@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
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LayoutStatusBarSubPanelPopover = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const rebass_1 = require("rebass");
|
|
7
|
+
const AdaptableContext_1 = require("../AdaptableContext");
|
|
8
|
+
const AdaptableObjectRow_1 = require("../Components/AdaptableObjectRow");
|
|
9
|
+
const PanelWithRow_1 = require("../Components/Panels/PanelWithRow");
|
|
10
|
+
const LayoutRadioSelector_1 = require("./LayoutRadioSelector");
|
|
11
|
+
const colItems = [
|
|
12
|
+
{ Content: 'Current', Size: 2 },
|
|
13
|
+
{ Content: 'Layout Name', Size: 4 },
|
|
14
|
+
];
|
|
15
|
+
exports.LayoutStatusBarSubPanelPopover = () => {
|
|
16
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
17
|
+
const layouts = adaptable.api.layoutApi.getAllLayout();
|
|
18
|
+
return (React.createElement(rebass_1.Flex, { flexDirection: "column" },
|
|
19
|
+
React.createElement(PanelWithRow_1.PanelWithRow, { colItems: colItems }),
|
|
20
|
+
layouts.map((layout) => {
|
|
21
|
+
return (React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { key: layout.Name, colItems: [
|
|
22
|
+
{ Content: React.createElement(LayoutRadioSelector_1.LayoutRadioSelector, { id: layout.Name, data: layout }), Size: 1 },
|
|
23
|
+
{
|
|
24
|
+
Content: (React.createElement("label", { style: { cursor: 'pointer' }, htmlFor: layout.Name }, layout.Name)),
|
|
25
|
+
Size: 4,
|
|
26
|
+
},
|
|
27
|
+
] }));
|
|
28
|
+
})));
|
|
29
|
+
};
|
|
@@ -4,6 +4,7 @@ exports.ColumnLabels = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const rebass_1 = require("rebass");
|
|
7
|
+
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
7
8
|
exports.ColumnLabels = (props) => {
|
|
8
9
|
const { children, showBoth, showTitle, flexDirection = 'row', labels: labelsProp } = props, columnProperties = tslib_1.__rest(props, ["children", "showBoth", "showTitle", "flexDirection", "labels"]);
|
|
9
10
|
const labelNames = [
|
|
@@ -19,7 +20,7 @@ exports.ColumnLabels = (props) => {
|
|
|
19
20
|
[flexDirection === 'row' ? 'alignItems' : 'justifyContent']: 'center',
|
|
20
21
|
};
|
|
21
22
|
return (React.createElement(rebass_1.Flex, Object.assign({ flexDirection: flexDirection }, flexProps, { width: "100%" }),
|
|
22
|
-
showTitle ? React.createElement(rebass_1.Text, { mr: 2 },
|
|
23
|
+
showTitle ? (React.createElement(rebass_1.Text, { mr: 2 }, AdaptableContext_1.useAdaptable().api.internalApi.getCorrectEnglishVariant('Behaviours:'))) : null,
|
|
23
24
|
labels.map((l, index) => {
|
|
24
25
|
const enabled = !!l;
|
|
25
26
|
const labelName = labelNames[index];
|
|
@@ -113,7 +113,7 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
113
113
|
}
|
|
114
114
|
setLayout(newLayout);
|
|
115
115
|
};
|
|
116
|
-
const getAgGridGroupAutoColumn = react_1.useCallback((layout) => layout.Columns.filter((columnId) => api.columnApi.
|
|
116
|
+
const getAgGridGroupAutoColumn = react_1.useCallback((layout) => layout.Columns.filter((columnId) => api.columnApi.isAutoRowGroupColumn(columnId)), []);
|
|
117
117
|
const onDragEndRef = react_1.useRef({
|
|
118
118
|
columnList: () => { },
|
|
119
119
|
columnSortList: () => { },
|
|
@@ -71,6 +71,7 @@ class LayoutEditorWizard extends React.Component {
|
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
render() {
|
|
74
|
+
const behaviourHeader = 'Column ' + this.props.api.internalApi.getCorrectEnglishVariant('Behaviours');
|
|
74
75
|
return (React.createElement("div", { "data-name": 'layout-editor', style: { height: '100%' } },
|
|
75
76
|
React.createElement(WizardPanel_1.default, { bodyProps: { padding: 0 } },
|
|
76
77
|
React.createElement(rebass_1.Flex, null,
|
|
@@ -88,7 +89,7 @@ class LayoutEditorWizard extends React.Component {
|
|
|
88
89
|
React.createElement(rebass_1.Flex, { width: 120, pr: 2, alignItems: "center", justifyContent: "end" },
|
|
89
90
|
React.createElement(rebass_1.Text, { mr: 2 }, "Legend"),
|
|
90
91
|
React.createElement(AdaptablePopover_1.AdaptablePopover, { popoverMinWidth: 200, bodyText: [
|
|
91
|
-
React.createElement(Panel_1.default, { variant: "modern", header:
|
|
92
|
+
React.createElement(Panel_1.default, { variant: "modern", header: behaviourHeader, className: "ab-LayoutEditor__LegendPanel", style: {
|
|
92
93
|
gridRow: '1 /1',
|
|
93
94
|
gridColumn: '3/3',
|
|
94
95
|
}, bodyProps: {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EditCurrentQueryButton = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
7
|
+
const AdaptableContext_1 = require("../AdaptableContext");
|
|
8
|
+
exports.EditCurrentQueryButton = () => {
|
|
9
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
10
|
+
const handleClick = React.useCallback((event) => {
|
|
11
|
+
event.stopPropagation();
|
|
12
|
+
adaptable.api.queryApi.expandCurrentQuery();
|
|
13
|
+
}, []);
|
|
14
|
+
return React.createElement(SimpleButton_1.default, { variant: "text", iconSize: 15, onClick: handleClick, icon: "edit" });
|
|
15
|
+
};
|
|
@@ -11,7 +11,6 @@ export interface QueryViewPanelComponentProps extends ViewPanelProps {
|
|
|
11
11
|
onAddCachedQuery: (cachedQuery: CachedQuery) => SystemRedux.SystemCachedQueryAddAction;
|
|
12
12
|
onRunQuery: (expression: string) => QueryRedux.QueryRunAction;
|
|
13
13
|
onShowNamedQueries: (value: string, popup: string) => PopupRedux.PopupShowScreenAction;
|
|
14
|
-
onExpand: (value: string) => void;
|
|
15
14
|
}
|
|
16
15
|
interface QueryViewPanelComponentState {
|
|
17
16
|
isAdaptableReady: boolean;
|
|
@@ -22,7 +22,6 @@ const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Exte
|
|
|
22
22
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
23
23
|
const ModuleConstants_1 = require("../../Utilities/Constants/ModuleConstants");
|
|
24
24
|
const react_redux_1 = require("react-redux");
|
|
25
|
-
const windowFactory_1 = require("../Components/Popups/WindowPopups/windowFactory");
|
|
26
25
|
class QueryViewPanelComponent extends React.Component {
|
|
27
26
|
constructor(props) {
|
|
28
27
|
super(props);
|
|
@@ -88,7 +87,7 @@ class QueryViewPanelComponent extends React.Component {
|
|
|
88
87
|
};
|
|
89
88
|
const renderTextInput = () => {
|
|
90
89
|
return this.props.viewType === 'Toolbar' ? (React.createElement(FieldWrap_1.default, { marginRight: 1, width: 600 },
|
|
91
|
-
React.createElement(ButtonExpand_1.ButtonExpand, { variant: "text", tone: "neutral", onClick: () => this.props.
|
|
90
|
+
React.createElement(ButtonExpand_1.ButtonExpand, { variant: "text", tone: "neutral", onClick: () => this.props.api.queryApi.expandCurrentQuery(this.state.expression), tooltip: "Expand", marginLeft: 1 }),
|
|
92
91
|
React.createElement(Input_1.default, { type: "text", placeholder: "Query", spellCheck: false, value: this.state.expression, onChange: (x) => this.setState({ expression: x.target.value }), style: { fontFamily: 'monospace', fontSize: 12 } }),
|
|
93
92
|
isExpressionValid ? (React.createElement(ButtonPlay_1.ButtonPlay, { onClick: () => this.runQuery(), tooltip: '', accessLevel: 'Full', variant: "text", tone: "neutral", disabled: this.state.expression == '' || this.state.expression == this.props.CurrentQuery, marginRight: 1 })) : (React.createElement(ButtonInvalid_1.ButtonInvalid, { variant: "text", tone: "neutral", tooltip: "Invalid Query", marginRight: 1 })),
|
|
94
93
|
' ',
|
|
@@ -106,7 +105,7 @@ class QueryViewPanelComponent extends React.Component {
|
|
|
106
105
|
React.createElement(DropdownButton_1.default, { disabled: ArrayExtensions_1.ArrayExtensions.IsNullOrEmpty(availableSearches), variant: "text", items: availableSearches, marginRight: 1, tooltip: "Load Query", icon: "folder-open" }),
|
|
107
106
|
' ')) : (React.createElement(React.Fragment, null,
|
|
108
107
|
saveButton,
|
|
109
|
-
React.createElement(ButtonExpand_1.ButtonExpand, { variant: "text", tone: "neutral", onClick: () => this.props.
|
|
108
|
+
React.createElement(ButtonExpand_1.ButtonExpand, { variant: "text", tone: "neutral", onClick: () => this.props.api.queryApi.expandCurrentQuery(this.state.expression), tooltip: "Expand", marginLeft: 1 }),
|
|
110
109
|
React.createElement(ButtonClear_1.ButtonClear, { onClick: () => this.clearQuery(), tooltip: "Clear Query", accessLevel: 'Full', disabled: this.state.expression == '' }),
|
|
111
110
|
React.createElement(ButtonPlay_1.ButtonPlay, { onClick: () => this.runQuery(), tooltip: "Run Query", accessLevel: 'Full', variant: "text", tone: "neutral", disabled: !isExpressionValid ||
|
|
112
111
|
this.state.expression == '' ||
|
|
@@ -166,14 +165,6 @@ function mapDispatchToProps(dispatch) {
|
|
|
166
165
|
source: 'Toolbar',
|
|
167
166
|
value,
|
|
168
167
|
})),
|
|
169
|
-
onExpand: (value) => dispatch(PopupRedux.PopupShowWindow({
|
|
170
|
-
Id: windowFactory_1.WINDOW_QUERY_EDITOR,
|
|
171
|
-
Title: 'Current Query',
|
|
172
|
-
Icon: 'query',
|
|
173
|
-
PopupProps: {
|
|
174
|
-
value: value,
|
|
175
|
-
},
|
|
176
|
-
})),
|
|
177
168
|
};
|
|
178
169
|
}
|
|
179
170
|
exports.QueryViewPanelControl = react_redux_1.connect(mapStateToProps, mapDispatchToProps)(QueryViewPanelComponent);
|
|
@@ -35,7 +35,7 @@ const QuickSearchPopupComponent = (props) => {
|
|
|
35
35
|
' ',
|
|
36
36
|
React.createElement(FormLayout_1.default, null,
|
|
37
37
|
React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { type: "text", marginLeft: 2, marginRight: 5, padding: 20, style: { height: '100%' }, placeholder: props.api.internalApi.getAdaptableOptions().searchOptions.quickSearchPlaceholder, value: searchText, OnTextChange: search }))),
|
|
38
|
-
React.createElement(Panel_1.default, { header: 'Behaviour', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginLeft: 2, marginRight: 2 },
|
|
38
|
+
React.createElement(Panel_1.default, { header: props.api.internalApi.getCorrectEnglishVariant('Behaviour'), style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginLeft: 2, marginRight: 2 },
|
|
39
39
|
' ',
|
|
40
40
|
React.createElement(rebass_1.Flex, { flexDirection: "column" },
|
|
41
41
|
React.createElement(FormLayout_1.default, { columns: [1, 2] },
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuickSearchStatusBarContent = 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 AdaptableFormControlTextClear_1 = require("../Components/Forms/AdaptableFormControlTextClear");
|
|
9
|
+
const QuickSearchRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/QuickSearchRedux"));
|
|
10
|
+
exports.QuickSearchStatusBarContent = () => {
|
|
11
|
+
const text = react_redux_1.useSelector((state) => state.QuickSearch.QuickSearchText);
|
|
12
|
+
const dispatch = react_redux_1.useDispatch();
|
|
13
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
14
|
+
const handleTextChange = React.useCallback((text) => dispatch(QuickSearchRedux.QuickSearchRun(text)), []);
|
|
15
|
+
return (React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { onClick: (event) => event.stopPropagation(), type: "text", inputStyle: { padding: '2px 3px', width: 90 }, placeholder: adaptable.api.internalApi.getAdaptableOptions().searchOptions.quickSearchPlaceholder, value: text, OnTextChange: handleTextChange }));
|
|
16
|
+
};
|
|
@@ -14,17 +14,19 @@ exports.StateManagementPopup = (props) => {
|
|
|
14
14
|
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: props.moduleInfo.FriendlyName, glyphicon: props.moduleInfo.Glyph, infoLink: props.moduleInfo.HelpPage, infoLinkDisabled: !props.api.internalApi.isDocumentationLinksDisplayed() },
|
|
15
15
|
React.createElement(rebass_1.Box, null,
|
|
16
16
|
React.createElement(Panel_1.default, { header: 'User State', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginRight: 2 },
|
|
17
|
-
React.createElement(HelpBlock_1.default,
|
|
18
|
-
React.createElement(HelpBlock_1.default, null, '
|
|
17
|
+
React.createElement(HelpBlock_1.default, { marginBottom: 2 }, 'Clear all current user state that has been persisted.'),
|
|
18
|
+
React.createElement(HelpBlock_1.default, null, 'This will cause this window to close and any state you have previously created will be lost and the initial Predefined Config will then be reapplied.'),
|
|
19
19
|
React.createElement(ClearButton_1.ClearButton, { tone: "error", variant: "raised", marginTop: 2, accessLevel: props.accessLevel, onClick: () => props.api.configApi.reloadPredefinedConfig() }, "Clear User State")),
|
|
20
20
|
React.createElement(Panel_1.default, { header: 'Load Predefined Config', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginRight: 2 },
|
|
21
|
-
React.createElement(HelpBlock_1.default, { marginTop:
|
|
21
|
+
React.createElement(HelpBlock_1.default, { marginTop: 2 }, 'Load Predefined Config (from a .json file). This will cause this window to close.'),
|
|
22
22
|
' ',
|
|
23
23
|
React.createElement(LoadButton_1.LoadButton, { tone: "info", variant: "raised", marginTop: 2, accessLevel: props.accessLevel, onLoad: (json) => props.api.configApi.reloadPredefinedConfig(json) }, "Load Predefined Config")),
|
|
24
|
-
React.createElement(Panel_1.default, { header: 'Export
|
|
25
|
-
React.createElement(
|
|
26
|
-
|
|
27
|
-
React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "
|
|
24
|
+
React.createElement(Panel_1.default, { header: 'Export Adaptable State', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginRight: 2 },
|
|
25
|
+
React.createElement(HelpBlock_1.default, { marginTop: 2, marginBottom: 2 }, 'Exports the currently persisted Adaptable state.'),
|
|
26
|
+
' ',
|
|
27
|
+
React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "adaptableState", marginRight: 3, style: { flex: 1, maxWidth: 'none' }, columns: ['label'] }, "Select Export Destination")),
|
|
28
28
|
React.createElement(Panel_1.default, { header: 'Export Initial Predefined Config', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginRight: 2 },
|
|
29
|
+
React.createElement(HelpBlock_1.default, { marginTop: 2, marginBottom: 2 }, 'Exports the Predefined Config which was provided at design time.'),
|
|
30
|
+
' ',
|
|
29
31
|
React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "predefinedConfig", marginRight: 3, style: { flex: 1, maxWidth: 'none' }, columns: ['label'] }, "Select Export Destination")))));
|
|
30
32
|
};
|
|
@@ -16,7 +16,6 @@ exports.StateManagementViewPanel = (props) => {
|
|
|
16
16
|
React.createElement(rebass_1.Flex, { flexDirection: "row" },
|
|
17
17
|
React.createElement(LoadButton_1.LoadButton, { tooltip: "Load Predefined Config", variant: "text", icon: "upload", onLoad: (json) => props.api.configApi.reloadPredefinedConfig(json), accessLevel: props.accessLevel }, !isToolbar && 'Load'),
|
|
18
18
|
React.createElement(ClearButton_1.ClearButton, { icon: "trash", tooltip: "Clear User State", variant: "text", onClick: () => props.api.configApi.reloadPredefinedConfig(), accessLevel: props.accessLevel }, !isToolbar && 'Clear')),
|
|
19
|
-
React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "
|
|
20
|
-
React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "userState" }, "User State"),
|
|
19
|
+
React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "adaptableState" }, "All State"),
|
|
21
20
|
React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "predefinedConfig" }, "Predefined Config")));
|
|
22
21
|
};
|
|
@@ -3,6 +3,6 @@ import { AdaptableApi } from '../../../../types';
|
|
|
3
3
|
import { DropdownButtonProps } from '../../../components/DropdownButton';
|
|
4
4
|
export interface ExportDropdownProps extends Omit<DropdownButtonProps, 'options' | 'value'> {
|
|
5
5
|
api: AdaptableApi;
|
|
6
|
-
type: '
|
|
6
|
+
type: 'adaptableState' | 'predefinedConfig';
|
|
7
7
|
}
|
|
8
8
|
export declare const ExportDropdown: React.FunctionComponent<ExportDropdownProps>;
|
|
@@ -8,13 +8,9 @@ const handleExportState_1 = require("../handleExportState");
|
|
|
8
8
|
exports.ExportDropdown = (props) => {
|
|
9
9
|
const handleChange = (destination) => {
|
|
10
10
|
switch (props.type) {
|
|
11
|
-
case '
|
|
12
|
-
const
|
|
13
|
-
handleExportState_1.handleExportState(destination, '
|
|
14
|
-
break;
|
|
15
|
-
case 'userState':
|
|
16
|
-
const userState = props.api.configApi.getAllUserState();
|
|
17
|
-
handleExportState_1.handleExportState(destination, 'userState', userState);
|
|
11
|
+
case 'adaptableState':
|
|
12
|
+
const adaptableState = props.api.configApi.getPersistedState();
|
|
13
|
+
handleExportState_1.handleExportState(destination, 'adaptableState', adaptableState);
|
|
18
14
|
break;
|
|
19
15
|
case 'predefinedConfig':
|
|
20
16
|
const predefinedConfig = props.api.configApi.getPredefinedConfig();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const handleExportState: (type: 'Clipboard' | 'Console' | 'JSON', name:
|
|
1
|
+
export declare const handleExportState: (type: 'Clipboard' | 'Console' | 'JSON', name: 'adaptableState' | 'predefinedConfig', state: any) => void;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdaptableStatusBar = 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 rebass_1 = require("rebass");
|
|
8
|
+
const StatusBarRedux_1 = require("../../Redux/ActionsReducers/StatusBarRedux");
|
|
9
|
+
const AdaptableContext_1 = require("../AdaptableContext");
|
|
10
|
+
const StatusBarPanel_1 = require("./StatusBarPanel");
|
|
11
|
+
exports.AdaptableStatusBar = (props) => {
|
|
12
|
+
var _a;
|
|
13
|
+
/**
|
|
14
|
+
* All state is selected so the Status Bar is re-rendered for all adaptable state changes
|
|
15
|
+
*/
|
|
16
|
+
const state = react_redux_1.useSelector((state) => state);
|
|
17
|
+
const statusPanels = StatusBarRedux_1.getStatusPanelsSelector(state);
|
|
18
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
19
|
+
const dispatch = react_redux_1.useDispatch();
|
|
20
|
+
const statusSubPanels = statusPanels.find((statusPanel) => statusPanel.Key === props.context.Key);
|
|
21
|
+
const allMenuItems = react_redux_1.useSelector((state) => { var _a; return (_a = state === null || state === void 0 ? void 0 : state.Grid) === null || _a === void 0 ? void 0 : _a.SettingPanelModuleMenuItems; });
|
|
22
|
+
return (React.createElement(rebass_1.Flex, { className: "ab-StatusBar-Panel", "data-id": props.context.Key }, (_a = statusSubPanels === null || statusSubPanels === void 0 ? void 0 : statusSubPanels.StatusBarPanels) === null || _a === void 0 ? void 0 : _a.map((subPanel) => {
|
|
23
|
+
var _a, _b, _c, _d, _e, _f;
|
|
24
|
+
const module = adaptable.ModuleService.getModuleById(subPanel);
|
|
25
|
+
if (!module) {
|
|
26
|
+
return React.createElement(React.Fragment, { key: subPanel });
|
|
27
|
+
}
|
|
28
|
+
if (!module.isModuleAvailable()) {
|
|
29
|
+
return React.createElement(React.Fragment, { key: subPanel });
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Both view properties and status panel are optional.
|
|
33
|
+
*/
|
|
34
|
+
const statusBarPanelProps = (_d = (_c = (_b = (_a = module.getViewProperties) === null || _a === void 0 ? void 0 : _a.call(module)) === null || _b === void 0 ? void 0 : _b.getStatusBarPanelProps) === null || _c === void 0 ? void 0 : _c.call(_b)) !== null && _d !== void 0 ? _d : {};
|
|
35
|
+
const moduleInfo = module.moduleInfo;
|
|
36
|
+
const onAction = (_e = statusBarPanelProps.onAction) !== null && _e !== void 0 ? _e : (() => {
|
|
37
|
+
const menuItem = allMenuItems.find((menuItem) => menuItem.module === subPanel);
|
|
38
|
+
if (menuItem === null || menuItem === void 0 ? void 0 : menuItem.reduxAction) {
|
|
39
|
+
dispatch(menuItem.reduxAction);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return (React.createElement(StatusBarPanel_1.StatusBarPanel, Object.assign({ "data-name": subPanel }, statusBarPanelProps, { onAction: onAction, icon: (_f = statusBarPanelProps.icon) !== null && _f !== void 0 ? _f : moduleInfo.Glyph, key: subPanel })));
|
|
43
|
+
})));
|
|
44
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { FlexProps } from 'rebass';
|
|
3
|
+
/**
|
|
4
|
+
* A panel can be:
|
|
5
|
+
* - icon
|
|
6
|
+
* - icon & text
|
|
7
|
+
* - icon & text
|
|
8
|
+
* - icon & text+popover
|
|
9
|
+
* - icon & text+popover & extra actions
|
|
10
|
+
*
|
|
11
|
+
* <icon> <text-with-dropdown> <extra-action>
|
|
12
|
+
* <dropdown-component>
|
|
13
|
+
*
|
|
14
|
+
* Extra actions are components so the components can call inside hooks.
|
|
15
|
+
*/
|
|
16
|
+
export interface StatusBarPanelProps extends Omit<FlexProps, 'content'> {
|
|
17
|
+
icon?: string;
|
|
18
|
+
content?: React.ReactNode | React.FunctionComponent;
|
|
19
|
+
/**
|
|
20
|
+
* weather to trigger onAction when the wrapper is clicked
|
|
21
|
+
*/
|
|
22
|
+
triggerActionOnWrapperClick?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* When specified this content will be rendered when the text
|
|
25
|
+
* is clicked.
|
|
26
|
+
*/
|
|
27
|
+
popover?: React.ReactNode | React.FunctionComponent;
|
|
28
|
+
popoverMinWidth?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Allow to render custom content
|
|
31
|
+
*/
|
|
32
|
+
view?: React.FunctionComponent;
|
|
33
|
+
onAction?: () => void;
|
|
34
|
+
extraActions?: React.FunctionComponent[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Statusbar sub panel are similar to vs code:
|
|
38
|
+
* - text
|
|
39
|
+
* - action
|
|
40
|
+
* - icon
|
|
41
|
+
*/
|
|
42
|
+
export declare const StatusBarPanel: React.FunctionComponent<StatusBarPanelProps>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StatusBarPanel = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const rebass_1 = require("rebass");
|
|
7
|
+
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
8
|
+
const AdaptablePopover_1 = require("../AdaptablePopover");
|
|
9
|
+
/**
|
|
10
|
+
* Statusbar sub panel are similar to vs code:
|
|
11
|
+
* - text
|
|
12
|
+
* - action
|
|
13
|
+
* - icon
|
|
14
|
+
*/
|
|
15
|
+
exports.StatusBarPanel = (props) => {
|
|
16
|
+
var _a;
|
|
17
|
+
const { icon, content, popover, popoverMinWidth, view, onAction, extraActions, triggerActionOnWrapperClick = true } = props, flexProps = tslib_1.__rest(props, ["icon", "content", "popover", "popoverMinWidth", "view", "onAction", "extraActions", "triggerActionOnWrapperClick"]);
|
|
18
|
+
const handleAction = () => onAction();
|
|
19
|
+
if (view) {
|
|
20
|
+
const View = view;
|
|
21
|
+
return React.createElement(View, null);
|
|
22
|
+
}
|
|
23
|
+
const baseClassName = 'ab-StatusBar__SubPanel';
|
|
24
|
+
const handleIconClick = React.useCallback(() => {
|
|
25
|
+
handleAction();
|
|
26
|
+
}, []);
|
|
27
|
+
const shouldTriggerActionOnWrapperClick = triggerActionOnWrapperClick && !popover;
|
|
28
|
+
const handleWrapperClick = React.useCallback(() => {
|
|
29
|
+
// handle action only if there is no popover
|
|
30
|
+
if (shouldTriggerActionOnWrapperClick) {
|
|
31
|
+
handleAction();
|
|
32
|
+
}
|
|
33
|
+
}, [popover, triggerActionOnWrapperClick]);
|
|
34
|
+
// popover
|
|
35
|
+
const popoverContent = typeof popover === 'function'
|
|
36
|
+
? React.createElement(popover)
|
|
37
|
+
: popover;
|
|
38
|
+
const preparedContent = typeof content === 'function'
|
|
39
|
+
? React.createElement(content)
|
|
40
|
+
: content;
|
|
41
|
+
return (React.createElement(rebass_1.Flex, Object.assign({}, flexProps, { alignItems: "center", justifyContent: "center", as: shouldTriggerActionOnWrapperClick ? 'button' : 'div', className: baseClassName, onClick: handleWrapperClick }),
|
|
42
|
+
props.icon && (React.createElement(SimpleButton_1.default, { color: props.color, icon: props.icon, iconSize: 15, variant: "text", onClick: handleIconClick, mr: preparedContent ? 1 : 0 })),
|
|
43
|
+
popover ? (React.createElement(AdaptablePopover_1.AdaptablePopover, { showIcon: false, bodyText: [popoverContent], MessageType: 'Info', showEvent: 'focus', hideEvent: "blur", popoverMinWidth: popoverMinWidth }, preparedContent)) : (preparedContent), (_a = extraActions === null || extraActions === void 0 ? void 0 : extraActions.map) === null || _a === void 0 ? void 0 :
|
|
44
|
+
_a.call(extraActions, (action, index) => React.createElement(action, { key: index }))));
|
|
45
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StatusBarPopup = 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 ModuleManager_1 = require("../../components/DragAndDropContext/ModuleManager");
|
|
8
|
+
const EmptyContent_1 = tslib_1.__importDefault(require("../../components/EmptyContent"));
|
|
9
|
+
const Types_1 = require("../../PredefinedConfig/Common/Types");
|
|
10
|
+
const StatusBarRedux_1 = require("../../Redux/ActionsReducers/StatusBarRedux");
|
|
11
|
+
const AdaptableContext_1 = require("../AdaptableContext");
|
|
12
|
+
const PopupPanel_1 = require("../Components/Popups/AdaptablePopup/PopupPanel");
|
|
13
|
+
exports.StatusBarPopup = (props) => {
|
|
14
|
+
const statusPanels = react_redux_1.useSelector(StatusBarRedux_1.getStatusPanelsSelector);
|
|
15
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
16
|
+
const tabs = React.useMemo(() => statusPanels.map((statusPanel) => {
|
|
17
|
+
return {
|
|
18
|
+
Name: statusPanel.Key,
|
|
19
|
+
Items: statusPanel.StatusBarPanels,
|
|
20
|
+
};
|
|
21
|
+
}), [statusPanels]);
|
|
22
|
+
const handleTabChange = React.useCallback((tabs) => {
|
|
23
|
+
const newStatusPanels = tabs.map((tab) => {
|
|
24
|
+
const statusPanel = statusPanels.find((sp) => sp.Key === tab.Name);
|
|
25
|
+
return Object.assign(Object.assign({}, statusPanel), { SubPanels: tab.Items });
|
|
26
|
+
});
|
|
27
|
+
adaptable.api.statusBarApi.setStatusPanels(newStatusPanels);
|
|
28
|
+
}, [statusPanels]);
|
|
29
|
+
const availableItems = Types_1.ALL_STATUS_SUB_PANELS.filter((panel) => {
|
|
30
|
+
const module = adaptable.ModuleService.getModuleById(panel);
|
|
31
|
+
return module.isModuleAvailable();
|
|
32
|
+
}).map((panel) => {
|
|
33
|
+
const module = adaptable.ModuleService.getModuleById(panel);
|
|
34
|
+
return { Id: panel, Title: module.moduleInfo.FriendlyName };
|
|
35
|
+
});
|
|
36
|
+
const disabled = props.accessLevel === 'ReadOnly';
|
|
37
|
+
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: props.moduleInfo.FriendlyName, glyphicon: props.moduleInfo.Glyph }, statusPanels.length ? (React.createElement(ModuleManager_1.ModuleManager, { permittedActions: {
|
|
38
|
+
createTab: false,
|
|
39
|
+
dragAndDropTab: false,
|
|
40
|
+
deleteTab: false,
|
|
41
|
+
editTabName: false,
|
|
42
|
+
}, onTabsChange: handleTabChange, disabled: disabled, tabs: tabs, availableItems: availableItems, tabsTitle: 'Status Bar Panels', unusedPanelTitle: "Available Status Panels" })) : (React.createElement(EmptyContent_1.default, null, "To enable this feature add to Grid Options statusPanels the Adaptable Status Panel."))));
|
|
43
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SystemStatusStatusBarContent = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const rebass_1 = require("rebass");
|
|
7
|
+
const AdaptableContext_1 = require("../AdaptableContext");
|
|
8
|
+
const getStatusItemStyle_1 = require("./Utilities/getStatusItemStyle");
|
|
9
|
+
exports.SystemStatusStatusBarContent = () => {
|
|
10
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
11
|
+
const currentSystemStatusMessageInfo = adaptable.api.systemStatusApi.getCurrentSystemStatusMessageInfo();
|
|
12
|
+
const { color, background } = getStatusItemStyle_1.getStatusItemStyle(currentSystemStatusMessageInfo);
|
|
13
|
+
const message = currentSystemStatusMessageInfo === null || currentSystemStatusMessageInfo === void 0 ? void 0 : currentSystemStatusMessageInfo.statusMessage;
|
|
14
|
+
return (React.createElement(rebass_1.Box, { style: { borderRadius: 'var(--ab__border-radius)' }, padding: 1, color: message && color, backgroundColor: message && background }, message || '0 Messages'));
|
|
15
|
+
};
|
|
@@ -3,24 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SystemStatusViewPanel = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const UIHelper_1 = tslib_1.__importDefault(require("../UIHelper"));
|
|
7
6
|
const rebass_1 = require("rebass");
|
|
8
7
|
const react_redux_1 = require("react-redux");
|
|
8
|
+
const getStatusItemStyle_1 = require("./Utilities/getStatusItemStyle");
|
|
9
9
|
class SystemStatusViewPanelComponent extends React.Component {
|
|
10
10
|
constructor(props) {
|
|
11
11
|
super(props);
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
var _a;
|
|
15
14
|
const currentSystemStatusMessageInfo = this.props.api.systemStatusApi.getCurrentSystemStatusMessageInfo();
|
|
16
|
-
const
|
|
17
|
-
const buttonTextColor = currentSystemStatusMessageInfo
|
|
18
|
-
? UIHelper_1.default.getButtonTextColourForMessageType(currentSystemStatusMessageInfo.statusType)
|
|
19
|
-
: '';
|
|
15
|
+
const { color, background } = getStatusItemStyle_1.getStatusItemStyle(currentSystemStatusMessageInfo);
|
|
20
16
|
const message = currentSystemStatusMessageInfo === null || currentSystemStatusMessageInfo === void 0 ? void 0 : currentSystemStatusMessageInfo.statusMessage;
|
|
21
17
|
const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
22
18
|
return (React.createElement(rebass_1.Flex, { flexDirection: "row", className: `ab-${elementType}__SystemStatus__wrap` },
|
|
23
|
-
React.createElement(rebass_1.Flex, { style: { borderRadius: 'var(--ab__border-radius)' }, className: `ab-${elementType}__SystemStatus__text`, marginRight: 2, padding: 2, color:
|
|
19
|
+
React.createElement(rebass_1.Flex, { style: { borderRadius: 'var(--ab__border-radius)' }, className: `ab-${elementType}__SystemStatus__text`, marginRight: 2, padding: 2, color: color, backgroundColor: message ? background : '', fontSize: 'var( --ab-font-size-2)', alignItems: "center", "data-name": "system-status-message" }, message || '0 Messages')));
|
|
24
20
|
}
|
|
25
21
|
}
|
|
26
22
|
function mapStateToProps(state) {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStatusItemStyle = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const UIHelper_1 = tslib_1.__importDefault(require("../../UIHelper"));
|
|
6
|
+
exports.getStatusItemStyle = (systemStatusMessageInfo) => {
|
|
7
|
+
var _a;
|
|
8
|
+
const background = UIHelper_1.default.getColorByMessageType((_a = systemStatusMessageInfo === null || systemStatusMessageInfo === void 0 ? void 0 : systemStatusMessageInfo.statusType) !== null && _a !== void 0 ? _a : 'Success');
|
|
9
|
+
const color = systemStatusMessageInfo
|
|
10
|
+
? UIHelper_1.default.getButtonTextColourForMessageType(systemStatusMessageInfo.statusType)
|
|
11
|
+
: '';
|
|
12
|
+
return {
|
|
13
|
+
background,
|
|
14
|
+
color,
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThemeStatusPanelPopover = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const rebass_1 = require("rebass");
|
|
7
|
+
const Radio_1 = tslib_1.__importDefault(require("../../components/Radio"));
|
|
8
|
+
const AdaptableContext_1 = require("../AdaptableContext");
|
|
9
|
+
const AdaptableObjectRow_1 = require("../Components/AdaptableObjectRow");
|
|
10
|
+
const PanelWithRow_1 = require("../Components/Panels/PanelWithRow");
|
|
11
|
+
const colItems = [
|
|
12
|
+
{ Content: 'Current', Size: 2 },
|
|
13
|
+
{ Content: 'Theme Name', Size: 4 },
|
|
14
|
+
];
|
|
15
|
+
exports.ThemeStatusPanelPopover = () => {
|
|
16
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
17
|
+
const themes = adaptable.api.themeApi.getAllTheme();
|
|
18
|
+
const currentTheme = adaptable.api.themeApi.getCurrentTheme();
|
|
19
|
+
const handleThemeChange = React.useCallback((theme) => {
|
|
20
|
+
adaptable.api.themeApi.loadTheme(theme.Name);
|
|
21
|
+
}, []);
|
|
22
|
+
return (React.createElement(rebass_1.Flex, { flexDirection: "column" },
|
|
23
|
+
React.createElement(PanelWithRow_1.PanelWithRow, { colItems: colItems }),
|
|
24
|
+
themes.map((theme) => {
|
|
25
|
+
return (React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { key: theme.Name, colItems: [
|
|
26
|
+
{
|
|
27
|
+
Content: (React.createElement(Radio_1.default, { onClick: () => handleThemeChange(theme), id: theme.Name, checked: currentTheme === theme.Name })),
|
|
28
|
+
Size: 1,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
Content: (React.createElement("label", { style: { cursor: 'pointer' }, htmlFor: theme.Name }, theme.Name)),
|
|
32
|
+
Size: 4,
|
|
33
|
+
},
|
|
34
|
+
] }));
|
|
35
|
+
})));
|
|
36
|
+
};
|
|
@@ -105,6 +105,8 @@ export declare class Adaptable implements IAdaptable {
|
|
|
105
105
|
private initializeAgGrid;
|
|
106
106
|
private isAgGridReady;
|
|
107
107
|
private initAgGridContainerFromInitializedAgGrid;
|
|
108
|
+
private createStatusBars;
|
|
109
|
+
getAgGridStatusPanels(): import("@ag-grid-community/all-modules").StatusPanelDef[];
|
|
108
110
|
debouncedSetColumnIntoStore: import("lodash").DebouncedFunc<() => void>;
|
|
109
111
|
debouncedSaveGridLayout: import("lodash").DebouncedFunc<() => void>;
|
|
110
112
|
debouncedSetSelectedCells: import("lodash").DebouncedFunc<() => void>;
|