@adaptabletools/adaptable 16.0.9 → 16.0.10-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/base.css +14 -14
- package/base.css.map +1 -1
- package/bundle.cjs.js +169 -169
- package/index.css +14 -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/AdaptableOptions.d.ts +2 -2
- package/src/AdaptableOptions/ChartingOptions.d.ts +40 -0
- package/src/AdaptableOptions/ColumnOptions.d.ts +17 -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 +3 -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/Implementation/AdaptableApiImpl.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -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/NotesApiImpl.d.ts +20 -0
- package/src/Api/Implementation/NotesApiImpl.js +58 -0
- package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -2
- package/src/Api/Implementation/OptionsApiImpl.js +2 -2
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +2 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +8 -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/NotesAPi.d.ts +50 -0
- package/src/Api/OptionsApi.d.ts +3 -3
- package/src/Api/UserInterfaceApi.d.ts +8 -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 +1 -1
- package/src/PredefinedConfig/Common/Types.d.ts +2 -2
- package/src/PredefinedConfig/Common/Types.js +1 -1
- package/src/PredefinedConfig/NotesState.d.ts +59 -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/DataSetModule.js +1 -0
- 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/{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 +6 -3
- package/src/Utilities/Constants/ModuleConstants.js +8 -5
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -1
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -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/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/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 +5 -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/Selectors/ColumnSelector.js +1 -1
- 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/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 +56 -30
- package/src/agGrid/agGridMenuHelper.js +4 -2
- 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/icons/index.js +2 -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 +72 -59
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +4 -4
- 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 → NotesOptions.js} +0 -0
- /package/src/Api/{CommentsApi.js → NotesAPi.js} +0 -0
- /package/src/PredefinedConfig/{CommentsState.js → NotesState.js} +0 -0
- /package/src/View/GridInfo/{AdaptableObjectsSummary.d.ts → GridInfoPopup/AdaptableObjectsSummary.d.ts} +0 -0
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
import { ChartModel } from '@ag-grid-community/core';
|
|
2
2
|
import { AdaptableObject } from '../types';
|
|
3
3
|
import { ConfigState } from './ConfigState';
|
|
4
|
+
export declare const isExternalChartDefinition: (chartDefinition: ChartDefinition | ExternalChartDefinition) => chartDefinition is ExternalChartDefinition<unknown>;
|
|
5
|
+
export declare const isAgChartDefinition: (chartDefinition: ChartDefinition | ExternalChartDefinition) => chartDefinition is ChartDefinition;
|
|
6
|
+
/**
|
|
7
|
+
* Wraps external chart definitions
|
|
8
|
+
* Can be used to store charts in Adaptable State
|
|
9
|
+
*/
|
|
10
|
+
export interface ExternalChartDefinition<T = unknown> extends AdaptableObject {
|
|
11
|
+
/**
|
|
12
|
+
* The name needs to be unique.
|
|
13
|
+
*/
|
|
14
|
+
Name: string;
|
|
15
|
+
/**
|
|
16
|
+
* Chart configuration. It can store any information needed to create the chart.
|
|
17
|
+
*/
|
|
18
|
+
Data: T;
|
|
19
|
+
/**
|
|
20
|
+
* Used to specify if the chart is saved in state or transient state.
|
|
21
|
+
* @defaultValue true
|
|
22
|
+
*/
|
|
23
|
+
IsPersisted?: boolean;
|
|
24
|
+
}
|
|
4
25
|
/**
|
|
5
26
|
* Wraps an AG Grid Chart Model
|
|
6
27
|
*/
|
|
@@ -22,6 +43,7 @@ export interface ChartingState extends ConfigState {
|
|
|
22
43
|
* Wrappers around AG Grid Chart Models
|
|
23
44
|
*/
|
|
24
45
|
ChartDefinitions?: ChartDefinition[];
|
|
46
|
+
ExternalChartDefinitions?: ExternalChartDefinition<unknown>[];
|
|
25
47
|
}
|
|
26
48
|
/**
|
|
27
49
|
* Aggregation function used in the Chart
|
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isAgChartDefinition = exports.isExternalChartDefinition = void 0;
|
|
4
|
+
const isExternalChartDefinition = (chartDefinition) => {
|
|
5
|
+
return chartDefinition && 'Data' in chartDefinition;
|
|
6
|
+
};
|
|
7
|
+
exports.isExternalChartDefinition = isExternalChartDefinition;
|
|
8
|
+
const isAgChartDefinition = (chartDefinition) => {
|
|
9
|
+
return chartDefinition && 'Model' in chartDefinition;
|
|
10
|
+
};
|
|
11
|
+
exports.isAgChartDefinition = isAgChartDefinition;
|
|
@@ -28,9 +28,21 @@ export declare const isValidOrderForColumnGroups: ({ oldColumns, newColumns, }:
|
|
|
28
28
|
* Defines a Column Group
|
|
29
29
|
*/
|
|
30
30
|
export interface AdaptableColumnGroup {
|
|
31
|
+
/**
|
|
32
|
+
* Whether the Group can be split
|
|
33
|
+
*/
|
|
31
34
|
allowGroupSplit: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Id for the Column Group
|
|
37
|
+
*/
|
|
32
38
|
columnGroupId: string;
|
|
39
|
+
/**
|
|
40
|
+
* Friendly name for the Group
|
|
41
|
+
*/
|
|
33
42
|
friendlyName: string;
|
|
43
|
+
/**
|
|
44
|
+
* Number of Columns in the the Group
|
|
45
|
+
*/
|
|
34
46
|
groupCount: number;
|
|
35
47
|
}
|
|
36
48
|
/**
|
|
@@ -54,4 +54,4 @@ export interface AdaptableBaseIcon {
|
|
|
54
54
|
/**
|
|
55
55
|
* All AdapTable System Icon names
|
|
56
56
|
*/
|
|
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' | 'dollar' | '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' | 'interactions' | 'less-than' | 'less-than-or-equal' | 'list' | 'logout' | 'mail' | 'menu' | 'minus' | 'multiplication' | 'money' | 'newpage' | 'news' | 'filled-circle' | 'not-contains' | 'not-equal' | 'open-in-new' | 'order' | 'organisation' | 'pause' | 'percent' | 'percent-tag' | 'person' | 'contact' | 'pie-chart' | 'play' | 'plus' | 'add-circle' | 'search' | 'search-table' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'science' | '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';
|
|
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' | 'dollar' | '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' | 'interactions' | 'less-than' | 'less-than-or-equal' | 'list' | 'logout' | 'mail' | 'menu' | 'minus' | 'multiplication' | 'money' | 'newpage' | 'news' | 'filled-circle' | 'not-contains' | 'not-equal' | 'open-in-new' | 'order' | 'organisation' | 'pause' | 'percent' | 'percent-tag' | 'person' | 'contact' | 'pie-chart' | 'play' | 'plus' | 'add-circle' | 'search' | 'search-table' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'science' | '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' | 'note';
|
|
@@ -62,7 +62,7 @@ export interface UserMenuItem<CONTEXT_TYPE extends BaseContext> {
|
|
|
62
62
|
/**
|
|
63
63
|
* Optional icon to display
|
|
64
64
|
*/
|
|
65
|
-
icon?: AdaptableIcon;
|
|
65
|
+
icon?: ((menuContext: CONTEXT_TYPE) => AdaptableIcon) | AdaptableIcon;
|
|
66
66
|
/**
|
|
67
67
|
* Array of Menu Items, enabling limitless levels of menus
|
|
68
68
|
*/
|
|
@@ -34,12 +34,12 @@ export declare type AdaptableStateKey = keyof AdaptablePersistentState | 'OpenFi
|
|
|
34
34
|
/**
|
|
35
35
|
* Modules provided by AdapTable, subject to Entitlements and usually have Predefined Config
|
|
36
36
|
*/
|
|
37
|
-
export declare type AdaptableModule = 'Alert' | 'BulkUpdate' | 'CalculatedColumn' | 'CellSummary' | 'Charting' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Fdc3' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'Glue42' | 'GridInfo' | 'IPushPull' | 'Layout' | 'OpenFin' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'Shortcut' | 'SmartEdit' | 'StyledColumn' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel' | '
|
|
37
|
+
export declare type AdaptableModule = 'Alert' | 'BulkUpdate' | 'CalculatedColumn' | 'CellSummary' | 'Charting' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Fdc3' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'Glue42' | 'GridInfo' | 'ColumnInfo' | 'IPushPull' | 'Layout' | 'OpenFin' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'Shortcut' | 'SmartEdit' | 'StyledColumn' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel' | 'Notes';
|
|
38
38
|
export declare const ALL_MODULES: AdaptableModule[];
|
|
39
39
|
/**
|
|
40
40
|
* Modules which can appear in the Settings Panel
|
|
41
41
|
*/
|
|
42
|
-
export declare type AdaptableSettingsPanel = 'Alert' | 'CalculatedColumn' | 'Charting' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'Layout' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'Shortcut' | 'StateManagement' | 'StatusBar' | 'StyledColumn' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel' | '
|
|
42
|
+
export declare type AdaptableSettingsPanel = 'Alert' | 'CalculatedColumn' | 'Charting' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'ColumnInfo' | 'Layout' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'Shortcut' | 'StateManagement' | 'StatusBar' | 'StyledColumn' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel' | 'Notes';
|
|
43
43
|
export declare type TypeHint<Base, Literals> = (Base & {
|
|
44
44
|
__subType?: true;
|
|
45
45
|
}) | Literals;
|
|
@@ -81,7 +81,7 @@ exports.ALL_MODULES = [
|
|
|
81
81
|
ModuleConstants.BulkUpdateModuleId,
|
|
82
82
|
ModuleConstants.CalculatedColumnModuleId,
|
|
83
83
|
ModuleConstants.CellSummaryModuleId,
|
|
84
|
-
ModuleConstants.
|
|
84
|
+
ModuleConstants.NotesModuleId,
|
|
85
85
|
ModuleConstants.ChartingModuleId,
|
|
86
86
|
ModuleConstants.CustomSortModuleId,
|
|
87
87
|
ModuleConstants.DashboardModuleId,
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { AdaptableObject } from '../types';
|
|
2
|
+
import { ConfigState } from './ConfigState';
|
|
3
|
+
/**
|
|
4
|
+
* Note that can be applied to a Cell in AdapTable
|
|
5
|
+
*/
|
|
6
|
+
export interface AdaptableNote extends AdaptableObject {
|
|
7
|
+
/**
|
|
8
|
+
* When Note was made
|
|
9
|
+
*/
|
|
10
|
+
Timestamp: number;
|
|
11
|
+
/**
|
|
12
|
+
* Value of the Note
|
|
13
|
+
*/
|
|
14
|
+
Value: string;
|
|
15
|
+
/**
|
|
16
|
+
* Author of the Note
|
|
17
|
+
*/
|
|
18
|
+
Author: {
|
|
19
|
+
UserName: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Value in Grid's Primary Key Column
|
|
23
|
+
*/
|
|
24
|
+
PrimaryKeyValue: any;
|
|
25
|
+
/**
|
|
26
|
+
* Id of Column containing the Note
|
|
27
|
+
*/
|
|
28
|
+
ColumnId: string;
|
|
29
|
+
/**
|
|
30
|
+
* Id of this AdapTable instance
|
|
31
|
+
*/
|
|
32
|
+
AdaptableId: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Collection of Cell Notes
|
|
36
|
+
*/
|
|
37
|
+
export declare type AdaptableNotes = AdaptableNote[];
|
|
38
|
+
/**
|
|
39
|
+
* Predefined Configuration for Notes Module
|
|
40
|
+
*/
|
|
41
|
+
export interface NotesState extends ConfigState {
|
|
42
|
+
/**
|
|
43
|
+
* Collection of AdapTable Notes
|
|
44
|
+
*/
|
|
45
|
+
Notes?: AdaptableNotes;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Cell that contains a Note
|
|
49
|
+
*/
|
|
50
|
+
export declare type NoteGridCell = {
|
|
51
|
+
/**
|
|
52
|
+
* Value in Primary Key Column
|
|
53
|
+
*/
|
|
54
|
+
PrimaryKeyValue: string | number;
|
|
55
|
+
/**
|
|
56
|
+
* Id of Column containing the Note
|
|
57
|
+
*/
|
|
58
|
+
ColumnId: string;
|
|
59
|
+
};
|
|
@@ -19,7 +19,7 @@ import { QueryState } from './QueryState';
|
|
|
19
19
|
import { StatusBarState } from './StatusBarState';
|
|
20
20
|
import { ChartingState } from './ChartingState';
|
|
21
21
|
import { StyledColumnState } from './StyledColumnState';
|
|
22
|
-
import {
|
|
22
|
+
import { NotesState } from './NotesState';
|
|
23
23
|
/**
|
|
24
24
|
* This is the main Predefined Config interface which developers will populate at design-time
|
|
25
25
|
*/
|
|
@@ -48,7 +48,7 @@ export interface PredefinedConfig {
|
|
|
48
48
|
* Supplies a collection of *Custom Sort* objects to allow some columns to be sorted in non-standard (e.g. non alphabetical) ways
|
|
49
49
|
*/
|
|
50
50
|
CustomSort?: CustomSortState;
|
|
51
|
-
|
|
51
|
+
Notes?: NotesState;
|
|
52
52
|
/**
|
|
53
53
|
* Large series of properties to give users full control over the look and feel of the *Dashboard* - the section above the grid with toolbars and buttons
|
|
54
54
|
*/
|
|
@@ -14,7 +14,8 @@ import { AdaptableFlashingCell } from './Common/AdaptableFlashingCell';
|
|
|
14
14
|
import { TypeUuid } from './Uuid';
|
|
15
15
|
import { SummaryOperation } from './Common/Enums';
|
|
16
16
|
import { ChartModel } from '@ag-grid-community/core';
|
|
17
|
-
import {
|
|
17
|
+
import { NoteGridCell } from './NotesState';
|
|
18
|
+
import { ExternalChartDefinition } from './ChartingState';
|
|
18
19
|
export type { IPushPullReport, IPushPullDomain };
|
|
19
20
|
export type { Glue42Report };
|
|
20
21
|
export type { OpenFinReport };
|
|
@@ -79,6 +80,7 @@ export interface SystemState extends InternalState, IPushPullState, Glue42State,
|
|
|
79
80
|
*/
|
|
80
81
|
Charting: {
|
|
81
82
|
currentChartModels: ChartModel[];
|
|
83
|
+
externalChartingDefinitions: ExternalChartDefinition<unknown>[];
|
|
82
84
|
};
|
|
83
85
|
/**
|
|
84
86
|
* Keeps session relevant information
|
|
@@ -98,9 +100,9 @@ export interface SystemState extends InternalState, IPushPullState, Glue42State,
|
|
|
98
100
|
QuickSearch?: {
|
|
99
101
|
floatingVisible?: boolean;
|
|
100
102
|
};
|
|
101
|
-
|
|
103
|
+
Notes?: {
|
|
102
104
|
editMode?: boolean;
|
|
103
|
-
popupPosition?:
|
|
105
|
+
popupPosition?: NoteGridCell | null;
|
|
104
106
|
};
|
|
105
107
|
}
|
|
106
108
|
export interface ProgressIndicator {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Redux from 'redux';
|
|
2
2
|
import { AdaptableState } from '../../../types';
|
|
3
|
-
import { ChartDefinition, ChartingState } from '../../PredefinedConfig/ChartingState';
|
|
3
|
+
import { ChartDefinition, ChartingState, ExternalChartDefinition } from '../../PredefinedConfig/ChartingState';
|
|
4
4
|
/**
|
|
5
5
|
* @ReduxAction Set AG Grid Charting Models
|
|
6
6
|
*/
|
|
@@ -21,6 +21,18 @@ export declare const CHARTING_ADD_CHART = "CHARTING_ADD_CHART";
|
|
|
21
21
|
* @ReduxAction Deelte chart definition
|
|
22
22
|
*/
|
|
23
23
|
export declare const CHARTING_DELETE_CHART = "CHARTING_DELETE_CHART";
|
|
24
|
+
/**
|
|
25
|
+
* @ReduxAction Edit chart definition
|
|
26
|
+
*/
|
|
27
|
+
export declare const CHARTING_EDIT_EXTERNAL_CHART = "CHARTING_EDIT_EXTERNAL_CHART";
|
|
28
|
+
/**
|
|
29
|
+
* @ReduxAction Add chart definition
|
|
30
|
+
*/
|
|
31
|
+
export declare const CHARTING_ADD_EXTERNAL_CHART = "CHARTING_ADD_EXTERNAL_CHART";
|
|
32
|
+
/**
|
|
33
|
+
* @ReduxAction Deelte chart definition
|
|
34
|
+
*/
|
|
35
|
+
export declare const CHARTING_DELETE_EXTERNAL_CHART = "CHARTING_DELETE_EXTERNAL_CHART";
|
|
24
36
|
export interface ChartingSetChartModelsAction extends Redux.Action {
|
|
25
37
|
charts: ChartDefinition[];
|
|
26
38
|
}
|
|
@@ -34,13 +46,26 @@ export interface ChartingAddChartAction extends Redux.Action {
|
|
|
34
46
|
chartDefinition: ChartDefinition;
|
|
35
47
|
}
|
|
36
48
|
export interface ChartingDeleteChartAction extends Redux.Action {
|
|
37
|
-
|
|
49
|
+
chartDefinition: ChartDefinition;
|
|
50
|
+
}
|
|
51
|
+
export interface ChartingEditExternalChartAction extends Redux.Action {
|
|
52
|
+
chartDefinition: ExternalChartDefinition;
|
|
53
|
+
}
|
|
54
|
+
export interface ChartingAddExternalChartAction extends Redux.Action {
|
|
55
|
+
chartDefinition: ExternalChartDefinition;
|
|
56
|
+
}
|
|
57
|
+
export interface ChartingDeleteExternalChartAction extends Redux.Action {
|
|
58
|
+
chartDefinition: ExternalChartDefinition;
|
|
38
59
|
}
|
|
39
60
|
export declare const ChartingSetChartModels: (charts: ChartDefinition[]) => ChartingSetChartModelsAction;
|
|
40
61
|
export declare const ChartingReady: (chartingState: ChartingState) => ChartingReadyAction;
|
|
41
62
|
export declare const ChartingEditChart: (chartDefinition: ChartDefinition) => ChartingEditChartAction;
|
|
42
63
|
export declare const ChartingAddChart: (chartDefinition: ChartDefinition) => ChartingAddChartAction;
|
|
43
|
-
export declare const ChartingDeleteChart: (
|
|
64
|
+
export declare const ChartingDeleteChart: (chartDefinition: ChartDefinition) => ChartingDeleteChartAction;
|
|
65
|
+
export declare const ChartingEditExternalChart: (chartDefinition: ExternalChartDefinition) => ChartingEditExternalChartAction;
|
|
66
|
+
export declare const ChartingAddExternalChart: (chartDefinition: ExternalChartDefinition) => ChartingAddExternalChartAction;
|
|
67
|
+
export declare const ChartingDeleteExternalChart: (chartDefinition: ExternalChartDefinition) => ChartingDeleteExternalChartAction;
|
|
44
68
|
export declare const initialState: ChartingState;
|
|
45
69
|
export declare const ChartingGetChartModels: (state: AdaptableState) => ChartDefinition[];
|
|
70
|
+
export declare const ChartingGetExternalChartDefinitions: (state: AdaptableState) => ExternalChartDefinition[];
|
|
46
71
|
export declare const ChartingReducer: Redux.Reducer<ChartingState>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChartingReducer = exports.ChartingGetChartModels = exports.initialState = exports.ChartingDeleteChart = exports.ChartingAddChart = exports.ChartingEditChart = exports.ChartingReady = exports.ChartingSetChartModels = exports.CHARTING_DELETE_CHART = exports.CHARTING_ADD_CHART = exports.CHARTING_EDIT_CHART = exports.CHARTING_READY = exports.SET_CHARTING_CHARTS = void 0;
|
|
3
|
+
exports.ChartingReducer = exports.ChartingGetExternalChartDefinitions = exports.ChartingGetChartModels = exports.initialState = exports.ChartingDeleteExternalChart = exports.ChartingAddExternalChart = exports.ChartingEditExternalChart = exports.ChartingDeleteChart = exports.ChartingAddChart = exports.ChartingEditChart = exports.ChartingReady = exports.ChartingSetChartModels = exports.CHARTING_DELETE_EXTERNAL_CHART = exports.CHARTING_ADD_EXTERNAL_CHART = exports.CHARTING_EDIT_EXTERNAL_CHART = exports.CHARTING_DELETE_CHART = exports.CHARTING_ADD_CHART = exports.CHARTING_EDIT_CHART = exports.CHARTING_READY = exports.SET_CHARTING_CHARTS = void 0;
|
|
4
4
|
const Uuid_1 = require("../../PredefinedConfig/Uuid");
|
|
5
5
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
6
6
|
/**
|
|
@@ -23,6 +23,18 @@ exports.CHARTING_ADD_CHART = 'CHARTING_ADD_CHART';
|
|
|
23
23
|
* @ReduxAction Deelte chart definition
|
|
24
24
|
*/
|
|
25
25
|
exports.CHARTING_DELETE_CHART = 'CHARTING_DELETE_CHART';
|
|
26
|
+
/**
|
|
27
|
+
* @ReduxAction Edit chart definition
|
|
28
|
+
*/
|
|
29
|
+
exports.CHARTING_EDIT_EXTERNAL_CHART = 'CHARTING_EDIT_EXTERNAL_CHART';
|
|
30
|
+
/**
|
|
31
|
+
* @ReduxAction Add chart definition
|
|
32
|
+
*/
|
|
33
|
+
exports.CHARTING_ADD_EXTERNAL_CHART = 'CHARTING_ADD_EXTERNAL_CHART';
|
|
34
|
+
/**
|
|
35
|
+
* @ReduxAction Deelte chart definition
|
|
36
|
+
*/
|
|
37
|
+
exports.CHARTING_DELETE_EXTERNAL_CHART = 'CHARTING_DELETE_EXTERNAL_CHART';
|
|
26
38
|
const ChartingSetChartModels = (charts) => ({
|
|
27
39
|
charts,
|
|
28
40
|
type: exports.SET_CHARTING_CHARTS,
|
|
@@ -43,16 +55,34 @@ const ChartingAddChart = (chartDefinition) => ({
|
|
|
43
55
|
chartDefinition,
|
|
44
56
|
});
|
|
45
57
|
exports.ChartingAddChart = ChartingAddChart;
|
|
46
|
-
const ChartingDeleteChart = (
|
|
58
|
+
const ChartingDeleteChart = (chartDefinition) => ({
|
|
47
59
|
type: exports.CHARTING_DELETE_CHART,
|
|
48
|
-
|
|
60
|
+
chartDefinition,
|
|
49
61
|
});
|
|
50
62
|
exports.ChartingDeleteChart = ChartingDeleteChart;
|
|
63
|
+
const ChartingEditExternalChart = (chartDefinition) => ({
|
|
64
|
+
type: exports.CHARTING_EDIT_EXTERNAL_CHART,
|
|
65
|
+
chartDefinition,
|
|
66
|
+
});
|
|
67
|
+
exports.ChartingEditExternalChart = ChartingEditExternalChart;
|
|
68
|
+
const ChartingAddExternalChart = (chartDefinition) => ({
|
|
69
|
+
type: exports.CHARTING_ADD_EXTERNAL_CHART,
|
|
70
|
+
chartDefinition,
|
|
71
|
+
});
|
|
72
|
+
exports.ChartingAddExternalChart = ChartingAddExternalChart;
|
|
73
|
+
const ChartingDeleteExternalChart = (chartDefinition) => ({
|
|
74
|
+
type: exports.CHARTING_DELETE_EXTERNAL_CHART,
|
|
75
|
+
chartDefinition,
|
|
76
|
+
});
|
|
77
|
+
exports.ChartingDeleteExternalChart = ChartingDeleteExternalChart;
|
|
51
78
|
exports.initialState = {
|
|
52
79
|
ChartDefinitions: GeneralConstants_1.EMPTY_ARRAY,
|
|
80
|
+
ExternalChartDefinitions: GeneralConstants_1.EMPTY_ARRAY,
|
|
53
81
|
};
|
|
54
|
-
const ChartingGetChartModels = (state) => state.Charting.ChartDefinitions;
|
|
82
|
+
const ChartingGetChartModels = (state) => { var _a; return (_a = state.Charting.ChartDefinitions) !== null && _a !== void 0 ? _a : []; };
|
|
55
83
|
exports.ChartingGetChartModels = ChartingGetChartModels;
|
|
84
|
+
const ChartingGetExternalChartDefinitions = (state) => { var _a; return (_a = state.Charting.ExternalChartDefinitions) !== null && _a !== void 0 ? _a : []; };
|
|
85
|
+
exports.ChartingGetExternalChartDefinitions = ChartingGetExternalChartDefinitions;
|
|
56
86
|
const ChartingReducer = (state = exports.initialState, action) => {
|
|
57
87
|
switch (action.type) {
|
|
58
88
|
case exports.SET_CHARTING_CHARTS:
|
|
@@ -71,7 +101,24 @@ const ChartingReducer = (state = exports.initialState, action) => {
|
|
|
71
101
|
}
|
|
72
102
|
return Object.assign(Object.assign({}, state), { ChartDefinitions: [...state.ChartDefinitions, chartDefinition] });
|
|
73
103
|
case exports.CHARTING_DELETE_CHART:
|
|
74
|
-
return Object.assign(Object.assign({}, state), { ChartDefinitions: state.ChartDefinitions.filter((chartDefinition) => chartDefinition.Name !== action.
|
|
104
|
+
return Object.assign(Object.assign({}, state), { ChartDefinitions: state.ChartDefinitions.filter((chartDefinition) => chartDefinition.Name !== action.chartDefinition.Name) });
|
|
105
|
+
case exports.CHARTING_EDIT_EXTERNAL_CHART:
|
|
106
|
+
return Object.assign(Object.assign({}, state), { ExternalChartDefinitions: state.ExternalChartDefinitions.map((chartDefinition) => {
|
|
107
|
+
if (chartDefinition.Uuid ===
|
|
108
|
+
action.chartDefinition.Uuid) {
|
|
109
|
+
return action.chartDefinition;
|
|
110
|
+
}
|
|
111
|
+
return chartDefinition;
|
|
112
|
+
}) });
|
|
113
|
+
case exports.CHARTING_ADD_EXTERNAL_CHART:
|
|
114
|
+
let externalChartDefinition = action.chartDefinition;
|
|
115
|
+
if (!('Uuid' in externalChartDefinition)) {
|
|
116
|
+
externalChartDefinition = Object.assign(Object.assign({}, externalChartDefinition), { Uuid: (0, Uuid_1.createUuid)() });
|
|
117
|
+
}
|
|
118
|
+
return Object.assign(Object.assign({}, state), { ExternalChartDefinitions: [...state.ExternalChartDefinitions, externalChartDefinition] });
|
|
119
|
+
case exports.CHARTING_DELETE_EXTERNAL_CHART:
|
|
120
|
+
return Object.assign(Object.assign({}, state), { ExternalChartDefinitions: state.ExternalChartDefinitions.filter((chartDefinition) => chartDefinition.Name !==
|
|
121
|
+
action.chartDefinition.Name) });
|
|
75
122
|
}
|
|
76
123
|
return state;
|
|
77
124
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AdaptableNote, NotesState } from '../../PredefinedConfig/NotesState';
|
|
2
|
+
import * as Redux from 'redux';
|
|
3
|
+
/**
|
|
4
|
+
* @ReduxAction A Notes has been added
|
|
5
|
+
*/
|
|
6
|
+
export declare const NOTES_ADD = "NOTES_ADD";
|
|
7
|
+
/**
|
|
8
|
+
* @ReduxAction A Notes has been edited
|
|
9
|
+
*/
|
|
10
|
+
export declare const NOTES_EDIT = "NOTES_EDIT";
|
|
11
|
+
/**
|
|
12
|
+
* @ReduxAction A Notes has been deleted
|
|
13
|
+
*/
|
|
14
|
+
export declare const NOTES_DELETE = "NOTES_DELETE";
|
|
15
|
+
/**
|
|
16
|
+
* @ReduxAction Notes Module is ready
|
|
17
|
+
*/
|
|
18
|
+
export declare const NOTES_READY = "NOTES_READY";
|
|
19
|
+
export interface AdaptableNoteAction extends Redux.Action {
|
|
20
|
+
adaptableNote: AdaptableNote;
|
|
21
|
+
}
|
|
22
|
+
export interface AdaptableNotesAddAction extends AdaptableNoteAction {
|
|
23
|
+
}
|
|
24
|
+
export interface AdaptableNotesEditAction extends AdaptableNoteAction {
|
|
25
|
+
}
|
|
26
|
+
export interface AdaptableNotesDeleteAction extends AdaptableNoteAction {
|
|
27
|
+
}
|
|
28
|
+
export interface NoteReadyAction extends Redux.Action {
|
|
29
|
+
notesState: NotesState;
|
|
30
|
+
}
|
|
31
|
+
export declare const NotesAdd: (note: AdaptableNote) => AdaptableNotesAddAction;
|
|
32
|
+
export declare const NotesEdit: (note: AdaptableNote) => AdaptableNotesEditAction;
|
|
33
|
+
export declare const NotesDelete: (note: AdaptableNote) => AdaptableNotesDeleteAction;
|
|
34
|
+
export declare const NotesReady: (note: NotesState) => NoteReadyAction;
|
|
35
|
+
export declare const GetNotesSelector: (state: NotesState, config?: {
|
|
36
|
+
PrimaryKeyValue: string | number;
|
|
37
|
+
ColumnId: string;
|
|
38
|
+
}) => import("../../PredefinedConfig/NotesState").AdaptableNotes;
|
|
39
|
+
export declare const NotesReducer: Redux.Reducer<NotesState>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotesReducer = exports.GetNotesSelector = exports.NotesReady = exports.NotesDelete = exports.NotesEdit = exports.NotesAdd = exports.NOTES_READY = exports.NOTES_DELETE = exports.NOTES_EDIT = exports.NOTES_ADD = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
|
|
6
|
+
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
7
|
+
/**
|
|
8
|
+
* @ReduxAction A Notes has been added
|
|
9
|
+
*/
|
|
10
|
+
exports.NOTES_ADD = 'NOTES_ADD';
|
|
11
|
+
/**
|
|
12
|
+
* @ReduxAction A Notes has been edited
|
|
13
|
+
*/
|
|
14
|
+
exports.NOTES_EDIT = 'NOTES_EDIT';
|
|
15
|
+
/**
|
|
16
|
+
* @ReduxAction A Notes has been deleted
|
|
17
|
+
*/
|
|
18
|
+
exports.NOTES_DELETE = 'NOTES_DELETE';
|
|
19
|
+
/**
|
|
20
|
+
* @ReduxAction Notes Module is ready
|
|
21
|
+
*/
|
|
22
|
+
exports.NOTES_READY = 'NOTES_READY';
|
|
23
|
+
const NotesAdd = (note) => ({
|
|
24
|
+
type: exports.NOTES_ADD,
|
|
25
|
+
adaptableNote: note,
|
|
26
|
+
});
|
|
27
|
+
exports.NotesAdd = NotesAdd;
|
|
28
|
+
const NotesEdit = (note) => ({
|
|
29
|
+
type: exports.NOTES_EDIT,
|
|
30
|
+
adaptableNote: note,
|
|
31
|
+
});
|
|
32
|
+
exports.NotesEdit = NotesEdit;
|
|
33
|
+
const NotesDelete = (note) => ({
|
|
34
|
+
type: exports.NOTES_DELETE,
|
|
35
|
+
adaptableNote: note,
|
|
36
|
+
});
|
|
37
|
+
exports.NotesDelete = NotesDelete;
|
|
38
|
+
const NotesReady = (note) => ({
|
|
39
|
+
type: exports.NOTES_READY,
|
|
40
|
+
notesState: note,
|
|
41
|
+
});
|
|
42
|
+
exports.NotesReady = NotesReady;
|
|
43
|
+
const GetNotesSelector = (state, config) => {
|
|
44
|
+
var _a, _b;
|
|
45
|
+
if (!config) {
|
|
46
|
+
return (_a = state === null || state === void 0 ? void 0 : state.Notes) !== null && _a !== void 0 ? _a : [];
|
|
47
|
+
}
|
|
48
|
+
return ((_b = state === null || state === void 0 ? void 0 : state.Notes) !== null && _b !== void 0 ? _b : []).filter((note) => {
|
|
49
|
+
if (note.PrimaryKeyValue === config.PrimaryKeyValue && note.ColumnId === config.ColumnId) {
|
|
50
|
+
// happy check
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
// Primary keys retreived from the grid dom are always strings, so we must also consider them strings
|
|
54
|
+
if ((typeof config.PrimaryKeyValue === 'number' && typeof note.PrimaryKeyValue === 'string') ||
|
|
55
|
+
(typeof config.PrimaryKeyValue === 'string' && typeof note.PrimaryKeyValue === 'number')) {
|
|
56
|
+
return (note.PrimaryKeyValue.toString() === config.PrimaryKeyValue.toString() &&
|
|
57
|
+
note.ColumnId === config.ColumnId);
|
|
58
|
+
}
|
|
59
|
+
return false;
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
exports.GetNotesSelector = GetNotesSelector;
|
|
63
|
+
const initialState = {
|
|
64
|
+
Notes: GeneralConstants_1.EMPTY_ARRAY,
|
|
65
|
+
};
|
|
66
|
+
const NotesReducer = (state = initialState, action) => {
|
|
67
|
+
let adaptableNotes;
|
|
68
|
+
switch (action.type) {
|
|
69
|
+
case exports.NOTES_ADD: {
|
|
70
|
+
const note = action.adaptableNote;
|
|
71
|
+
AdaptableHelper_1.default.addUuidAndSource(note);
|
|
72
|
+
adaptableNotes = [].concat(state.Notes);
|
|
73
|
+
adaptableNotes.push(note);
|
|
74
|
+
return Object.assign(Object.assign({}, state), { Notes: adaptableNotes });
|
|
75
|
+
}
|
|
76
|
+
case exports.NOTES_EDIT: {
|
|
77
|
+
const note = action.adaptableNote;
|
|
78
|
+
return Object.assign(Object.assign({}, state), { Notes: state.Notes.map((abObject) => (abObject.Uuid === note.Uuid ? note : abObject)) });
|
|
79
|
+
}
|
|
80
|
+
case exports.NOTES_DELETE: {
|
|
81
|
+
const note = action.adaptableNote;
|
|
82
|
+
return Object.assign(Object.assign({}, state), { Notes: state.Notes.filter((abObject) => abObject.Uuid !== note.Uuid) });
|
|
83
|
+
}
|
|
84
|
+
default:
|
|
85
|
+
return state;
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
exports.NotesReducer = NotesReducer;
|
|
@@ -14,7 +14,7 @@ import { SummaryOperation } from '../../PredefinedConfig/Common/Enums';
|
|
|
14
14
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
15
15
|
import { RowsHighlightInfo } from '../../PredefinedConfig/Common/RowsHighlightInfo';
|
|
16
16
|
import { SmartEditOperation } from '../../AdaptableOptions/EditOptions';
|
|
17
|
-
import {
|
|
17
|
+
import { DataSet, NoteGridCell } from '../../types';
|
|
18
18
|
import { ChartModel } from '@ag-grid-community/core';
|
|
19
19
|
export declare const FLASHING_CELL_ROW_KEY = "__ROW";
|
|
20
20
|
export declare const SYSTEM_ALERT_ADD = "SYSTEM_ALERT_ADD";
|
|
@@ -74,8 +74,8 @@ export declare const SYSTEM_SET_PREVIOUS_GROUPED_COLUMN_INDEX = "SYSTEM_SET_PREV
|
|
|
74
74
|
export declare const SYSTEM_SET_QUICK_SEARCH_FLOATING_VISIBILITY = "SYSTEM_SET_QUICK_SEARCH_FLOATING_VISIBILITY";
|
|
75
75
|
export declare const SYSTEM_VISUAL_EXPORT_BEGIN = "SYSTEM_VISUAL_EXPORT_BEGIN";
|
|
76
76
|
export declare const SYSTEM_VISUAL_EXPORT_END = "SYSTEM_VISUAL_EXPORT_END";
|
|
77
|
-
export declare const
|
|
78
|
-
export declare const
|
|
77
|
+
export declare const SYSTEM_NOTESS_SHOW = "SYSTEM_NOTES_SHOW";
|
|
78
|
+
export declare const SYSTEM_NOTS_HIDE = "SYSTEM_NOTES_HIDE";
|
|
79
79
|
export interface SystemHighlightCellAddAction extends Redux.Action {
|
|
80
80
|
cellHighlightInfo: CellHighlightInfo;
|
|
81
81
|
}
|
|
@@ -255,11 +255,11 @@ export interface SystemVisualExportEndAction extends Redux.Action {
|
|
|
255
255
|
export interface SystemQuickSearchFloatingVisibilityAction extends Redux.Action {
|
|
256
256
|
visible: boolean;
|
|
257
257
|
}
|
|
258
|
-
export interface
|
|
259
|
-
cellPosition:
|
|
258
|
+
export interface SystemNotesShowAction extends Redux.Action {
|
|
259
|
+
cellPosition: NoteGridCell;
|
|
260
260
|
editMode?: boolean;
|
|
261
261
|
}
|
|
262
|
-
export interface
|
|
262
|
+
export interface SystemNotesHideAction extends Redux.Action {
|
|
263
263
|
}
|
|
264
264
|
export declare const SystemHighlightCellAdd: (cellHighlightInfo: CellHighlightInfo) => SystemHighlightCellAddAction;
|
|
265
265
|
export declare const SystemHighlightCellDelete: (primaryKeyValue: CellHighlightInfo['primaryKeyValue'], columnId: CellHighlightInfo['columnId']) => SystemHighlightCellDeleteAction;
|
|
@@ -318,11 +318,11 @@ export declare const SystemDisableDeleteConfirmation: () => SystemDisableDeleteC
|
|
|
318
318
|
export declare const SystemVisualExportBegin: () => SystemVisualExportBeginAction;
|
|
319
319
|
export declare const SystemVisualExportEnd: () => SystemVisualExportEndAction;
|
|
320
320
|
export declare const SystemQuickSearchFloatingVisibility: (visible: boolean) => SystemQuickSearchFloatingVisibilityAction;
|
|
321
|
-
export declare const
|
|
322
|
-
export declare const
|
|
321
|
+
export declare const SystemNotesShow: (cellPosition: NoteGridCell, editMode?: boolean) => SystemNotesShowAction;
|
|
322
|
+
export declare const SystemNoteHide: () => SystemNotesHideAction;
|
|
323
323
|
export declare const SystemDisableDeleteConfirmationSelector: (state: SystemState) => boolean;
|
|
324
324
|
export declare const SystemPreviousGroupedColumnsSelector: (state: SystemState) => Record<string, Record<string, number>>;
|
|
325
325
|
export declare const SystemQuickSearchFloatingVisibilitySelector: (state: SystemState) => boolean;
|
|
326
|
-
export declare const
|
|
327
|
-
export declare const
|
|
326
|
+
export declare const SystemNotesSelector: (state: SystemState) => NoteGridCell;
|
|
327
|
+
export declare const SystemNotesEditModeSelector: (state: SystemState) => boolean;
|
|
328
328
|
export declare const SystemReducer: Redux.Reducer<SystemState>;
|