@adaptabletools/adaptable 11.1.7 → 11.1.10
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 +16 -0
- package/bundle.cjs.js +106 -106
- package/index.css +20 -0
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +1 -1
- package/src/AdaptableOptions/AlertOptions.d.ts +9 -2
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +57 -16
- package/src/AdaptableOptions/GeneralOptions.d.ts +7 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +7 -0
- package/src/Api/AdaptableApi.d.ts +5 -0
- package/src/Api/CellSummaryApi.d.ts +8 -0
- package/src/Api/ColumnApi.d.ts +6 -1
- package/src/Api/ConfigApi.d.ts +8 -2
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
- package/src/Api/Implementation/AlertApiImpl.js +32 -15
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +2 -0
- package/src/Api/Implementation/CellSummaryApiImpl.js +34 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -1
- package/src/Api/Implementation/ColumnApiImpl.js +7 -3
- package/src/Api/Implementation/ConfigApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ConfigApiImpl.js +8 -29
- package/src/Api/Implementation/GridApiImpl.js +0 -4
- package/src/Api/Implementation/InternalApiImpl.d.ts +2 -1
- package/src/Api/Implementation/InternalApiImpl.js +29 -7
- package/src/Api/Implementation/LayoutApiImpl.d.ts +5 -4
- package/src/Api/Implementation/LayoutApiImpl.js +13 -7
- package/src/Api/Implementation/QueryApiImpl.d.ts +1 -0
- package/src/Api/Implementation/QueryApiImpl.js +12 -0
- package/src/Api/Implementation/StatusBarApiImpl.d.ts +8 -0
- package/src/Api/Implementation/StatusBarApiImpl.js +17 -0
- package/src/Api/InternalApi.d.ts +2 -1
- package/src/Api/LayoutApi.d.ts +16 -9
- package/src/Api/QueryApi.d.ts +6 -0
- package/src/Api/StatusBarApi.d.ts +10 -0
- package/src/Api/StatusBarApi.js +2 -0
- package/src/PredefinedConfig/AdaptableState.d.ts +20 -8
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +61 -29
- package/src/PredefinedConfig/Common/Types.d.ts +6 -3
- package/src/PredefinedConfig/Common/Types.js +32 -1
- package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
- package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
- package/src/PredefinedConfig/GridState.d.ts +1 -1
- package/src/PredefinedConfig/PredefinedConfig.d.ts +5 -0
- package/src/PredefinedConfig/StatusBarState.d.ts +27 -0
- package/src/PredefinedConfig/StatusBarState.js +7 -0
- package/src/PredefinedConfig/ToolPanelState.d.ts +1 -1
- package/src/Redux/ActionsReducers/GridRedux.d.ts +2 -2
- package/src/Redux/ActionsReducers/GridRedux.js +4 -4
- package/src/Redux/ActionsReducers/StatusBarRedux.d.ts +22 -0
- package/src/Redux/ActionsReducers/StatusBarRedux.js +31 -0
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +8 -3
- package/src/Redux/ActionsReducers/SystemRedux.js +22 -5
- package/src/Redux/Store/AdaptableReduxMerger.js +2 -2
- package/src/Redux/Store/AdaptableStore.js +24 -10
- package/src/Strategy/AlertModule.d.ts +3 -0
- package/src/Strategy/AlertModule.js +6 -0
- package/src/Strategy/CellSummaryModule.d.ts +6 -0
- package/src/Strategy/CellSummaryModule.js +14 -0
- package/src/Strategy/DataChangeHistoryModule.d.ts +7 -0
- package/src/Strategy/DataChangeHistoryModule.js +11 -0
- package/src/Strategy/ExportModule.d.ts +1 -0
- package/src/Strategy/ExportModule.js +1 -0
- package/src/Strategy/FilterModule.d.ts +6 -0
- package/src/Strategy/FilterModule.js +21 -0
- package/src/Strategy/Interface/IModule.d.ts +21 -10
- package/src/Strategy/LayoutModule.d.ts +7 -0
- package/src/Strategy/LayoutModule.js +14 -1
- package/src/Strategy/QueryModule.d.ts +8 -0
- package/src/Strategy/QueryModule.js +18 -0
- package/src/Strategy/QuickSearchModule.d.ts +6 -0
- package/src/Strategy/QuickSearchModule.js +10 -0
- package/src/Strategy/StatusBarModule.d.ts +8 -0
- package/src/Strategy/StatusBarModule.js +39 -0
- package/src/Strategy/SystemStatusModule.d.ts +6 -0
- package/src/Strategy/SystemStatusModule.js +10 -0
- package/src/Strategy/ThemeModule.d.ts +7 -0
- package/src/Strategy/ThemeModule.js +12 -0
- package/src/Strategy/Utilities/getAlertBehaviourViewItems.js +1 -1
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +2 -1
- package/src/Utilities/Constants/ModuleConstants.d.ts +1 -0
- package/src/Utilities/Constants/ModuleConstants.js +2 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +4 -1
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -0
- package/src/Utilities/Services/ModuleService.js +6 -6
- package/src/View/AdaptablePopover/index.d.ts +1 -0
- package/src/View/AdaptablePopover/index.js +5 -2
- package/src/View/AdaptableViewFactory.js +2 -2
- package/src/View/Alert/AlertStatusSubPanel.d.ts +2 -0
- package/src/View/Alert/AlertStatusSubPanel.js +56 -0
- package/src/View/Alert/AlertViewPanel.js +6 -7
- package/src/View/Alert/AlertsPanel.d.ts +1 -1
- package/src/View/Alert/AlertsPanel.js +2 -1
- package/src/View/Alert/Utilities/getAlertButtonStyle.d.ts +5 -0
- package/src/View/Alert/Utilities/getAlertButtonStyle.js +15 -0
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +18 -7
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +1 -8
- package/src/View/Alert/Wizard/AlertWizard.js +3 -2
- package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.d.ts +2 -0
- package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +15 -0
- package/src/View/CellSummary/CellSummaryStatusPanel.d.ts +2 -0
- package/src/View/CellSummary/CellSummaryStatusPanel.js +36 -0
- package/src/View/CellSummary/CellSummaryViewPanel.js +2 -20
- package/src/View/ColorPicker.d.ts +1 -1
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableInput/index.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonDelete.d.ts +1 -1
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
- package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +1 -1
- package/src/View/Components/Forms/AdaptableFormControlTextClear.js +1 -1
- package/src/View/Components/Panels/PanelWithImage.d.ts +6 -6
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +5 -4
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +1 -1
- package/src/View/Components/RangesComponent.js +6 -2
- package/src/View/Components/StyleComponent.js +18 -6
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +3 -3
- package/src/View/Dashboard/DashboardPopup.js +2 -2
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +5 -13
- package/src/View/DataChangeHistory/DataChangeHistoryStatusBarContent.d.ts +2 -0
- package/src/View/DataChangeHistory/DataChangeHistoryStatusBarContent.js +9 -0
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.d.ts +4 -16
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +32 -40
- package/src/View/Filter/ActiveFiltersPanel.d.ts +0 -2
- package/src/View/Filter/FilterStatusBarSubPanelPopover.d.ts +2 -0
- package/src/View/Filter/FilterStatusBarSubPanelPopover.js +18 -0
- package/src/View/Filter/FilterViewPanel.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +4 -1
- package/src/View/Layout/EditCurrentLayoutButton.d.ts +2 -0
- package/src/View/Layout/EditCurrentLayoutButton.js +14 -0
- package/src/View/Layout/LayoutPopup.d.ts +1 -1
- package/src/View/Layout/LayoutPopup.js +3 -3
- package/src/View/Layout/LayoutRadioSelector.d.ts +1 -0
- package/src/View/Layout/LayoutRadioSelector.js +2 -2
- package/src/View/Layout/LayoutStatusBarSubPanelPopover.d.ts +2 -0
- package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +29 -0
- package/src/View/Layout/Wizard/LayoutEditor/ColumnLabels.js +2 -1
- package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditorWizard.js +2 -1
- package/src/View/Query/EditCurrentQueryButton.d.ts +2 -0
- package/src/View/Query/EditCurrentQueryButton.js +15 -0
- package/src/View/Query/QueryViewPanel.d.ts +0 -1
- package/src/View/Query/QueryViewPanel.js +2 -11
- package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
- package/src/View/QuickSearch/QuickSearchStatusBarContent.d.ts +2 -0
- package/src/View/QuickSearch/QuickSearchStatusBarContent.js +16 -0
- package/src/View/StateManagement/StateManagementPopup.js +9 -7
- package/src/View/StateManagement/StateManagementViewPanel.js +1 -2
- package/src/View/StateManagement/components/ExportDropdown.d.ts +1 -1
- package/src/View/StateManagement/components/ExportDropdown.js +3 -7
- package/src/View/StateManagement/handleExportState.d.ts +1 -1
- package/src/View/StatusBar/AdaptableStatusBar.d.ts +3 -0
- package/src/View/StatusBar/AdaptableStatusBar.js +44 -0
- package/src/View/StatusBar/StatusBarPanel.d.ts +42 -0
- package/src/View/StatusBar/StatusBarPanel.js +45 -0
- package/src/View/StatusBar/StatusBarPopup.d.ts +3 -0
- package/src/View/StatusBar/StatusBarPopup.js +43 -0
- package/src/View/SystemStatus/SystemStatusStatusBarContent.d.ts +2 -0
- package/src/View/SystemStatus/SystemStatusStatusBarContent.js +15 -0
- package/src/View/SystemStatus/SystemStatusViewPanel.js +3 -7
- package/src/View/SystemStatus/Utilities/getStatusItemStyle.d.ts +5 -0
- package/src/View/SystemStatus/Utilities/getStatusItemStyle.js +16 -0
- package/src/View/Theme/ThemeStatusPanelPopover.d.ts +2 -0
- package/src/View/Theme/ThemeStatusPanelPopover.js +36 -0
- package/src/agGrid/Adaptable.d.ts +2 -0
- package/src/agGrid/Adaptable.js +30 -3
- package/src/agGrid/agGridHelper.js +2 -0
- package/src/agGrid/agGridMenuHelper.js +2 -2
- package/src/agGrid/createAgStatusPanelComponent.d.ts +21 -0
- package/src/agGrid/createAgStatusPanelComponent.js +31 -0
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +1 -1
- package/src/components/Dashboard/DashboardManager.js +9 -162
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/DragAndDropContext/DragAndDropContext.d.ts +7 -0
- package/src/components/DragAndDropContext/DragAndDropContext.js +14 -0
- package/src/components/DragAndDropContext/ModuleManager.d.ts +17 -0
- package/src/components/DragAndDropContext/ModuleManager.js +81 -0
- package/src/components/DragAndDropContext/TabList.d.ts +29 -0
- package/src/components/DragAndDropContext/TabList.js +72 -0
- package/src/components/DragAndDropContext/UnusedPanel.d.ts +6 -0
- package/src/components/DragAndDropContext/UnusedPanel.js +46 -0
- package/src/components/DragAndDropContext/types.d.ts +8 -0
- package/src/components/DragAndDropContext/types.js +2 -0
- package/src/components/FormLayout/index.d.ts +1 -0
- package/src/components/Input/index.d.ts +1 -1
- package/src/components/List/ListGroupItem/index.d.ts +1 -1
- package/src/components/PopupWithFooter.d.ts +1 -1
- package/src/components/SimpleButton/index.js +3 -0
- package/src/components/Textarea/index.d.ts +1 -1
- package/src/components/icons/DefaultIcon.d.ts +2 -1
- package/src/components/icons/DefaultIcon.js +2 -2
- package/src/components/icons/index.js +2 -0
- package/src/components/icons/statusbar.d.ts +3 -0
- package/src/components/icons/statusbar.js +8 -0
- package/src/metamodel/adaptable.metamodel.d.ts +236 -0
- package/src/metamodel/adaptable.metamodel.js +466 -47
- package/src/types.d.ts +5 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -7,6 +7,7 @@ const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/Mod
|
|
|
7
7
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
|
|
8
8
|
const FilterRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/FilterRedux"));
|
|
9
9
|
const LoggingHelper_1 = require("../Utilities/Helpers/LoggingHelper");
|
|
10
|
+
const FilterStatusBarSubPanelPopover_1 = require("../View/Filter/FilterStatusBarSubPanelPopover");
|
|
10
11
|
class FilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
11
12
|
constructor(api) {
|
|
12
13
|
super(ModuleConstants.FilterModuleId, 'Filter', 'column-filter', 'FilterPopup', 'Advanced filtering capability allows users to see precisely the data they want', api);
|
|
@@ -95,6 +96,7 @@ class FilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
95
96
|
return this.getModuleAdaptableObjects().map((filter) => this.toView(filter));
|
|
96
97
|
}
|
|
97
98
|
getViewProperties() {
|
|
99
|
+
const api = this.api;
|
|
98
100
|
return {
|
|
99
101
|
getDeleteAction: FilterRedux.ColumnFilterClear,
|
|
100
102
|
emptyView: `
|
|
@@ -102,6 +104,25 @@ class FilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
102
104
|
|
|
103
105
|
Create column filters by using the filter dropdown the Quick Filter Bar or the Filter Form in the Column Header Menu.
|
|
104
106
|
`,
|
|
107
|
+
getStatusBarPanelProps() {
|
|
108
|
+
let text;
|
|
109
|
+
const filters = api.filterApi.getAllColumnFilter();
|
|
110
|
+
if (filters.length === 0) {
|
|
111
|
+
text = '0 Filters';
|
|
112
|
+
}
|
|
113
|
+
else if (filters.length === 1) {
|
|
114
|
+
text = '1 Filter';
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
text = filters.length + ' Filters';
|
|
118
|
+
}
|
|
119
|
+
const popover = filters.length ? FilterStatusBarSubPanelPopover_1.FilterStatusBarSubPanelPopover : null;
|
|
120
|
+
return {
|
|
121
|
+
content: text,
|
|
122
|
+
popover,
|
|
123
|
+
popoverMinWidth: 280,
|
|
124
|
+
};
|
|
125
|
+
},
|
|
105
126
|
};
|
|
106
127
|
}
|
|
107
128
|
}
|
|
@@ -10,16 +10,7 @@ import { FreeTextColumn } from '../../PredefinedConfig/FreeTextColumnState';
|
|
|
10
10
|
import { AdaptableOnePageWizardProps } from '../../View/Wizard/Interface/IAdaptableWizard';
|
|
11
11
|
import * as Redux from 'redux';
|
|
12
12
|
import { SuspendableObject } from '../../../types';
|
|
13
|
-
|
|
14
|
-
* This is the interface that all Moduless implement (as well as all deriving from AdaptableModulesBase).
|
|
15
|
-
* Each Module is responsible for creating popup and context menu items, providing an entitlement ( the default is 'Default') and initialising with Redux
|
|
16
|
-
* Most Modules map to their own Reducer (e.g. QuickSearchModules => QuickSearchReducer)
|
|
17
|
-
* However these Moduless DONT store any State:
|
|
18
|
-
* Application
|
|
19
|
-
* GridInfo
|
|
20
|
-
* StateManagement
|
|
21
|
-
* TeamSharing
|
|
22
|
-
*/
|
|
13
|
+
import { StatusBarPanelProps } from '../../View/StatusBar/StatusBarPanel';
|
|
23
14
|
export interface ModuleInfo {
|
|
24
15
|
ModuleName: AdaptableModule;
|
|
25
16
|
FriendlyName: string;
|
|
@@ -86,6 +77,7 @@ export interface AdaptableModuleView {
|
|
|
86
77
|
emptyView?: React.FunctionComponent<{
|
|
87
78
|
module: IModule;
|
|
88
79
|
}> | string;
|
|
80
|
+
newTooltipText?: string;
|
|
89
81
|
/**
|
|
90
82
|
* Specifieds the types of objects the module manages.
|
|
91
83
|
* When specified the new button will have these options.
|
|
@@ -96,7 +88,22 @@ export interface AdaptableModuleView {
|
|
|
96
88
|
accessLevel?: AccessLevel;
|
|
97
89
|
}[];
|
|
98
90
|
getEditWizard?(abObject?: AdaptableObject): React.FunctionComponent<AdaptableOnePageWizardProps<AdaptableObject>>;
|
|
91
|
+
/**
|
|
92
|
+
* Specify status panel props.
|
|
93
|
+
* Can be extended to include custom rendereres.
|
|
94
|
+
*/
|
|
95
|
+
getStatusBarPanelProps?(): StatusBarPanelProps;
|
|
99
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* This is the interface that all Moduless implement (as well as all deriving from AdaptableModulesBase).
|
|
99
|
+
* Each Module is responsible for creating popup and context menu items, providing an entitlement ( the default is 'Default') and initialising with Redux
|
|
100
|
+
* Most Modules map to their own Reducer (e.g. QuickSearchModules => QuickSearchReducer)
|
|
101
|
+
* However these Moduless DONT store any State:
|
|
102
|
+
* Application
|
|
103
|
+
* GridInfo
|
|
104
|
+
* StateManagement
|
|
105
|
+
* TeamSharing
|
|
106
|
+
*/
|
|
100
107
|
export interface IModule {
|
|
101
108
|
moduleInfo: ModuleInfo;
|
|
102
109
|
AccessLevel: AccessLevel;
|
|
@@ -114,6 +121,10 @@ export interface IModule {
|
|
|
114
121
|
getModuleFreeTextColumnReferences(): FreeTextColumn[];
|
|
115
122
|
getPopupMaxWidth(): number | undefined;
|
|
116
123
|
updateOldConfig(): void;
|
|
124
|
+
/**
|
|
125
|
+
* The following view options are used to render adaptable objects and
|
|
126
|
+
* module general views.
|
|
127
|
+
*/
|
|
117
128
|
toView?: (abObject: AdaptableObject) => AdaptableObjectView;
|
|
118
129
|
toViewAll?: () => AdaptableObjectView[];
|
|
119
130
|
getViewProperties?: () => AdaptableModuleView;
|
|
@@ -35,8 +35,15 @@ export declare class LayoutModule extends AdaptableModuleBase implements IModule
|
|
|
35
35
|
getViewProperties(): {
|
|
36
36
|
actions: import("react").FunctionComponent<{
|
|
37
37
|
data: Layout;
|
|
38
|
+
id?: string;
|
|
38
39
|
}>[];
|
|
39
40
|
getDeleteAction: (layout: Layout) => LayoutRedux.LayoutDeleteAction;
|
|
40
41
|
onOpenEditPopup: (layout?: Layout) => void;
|
|
42
|
+
getStatusBarPanelProps: () => {
|
|
43
|
+
content: string;
|
|
44
|
+
popover: import("react").FunctionComponent<{}>;
|
|
45
|
+
popoverMinWidth: number;
|
|
46
|
+
extraActions: import("react").FunctionComponent<{}>[];
|
|
47
|
+
};
|
|
41
48
|
};
|
|
42
49
|
}
|
|
@@ -7,6 +7,8 @@ const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/Mod
|
|
|
7
7
|
const LayoutRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/LayoutRedux"));
|
|
8
8
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
|
|
9
9
|
const LayoutRadioSelector_1 = require("../View/Layout/LayoutRadioSelector");
|
|
10
|
+
const LayoutStatusBarSubPanelPopover_1 = require("../View/Layout/LayoutStatusBarSubPanelPopover");
|
|
11
|
+
const EditCurrentLayoutButton_1 = require("../View/Layout/EditCurrentLayoutButton");
|
|
10
12
|
class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
11
13
|
constructor(api) {
|
|
12
14
|
super(ModuleConstants.LayoutModuleId, 'Layout', 'layout', 'LayoutPopup', 'Named sets of column visibility, order, groupings, aggregation, pivots etc.', api);
|
|
@@ -138,7 +140,7 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
138
140
|
const columnIdToFriendlyName = (columnId) => {
|
|
139
141
|
return this.api.columnApi.getFriendlyNameFromColumnId(columnId);
|
|
140
142
|
};
|
|
141
|
-
let columns = layout.Columns;
|
|
143
|
+
let columns = layout.Columns.filter((c) => !this.api.columnApi.isAutoRowGroupColumn(c)).filter((c) => !this.api.columnApi.isAutoPivotColumn(c));
|
|
142
144
|
if (columns.length >
|
|
143
145
|
maxColumnsToDisplay + 1 /* +1 is to show tag only beginning with 2, 'other 2' */) {
|
|
144
146
|
const extraColumns = columns.length - maxColumnsToDisplay;
|
|
@@ -196,6 +198,17 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
196
198
|
this.api.layoutApi.showLayoutEditor(layout.Name);
|
|
197
199
|
}
|
|
198
200
|
},
|
|
201
|
+
getStatusBarPanelProps: () => {
|
|
202
|
+
const text = this.api.layoutApi.getCurrentLayoutName();
|
|
203
|
+
const layouts = this.api.layoutApi.getAllLayout();
|
|
204
|
+
const popover = layouts.length > 1 ? LayoutStatusBarSubPanelPopover_1.LayoutStatusBarSubPanelPopover : null;
|
|
205
|
+
return {
|
|
206
|
+
content: text,
|
|
207
|
+
popover: popover,
|
|
208
|
+
popoverMinWidth: 150,
|
|
209
|
+
extraActions: [EditCurrentLayoutButton_1.EditCurrentLayoutButton],
|
|
210
|
+
};
|
|
211
|
+
},
|
|
199
212
|
};
|
|
200
213
|
}
|
|
201
214
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
3
|
import * as QueryRedux from '../Redux/ActionsReducers/QueryRedux';
|
|
3
4
|
import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
|
|
@@ -28,6 +29,13 @@ export declare class QueryModule extends AdaptableModuleBase implements IModule
|
|
|
28
29
|
}[];
|
|
29
30
|
getViewProperties(): {
|
|
30
31
|
getDeleteAction: (namedQuery: NamedQuery) => QueryRedux.NamedQueryDeleteAction;
|
|
32
|
+
newTooltipText: string;
|
|
33
|
+
emptyView: string;
|
|
31
34
|
getEditWizard: () => typeof NamedQueryWizard;
|
|
35
|
+
getStatusBarPanelProps: () => {
|
|
36
|
+
content: string;
|
|
37
|
+
extraActions: (() => JSX.Element)[];
|
|
38
|
+
popover: string;
|
|
39
|
+
};
|
|
32
40
|
};
|
|
33
41
|
}
|
|
@@ -6,6 +6,7 @@ const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
|
6
6
|
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
7
7
|
const QueryRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/QueryRedux"));
|
|
8
8
|
const NamedQueryWizard_1 = require("../View/Query/Wizard/NamedQueryWizard");
|
|
9
|
+
const EditCurrentQueryButton_1 = require("../View/Query/EditCurrentQueryButton");
|
|
9
10
|
class QueryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
10
11
|
constructor(api) {
|
|
11
12
|
super(ModuleConstants.QueryModuleId, 'Query', 'query', 'QueryPopup', 'Run real-time text-based queries using a wealth of powerful functions and operators', api);
|
|
@@ -47,7 +48,24 @@ class QueryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
47
48
|
getViewProperties() {
|
|
48
49
|
return {
|
|
49
50
|
getDeleteAction: QueryRedux.NamedQueryDelete,
|
|
51
|
+
newTooltipText: 'Create New Named Query',
|
|
52
|
+
emptyView: "Click 'New' to create a Named Query that can be referenced in other Expressions",
|
|
50
53
|
getEditWizard: () => NamedQueryWizard_1.NamedQueryWizard,
|
|
54
|
+
getStatusBarPanelProps: () => {
|
|
55
|
+
const queryMaxLength = 15;
|
|
56
|
+
const query = this.api.queryApi.getCurrentQuery();
|
|
57
|
+
let text = query;
|
|
58
|
+
let popover = null;
|
|
59
|
+
if (query.length > queryMaxLength) {
|
|
60
|
+
text = query.substring(0, queryMaxLength - 3) + '...';
|
|
61
|
+
popover = query;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
content: text || 'No Query',
|
|
65
|
+
extraActions: [EditCurrentQueryButton_1.EditCurrentQueryButton],
|
|
66
|
+
popover,
|
|
67
|
+
};
|
|
68
|
+
},
|
|
51
69
|
};
|
|
52
70
|
}
|
|
53
71
|
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
3
|
import { IModule } from './Interface/IModule';
|
|
3
4
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
4
5
|
export declare class QuickSearchModule extends AdaptableModuleBase implements IModule {
|
|
5
6
|
constructor(api: AdaptableApi);
|
|
7
|
+
getViewProperties(): {
|
|
8
|
+
getStatusBarPanelProps(): {
|
|
9
|
+
content: import("react").FunctionComponent<{}>;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
6
12
|
}
|
|
@@ -4,9 +4,19 @@ exports.QuickSearchModule = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
6
6
|
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
7
|
+
const QuickSearchStatusBarContent_1 = require("../View/QuickSearch/QuickSearchStatusBarContent");
|
|
7
8
|
class QuickSearchModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
8
9
|
constructor(api) {
|
|
9
10
|
super(ModuleConstants.QuickSearchModuleId, 'Quick Search', 'quick-search', 'QuickSearchPopup', 'Quickly highlight all cells in the grid that contain matching query text', api);
|
|
10
11
|
}
|
|
12
|
+
getViewProperties() {
|
|
13
|
+
return {
|
|
14
|
+
getStatusBarPanelProps() {
|
|
15
|
+
return {
|
|
16
|
+
content: QuickSearchStatusBarContent_1.QuickSearchStatusBarContent,
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
11
21
|
}
|
|
12
22
|
exports.QuickSearchModule = QuickSearchModule;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
|
+
import { IModule } from './Interface/IModule';
|
|
3
|
+
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
4
|
+
export declare class StatusBarModule extends AdaptableModuleBase implements IModule {
|
|
5
|
+
constructor(api: AdaptableApi);
|
|
6
|
+
syncStateWithOptions(): void;
|
|
7
|
+
isModuleAvailable(): boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StatusBarModule = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
6
|
+
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
7
|
+
class StatusBarModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
8
|
+
constructor(api) {
|
|
9
|
+
super(ModuleConstants.StatusBarModuleId, 'Status Bar', 'statusbar', 'StatusBarPopup', 'Configure AdapTable Status Bar', api);
|
|
10
|
+
}
|
|
11
|
+
syncStateWithOptions() {
|
|
12
|
+
const agGridStatusPanels = this.api.statusBarApi.getAgGridStatusPanels();
|
|
13
|
+
const statusPanelsState = this.api.statusBarApi.getStatusPanels();
|
|
14
|
+
/**
|
|
15
|
+
* Grid config determines how many adaptable status panels are rendered.
|
|
16
|
+
* This dictates the state.
|
|
17
|
+
* - if a status panel is removed from ag-grid, it's sub-panels are made available;
|
|
18
|
+
* - if a new status panel is added it is added to state with an empty list
|
|
19
|
+
*/
|
|
20
|
+
const newStatusPanelsState = agGridStatusPanels.map((agGridStatusPanel) => {
|
|
21
|
+
let statusPanelState = statusPanelsState.find((statusPanel) => statusPanel.Key === agGridStatusPanel.key);
|
|
22
|
+
// no state found
|
|
23
|
+
if (!statusPanelState) {
|
|
24
|
+
statusPanelState = {
|
|
25
|
+
Key: agGridStatusPanel.key,
|
|
26
|
+
StatusBarPanels: [],
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return statusPanelState;
|
|
30
|
+
});
|
|
31
|
+
this.api.statusBarApi.setStatusPanels(newStatusPanelsState);
|
|
32
|
+
}
|
|
33
|
+
isModuleAvailable() {
|
|
34
|
+
return false;
|
|
35
|
+
// TODO: replace with this like when we release Status Bar properly
|
|
36
|
+
// return super.isModuleAvailable() && this.api.statusBarApi.getAgGridStatusPanels().length > 0;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.StatusBarModule = StatusBarModule;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
3
|
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
3
4
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
@@ -7,4 +8,9 @@ export declare class SystemStatusModule extends AdaptableModuleBase implements I
|
|
|
7
8
|
constructor(api: AdaptableApi);
|
|
8
9
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
9
10
|
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
11
|
+
getViewProperties(): {
|
|
12
|
+
getStatusBarPanelProps: () => {
|
|
13
|
+
content: import("react").FunctionComponent<{}>;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
10
16
|
}
|
|
@@ -4,6 +4,7 @@ exports.SystemStatusModule = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
6
6
|
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
7
|
+
const SystemStatusStatusBarContent_1 = require("../View/SystemStatus/SystemStatusStatusBarContent");
|
|
7
8
|
class SystemStatusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
8
9
|
constructor(api) {
|
|
9
10
|
super(ModuleConstants.SystemStatusModuleId, 'System Status', 'system-status', 'SystemStatusPopup', 'Provide messages about the Status of your application', api);
|
|
@@ -30,5 +31,14 @@ class SystemStatusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
30
31
|
];
|
|
31
32
|
}
|
|
32
33
|
}
|
|
34
|
+
getViewProperties() {
|
|
35
|
+
return {
|
|
36
|
+
getStatusBarPanelProps: () => {
|
|
37
|
+
return {
|
|
38
|
+
content: SystemStatusStatusBarContent_1.SystemStatusStatusBarContent,
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
}
|
|
33
43
|
}
|
|
34
44
|
exports.SystemStatusModule = SystemStatusModule;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
3
|
import { IModule } from './Interface/IModule';
|
|
3
4
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
@@ -6,4 +7,10 @@ export declare class ThemeModule extends AdaptableModuleBase implements IModule
|
|
|
6
7
|
constructor(api: AdaptableApi);
|
|
7
8
|
getModuleAdaptableObjects(): AdaptableObject[];
|
|
8
9
|
hasNamedQueryReferences(): boolean;
|
|
10
|
+
getViewProperties(): {
|
|
11
|
+
getStatusBarPanelProps: () => {
|
|
12
|
+
content: string;
|
|
13
|
+
popover: import("react").FunctionComponent<{}>;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
9
16
|
}
|
|
@@ -4,6 +4,7 @@ exports.ThemeModule = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
6
6
|
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
7
|
+
const ThemeStatusPanelPopover_1 = require("../View/Theme/ThemeStatusPanelPopover");
|
|
7
8
|
class ThemeModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
8
9
|
constructor(api) {
|
|
9
10
|
super(ModuleConstants.ThemeModuleId, 'Theme', 'theme', 'ThemePopup', 'Theme AdapTable with a colour configuration set of your choosing', api);
|
|
@@ -14,5 +15,16 @@ class ThemeModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
14
15
|
hasNamedQueryReferences() {
|
|
15
16
|
return false;
|
|
16
17
|
}
|
|
18
|
+
getViewProperties() {
|
|
19
|
+
return {
|
|
20
|
+
getStatusBarPanelProps: () => {
|
|
21
|
+
const currentTheme = this.api.themeApi.getCurrentTheme();
|
|
22
|
+
return {
|
|
23
|
+
content: currentTheme,
|
|
24
|
+
popover: ThemeStatusPanelPopover_1.ThemeStatusPanelPopover,
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
17
29
|
}
|
|
18
30
|
exports.ThemeModule = ThemeModule;
|
|
@@ -20,6 +20,7 @@ export declare const EMPTY_ARRAY: any[];
|
|
|
20
20
|
export declare const AB_SPECIAL_COLUMN = "abSpecialColumn";
|
|
21
21
|
export declare const HALF_SECOND: number;
|
|
22
22
|
export declare const AG_GRID_GROUPED_COLUMN: string;
|
|
23
|
+
export declare const AG_GRID_PIVOT_COLUMN: string;
|
|
23
24
|
export declare const SYSTEM_STATUS_DEFAULT_MAX_MESSAGES_IN_STORE: number;
|
|
24
25
|
export declare const QUICK_SEARCH_DEFAULT_BACK_COLOR: string;
|
|
25
26
|
export declare const QUICK_SEARCH_DEFAULT_FORE_COLOR: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.THEME_STYLE = exports.SELECTED_ROWS_REPORT = exports.SELECTED_CELLS_REPORT = exports.CURRENT_DATA_REPORT = exports.ALL_DATA_REPORT = exports.VISUAL_DATA_REPORT = exports.SYSTEM_THEMES = exports.SMART_EDIT_MATH_OPERATION_STATE_PROPERTY = exports.SMART_EDIT_VALUE_STATE_PROPERTY = exports.QUICK_SEARCH_STYLE_STATE_PROPERTY = exports.QUICK_SEARCH_TEXT_STATE_PROPERTY = exports.CURRENT_THEME_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DURATION_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DOWN_COLOR_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_UP_COLOR_STATE_PROPERTY = exports.CURRENT_REPORT_STATE_PROPERTY = exports.CURRENT_DATA_SOURCE_STATE_PROPERTY = exports.CURRENT_LAYOUT_STATE_PROPERTY = exports.SUMMARY_OPERATION_STATE_PROPERTY = exports.ALERT_DEFAULT_SHOW_POPUP = exports.ALERT_DEFAULT_MESSAGE_TYPE = exports.PLUS_MINUS_DEFAULT_NUDGE_VALUE = exports.DEFAULT_LIVE_REPORT_THROTTLE_TIME = exports.THEME_DEFAULT_CURRENT_THEME = exports.SYSTEM_DEFAULT_SYSTEM_STATUS_TYPE = exports.CELL_SUMMARY_DEFAULT_OPERATION = exports.QUICK_SEARCH_DEBOUNCE_TIME = exports.QUICK_SEARCH_DEFAULT_FORE_COLOR = exports.QUICK_SEARCH_DEFAULT_BACK_COLOR = exports.SYSTEM_STATUS_DEFAULT_MAX_MESSAGES_IN_STORE = exports.AG_GRID_GROUPED_COLUMN = exports.HALF_SECOND = exports.AB_SPECIAL_COLUMN = exports.EMPTY_ARRAY = exports.EMPTY_STRING = exports.FILTER_THROTTLE = exports.FILTER_NEVER = exports.FILTER_ALWAYS = exports.ALL_COLUMN_VALUES = exports.READ_ONLY_STYLE = exports.MENU_PREFIX = exports.ADAPTABLE = exports.ADAPTABLE_ID = exports.USER_NAME = exports.DARK_THEME = exports.LIGHT_THEME = exports.DEFAULT_LAYOUT = exports.MISSING_COLUMN = exports.AUTOGENERATED_PK_COLUMN = void 0;
|
|
3
|
+
exports.THEME_STYLE = exports.SELECTED_ROWS_REPORT = exports.SELECTED_CELLS_REPORT = exports.CURRENT_DATA_REPORT = exports.ALL_DATA_REPORT = exports.VISUAL_DATA_REPORT = exports.SYSTEM_THEMES = exports.SMART_EDIT_MATH_OPERATION_STATE_PROPERTY = exports.SMART_EDIT_VALUE_STATE_PROPERTY = exports.QUICK_SEARCH_STYLE_STATE_PROPERTY = exports.QUICK_SEARCH_TEXT_STATE_PROPERTY = exports.CURRENT_THEME_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DURATION_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DOWN_COLOR_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_UP_COLOR_STATE_PROPERTY = exports.CURRENT_REPORT_STATE_PROPERTY = exports.CURRENT_DATA_SOURCE_STATE_PROPERTY = exports.CURRENT_LAYOUT_STATE_PROPERTY = exports.SUMMARY_OPERATION_STATE_PROPERTY = exports.ALERT_DEFAULT_SHOW_POPUP = exports.ALERT_DEFAULT_MESSAGE_TYPE = exports.PLUS_MINUS_DEFAULT_NUDGE_VALUE = exports.DEFAULT_LIVE_REPORT_THROTTLE_TIME = exports.THEME_DEFAULT_CURRENT_THEME = exports.SYSTEM_DEFAULT_SYSTEM_STATUS_TYPE = exports.CELL_SUMMARY_DEFAULT_OPERATION = exports.QUICK_SEARCH_DEBOUNCE_TIME = exports.QUICK_SEARCH_DEFAULT_FORE_COLOR = exports.QUICK_SEARCH_DEFAULT_BACK_COLOR = exports.SYSTEM_STATUS_DEFAULT_MAX_MESSAGES_IN_STORE = exports.AG_GRID_PIVOT_COLUMN = exports.AG_GRID_GROUPED_COLUMN = exports.HALF_SECOND = exports.AB_SPECIAL_COLUMN = exports.EMPTY_ARRAY = exports.EMPTY_STRING = exports.FILTER_THROTTLE = exports.FILTER_NEVER = exports.FILTER_ALWAYS = exports.ALL_COLUMN_VALUES = exports.READ_ONLY_STYLE = exports.MENU_PREFIX = exports.ADAPTABLE = exports.ADAPTABLE_ID = exports.USER_NAME = exports.DARK_THEME = exports.LIGHT_THEME = exports.DEFAULT_LAYOUT = exports.MISSING_COLUMN = exports.AUTOGENERATED_PK_COLUMN = void 0;
|
|
4
4
|
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
5
5
|
const UIHelper_1 = require("../../View/UIHelper");
|
|
6
6
|
exports.AUTOGENERATED_PK_COLUMN = '__ADAPTABLE_PK__';
|
|
@@ -22,6 +22,7 @@ exports.EMPTY_ARRAY = [];
|
|
|
22
22
|
exports.AB_SPECIAL_COLUMN = 'abSpecialColumn';
|
|
23
23
|
exports.HALF_SECOND = 500;
|
|
24
24
|
exports.AG_GRID_GROUPED_COLUMN = 'ag-Grid-AutoColumn';
|
|
25
|
+
exports.AG_GRID_PIVOT_COLUMN = 'pivot_';
|
|
25
26
|
/*
|
|
26
27
|
Redux / State Defaults
|
|
27
28
|
Try to put all our Redux / State defaults here and ONLY reference from here - avoid magic numbers / strings.
|
|
@@ -31,3 +31,4 @@ export declare const TeamSharingModuleId: ModuleConstants;
|
|
|
31
31
|
export declare const ThemeModuleId: ModuleConstants;
|
|
32
32
|
export declare const ToolPanelModuleId: ModuleConstants;
|
|
33
33
|
export declare const SettingsPanelModuleId: ModuleConstants;
|
|
34
|
+
export declare const StatusBarModuleId: ModuleConstants;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SettingsPanelModuleId = exports.ToolPanelModuleId = exports.ThemeModuleId = exports.TeamSharingModuleId = exports.SystemStatusModuleId = exports.StateManagementModuleId = exports.SmartEditModuleId = exports.ShortcutModuleId = exports.ScheduleModuleId = exports.QuickSearchModuleId = exports.QueryModuleId = exports.PlusMinusModuleId = exports.OpenFinModuleId = exports.LayoutModuleId = exports.IPushPullModuleId = exports.GridInfoModuleId = exports.Glue42ModuleId = exports.FreeTextColumnModuleId = exports.FormatColumnModuleId = exports.FilterModuleId = exports.ExportModuleId = exports.DataSourceModuleId = exports.DataChangeHistoryModuleId = exports.DashboardModuleId = exports.CustomSortModuleId = exports.ConditionalStyleModuleId = exports.ChartingModuleId = exports.CellSummaryModuleId = exports.CalculatedColumnModuleId = exports.BulkUpdateModuleId = exports.FlashingCellModuleId = exports.AlertModuleId = void 0;
|
|
3
|
+
exports.StatusBarModuleId = exports.SettingsPanelModuleId = exports.ToolPanelModuleId = exports.ThemeModuleId = exports.TeamSharingModuleId = exports.SystemStatusModuleId = exports.StateManagementModuleId = exports.SmartEditModuleId = exports.ShortcutModuleId = exports.ScheduleModuleId = exports.QuickSearchModuleId = exports.QueryModuleId = exports.PlusMinusModuleId = exports.OpenFinModuleId = exports.LayoutModuleId = exports.IPushPullModuleId = exports.GridInfoModuleId = exports.Glue42ModuleId = exports.FreeTextColumnModuleId = exports.FormatColumnModuleId = exports.FilterModuleId = exports.ExportModuleId = exports.DataSourceModuleId = exports.DataChangeHistoryModuleId = exports.DashboardModuleId = exports.CustomSortModuleId = exports.ConditionalStyleModuleId = exports.ChartingModuleId = exports.CellSummaryModuleId = exports.CalculatedColumnModuleId = exports.BulkUpdateModuleId = exports.FlashingCellModuleId = exports.AlertModuleId = void 0;
|
|
4
4
|
exports.AlertModuleId = 'Alert';
|
|
5
5
|
exports.FlashingCellModuleId = 'FlashingCell';
|
|
6
6
|
exports.BulkUpdateModuleId = 'BulkUpdate';
|
|
@@ -33,3 +33,4 @@ exports.TeamSharingModuleId = 'TeamSharing';
|
|
|
33
33
|
exports.ThemeModuleId = 'Theme';
|
|
34
34
|
exports.ToolPanelModuleId = 'ToolPanel';
|
|
35
35
|
exports.SettingsPanelModuleId = 'SettingsPanel';
|
|
36
|
+
exports.StatusBarModuleId = 'StatusBar';
|
|
@@ -23,7 +23,8 @@ exports.DefaultAdaptableOptions = {
|
|
|
23
23
|
alertOptions: {
|
|
24
24
|
alertForms: undefined,
|
|
25
25
|
maxAlertsInStore: 20,
|
|
26
|
-
cellHighlightDuration:
|
|
26
|
+
cellHighlightDuration: 2000,
|
|
27
|
+
rowHighlightDuration: 4000,
|
|
27
28
|
dataChangeDetectionPolicy: 'rawValue',
|
|
28
29
|
actionHandlers: undefined,
|
|
29
30
|
},
|
|
@@ -123,6 +124,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
123
124
|
currentCalendar: 'United Kingdom',
|
|
124
125
|
cellSummaryOperations: undefined,
|
|
125
126
|
customSortComparers: undefined,
|
|
127
|
+
englishVariant: 'GB',
|
|
126
128
|
},
|
|
127
129
|
layoutOptions: {
|
|
128
130
|
includeExpandedRowGroups: false,
|
|
@@ -214,6 +216,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
214
216
|
actionColumns: undefined,
|
|
215
217
|
showDocumentationLinks: true,
|
|
216
218
|
gridInfoSections: ['GridSummary', 'AdaptableOptions', 'ColumnInfo'],
|
|
219
|
+
showAdapTableVersion: true,
|
|
217
220
|
},
|
|
218
221
|
toolPanelOptions: {
|
|
219
222
|
showAdaptableToolPanel: true,
|
|
@@ -10,13 +10,13 @@ class ModuleService {
|
|
|
10
10
|
this.adaptableApi = adaptableApi;
|
|
11
11
|
}
|
|
12
12
|
createModuleMenus() {
|
|
13
|
-
const
|
|
13
|
+
const settingsPanelMenuItems = [];
|
|
14
14
|
const buttonMenuItems = [];
|
|
15
15
|
this.getModuleCollection().forEach((module) => {
|
|
16
|
-
const
|
|
17
|
-
if (Helper_1.default.objectExists(
|
|
18
|
-
if (
|
|
19
|
-
|
|
16
|
+
const settingsPanelMenuItem = module.addModuleMenuItem('ModuleMenu');
|
|
17
|
+
if (Helper_1.default.objectExists(settingsPanelMenuItem)) {
|
|
18
|
+
if (settingsPanelMenuItems.findIndex((m) => m.module == settingsPanelMenuItem.module) == -1) {
|
|
19
|
+
settingsPanelMenuItems.push(settingsPanelMenuItem);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
const buttonMenuItem = module.addModuleMenuItem('ModuleButton');
|
|
@@ -27,7 +27,7 @@ class ModuleService {
|
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
// store the main menu as we will re-use (and it never changes)
|
|
30
|
-
this.adaptableApi.internalApi.
|
|
30
|
+
this.adaptableApi.internalApi.setSettingPanelModuleMenuItems(settingsPanelMenuItems);
|
|
31
31
|
this.adaptableApi.internalApi.setModuleButtonMenuItems(buttonMenuItems);
|
|
32
32
|
}
|
|
33
33
|
isModuleAvailable(adaptableModule) {
|
|
@@ -11,7 +11,9 @@ const OverlayTrigger_1 = tslib_1.__importDefault(require("../../components/Overl
|
|
|
11
11
|
const rebass_1 = require("rebass");
|
|
12
12
|
class AdaptablePopover extends React.Component {
|
|
13
13
|
render() {
|
|
14
|
+
var _a;
|
|
14
15
|
let messageType = this.props.MessageType != null ? this.props.MessageType : 'Info';
|
|
16
|
+
const showIcon = (_a = this.props.showIcon) !== null && _a !== void 0 ? _a : true;
|
|
15
17
|
let useButton = this.props.useButton != null ? this.props.useButton : false;
|
|
16
18
|
let popoverMinWidth = this.props.popoverMinWidth != null ? this.props.popoverMinWidth.toString() + 'px' : 'auto';
|
|
17
19
|
const title = StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.headerText)
|
|
@@ -35,8 +37,9 @@ class AdaptablePopover extends React.Component {
|
|
|
35
37
|
return (React.createElement(rebass_1.Flex, { alignItems: "center", className: this.props.className },
|
|
36
38
|
React.createElement(OverlayTrigger_1.default, { showTriangle: true, render: () => popoverClickRootClose, showEvent: (this.props.showEvent || 'mouseenter'), hideEvent: (this.props.hideEvent || 'mouseleave'), style: {
|
|
37
39
|
overflow: 'visible',
|
|
38
|
-
}, defaultZIndex: 100000 }, useButton ? (React.createElement(ButtonInfo_1.ButtonInfo, { style: iconStyle, onClick: () => null, icon: icon, tooltip: this.props.tooltipText })) : (React.createElement("div", { tabIndex: 0, style: { cursor: 'pointer', display: 'inline-block' } },
|
|
39
|
-
|
|
40
|
+
}, defaultZIndex: 100000 }, useButton ? (React.createElement(ButtonInfo_1.ButtonInfo, { style: iconStyle, onClick: () => null, icon: showIcon && icon, tooltip: this.props.tooltipText }, this.props.children)) : (React.createElement("div", { tabIndex: 0, style: { cursor: 'pointer', display: 'inline-block' } },
|
|
41
|
+
this.props.children,
|
|
42
|
+
showIcon && React.createElement(icons_1.Icon, { name: icon }))))));
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
45
|
exports.AdaptablePopover = AdaptablePopover;
|
|
@@ -30,13 +30,13 @@ const DataSourceViewPanel_1 = require("./DataSource/DataSourceViewPanel");
|
|
|
30
30
|
const DataChangeHistoryPopup_1 = require("./DataChangeHistory/DataChangeHistoryPopup");
|
|
31
31
|
const DataChangeHistoryViewPanel_1 = require("./DataChangeHistory/DataChangeHistoryViewPanel");
|
|
32
32
|
const StateManagementViewPanel_1 = require("./StateManagement/StateManagementViewPanel");
|
|
33
|
+
const StatusBarPopup_1 = require("./StatusBar/StatusBarPopup");
|
|
33
34
|
exports.AdaptableViewFactory = {
|
|
34
|
-
// ExpandedQueryPopup,
|
|
35
35
|
BulkUpdatePopup: BulkUpdatePopup_1.BulkUpdatePopup,
|
|
36
36
|
DashboardPopup: DashboardPopup_1.DashboardPopup,
|
|
37
37
|
StateManagementPopup: StateManagementPopup_1.StateManagementPopup,
|
|
38
38
|
GridInfoPopup: GridInfoPopup_1.GridInfoPopup,
|
|
39
|
-
|
|
39
|
+
StatusBarPopup: StatusBarPopup_1.StatusBarPopup,
|
|
40
40
|
QuickSearchPopup: QuickSearchPopup_1.QuickSearchPopup,
|
|
41
41
|
CellSummaryPopup: CellSummaryPopup_1.CellSummaryPopup,
|
|
42
42
|
SmartEditPopup: SmartEditPopup_1.SmartEditPopup,
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AlertStatusPanel = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const react_redux_1 = require("react-redux");
|
|
7
|
+
const AdaptableContext_1 = require("../AdaptableContext");
|
|
8
|
+
const AlertsPanel_1 = require("./AlertsPanel");
|
|
9
|
+
const getAlertButtonStyle_1 = require("./Utilities/getAlertButtonStyle");
|
|
10
|
+
const StatusBarPanel_1 = require("../StatusBar/StatusBarPanel");
|
|
11
|
+
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
12
|
+
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
13
|
+
const initialStyle = { color: '', background: '' };
|
|
14
|
+
exports.AlertStatusPanel = () => {
|
|
15
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
16
|
+
const [style, setStyle] = React.useState(initialStyle);
|
|
17
|
+
const dispatch = react_redux_1.useDispatch();
|
|
18
|
+
const module = adaptable.ModuleService.getModuleById(ModuleConstants.AlertModuleId);
|
|
19
|
+
/**
|
|
20
|
+
* Using a selector to so the component updates each time an alert is triggered.
|
|
21
|
+
*/
|
|
22
|
+
const alerts = react_redux_1.useSelector((state) => state.System.AdaptableAlerts);
|
|
23
|
+
const text = alerts.length == 0 ? '0 Alerts' : alerts.length == 1 ? '1 Alert' : alerts.length + ' Alerts';
|
|
24
|
+
const handleAction = React.useCallback(() => adaptable.api.alertApi.showAlertPopup(), []);
|
|
25
|
+
// blinking logic
|
|
26
|
+
const previousAlerts = React.useRef(alerts);
|
|
27
|
+
const timeoutId = React.useRef();
|
|
28
|
+
React.useEffect(() => {
|
|
29
|
+
const noNewAlerts = previousAlerts.current.length === alerts.length;
|
|
30
|
+
previousAlerts.current = alerts;
|
|
31
|
+
if (!alerts.length) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
if (noNewAlerts) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const { color, background } = getAlertButtonStyle_1.getAlertButtonStyle(alerts);
|
|
38
|
+
setStyle({ color, background });
|
|
39
|
+
if (timeoutId.current) {
|
|
40
|
+
clearTimeout(timeoutId.current);
|
|
41
|
+
timeoutId.current = null;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Cannot clear timeout in the useEffect cleanup function, because this logic is not
|
|
45
|
+
* called for each case. e.g. it is skipped for when alerts are not added.
|
|
46
|
+
*/
|
|
47
|
+
timeoutId.current = setTimeout(() => {
|
|
48
|
+
setStyle(initialStyle);
|
|
49
|
+
}, 2000);
|
|
50
|
+
}, [alerts]);
|
|
51
|
+
// Dropdown content
|
|
52
|
+
const handleDeleteAlert = React.useCallback((alert) => dispatch(SystemRedux.SystemAlertDelete(alert)), []);
|
|
53
|
+
const handleDeleteAllAlerts = React.useCallback((alerts) => dispatch(SystemRedux.SystemAlertDeleteAll(alerts)), []);
|
|
54
|
+
let alertsPanel = (React.createElement(AlertsPanel_1.AlertsPanel, { Alerts: alerts, ShowPanel: true, ShowHeader: false, onClearAlert: handleDeleteAlert, onClearAllAlerts: handleDeleteAllAlerts }));
|
|
55
|
+
return (React.createElement(StatusBarPanel_1.StatusBarPanel, { "data-name": module.moduleInfo.ModuleName, color: style.color, backgroundColor: style.background, onAction: handleAction, icon: module.moduleInfo.Glyph, popover: alerts.length ? alertsPanel : null, content: text }));
|
|
56
|
+
};
|