@adaptabletools/adaptable 11.1.15 → 11.1.16
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 +2 -0
- package/bundle.cjs.js +94 -94
- package/index.css +3 -0
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/AlertOptions.d.ts +8 -2
- package/src/AdaptableOptions/DashboardOptions.d.ts +4 -3
- package/src/AdaptableOptions/ExportOptions.d.ts +2 -2
- package/src/AdaptableOptions/FilterOptions.d.ts +5 -4
- package/src/AdaptableOptions/LayoutOptions.d.ts +56 -10
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +4 -3
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +18 -16
- package/src/Api/AdaptableApi.d.ts +10 -0
- package/src/Api/ConfigApi.d.ts +3 -3
- package/src/Api/EventApi.d.ts +1 -0
- package/src/Api/Events/LayoutChanged.d.ts +1 -1
- package/src/Api/ExportApi.d.ts +16 -0
- package/src/Api/FinanceApi.d.ts +104 -3
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +6 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +53 -0
- package/src/Api/Implementation/AlertApiImpl.js +5 -5
- package/src/Api/Implementation/ApiBase.js +3 -0
- package/src/Api/Implementation/ConditionalStyleApiImpl.js +3 -3
- package/src/Api/Implementation/ConfigApiImpl.js +5 -1
- package/src/Api/Implementation/CustomSortApiImpl.js +4 -4
- package/src/Api/Implementation/EventApiImpl.d.ts +1 -0
- package/src/Api/Implementation/EventApiImpl.js +3 -0
- package/src/Api/Implementation/ExportApiImpl.d.ts +3 -0
- package/src/Api/Implementation/ExportApiImpl.js +10 -0
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.js +7 -6
- package/src/Api/Implementation/FormatColumnApiImpl.js +5 -5
- package/src/Api/Implementation/InternalApiImpl.d.ts +11 -5
- package/src/Api/Implementation/InternalApiImpl.js +65 -3
- package/src/Api/Implementation/PlusMinusApiImpl.js +4 -7
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +2 -1
- package/src/Api/Implementation/ScheduleApiImpl.js +15 -7
- package/src/Api/Implementation/ShortcutApiImpl.js +3 -3
- package/src/Api/InternalApi.d.ts +11 -7
- package/src/Api/LayoutApi.d.ts +4 -6
- package/src/Api/ScheduleApi.d.ts +5 -1
- package/src/PredefinedConfig/AlertState.d.ts +3 -3
- package/src/PredefinedConfig/Common/AdaptableButton.d.ts +2 -5
- package/src/PredefinedConfig/Common/AdaptableForm.d.ts +4 -3
- package/src/PredefinedConfig/Common/AdaptableObject.d.ts +18 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +9 -0
- package/src/PredefinedConfig/Common/BaseContext.d.ts +10 -0
- package/src/PredefinedConfig/Common/BaseContext.js +2 -0
- package/src/PredefinedConfig/Common/CellSummary.d.ts +3 -3
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +9 -9
- package/src/PredefinedConfig/Common/Menu.d.ts +4 -13
- package/src/PredefinedConfig/DataSourceState.d.ts +2 -2
- package/src/PredefinedConfig/FilterState.d.ts +1 -1
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +5 -5
- package/src/Redux/Store/AdaptableStore.d.ts +1 -0
- package/src/Redux/Store/AdaptableStore.js +6 -1
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +1 -0
- package/src/Strategy/AlertModule.js +3 -0
- package/src/Strategy/CalculatedColumnModule.d.ts +3 -17
- package/src/Strategy/CalculatedColumnModule.js +2 -0
- package/src/Strategy/ConditionalStyleModule.js +4 -1
- package/src/Strategy/CustomSortModule.js +2 -0
- package/src/Strategy/DataSourceModule.js +2 -0
- package/src/Strategy/ExportModule.d.ts +5 -3
- package/src/Strategy/ExportModule.js +10 -0
- package/src/Strategy/FlashingCellModule.js +2 -0
- package/src/Strategy/FormatColumnModule.js +2 -0
- package/src/Strategy/FreeTextColumnModule.js +2 -0
- package/src/Strategy/Interface/IModule.d.ts +5 -3
- package/src/Strategy/Interface/IScheduleModule.d.ts +1 -1
- package/src/Strategy/LayoutModule.d.ts +2 -1
- package/src/Strategy/LayoutModule.js +35 -2
- package/src/Strategy/PlusMinusModule.js +7 -4
- package/src/Strategy/QueryModule.d.ts +2 -8
- package/src/Strategy/QueryModule.js +2 -0
- package/src/Strategy/ScheduleModule.d.ts +4 -3
- package/src/Strategy/ScheduleModule.js +4 -2
- package/src/Strategy/ShortcutModule.js +6 -1
- package/src/Strategy/StatusBarModule.d.ts +2 -1
- package/src/Strategy/StatusBarModule.js +2 -3
- package/src/Strategy/Utilities/getObjectTagsViewItems.d.ts +4 -0
- package/src/Strategy/Utilities/getObjectTagsViewItems.js +13 -0
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +2 -1
- package/src/Utilities/Emitter.d.ts +1 -0
- package/src/Utilities/Emitter.js +9 -0
- package/src/Utilities/Extensions/TypeExtensions.d.ts +2 -0
- package/src/Utilities/Interface/MessagePopups.d.ts +3 -3
- package/src/Utilities/ObjectFactory.d.ts +2 -2
- package/src/Utilities/Services/AlertService.js +1 -1
- package/src/Utilities/Services/DataService.js +1 -1
- package/src/Utilities/Services/Interface/IModuleService.d.ts +1 -1
- package/src/Utilities/Services/ModuleService.d.ts +1 -1
- package/src/Utilities/Services/ModuleService.js +1 -0
- package/src/View/Alert/AlertStatusSubPanel.js +2 -1
- package/src/View/Alert/Wizard/AlertWizard.js +9 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +9 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -0
- package/src/View/Components/FilterForm/FilterForm.js +1 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +11 -7
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
- package/src/View/Components/Popups/AdaptableToaster.js +3 -1
- package/src/View/Components/Popups/FormPopups/FormPopups.d.ts +3 -3
- package/src/View/Components/TagValueSelector/index.d.ts +13 -0
- package/src/View/Components/TagValueSelector/index.js +22 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +9 -0
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +9 -0
- package/src/View/DataSource/Wizard/DataSourceSettingsWizard.js +1 -1
- package/src/View/DataSource/Wizard/DataSourceWizard.js +10 -0
- package/src/View/Export/ExportSelector.d.ts +4 -0
- package/src/View/Export/ExportSelector.js +75 -0
- package/src/View/Export/ExportViewPanel.js +6 -7
- package/src/View/Export/ReportExportDropdown.d.ts +2 -5
- package/src/View/Export/Wizard/NewReportWizard.js +9 -0
- package/src/View/Export/constants.d.ts +2 -0
- package/src/View/Export/constants.js +5 -0
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +9 -0
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +9 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +9 -0
- package/src/View/GridInfo/GridOptionsComponent.d.ts +0 -1
- package/src/View/GridInfo/GridOptionsComponent.js +0 -1
- package/src/View/Layout/LayoutCloneButton.d.ts +6 -0
- package/src/View/Layout/LayoutCloneButton.js +15 -0
- package/src/View/Layout/LayoutRadioSelector.d.ts +2 -1
- package/src/View/Layout/LayoutRadioSelector.js +1 -1
- package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +6 -1
- package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -0
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +9 -0
- package/src/View/Query/Wizard/NamedQueryWizard.js +9 -0
- package/src/View/Schedule/Wizard/ScheduleWizard.js +10 -0
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +10 -0
- package/src/View/StatusBar/StatusBarPopup.js +1 -1
- package/src/View/Wizard/ObjectTagsWizardSection.d.ts +8 -0
- package/src/View/Wizard/ObjectTagsWizardSection.js +22 -0
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -0
- package/src/View/Wizard/OnePageAdaptableWizard.js +12 -5
- package/src/agGrid/Adaptable.d.ts +12 -0
- package/src/agGrid/Adaptable.js +80 -45
- package/src/agGrid/createAgStatusPanelComponent.js +1 -0
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.d.ts +8 -7
- package/src/components/ExpressionEditor/index.js +5 -2
- package/src/metamodel/adaptable.metamodel.d.ts +44 -2
- package/src/metamodel/adaptable.metamodel.js +222 -21
- package/src/types.d.ts +6 -5
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TagValueOptionsTags = exports.TagValueSelector = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const ValueSelector_1 = require("../ValueSelector");
|
|
7
|
+
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
8
|
+
exports.TagValueSelector = (props) => {
|
|
9
|
+
const { api } = AdaptableContext_1.useAdaptable();
|
|
10
|
+
const getDefaultTags = () => {
|
|
11
|
+
var _a;
|
|
12
|
+
return (_a = api.internalApi.getAvailableTags()) !== null && _a !== void 0 ? _a : [];
|
|
13
|
+
};
|
|
14
|
+
const { availableTags = getDefaultTags(), selectedTags = [], onChange, singleSelect } = props;
|
|
15
|
+
return (React.createElement(ValueSelector_1.ValueSelector, { options: availableTags, value: selectedTags.map((tag) => tag.value), singleSelect: singleSelect, allowReorder: false, onChange: (selectedTagsIds, selectedTagsMap) => {
|
|
16
|
+
onChange(selectedTagsIds.map((id) => selectedTagsMap.get(id)));
|
|
17
|
+
}, selectionBoxPosition: 'top', toIdentifier: (tag) => tag.value, toLabel: (tag) => tag.label, noSelectionLabel: singleSelect ? 'Select a tag' : 'You have not selected any tags.', xSelectedLabel: singleSelect ? () => 'Selected tag:' : () => 'Selected tags:' }));
|
|
18
|
+
};
|
|
19
|
+
exports.TagValueOptionsTags = (props) => {
|
|
20
|
+
const { tags = [] } = props;
|
|
21
|
+
return (React.createElement(ValueSelector_1.ValueOptionsTags, { options: tags, value: tags.map((tag) => tag.value), toIdentifier: (tag) => tag.value, toLabel: (tag) => tag.label, allowWrap: true, readOnly: true }));
|
|
22
|
+
};
|
|
@@ -18,6 +18,7 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/Obje
|
|
|
18
18
|
const react_redux_1 = require("react-redux");
|
|
19
19
|
const ConditionalStyleRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ConditionalStyleRedux"));
|
|
20
20
|
const ConditionalStyleSettingsWizardSettings_1 = require("./ConditionalStyleSettingsWizardSettings");
|
|
21
|
+
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
21
22
|
exports.ConditionalStyleWizard = (props) => {
|
|
22
23
|
var _a;
|
|
23
24
|
const data = (_a = props.data) !== null && _a !== void 0 ? _a : props.popupParams.value;
|
|
@@ -91,6 +92,14 @@ exports.ConditionalStyleWizard = (props) => {
|
|
|
91
92
|
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
92
93
|
React.createElement(ConditionalStyleSettingsWizardSettings_1.ConditionalStyleSettingsWizardSettings, { onChange: setConditionalStyle }))),
|
|
93
94
|
},
|
|
95
|
+
{
|
|
96
|
+
details: 'Select Conditional Style tags',
|
|
97
|
+
title: 'Tags',
|
|
98
|
+
isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
|
|
99
|
+
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
100
|
+
React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setConditionalStyle }))),
|
|
101
|
+
renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
|
|
102
|
+
},
|
|
94
103
|
'-',
|
|
95
104
|
{
|
|
96
105
|
details: 'Review the Conditional Style',
|
|
@@ -12,6 +12,7 @@ const CustomSortValuesWizardSection_1 = require("./CustomSortValuesWizardSection
|
|
|
12
12
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
13
13
|
const react_redux_1 = require("react-redux");
|
|
14
14
|
const CustomSortRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/CustomSortRedux"));
|
|
15
|
+
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
15
16
|
exports.CustomSortWizard = (props) => {
|
|
16
17
|
var _a, _b;
|
|
17
18
|
let data = props.data;
|
|
@@ -59,6 +60,14 @@ exports.CustomSortWizard = (props) => {
|
|
|
59
60
|
render: () => (React.createElement(rebass_1.Box, { padding: 2, style: { height: '100%' } },
|
|
60
61
|
React.createElement(CustomSortValuesWizardSection_1.CustomSortValuesWizardSection, { onChange: setCustomSort }))),
|
|
61
62
|
},
|
|
63
|
+
{
|
|
64
|
+
details: 'Select Custom Sort tags',
|
|
65
|
+
title: 'Tags',
|
|
66
|
+
isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
|
|
67
|
+
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
68
|
+
React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setCustomSort }))),
|
|
69
|
+
renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
|
|
70
|
+
},
|
|
62
71
|
'-',
|
|
63
72
|
{
|
|
64
73
|
title: 'Summary',
|
|
@@ -32,7 +32,7 @@ exports.DataSourceSettingsWizard = (props) => {
|
|
|
32
32
|
};
|
|
33
33
|
return (React.createElement(rebass_1.Box, { "data-name": "data-soruce-settings" },
|
|
34
34
|
React.createElement(Tabs_1.Tabs, { autoFocus: false },
|
|
35
|
-
React.createElement(Tabs_1.Tabs.Tab, null, "Data
|
|
35
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Data Source Settings"),
|
|
36
36
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
37
37
|
React.createElement(FormLayout_1.default, null,
|
|
38
38
|
React.createElement(FormLayout_1.FormRow, { label: "Name" },
|
|
@@ -10,6 +10,7 @@ const DataSourceSettingsSummary_1 = require("./DataSourceSettingsSummary");
|
|
|
10
10
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
11
11
|
const react_redux_1 = require("react-redux");
|
|
12
12
|
const DataSourceRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/DataSourceRedux"));
|
|
13
|
+
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
13
14
|
exports.DataSourceWizard = (props) => {
|
|
14
15
|
const [dataSource, setDataSource] = React.useState(() => {
|
|
15
16
|
return props.data ? props.data : ObjectFactory_1.default.CreateEmptyDataSource();
|
|
@@ -32,6 +33,15 @@ exports.DataSourceWizard = (props) => {
|
|
|
32
33
|
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
33
34
|
React.createElement(DataSourceSettingsWizard_1.DataSourceSettingsWizard, { onChange: setDataSource }))),
|
|
34
35
|
},
|
|
36
|
+
{
|
|
37
|
+
details: 'Select Data Source tags',
|
|
38
|
+
title: 'Tags',
|
|
39
|
+
isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
|
|
40
|
+
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
41
|
+
React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setDataSource }))),
|
|
42
|
+
renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
|
|
43
|
+
},
|
|
44
|
+
'-',
|
|
35
45
|
{
|
|
36
46
|
render: () => {
|
|
37
47
|
return (React.createElement(rebass_1.Box, { padding: 2 },
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExportSelector = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const DropdownButton_1 = tslib_1.__importDefault(require("../../components/DropdownButton"));
|
|
7
|
+
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
8
|
+
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
9
|
+
const AdaptableContext_1 = require("../AdaptableContext");
|
|
10
|
+
const constants_1 = require("./constants");
|
|
11
|
+
const dropdownStyle = {
|
|
12
|
+
padding: 2,
|
|
13
|
+
fontSize: 'small',
|
|
14
|
+
};
|
|
15
|
+
const isCustomDestination = (destination) => {
|
|
16
|
+
return !!destination.name;
|
|
17
|
+
};
|
|
18
|
+
exports.ExportSelector = () => {
|
|
19
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
20
|
+
// reports
|
|
21
|
+
const handleReportChange = (report) => {
|
|
22
|
+
adaptable.api.exportApi.selectReport(report);
|
|
23
|
+
};
|
|
24
|
+
const allReports = adaptable.api.exportApi.getAllReports();
|
|
25
|
+
const allReportNames = allReports.map((report) => report.Name);
|
|
26
|
+
const reportItems = allReportNames.map((report) => {
|
|
27
|
+
return {
|
|
28
|
+
label: report,
|
|
29
|
+
value: report,
|
|
30
|
+
onClick: () => handleReportChange(report),
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
const currentReport = adaptable.api.exportApi.getCurrentReport();
|
|
34
|
+
const currentReportId = StringExtensions_1.default.IsNullOrEmpty(currentReport === null || currentReport === void 0 ? void 0 : currentReport.Name)
|
|
35
|
+
? currentReport
|
|
36
|
+
: currentReport.Name;
|
|
37
|
+
// destinations
|
|
38
|
+
const handleDestinationChange = (destination) => {
|
|
39
|
+
adaptable.api.exportApi.selectDestination(destination);
|
|
40
|
+
};
|
|
41
|
+
const destinationItems = [
|
|
42
|
+
...adaptable.api.exportApi.getAvailableExportDestinations().map((destination) => ({
|
|
43
|
+
label: destination,
|
|
44
|
+
onClick: () => handleDestinationChange(destination),
|
|
45
|
+
})),
|
|
46
|
+
...adaptable.api.exportApi.getAllCustomDestination().map((destination) => ({
|
|
47
|
+
label: destination.name,
|
|
48
|
+
onClick: () => handleDestinationChange(destination.name),
|
|
49
|
+
})),
|
|
50
|
+
];
|
|
51
|
+
const currentDestination = adaptable.api.exportApi.getCurrentDestination();
|
|
52
|
+
let currentDestinationId = null;
|
|
53
|
+
if (typeof currentDestination === 'string') {
|
|
54
|
+
currentDestinationId = currentDestination;
|
|
55
|
+
}
|
|
56
|
+
else if (currentDestination && 'name' in currentDestination) {
|
|
57
|
+
currentDestinationId = currentDestination.name;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
currentDestinationId = constants_1.SELECT_DESTINATION_STRING;
|
|
61
|
+
}
|
|
62
|
+
// export
|
|
63
|
+
const handleExport = () => {
|
|
64
|
+
if (isCustomDestination(currentDestination)) {
|
|
65
|
+
adaptable.api.exportApi.sendReport(currentReport.Name, currentDestination.name);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
adaptable.api.exportApi.sendReport(currentReport.Name, currentDestination);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
return (React.createElement(React.Fragment, null,
|
|
72
|
+
React.createElement(DropdownButton_1.default, { disabled: allReportNames.length == 0, style: dropdownStyle, items: reportItems, columns: ['label'], onClear: () => handleReportChange(null), showClearButton: !!currentReport, variant: "outlined", marginRight: 2 }, currentReportId !== null && currentReportId !== void 0 ? currentReportId : constants_1.SELECT_REPORT_STRING),
|
|
73
|
+
React.createElement(DropdownButton_1.default, { disabled: currentReportId === constants_1.SELECT_REPORT_STRING, style: dropdownStyle, items: destinationItems, columns: ['label'], onClear: () => handleDestinationChange(null), showClearButton: !!currentDestination, variant: "outlined", marginRight: 2 }, currentDestinationId),
|
|
74
|
+
React.createElement(SimpleButton_1.default, { disabled: currentDestinationId === constants_1.SELECT_DESTINATION_STRING, iconSize: 15, icon: "export", variant: "text", onClick: handleExport })));
|
|
75
|
+
};
|
|
@@ -21,13 +21,12 @@ const ButtonSchedule_1 = require("../Components/Buttons/ButtonSchedule");
|
|
|
21
21
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
|
|
22
22
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
23
23
|
const react_redux_1 = require("react-redux");
|
|
24
|
-
const
|
|
25
|
-
const SELECT_DESTINATION_STRING = 'Select Destination';
|
|
24
|
+
const constants_1 = require("./constants");
|
|
26
25
|
class ExportViewPanelComponent extends React.Component {
|
|
27
26
|
render() {
|
|
28
27
|
let currentReport = this.props.api.exportApi.getReportByName(this.props.CurrentReport);
|
|
29
28
|
let currentReportId = StringExtensions_1.StringExtensions.IsNullOrEmpty(this.props.CurrentReport)
|
|
30
|
-
? SELECT_REPORT_STRING
|
|
29
|
+
? constants_1.SELECT_REPORT_STRING
|
|
31
30
|
: this.props.CurrentReport;
|
|
32
31
|
const allReportNames = this.getAllReportNames();
|
|
33
32
|
let reportItems = allReportNames.map((report) => {
|
|
@@ -40,11 +39,11 @@ class ExportViewPanelComponent extends React.Component {
|
|
|
40
39
|
if (currentReport && !allReportNames.includes(currentReport.Name)) {
|
|
41
40
|
// current report is not available
|
|
42
41
|
currentReport = undefined;
|
|
43
|
-
currentReportId = SELECT_REPORT_STRING;
|
|
42
|
+
currentReportId = constants_1.SELECT_REPORT_STRING;
|
|
44
43
|
}
|
|
45
44
|
let currentDestination = this.props.api.exportApi.getDestinationByName(this.props.CurrentDestination);
|
|
46
45
|
let currentDestinationId = StringExtensions_1.StringExtensions.IsNullOrEmpty(this.props.CurrentDestination)
|
|
47
|
-
? SELECT_DESTINATION_STRING
|
|
46
|
+
? constants_1.SELECT_DESTINATION_STRING
|
|
48
47
|
: this.props.CurrentDestination;
|
|
49
48
|
const destinationItems = [
|
|
50
49
|
...this.props.api.exportApi.getAvailableExportDestinations().map((destination) => ({
|
|
@@ -66,7 +65,7 @@ class ExportViewPanelComponent extends React.Component {
|
|
|
66
65
|
.includes(this.props.CurrentDestination)) {
|
|
67
66
|
// current destination is not available
|
|
68
67
|
currentDestination = undefined;
|
|
69
|
-
currentDestinationId = SELECT_DESTINATION_STRING;
|
|
68
|
+
currentDestinationId = constants_1.SELECT_DESTINATION_STRING;
|
|
70
69
|
}
|
|
71
70
|
let accessLevel = AdaptableHelper_1.default.getAppropriateAccessLevel(currentReport, this.props.accessLevel);
|
|
72
71
|
let deleteMessage = "Are you sure you want to delete '";
|
|
@@ -81,7 +80,7 @@ class ExportViewPanelComponent extends React.Component {
|
|
|
81
80
|
React.createElement(rebass_1.Flex, { flex: 1 },
|
|
82
81
|
React.createElement(DropdownButton_1.default, { disabled: allReportNames.length == 0, style: { width: '100%', fontSize: 'small' }, items: reportItems, columns: ['label'], className: `ab-${elementType}__Export__select`, onClear: () => this.onSelectedReportChanged(null), showClearButton: !!currentReport, variant: "outlined", marginRight: 2 }, currentReportId)),
|
|
83
82
|
React.createElement(rebass_1.Flex, { flex: 1 },
|
|
84
|
-
React.createElement(DropdownButton_1.default, { disabled: currentReportId === SELECT_REPORT_STRING, style: { width: '100%', fontSize: 'small' }, items: destinationItems, columns: ['label'], className: `ab-${elementType}__Export__export`, onClear: () => this.onSelectedDestinationChanged(null), showClearButton: !!currentDestination, variant: "outlined", marginRight: 2 }, currentDestinationId)),
|
|
83
|
+
React.createElement(DropdownButton_1.default, { disabled: currentReportId === constants_1.SELECT_REPORT_STRING, style: { width: '100%', fontSize: 'small' }, items: destinationItems, columns: ['label'], className: `ab-${elementType}__Export__export`, onClear: () => this.onSelectedDestinationChanged(null), showClearButton: !!currentDestination, variant: "outlined", marginRight: 2 }, currentDestinationId)),
|
|
85
84
|
React.createElement(rebass_1.Flex, { className: join_1.default(accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__Export__controls`), style: { width: '100%' } },
|
|
86
85
|
React.createElement(ButtonExport_1.ButtonExport, { onClick: () => onApplyExport(), tooltip: "Export Report", className: `ab-${elementType}__Export__export`, disabled: currentReport == null || currentDestination == null }),
|
|
87
86
|
React.createElement(ButtonEdit_1.ButtonEdit, { onClick: () => this.props.onEditReport(this.props.moduleInfo.Popup), tooltip: "Edit Report", className: `ab-${elementType}__Export__edit`, disabled: currentReport == null || currentReport.ReportColumnScope == 'CustomColumns', accessLevel: accessLevel }),
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export declare const ReportExportDropdown: React.FunctionComponent<{
|
|
4
|
-
data: Report;
|
|
5
|
-
}>;
|
|
1
|
+
import { AdaptableModuleViewAction } from '../../Strategy/Interface/IModule';
|
|
2
|
+
export declare const ReportExportDropdown: AdaptableModuleViewAction;
|
|
@@ -13,6 +13,7 @@ const ReportNameWizardSection_1 = require("./ReportNameWizardSection");
|
|
|
13
13
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
14
14
|
const react_redux_1 = require("react-redux");
|
|
15
15
|
const ExportRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ExportRedux"));
|
|
16
|
+
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
16
17
|
exports.NewReportWizard = (props) => {
|
|
17
18
|
var _a, _b;
|
|
18
19
|
const isEdit = ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) ? props.popupParams.action === 'Edit'
|
|
@@ -59,6 +60,14 @@ exports.NewReportWizard = (props) => {
|
|
|
59
60
|
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
60
61
|
React.createElement(ReportNameWizardSection_1.ReportNameWizardSection, { onChange: setReport }))),
|
|
61
62
|
},
|
|
63
|
+
{
|
|
64
|
+
details: 'Select Report tags',
|
|
65
|
+
title: 'Tags',
|
|
66
|
+
isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
|
|
67
|
+
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
68
|
+
React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setReport }))),
|
|
69
|
+
renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
|
|
70
|
+
},
|
|
62
71
|
'-',
|
|
63
72
|
{
|
|
64
73
|
title: 'Summary',
|
|
@@ -18,6 +18,7 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/Obje
|
|
|
18
18
|
const react_redux_1 = require("react-redux");
|
|
19
19
|
const isValidFlashingCellRules_1 = require("./isValidFlashingCellRules");
|
|
20
20
|
const FlashingCellRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/FlashingCellRedux"));
|
|
21
|
+
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
21
22
|
exports.FlashingCellWizard = (props) => {
|
|
22
23
|
const { api } = AdaptableContext_1.useAdaptable();
|
|
23
24
|
const [flashingCell, setFlashingCell] = react_1.useState(() => {
|
|
@@ -84,6 +85,14 @@ exports.FlashingCellWizard = (props) => {
|
|
|
84
85
|
renderSummary: FlashingCellStyleWizardSection_1.renderFlashingAlertStyleSummary,
|
|
85
86
|
title: 'Flash Styles',
|
|
86
87
|
},
|
|
88
|
+
{
|
|
89
|
+
details: 'Select Flashing Cell tags',
|
|
90
|
+
title: 'Tags',
|
|
91
|
+
isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
|
|
92
|
+
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
93
|
+
React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setFlashingCell }))),
|
|
94
|
+
renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
|
|
95
|
+
},
|
|
87
96
|
'-',
|
|
88
97
|
{
|
|
89
98
|
details: 'Review the Flashing Cell Rule',
|
|
@@ -16,6 +16,7 @@ const NewScopeComponent_1 = require("../../Components/NewScopeComponent");
|
|
|
16
16
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
17
17
|
const react_redux_1 = require("react-redux");
|
|
18
18
|
const FormatColumnRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/FormatColumnRedux"));
|
|
19
|
+
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
19
20
|
const adjustDisplayFormat = (formatColumn, api) => {
|
|
20
21
|
formatColumn = Object.assign({}, formatColumn);
|
|
21
22
|
const formatDataType = FormatColumnFormatWizardSection_1.getFormatDisplayTypeForScope(formatColumn.Scope, api);
|
|
@@ -137,6 +138,14 @@ function FormatColumnWizard(props) {
|
|
|
137
138
|
React.createElement(FormatColumnSettingsWizardSection_1.FormatColumnSettingsWizardSection, { onChange: setFormatColumn })));
|
|
138
139
|
},
|
|
139
140
|
},
|
|
141
|
+
{
|
|
142
|
+
details: 'Select Format Column tags',
|
|
143
|
+
title: 'Tags',
|
|
144
|
+
isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
|
|
145
|
+
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
146
|
+
React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setFormatColumn }))),
|
|
147
|
+
renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
|
|
148
|
+
},
|
|
140
149
|
'-',
|
|
141
150
|
{
|
|
142
151
|
details: 'Review the Format Column',
|
|
@@ -11,6 +11,7 @@ const FreeTextColumnSettingsWizardSection_1 = require("./FreeTextColumnSettingsW
|
|
|
11
11
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
12
12
|
const FreeTextColumnRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/FreeTextColumnRedux"));
|
|
13
13
|
const react_redux_1 = require("react-redux");
|
|
14
|
+
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
14
15
|
exports.FreeTextColumnWizard = (props) => {
|
|
15
16
|
var _a;
|
|
16
17
|
const allFreeTextColumns = react_redux_1.useSelector((state) => state.FreeTextColumn.FreeTextColumns);
|
|
@@ -45,6 +46,14 @@ exports.FreeTextColumnWizard = (props) => {
|
|
|
45
46
|
React.createElement(FreeTextColumnSettingsWizardSection_1.FreeTextColumnSettingsWizardSection, { isEdit: Boolean(props.data), onChange: setFreeTextColumn })));
|
|
46
47
|
},
|
|
47
48
|
},
|
|
49
|
+
{
|
|
50
|
+
details: 'Select Free Text Column tags',
|
|
51
|
+
title: 'Tags',
|
|
52
|
+
isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
|
|
53
|
+
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
54
|
+
React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setFreeTextColumn }))),
|
|
55
|
+
renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
|
|
56
|
+
},
|
|
48
57
|
'-',
|
|
49
58
|
{
|
|
50
59
|
details: 'Review the Free Text Column',
|
|
@@ -11,7 +11,6 @@ class GridOptionsComponent extends React.Component {
|
|
|
11
11
|
super(props);
|
|
12
12
|
const gridOptions = props.api.internalApi.getAgGridInstance();
|
|
13
13
|
this.state = {
|
|
14
|
-
testString: 'Hello world',
|
|
15
14
|
showTotalFooter: gridOptions.groupIncludeTotalFooter,
|
|
16
15
|
showGroupFooter: gridOptions.groupIncludeFooter,
|
|
17
16
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LayoutCloneButton = 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.LayoutCloneButton = ({ data, accessLevel }) => {
|
|
9
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
10
|
+
const isDisabled = accessLevel === 'ReadOnly';
|
|
11
|
+
const handleClick = React.useCallback(() => {
|
|
12
|
+
adaptable.api.layoutApi.showLayoutEditor(data.Name, 'Clone');
|
|
13
|
+
}, []);
|
|
14
|
+
return React.createElement(SimpleButton_1.default, { onClick: handleClick, disabled: isDisabled, variant: "text", icon: "clone" });
|
|
15
|
+
};
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const Radio_1 = tslib_1.__importDefault(require("../../components/Radio"));
|
|
7
7
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
8
|
-
exports.LayoutRadioSelector = ({ data
|
|
8
|
+
exports.LayoutRadioSelector = ({ data }) => {
|
|
9
9
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
10
10
|
const currentLayout = adaptable.api.layoutApi.getCurrentLayout();
|
|
11
11
|
const layouts = adaptable.api.layoutApi.getAllLayout();
|
|
@@ -4,6 +4,7 @@ exports.LayoutStatusBarSubPanelPopover = 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 ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
7
8
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
8
9
|
const AdaptableObjectRow_1 = require("../Components/AdaptableObjectRow");
|
|
9
10
|
const PanelWithRow_1 = require("../Components/Panels/PanelWithRow");
|
|
@@ -14,12 +15,16 @@ const colItems = [
|
|
|
14
15
|
];
|
|
15
16
|
exports.LayoutStatusBarSubPanelPopover = () => {
|
|
16
17
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
18
|
+
const accessLevel = adaptable.EntitlementService.getEntitlementAccessLevelForModule(ModuleConstants.LayoutModuleId);
|
|
17
19
|
const layouts = adaptable.api.layoutApi.getAllLayout();
|
|
18
20
|
return (React.createElement(rebass_1.Flex, { flexDirection: "column" },
|
|
19
21
|
React.createElement(PanelWithRow_1.PanelWithRow, { colItems: colItems }),
|
|
20
22
|
layouts.map((layout) => {
|
|
21
23
|
return (React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { key: layout.Name, colItems: [
|
|
22
|
-
{
|
|
24
|
+
{
|
|
25
|
+
Content: (React.createElement(LayoutRadioSelector_1.LayoutRadioSelector, { accessLevel: accessLevel, id: layout.Name, data: layout })),
|
|
26
|
+
Size: 1,
|
|
27
|
+
},
|
|
23
28
|
{
|
|
24
29
|
Content: (React.createElement("label", { style: { cursor: 'pointer' }, htmlFor: layout.Name }, layout.Name)),
|
|
25
30
|
Size: 4,
|
|
@@ -43,6 +43,7 @@ export declare class LayoutEditorWizard extends React.Component<LayoutEditorWiza
|
|
|
43
43
|
Uuid?: string;
|
|
44
44
|
Source?: "Config" | "User";
|
|
45
45
|
IsReadOnly?: boolean;
|
|
46
|
+
Tags?: import("../../../PredefinedConfig/Common/AdaptableObject").AdaptableObjectTag[];
|
|
46
47
|
};
|
|
47
48
|
canNext(): boolean;
|
|
48
49
|
canBack(): boolean;
|
|
@@ -11,6 +11,7 @@ const PlusMinusSettingsWizardSection_1 = require("./PlusMinusSettingsWizardSecti
|
|
|
11
11
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
12
12
|
const react_redux_1 = require("react-redux");
|
|
13
13
|
const PlusMinusRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/PlusMinusRedux"));
|
|
14
|
+
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
14
15
|
exports.PlusMinusWizard = (props) => {
|
|
15
16
|
const [plusMinus, setPlusMinus] = React.useState(() => {
|
|
16
17
|
var _a, _b, _c, _d, _e;
|
|
@@ -67,6 +68,14 @@ exports.PlusMinusWizard = (props) => {
|
|
|
67
68
|
renderSummary: () => React.createElement(PlusMinusSettingsWizardSection_1.PlusMinusSettingsSummary, { hasCondition: hasCondition }),
|
|
68
69
|
render: () => (React.createElement(PlusMinusSettingsWizardSection_1.PlusMinusSettingsWizardSection, { hasCondition: hasCondition, onConditionChange: setHasCondition, onChange: setPlusMinus })),
|
|
69
70
|
},
|
|
71
|
+
{
|
|
72
|
+
details: 'Select Plus/Minus tags',
|
|
73
|
+
title: 'Tags',
|
|
74
|
+
isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
|
|
75
|
+
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
76
|
+
React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setPlusMinus }))),
|
|
77
|
+
renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
|
|
78
|
+
},
|
|
70
79
|
'-',
|
|
71
80
|
{
|
|
72
81
|
render: () => {
|
|
@@ -12,6 +12,7 @@ const NamedQueryExpressionWizardSection_1 = require("./NamedQueryExpressionWizar
|
|
|
12
12
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
13
13
|
const react_redux_1 = require("react-redux");
|
|
14
14
|
const QueryRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/QueryRedux"));
|
|
15
|
+
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
15
16
|
function NamedQueryWizard(props) {
|
|
16
17
|
const [namedQuery, setNamedQuery] = react_1.useState(() => {
|
|
17
18
|
var _a, _b;
|
|
@@ -47,6 +48,14 @@ function NamedQueryWizard(props) {
|
|
|
47
48
|
return React.createElement(NamedQuerySettingsWizardSection_1.NamedQuerySettingsWizardSection, { onChange: setNamedQuery });
|
|
48
49
|
},
|
|
49
50
|
},
|
|
51
|
+
{
|
|
52
|
+
details: 'Select Query tags',
|
|
53
|
+
title: 'Tags',
|
|
54
|
+
isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
|
|
55
|
+
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
56
|
+
React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setNamedQuery }))),
|
|
57
|
+
renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
|
|
58
|
+
},
|
|
50
59
|
'-',
|
|
51
60
|
{
|
|
52
61
|
title: 'Summary',
|
|
@@ -12,6 +12,7 @@ const Enums_1 = require("../../../PredefinedConfig/Common/Enums");
|
|
|
12
12
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
13
13
|
const react_redux_1 = require("react-redux");
|
|
14
14
|
const ScheduleRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ScheduleRedux"));
|
|
15
|
+
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
15
16
|
exports.ScheduleWizard = (props) => {
|
|
16
17
|
var _a, _b, _c;
|
|
17
18
|
const data = (_a = props.data) !== null && _a !== void 0 ? _a : props.popupParams.value;
|
|
@@ -101,6 +102,15 @@ exports.ScheduleWizard = (props) => {
|
|
|
101
102
|
render: () => (React.createElement(rebass_1.Box, { p: 3 },
|
|
102
103
|
React.createElement(ScheduleScheduleWizard_1.ScheduleScheduleWizard, { isOneOff: isOneOff, onSetIsOneOff: setIsOneOff, onChange: setSchedule }))),
|
|
103
104
|
},
|
|
105
|
+
{
|
|
106
|
+
details: 'Select Schedule tags',
|
|
107
|
+
title: 'Tags',
|
|
108
|
+
isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
|
|
109
|
+
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
110
|
+
React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setSchedule }))),
|
|
111
|
+
renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
|
|
112
|
+
},
|
|
113
|
+
'-',
|
|
104
114
|
{
|
|
105
115
|
render: () => {
|
|
106
116
|
return (React.createElement(rebass_1.Box, { padding: 2 },
|
|
@@ -14,6 +14,7 @@ const react_redux_1 = require("react-redux");
|
|
|
14
14
|
const ShortcutRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ShortcutRedux"));
|
|
15
15
|
const shortcutKeys_1 = require("../shortcutKeys");
|
|
16
16
|
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
17
|
+
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
17
18
|
exports.ShortcutWizard = (props) => {
|
|
18
19
|
const [shortcut, setShortcut] = React.useState(() => {
|
|
19
20
|
var _a;
|
|
@@ -71,6 +72,15 @@ exports.ShortcutWizard = (props) => {
|
|
|
71
72
|
React.createElement(ShortcutSettingsWizard_1.ShortcutSettingsWizard, { availableKeys: (_a = props.availableKeys) !== null && _a !== void 0 ? _a : availableKeys, onChange: setShortcut })));
|
|
72
73
|
},
|
|
73
74
|
},
|
|
75
|
+
{
|
|
76
|
+
details: 'Select Shortcut tags',
|
|
77
|
+
title: 'Tags',
|
|
78
|
+
isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
|
|
79
|
+
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
80
|
+
React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setShortcut }))),
|
|
81
|
+
renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
|
|
82
|
+
},
|
|
83
|
+
'-',
|
|
74
84
|
{
|
|
75
85
|
render: () => {
|
|
76
86
|
return (React.createElement(rebass_1.Box, { padding: 2 },
|
|
@@ -22,7 +22,7 @@ exports.StatusBarPopup = (props) => {
|
|
|
22
22
|
const handleTabChange = React.useCallback((tabs) => {
|
|
23
23
|
const newStatusPanels = tabs.map((tab) => {
|
|
24
24
|
const statusPanel = statusPanels.find((sp) => sp.Key === tab.Name);
|
|
25
|
-
return Object.assign(Object.assign({}, statusPanel), {
|
|
25
|
+
return Object.assign(Object.assign({}, statusPanel), { StatusBarPanels: tab.Items });
|
|
26
26
|
});
|
|
27
27
|
adaptable.api.statusBarApi.setStatusPanels(newStatusPanels);
|
|
28
28
|
}, [statusPanels]);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AdaptableObject } from '../../PredefinedConfig/Common/AdaptableObject';
|
|
3
|
+
declare type ObjectTagsWizardSectionProps<T extends AdaptableObject> = {
|
|
4
|
+
onChange: (data: T) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const ObjectTagsWizardSection: <T extends AdaptableObject>(props: ObjectTagsWizardSectionProps<T>) => JSX.Element;
|
|
7
|
+
export declare const renderObjectTagsSummary: <T extends AdaptableObject>(data: T) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderObjectTagsSummary = exports.ObjectTagsWizardSection = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const Tabs_1 = require("../../components/Tabs");
|
|
7
|
+
const TagValueSelector_1 = require("../Components/TagValueSelector");
|
|
8
|
+
const OnePageAdaptableWizard_1 = require("./OnePageAdaptableWizard");
|
|
9
|
+
const rebass_1 = require("rebass");
|
|
10
|
+
exports.ObjectTagsWizardSection = (props) => {
|
|
11
|
+
const { onChange } = props;
|
|
12
|
+
const { data } = OnePageAdaptableWizard_1.useOnePageWizardContext();
|
|
13
|
+
return (React.createElement(Tabs_1.Tabs, { style: { height: '100%' } },
|
|
14
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Tags"),
|
|
15
|
+
React.createElement(Tabs_1.Tabs.Content, null,
|
|
16
|
+
React.createElement(TagValueSelector_1.TagValueSelector, { selectedTags: data.Tags, onChange: (selectedTags) => onChange(Object.assign(Object.assign({}, data), { Tags: selectedTags })) }))));
|
|
17
|
+
};
|
|
18
|
+
exports.renderObjectTagsSummary = (data) => {
|
|
19
|
+
var _a;
|
|
20
|
+
return ((_a = data.Tags) === null || _a === void 0 ? void 0 : _a.length) ? (React.createElement(rebass_1.Text, { fontSize: 2 },
|
|
21
|
+
React.createElement(TagValueSelector_1.TagValueOptionsTags, { tags: data.Tags }))) : null;
|
|
22
|
+
};
|
|
@@ -21,6 +21,7 @@ export declare type OnePageWizardSection<ENTITY> = {
|
|
|
21
21
|
title: string;
|
|
22
22
|
details?: React.ReactNode;
|
|
23
23
|
isValid?: (data: ENTITY, api: AdaptableApi, context: OnePageAdaptableWizardContextType<ENTITY>) => true | string;
|
|
24
|
+
isVisible?: (data: ENTITY, api: AdaptableApi, context: OnePageAdaptableWizardContextType<ENTITY>) => boolean;
|
|
24
25
|
render: (data: ENTITY, index: number) => React.ReactNode;
|
|
25
26
|
renderSummary?: (data: ENTITY, api: AdaptableApi) => React.ReactNode;
|
|
26
27
|
};
|