@adaptabletools/adaptable 22.0.0-canary.2 → 22.0.0-canary.4
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/index.css +64 -26
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -2
- package/src/AdaptableOptions/ActionColumnOptions.d.ts +2 -2
- package/src/AdaptableOptions/CustomSortOptions.d.ts +5 -0
- package/src/AdaptableOptions/DashboardOptions.d.ts +1 -2
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +1 -2
- package/src/AdaptableState/AlertState.d.ts +2 -2
- package/src/AdaptableState/ChartingState.d.ts +3 -3
- package/src/AdaptableState/Common/AdaptableAlert.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableButton.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableFlashingCell.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableObject.d.ts +25 -2
- package/src/AdaptableState/Common/AdaptableStyle.d.ts +8 -0
- package/src/AdaptableState/Common/RowSummary.d.ts +1 -1
- package/src/AdaptableState/Common/Schedule.d.ts +3 -4
- package/src/AdaptableState/Common/SystemStatusMessageInfo.d.ts +2 -2
- package/src/AdaptableState/CustomSortState.d.ts +2 -2
- package/src/AdaptableState/DashboardState.d.ts +2 -2
- package/src/AdaptableState/ExportState.d.ts +2 -2
- package/src/AdaptableState/FlashingCellState.d.ts +2 -2
- package/src/AdaptableState/FormatColumnState.d.ts +2 -10
- package/src/AdaptableState/LayoutState.d.ts +8 -3
- package/src/AdaptableState/NamedQueryState.d.ts +2 -2
- package/src/AdaptableState/PlusMinusState.d.ts +2 -2
- package/src/AdaptableState/ShortcutState.d.ts +2 -2
- package/src/AdaptableState/StyledColumnState.d.ts +1 -1
- package/src/AdaptableState/ThemeState.d.ts +2 -2
- package/src/Api/CustomSortApi.d.ts +6 -3
- package/src/Api/DataSetApi.d.ts +1 -1
- package/src/Api/GridApi.d.ts +3 -3
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +5 -1
- package/src/Api/Implementation/CustomSortApiImpl.js +2 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +9 -9
- package/src/Api/Implementation/GridApiImpl.js +16 -16
- package/src/Api/Implementation/LayoutHelpers.js +7 -0
- package/src/Api/Implementation/ScheduleApiImpl.js +1 -0
- package/src/Api/Internal/ColumnInternalApi.js +1 -1
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +0 -10
- package/src/Api/Internal/FormatColumnInternalApi.js +1 -19
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/NoteRedux.js +1 -1
- package/src/Strategy/AlertModule.js +4 -0
- package/src/Strategy/CustomSortModule.js +4 -0
- package/src/Strategy/FlashingCellModule.js +5 -0
- package/src/Strategy/FormatColumnModule.js +4 -0
- package/src/Strategy/LayoutModule.js +4 -4
- package/src/Strategy/PlusMinusModule.js +4 -0
- package/src/Strategy/ScheduleModule.js +4 -0
- package/src/Strategy/ShortcutModule.js +4 -0
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +0 -3
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +2 -2
- package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -2
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +3 -3
- package/src/Utilities/Extensions/StringExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/StringExtensions.js +16 -0
- package/src/Utilities/Helpers/FormatHelper.js +9 -2
- package/src/Utilities/Helpers/StyleHelper.js +14 -0
- package/src/Utilities/ObjectFactory.js +16 -3
- package/src/Utilities/Services/AnnotationsService.js +1 -1
- package/src/Utilities/Services/ModuleService.js +3 -3
- package/src/View/AdaptablePopover/index.d.ts +1 -0
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/Alert/ActiveAlertsPanel.js +8 -0
- package/src/View/Alert/AlertViewPanel.js +13 -9
- package/src/View/Alert/Utilities/getAlertButtonStyle.d.ts +1 -0
- package/src/View/Alert/Utilities/getAlertButtonStyle.js +8 -0
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +2 -1
- package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +5 -2
- package/src/View/Alert/Wizard/AlertTypeWizardSection.js +47 -12
- package/src/View/Alert/Wizard/AlertWizard.js +14 -10
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +23 -11
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -2
- package/src/View/CellSummary/CellSummaryViewPanel.js +15 -17
- package/src/View/Components/AdaptableDateInput/index.js +1 -1
- package/src/View/Components/Buttons/ButtonApply.js +1 -1
- package/src/View/Components/Buttons/ButtonClear.d.ts +1 -0
- package/src/View/Components/Buttons/EntityListActionButtons.d.ts +1 -2
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -2
- package/src/View/Components/Selectors/BulkUpdateValueSelector.js +19 -18
- package/src/View/Components/StyleComponent.js +20 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +40 -14
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +4 -4
- package/src/View/Dashboard/DashboardPopup.js +4 -5
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -0
- package/src/View/Export/ExportDestinationPicker.js +1 -1
- package/src/View/Export/ExportStatusBar.js +4 -2
- package/src/View/Export/ExportViewPanel.js +25 -18
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.d.ts +2 -1
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +34 -14
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +14 -10
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +46 -51
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +20 -9
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +57 -65
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +8 -0
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +32 -9
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +20 -15
- package/src/View/QuickSearch/QuickSearchPopup.js +4 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +12 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +12 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +14 -4
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +12 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +2 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +10 -1
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.d.ts +2 -1
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +25 -4
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +18 -14
- package/src/View/UIHelper.d.ts +2 -0
- package/src/View/UIHelper.js +15 -0
- package/src/agGrid/AdaptableAgGrid.d.ts +2 -2
- package/src/agGrid/AdaptableAgGrid.js +5 -5
- package/src/agGrid/AgGridColumnAdapter.js +3 -18
- package/src/components/Dashboard/DashboardToolbar.js +1 -1
- package/src/components/ExpressionEditor/EditorInput.js +19 -3
- package/src/components/Tree/TreeDropdown/index.js +1 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +1 -0
- package/src/layout-manager/src/index.js +25 -7
- package/src/layout-manager/src/normalizeLayoutModel.js +3 -0
- package/src/metamodel/adaptable.metamodel.d.ts +39 -7
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/AdaptableUpgradeHelper.js +3 -1
- package/src/migration/VersionUpgrade22.d.ts +21 -0
- package/src/migration/VersionUpgrade22.js +187 -0
- package/src/types.d.ts +2 -3
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/AdaptableState/Common/SuspendableObject.d.ts +0 -10
- package/src/AdaptableState/Common/SuspendableObject.js +0 -1
|
@@ -15,6 +15,7 @@ import { ReportNameSelector } from './ReportNameSelector';
|
|
|
15
15
|
import { ReportFormatSelector } from './ReportFormatSelector';
|
|
16
16
|
import { ExportDestinationPicker } from './ExportDestinationPicker';
|
|
17
17
|
import { Flex } from '../../components/Flex';
|
|
18
|
+
import clsx from 'clsx';
|
|
18
19
|
export const ExportViewPanel = (props) => {
|
|
19
20
|
const dispatch = useDispatch();
|
|
20
21
|
const exportApi = props.api.exportApi;
|
|
@@ -26,27 +27,33 @@ export const ExportViewPanel = (props) => {
|
|
|
26
27
|
const deleteMessage = currentReport
|
|
27
28
|
? `Are you sure you want to delete '${currentReport.Name}'?`
|
|
28
29
|
: 'Are you sure you want to delete this report?';
|
|
29
|
-
const
|
|
30
|
-
|
|
30
|
+
const isToolbar = props.viewType === 'Toolbar';
|
|
31
|
+
const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
|
|
32
|
+
return (React.createElement(Flex, { flexDirection: "row", className: clsx(`ab-${elementType}__CellSummary__wrap twa:gap-2 twa:flex-row`, {
|
|
33
|
+
'twa:min-w-[486px] twa:flex-nowrap': isToolbar,
|
|
34
|
+
'twa:flex-1 twa:flex-wrap': !isToolbar,
|
|
35
|
+
}) },
|
|
31
36
|
React.createElement(ReportNameSelector, { viewType: props.viewType, reportName: currentReportName, userReports: userReports, onReportNameSelected: (reportName) => exportApi.selectReport(reportName) }),
|
|
32
37
|
React.createElement(ReportFormatSelector, { viewType: props.viewType, reportName: currentReportName, reportFormat: currentFormat, onReportFormatSelected: (reportFormat) => exportApi.selectFormat(reportFormat) }),
|
|
33
38
|
React.createElement(Flex, { className: join(accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__Export__controls twa:w-full`) },
|
|
34
|
-
React.createElement(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
})), tooltip: "Create New Report", accessLevel: props.accessLevel }),
|
|
43
|
-
React.createElement(ButtonDelete, { tooltip: "Delete Report", className: `ab-${elementType}__Export__delete`, disabled: currentReport == null, ConfirmAction: ExportRedux.ReportDelete(currentReport), ConfirmationMsg: deleteMessage, ConfirmationTitle: 'Delete Report', accessLevel: accessLevel }),
|
|
44
|
-
props.api.entitlementApi.isModuleFullEntitlement('Schedule') && (React.createElement(ButtonSchedule, { className: `ab-${elementType}__Export__schedule twa:ml-1`, onClick: () => {
|
|
45
|
-
const reportSchedule = ObjectFactory.CreateReportSchedule(currentReportName, currentFormat);
|
|
46
|
-
dispatch(PopupRedux.PopupShowScreen(ModuleConstants.ScheduleModuleId, 'SchedulePopup', {
|
|
39
|
+
React.createElement(Flex, { className: "twa:min-w-[44px]" },
|
|
40
|
+
React.createElement(ExportDestinationPicker, { viewType: props.viewType, reportName: currentReportName, reportFormat: currentFormat })),
|
|
41
|
+
React.createElement(Flex, null,
|
|
42
|
+
React.createElement(ButtonEdit, { onClick: () => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.ExportModuleId, props.moduleInfo.Popup, {
|
|
43
|
+
action: 'Edit',
|
|
44
|
+
source: 'Toolbar',
|
|
45
|
+
})), tooltip: "Edit Report", className: `ab-${elementType}__Export__edit`, disabled: currentReport == null, accessLevel: accessLevel }),
|
|
46
|
+
React.createElement(ButtonNew, { variant: "text", className: `ab-${elementType}__Export__new`, tone: "neutral", children: null, onClick: () => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.ExportModuleId, props.moduleInfo.Popup, {
|
|
47
47
|
action: 'New',
|
|
48
48
|
source: 'Toolbar',
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
})), tooltip: "Create New Report", accessLevel: props.accessLevel }),
|
|
50
|
+
React.createElement(ButtonDelete, { tooltip: "Delete Report", className: `ab-${elementType}__Export__delete`, disabled: currentReport == null, ConfirmAction: ExportRedux.ReportDelete(currentReport), ConfirmationMsg: deleteMessage, ConfirmationTitle: 'Delete Report', accessLevel: accessLevel }),
|
|
51
|
+
props.api.entitlementApi.isModuleFullEntitlement('Schedule') && (React.createElement(ButtonSchedule, { className: `ab-${elementType}__Export__schedule`, onClick: () => {
|
|
52
|
+
const reportSchedule = ObjectFactory.CreateReportSchedule(currentReportName, currentFormat);
|
|
53
|
+
dispatch(PopupRedux.PopupShowScreen(ModuleConstants.ScheduleModuleId, 'SchedulePopup', {
|
|
54
|
+
action: 'New',
|
|
55
|
+
source: 'Toolbar',
|
|
56
|
+
value: reportSchedule,
|
|
57
|
+
}));
|
|
58
|
+
}, tooltip: "Schedule", disabled: currentReport == null, accessLevel: props.accessLevel }))))));
|
|
52
59
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { FlashingCellDefinition } from '../../../types';
|
|
2
|
+
import { AdaptableApi, FlashingCellDefinition } from '../../../types';
|
|
3
3
|
type FlashingAlertDurationWizardSectionProps = {
|
|
4
4
|
readOnly?: boolean;
|
|
5
5
|
flashingCell?: FlashingCellDefinition;
|
|
6
6
|
onChange: (data: FlashingCellDefinition) => void;
|
|
7
7
|
};
|
|
8
|
+
export declare const isSettingsValid: (data: FlashingCellDefinition, api: AdaptableApi) => true | "Name is required" | "A Flashing Cell already exists with that name";
|
|
8
9
|
export declare const renderFlashingAlertSettingsSummary: (flashingAlert: FlashingCellDefinition) => React.JSX.Element;
|
|
9
10
|
export declare const FlashingAlertSettingsWizardSection: (props: FlashingAlertDurationWizardSectionProps) => React.JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -2,15 +2,30 @@ import * as React from 'react';
|
|
|
2
2
|
import { useRef } from 'react';
|
|
3
3
|
import Input from '../../../components/Input';
|
|
4
4
|
import usePrevious from '../../../components/utils/usePrevious';
|
|
5
|
-
import Radio from '../../../components/Radio';
|
|
6
5
|
import { Tabs } from '../../../components/Tabs';
|
|
7
6
|
import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
|
|
8
7
|
import { CodeBlock } from '../../../components/CodeBlock';
|
|
9
8
|
import FormLayout, { FormRow } from '../../../components/FormLayout';
|
|
10
9
|
import { CheckBox } from '../../../components/CheckBox';
|
|
11
10
|
import { Box, Flex } from '../../../components/Flex';
|
|
11
|
+
import { Tag } from '../../../components/Tag';
|
|
12
|
+
import { SummaryText } from '../../Wizard/OnePageAdaptableWizard';
|
|
13
|
+
export const isSettingsValid = (data, api) => {
|
|
14
|
+
if (!data.Name?.trim()) {
|
|
15
|
+
return 'Name is required';
|
|
16
|
+
}
|
|
17
|
+
const allFlashingCells = api.flashingCellApi.getFlashingCellDefinitions();
|
|
18
|
+
const isDuplicateName = allFlashingCells.some((fc) => fc.Name === data.Name && fc.Uuid !== data.Uuid);
|
|
19
|
+
if (isDuplicateName) {
|
|
20
|
+
return 'A Flashing Cell already exists with that name';
|
|
21
|
+
}
|
|
22
|
+
return true;
|
|
23
|
+
};
|
|
12
24
|
export const renderFlashingAlertSettingsSummary = (flashingAlert) => {
|
|
13
25
|
return (React.createElement(React.Fragment, null,
|
|
26
|
+
React.createElement(SummaryText, null,
|
|
27
|
+
"Name ",
|
|
28
|
+
React.createElement(Tag, null, flashingAlert.Name || 'Not specified')),
|
|
14
29
|
React.createElement(Box, { className: "twa:text-2" }, flashingAlert.FlashDuration === 'always' ? (React.createElement(React.Fragment, null, "Flashing is never removed")) : (React.createElement(React.Fragment, null,
|
|
15
30
|
"Flashing is removed after ",
|
|
16
31
|
React.createElement(CodeBlock, null, flashingAlert.FlashDuration),
|
|
@@ -20,6 +35,12 @@ export const renderFlashingAlertSettingsSummary = (flashingAlert) => {
|
|
|
20
35
|
export const FlashingAlertSettingsWizardSection = (props) => {
|
|
21
36
|
let { data: flashingCell } = useOnePageAdaptableWizardContext();
|
|
22
37
|
flashingCell = flashingCell ?? props.flashingCell;
|
|
38
|
+
const handleNameChange = (event) => {
|
|
39
|
+
props.onChange({
|
|
40
|
+
...flashingCell,
|
|
41
|
+
Name: event.target.value,
|
|
42
|
+
});
|
|
43
|
+
};
|
|
23
44
|
const setDuration = (FlashDuration) => {
|
|
24
45
|
props.onChange({ ...flashingCell, FlashDuration: FlashDuration });
|
|
25
46
|
};
|
|
@@ -58,23 +79,22 @@ export const FlashingAlertSettingsWizardSection = (props) => {
|
|
|
58
79
|
React.createElement(Tabs.Tab, null, "Flashing Cell Settings"),
|
|
59
80
|
React.createElement(Tabs.Content, null,
|
|
60
81
|
React.createElement(FormLayout, null,
|
|
61
|
-
React.createElement(FormRow, { label: "
|
|
62
|
-
React.createElement(
|
|
63
|
-
React.createElement(Radio, { "data-name": "duration-type-number", checked: duration !== 'always', tabIndex: -1, onChange: () => handleTypeChange('number') }, "Limited (ms)")),
|
|
64
|
-
React.createElement(FormRow, { label: "" },
|
|
65
|
-
duration !== 'always' && (React.createElement(Flex, { flexDirection: "row", alignItems: "baseline" },
|
|
66
|
-
React.createElement(Box, { className: "twa:text-2 twa:mr-2" }, "After"),
|
|
67
|
-
React.createElement(Input, { "data-name": "duration-input", readOnly: props.readOnly, type: "text", name: "value", ref: inputRef, className: "twa:mt-2 twa:mr-1", value: duration, onChange: (event) => {
|
|
68
|
-
const value = event.target.value;
|
|
69
|
-
setDuration(isNaN(Number(value)) ? 500 : Number(value));
|
|
70
|
-
} }),
|
|
71
|
-
React.createElement(Box, { className: "twa:text-2" }, "milliseconds"))),
|
|
72
|
-
duration === 'always' && (React.createElement(Box, { className: "twa:text-3 twa:h-[43px]" }, "Persists the flashing style indeterminately - can be removed manually"))),
|
|
82
|
+
React.createElement(FormRow, { label: "Name" },
|
|
83
|
+
React.createElement(Input, { "data-name": "flashing-cell-name", className: "twa:flex-1 twa:mr-3", onChange: handleNameChange, placeholder: "Enter Name", value: flashingCell.Name ?? '' })),
|
|
73
84
|
React.createElement(FormRow, { label: "Flash Target" },
|
|
74
85
|
React.createElement(CheckBox, { "data-name": "flashing-target", onChange: (checked) => handleTargetChange('cell', checked), className: "twa:mr-3", checked: flashingCell?.FlashTarget === 'cell' ||
|
|
75
86
|
flashingCell?.FlashTarget?.includes?.('cell'), tabIndex: -1 }, "Cell"),
|
|
76
87
|
React.createElement(CheckBox, { "data-name": "flashing-target-row", className: "twa:mr-3", onChange: (checked) => handleTargetChange('row', checked), checked: flashingCell?.FlashTarget === 'row' ||
|
|
77
88
|
flashingCell?.FlashTarget?.includes?.('row'), tabIndex: -1 }, "Row"),
|
|
78
89
|
React.createElement(CheckBox, { "data-name": "flashing-target-aggFuncCell", onChange: (checked) => handleTargetChange('aggFuncCell', checked), checked: flashingCell?.FlashTarget === 'aggFuncCell' ||
|
|
79
|
-
flashingCell?.FlashTarget?.includes?.('aggFuncCell'), tabIndex: -1 }, "Aggregated Function Cell"))
|
|
90
|
+
flashingCell?.FlashTarget?.includes?.('aggFuncCell'), tabIndex: -1 }, "Aggregated Function Cell")),
|
|
91
|
+
React.createElement(FormRow, { label: "Duration" },
|
|
92
|
+
React.createElement(Flex, { alignItems: "center" },
|
|
93
|
+
React.createElement(CheckBox, { "data-name": "duration-always", checked: duration === 'always', onChange: (checked) => handleTypeChange(checked ? 'always' : 'number'), className: "twa:mr-4", tabIndex: -1 }, "Always"),
|
|
94
|
+
duration !== 'always' && (React.createElement(React.Fragment, null,
|
|
95
|
+
React.createElement(Input, { "data-name": "duration-input", readOnly: props.readOnly, type: "number", name: "value", ref: inputRef, className: "twa:w-20 twa:mr-2", value: duration, onChange: (event) => {
|
|
96
|
+
const value = event.target.value;
|
|
97
|
+
setDuration(isNaN(Number(value)) ? 500 : Number(value));
|
|
98
|
+
} }),
|
|
99
|
+
React.createElement(Box, { className: "twa:text-2" }, "ms"))))))))));
|
|
80
100
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useState, useCallback } from 'react';
|
|
3
3
|
import { OnePageAdaptableWizard, OnePageWizardSummary } from '../../Wizard/OnePageAdaptableWizard';
|
|
4
|
-
import { FlashingAlertSettingsWizardSection, renderFlashingAlertSettingsSummary, } from './FlashingCellSettingsWizardSection';
|
|
4
|
+
import { FlashingAlertSettingsWizardSection, renderFlashingAlertSettingsSummary, isSettingsValid, } from './FlashingCellSettingsWizardSection';
|
|
5
5
|
import { cloneObject } from '../../../Utilities/Helpers/Helper';
|
|
6
6
|
import { FlashingAlertRulesWizardSection, renderFlashingAlertRulesSummary, } from './FlashingCellRulesWizardSection';
|
|
7
7
|
import { FlashingAlertStyleWizardSection, renderFlashingAlertStyleSummary, } from './FlashingCellStyleWizardSection';
|
|
@@ -17,7 +17,7 @@ import { ObjectTagsWizardSection, renderObjectTagsSummary, } from '../../Wizard/
|
|
|
17
17
|
import { Box } from '../../../components/Flex';
|
|
18
18
|
export const FlashingCellWizard = (props) => {
|
|
19
19
|
const { api } = useAdaptable();
|
|
20
|
-
const [flashingCell,
|
|
20
|
+
const [flashingCell, doSetFlashingCell] = useState(() => {
|
|
21
21
|
let flashingCell = props.data
|
|
22
22
|
? cloneObject(props.data)
|
|
23
23
|
: ObjectFactory.CreateEmptyFlashingCellDefinition();
|
|
@@ -33,9 +33,12 @@ export const FlashingCellWizard = (props) => {
|
|
|
33
33
|
}
|
|
34
34
|
return flashingCell;
|
|
35
35
|
});
|
|
36
|
+
const setFlashingCell = useCallback((data) => {
|
|
37
|
+
doSetFlashingCell(data);
|
|
38
|
+
}, []);
|
|
36
39
|
const updateProperty = (propName) => {
|
|
37
40
|
return (value) => {
|
|
38
|
-
|
|
41
|
+
doSetFlashingCell((flashingCell) => {
|
|
39
42
|
flashingCell = { ...flashingCell, [propName]: value };
|
|
40
43
|
return flashingCell;
|
|
41
44
|
});
|
|
@@ -57,6 +60,14 @@ export const FlashingCellWizard = (props) => {
|
|
|
57
60
|
props.onFinishWizard(flashingCell);
|
|
58
61
|
};
|
|
59
62
|
return (React.createElement(OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: flashingCell, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
|
|
63
|
+
{
|
|
64
|
+
details: 'Set Name, Duration and Target Properties',
|
|
65
|
+
isValid: isSettingsValid,
|
|
66
|
+
render: () => (React.createElement(Box, { className: "twa:p-2" },
|
|
67
|
+
React.createElement(FlashingAlertSettingsWizardSection, { onChange: setFlashingCell }))),
|
|
68
|
+
renderSummary: renderFlashingAlertSettingsSummary,
|
|
69
|
+
title: 'Settings',
|
|
70
|
+
},
|
|
60
71
|
{
|
|
61
72
|
details: 'Specify which data changes should trigger Cell Flashing',
|
|
62
73
|
isValid: isScopeValid,
|
|
@@ -80,13 +91,6 @@ export const FlashingCellWizard = (props) => {
|
|
|
80
91
|
renderSummary: renderFlashingAlertStyleSummary,
|
|
81
92
|
title: 'Flash Styles',
|
|
82
93
|
},
|
|
83
|
-
{
|
|
84
|
-
details: 'Set Duration and Target Properties',
|
|
85
|
-
render: () => (React.createElement(Box, { className: "twa:p-2" },
|
|
86
|
-
React.createElement(FlashingAlertSettingsWizardSection, { onChange: setFlashingCell }))),
|
|
87
|
-
renderSummary: renderFlashingAlertSettingsSummary,
|
|
88
|
-
title: 'Settings',
|
|
89
|
-
},
|
|
90
94
|
{
|
|
91
95
|
details: 'Select Flashing Cell Tags',
|
|
92
96
|
title: 'Tags',
|
|
@@ -3,16 +3,15 @@ import FormLayout, { FormRow } from '../../../components/FormLayout';
|
|
|
3
3
|
import { CheckBox } from '../../../components/CheckBox';
|
|
4
4
|
import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
|
|
5
5
|
import { Tag } from '../../../components/Tag';
|
|
6
|
-
import { ToggleGroup } from '../../../components/Toggle/ToggleGroup';
|
|
7
|
-
import { Toggle } from '../../../components/Toggle/Toggle';
|
|
8
6
|
import Radio, { RadioGroup } from '../../../components/Radio';
|
|
9
7
|
import { Box, Flex } from '../../../components/Flex';
|
|
10
|
-
import {
|
|
8
|
+
import { Tabs } from '../../../components/Tabs';
|
|
9
|
+
import Input from '../../../components/Input';
|
|
11
10
|
export const renderFormatColumnSettingsSummary = (data) => {
|
|
12
11
|
return (React.createElement(Box, { className: "twa:p-2" },
|
|
13
|
-
React.createElement(Box,
|
|
14
|
-
"
|
|
15
|
-
React.createElement(Tag, null, data.
|
|
12
|
+
React.createElement(Box, { className: "twa:mt-3" },
|
|
13
|
+
"Name ",
|
|
14
|
+
React.createElement(Tag, null, data.Name)),
|
|
16
15
|
React.createElement(Box, { className: "twa:mt-3" },
|
|
17
16
|
"Data Rows ",
|
|
18
17
|
React.createElement(Tag, null, data.RowScope?.ExcludeDataRows ? 'no' : 'yes')),
|
|
@@ -35,12 +34,11 @@ export const renderFormatColumnSettingsSummary = (data) => {
|
|
|
35
34
|
};
|
|
36
35
|
export const FormatColumnSettingsWizardSection = (props) => {
|
|
37
36
|
const { data } = useOnePageAdaptableWizardContext();
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
props.onChange(newData);
|
|
37
|
+
const onNameChange = (event) => {
|
|
38
|
+
props.onChange({
|
|
39
|
+
...data,
|
|
40
|
+
Name: event.target.value,
|
|
41
|
+
});
|
|
44
42
|
};
|
|
45
43
|
const onExcludeDataRowsChanged = (ExcludeDataRows) => {
|
|
46
44
|
props.onChange({
|
|
@@ -78,43 +76,40 @@ export const FormatColumnSettingsWizardSection = (props) => {
|
|
|
78
76
|
},
|
|
79
77
|
});
|
|
80
78
|
};
|
|
81
|
-
return (React.createElement(
|
|
82
|
-
React.createElement(
|
|
83
|
-
|
|
84
|
-
React.createElement(
|
|
85
|
-
React.createElement(
|
|
86
|
-
React.createElement(
|
|
87
|
-
React.createElement(
|
|
88
|
-
React.createElement(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
React.createElement(FormRow, { label: "
|
|
108
|
-
React.createElement(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
})
|
|
116
|
-
|
|
117
|
-
React.createElement(Radio, { className: "twa:ml-1", value: "Both" }, "Always"),
|
|
118
|
-
React.createElement(Radio, { className: "twa:ml-4", value: "Expanded" }, "Expanded"),
|
|
119
|
-
React.createElement(Radio, { className: "twa:ml-4", value: "Collapsed" }, "Collapsed"))))))));
|
|
79
|
+
return (React.createElement(Flex, { flexDirection: "column", style: { height: '100%' } },
|
|
80
|
+
React.createElement(Tabs, { className: "twa:mb-3" },
|
|
81
|
+
React.createElement(Tabs.Tab, null, "Settings"),
|
|
82
|
+
React.createElement(Tabs.Content, null,
|
|
83
|
+
React.createElement(Flex, { flexDirection: "row" },
|
|
84
|
+
React.createElement(FormLayout, { className: "twa:max-w-[300px] twa:w-full" },
|
|
85
|
+
React.createElement(FormRow, { label: "Name" },
|
|
86
|
+
React.createElement(Input, { className: "twa:w-full", "data-name": "format-column-name", onChange: onNameChange, value: data?.Name ?? '' })))))),
|
|
87
|
+
React.createElement(Tabs, null,
|
|
88
|
+
React.createElement(Tabs.Tab, null, "Configuration"),
|
|
89
|
+
React.createElement(Tabs.Content, null,
|
|
90
|
+
React.createElement(Flex, { flexDirection: "row" },
|
|
91
|
+
React.createElement(FormLayout, null,
|
|
92
|
+
data.Target === 'cell' && (React.createElement(React.Fragment, null,
|
|
93
|
+
React.createElement(FormRow, { label: "Exclude Data Rows:" },
|
|
94
|
+
React.createElement(Flex, { alignItems: "center", className: "twa:ml-2" },
|
|
95
|
+
React.createElement(CheckBox, { "data-name": "exclude-data-rows-checkbox", checked: data.RowScope?.ExcludeDataRows, onChange: onExcludeDataRowsChanged, className: "twa:mr-2" }))),
|
|
96
|
+
React.createElement(FormRow, { label: "Exclude Group Rows:" },
|
|
97
|
+
React.createElement(Flex, { alignItems: "center", className: "twa:ml-2" },
|
|
98
|
+
React.createElement(CheckBox, { "data-name": "exclude-grouped-rows-checkbox", checked: data.RowScope?.ExcludeGroupRows, onChange: onExcludeGroupedRowsChanged, className: "twa:mr-2" }))),
|
|
99
|
+
React.createElement(FormRow, { label: "Exclude Row Summaries:" },
|
|
100
|
+
React.createElement(Flex, { alignItems: "center", className: "twa:ml-2" },
|
|
101
|
+
React.createElement(CheckBox, { "data-name": "exclude-summary-rows-checkbox", checked: data.RowScope?.ExcludeSummaryRows, onChange: onExcludeSummaryRowsChanged, className: "twa:mr-2" }))),
|
|
102
|
+
React.createElement(FormRow, { label: "Exclude Total Rows:" },
|
|
103
|
+
React.createElement(Flex, { alignItems: "center", className: "twa:ml-2" },
|
|
104
|
+
React.createElement(CheckBox, { "data-name": "exclude-total-rows-checkbox", checked: data.RowScope?.ExcludeTotalRows, onChange: onExcludeTotalRowsChanged, className: "twa:mr-2" }))))),
|
|
105
|
+
React.createElement(FormRow, { label: "Apply on Column Group:" },
|
|
106
|
+
React.createElement(RadioGroup, { value: data.ColumnGroupScope || 'Both', name: "columnGroupScope", orientation: "horizontal", onRadioChange: (columnGroupScope) => {
|
|
107
|
+
props.onChange({
|
|
108
|
+
...data,
|
|
109
|
+
ColumnGroupScope: columnGroupScope,
|
|
110
|
+
});
|
|
111
|
+
} },
|
|
112
|
+
React.createElement(Radio, { className: "twa:ml-1", value: "Both" }, "Always"),
|
|
113
|
+
React.createElement(Radio, { className: "twa:ml-4", value: "Expanded" }, "When Expanded"),
|
|
114
|
+
React.createElement(Radio, { className: "twa:ml-4", value: "Collapsed" }, "When Collapsed")))))))));
|
|
120
115
|
};
|
|
@@ -8,7 +8,6 @@ export const isFormatColumnStyleValid = (data, api) => {
|
|
|
8
8
|
if (data.Style &&
|
|
9
9
|
UIHelper.IsEmptyStyle(data.Style) &&
|
|
10
10
|
data.DisplayFormat === undefined &&
|
|
11
|
-
data.CellAlignment === undefined &&
|
|
12
11
|
!api.columnScopeApi.isSingleBooleanColumnScope(data.Scope)) {
|
|
13
12
|
return 'No format applied';
|
|
14
13
|
}
|
|
@@ -19,7 +18,8 @@ const toStyle = (data) => {
|
|
|
19
18
|
...convertAdaptableStyleToCSS(data.Style ?? {}),
|
|
20
19
|
borderWidth: data.Style?.BorderColor ? 2 : 0,
|
|
21
20
|
borderStyle: 'solid',
|
|
22
|
-
|
|
21
|
+
// ToDO abcdefg
|
|
22
|
+
textAlign: data.Style?.Alignment ? data.Style.Alignment.toLowerCase() : undefined,
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
export const renderFormatColumnStyleWizardSummary = (data) => {
|
|
@@ -7,6 +7,7 @@ import { FormatColumnStyleWizardSection, isFormatColumnStyleValid, renderFormatC
|
|
|
7
7
|
import { FormatColumnFormatWizardSection, getFormatDisplayTypeForScope, renderFormatColumnFormatSummary, } from './FormatColumnFormatWizardSection';
|
|
8
8
|
import { useAdaptable } from '../../AdaptableContext';
|
|
9
9
|
import { FormatColumnSettingsWizardSection, renderFormatColumnSettingsSummary, } from './FormatColumnSettingsWizardSection';
|
|
10
|
+
import { useSelector } from 'react-redux';
|
|
10
11
|
import { isScopeValid } from '../../Components/NewScopeComponent';
|
|
11
12
|
import ObjectFactory from '../../../Utilities/ObjectFactory';
|
|
12
13
|
import { useDispatch } from 'react-redux';
|
|
@@ -57,6 +58,7 @@ const adjustFormatColumn = (formatColumn, api) => {
|
|
|
57
58
|
};
|
|
58
59
|
export function FormatColumnWizard(props) {
|
|
59
60
|
const { api } = useAdaptable();
|
|
61
|
+
const allFormatColumns = useSelector((state) => state.FormatColumn?.FormatColumns ?? []);
|
|
60
62
|
const data = props.data ?? props.popupParams?.value;
|
|
61
63
|
const [formatColumn, doSetFormatColumn] = useState(() => {
|
|
62
64
|
let formatColumn = data ? cloneObject(data) : ObjectFactory.CreateEmptyFormatColumn();
|
|
@@ -92,6 +94,24 @@ export function FormatColumnWizard(props) {
|
|
|
92
94
|
props.onFinishWizard(formatColumn);
|
|
93
95
|
};
|
|
94
96
|
return (React.createElement(OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, modal: props.modal, data: formatColumn, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
|
|
97
|
+
{
|
|
98
|
+
title: 'Settings',
|
|
99
|
+
details: 'Enter Name and set Additional Properties',
|
|
100
|
+
isValid: (formatColumnData) => {
|
|
101
|
+
if (!formatColumnData.Name) {
|
|
102
|
+
return 'Format Column Name cannot be blank';
|
|
103
|
+
}
|
|
104
|
+
if (allFormatColumns.some((fc) => fc.Name === formatColumnData.Name && fc.Uuid !== formatColumnData.Uuid)) {
|
|
105
|
+
return 'A Format Column already exists with that name';
|
|
106
|
+
}
|
|
107
|
+
return true;
|
|
108
|
+
},
|
|
109
|
+
renderSummary: renderFormatColumnSettingsSummary,
|
|
110
|
+
render: () => {
|
|
111
|
+
return (React.createElement(Box, { className: "twa:p-2" },
|
|
112
|
+
React.createElement(FormatColumnSettingsWizardSection, { onChange: setFormatColumn })));
|
|
113
|
+
},
|
|
114
|
+
},
|
|
95
115
|
{
|
|
96
116
|
title: 'Scope',
|
|
97
117
|
details: 'Select which Columns will be formatted',
|
|
@@ -142,15 +162,6 @@ export function FormatColumnWizard(props) {
|
|
|
142
162
|
return React.createElement(FormatColumnFormatWizardSection, { onChange: setFormatColumn });
|
|
143
163
|
},
|
|
144
164
|
},
|
|
145
|
-
{
|
|
146
|
-
title: 'Settings',
|
|
147
|
-
details: 'Set Additional Properties',
|
|
148
|
-
renderSummary: renderFormatColumnSettingsSummary,
|
|
149
|
-
render: () => {
|
|
150
|
-
return (React.createElement(Box, { className: "twa:p-2" },
|
|
151
|
-
React.createElement(FormatColumnSettingsWizardSection, { onChange: setFormatColumn })));
|
|
152
|
-
},
|
|
153
|
-
},
|
|
154
165
|
{
|
|
155
166
|
details: 'Select Format Column Tags',
|
|
156
167
|
title: 'Tags',
|
|
@@ -1,82 +1,73 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import ArrayExtensions from '../../../Utilities/Extensions/ArrayExtensions';
|
|
3
|
+
import { ADAPTABLE_VERSION } from '../../../EnvVars';
|
|
4
|
+
import { AG_GRID_VERSION } from '../../../agGrid/AgGridModulesAdapter';
|
|
5
|
+
import { DataSource, InfiniteTableGrid } from '../../../components/InfiniteTable';
|
|
2
6
|
import Panel from '../../../components/Panel';
|
|
3
7
|
import { Tabs } from '../../../components/Tabs';
|
|
4
|
-
import ArrayExtensions from '../../../Utilities/Extensions/ArrayExtensions';
|
|
5
|
-
import Helper from '../../../Utilities/Helpers/Helper';
|
|
6
|
-
import { AdaptablePopover } from '../../AdaptablePopover';
|
|
7
|
-
import { AdaptableObjectCollection } from '../../Components/AdaptableObjectCollection';
|
|
8
|
-
import { AdaptableObjectRow } from '../../Components/AdaptableObjectRow';
|
|
9
8
|
import { PopupPanel } from '../../Components/Popups/AdaptablePopup/PopupPanel';
|
|
10
9
|
import { AdaptableObjectsSummary } from './AdaptableObjectsSummary';
|
|
11
|
-
import { ADAPTABLE_VERSION } from '../../../EnvVars';
|
|
12
|
-
import { AG_GRID_VERSION } from '../../../agGrid/AgGridModulesAdapter';
|
|
13
10
|
import clsx from 'clsx';
|
|
14
11
|
const adaptableVersion = ADAPTABLE_VERSION;
|
|
15
12
|
const agGridVersion = AG_GRID_VERSION;
|
|
16
13
|
export const GridInfoPopup = (props) => {
|
|
17
14
|
const api = props.api;
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
returnRows.push(createReadOnlyColItem(colItems, 'Calculated Columns', ArrayExtensions.IsNotNullOrEmpty(calcColumns)
|
|
15
|
+
const keyValuePairs = [];
|
|
16
|
+
const calcColumns = api.calculatedColumnApi
|
|
17
|
+
.getCalculatedColumns()
|
|
18
|
+
.map((c) => c.ColumnId);
|
|
19
|
+
const actionColumns = api.actionColumnApi
|
|
20
|
+
.getActionColumns()
|
|
21
|
+
.map((ac) => ac.columnId);
|
|
22
|
+
const freeTextColumns = api.freeTextColumnApi
|
|
23
|
+
.getFreeTextColumns()
|
|
24
|
+
.map((c) => c.ColumnId);
|
|
25
|
+
const columnFilterDescription = api.filterApi.columnFilterApi.columnFiltersToString(api.filterApi.columnFilterApi.getColumnFilters());
|
|
26
|
+
const gridFilterExpression = api.filterApi.gridFilterApi.getCurrentGridFilterExpression();
|
|
27
|
+
const sorts = ArrayExtensions.IsNotNullOrEmpty(props.api.gridApi.getColumnSorts())
|
|
28
|
+
? api.gridApi.getColumnSorts().map((gs) => {
|
|
29
|
+
return api.columnApi.getFriendlyNameForColumnId(gs.ColumnId) + ': ' + gs.SortOrder;
|
|
30
|
+
})
|
|
31
|
+
: null;
|
|
32
|
+
const selectedRowInfo = api.gridApi.getSelectedRowInfo();
|
|
33
|
+
if (api.optionsApi.getUserInterfaceOptions()?.showAdapTableVersion) {
|
|
34
|
+
keyValuePairs.push({ Key: 'AdapTable Version', Value: adaptableVersion });
|
|
35
|
+
}
|
|
36
|
+
if (api.optionsApi.getUserInterfaceOptions()?.showAgGridVersion) {
|
|
37
|
+
keyValuePairs.push({ Key: 'AG Grid Version', Value: agGridVersion });
|
|
38
|
+
}
|
|
39
|
+
keyValuePairs.push({ Key: 'Sorted Columns', Value: ArrayExtensions.IsNotNullOrEmpty(sorts) ? sorts.join('; ') : 'None' });
|
|
40
|
+
keyValuePairs.push({ Key: 'Column Filters', Value: columnFilterDescription });
|
|
41
|
+
keyValuePairs.push({ Key: 'Grid Filter', Value: gridFilterExpression });
|
|
42
|
+
keyValuePairs.push({ Key: 'All Rows', Value: props.api.gridApi.getRowCount() });
|
|
43
|
+
keyValuePairs.push({ Key: 'Visible Rows', Value: props.api.gridApi.getVisibleRowCount() });
|
|
44
|
+
keyValuePairs.push({ Key: 'Selected Rows', Value: selectedRowInfo?.gridRows.length });
|
|
45
|
+
keyValuePairs.push({ Key: 'Visible Selected Rows', Value: selectedRowInfo?.gridRows.filter((gr) => gr.rowNode?.displayed == true).length });
|
|
46
|
+
keyValuePairs.push({ Key: 'All Columns', Value: props.api.gridApi.getColumnCount() });
|
|
47
|
+
keyValuePairs.push({ Key: 'Visible Columns', Value: props.api.gridApi.getVisibleColumnCount() });
|
|
48
|
+
keyValuePairs.push({ Key: 'Calculated Columns', Value: ArrayExtensions.IsNotNullOrEmpty(calcColumns)
|
|
53
49
|
? ArrayExtensions.createCommaSeparatedString(calcColumns)
|
|
54
|
-
: 'None')
|
|
55
|
-
|
|
50
|
+
: 'None' });
|
|
51
|
+
keyValuePairs.push({ Key: 'Free Text Columns', Value: ArrayExtensions.IsNotNullOrEmpty(freeTextColumns)
|
|
56
52
|
? ArrayExtensions.createCommaSeparatedString(freeTextColumns)
|
|
57
|
-
: 'None')
|
|
58
|
-
|
|
53
|
+
: 'None' });
|
|
54
|
+
keyValuePairs.push({ Key: 'CalcuActionlated Columns', Value: ArrayExtensions.IsNotNullOrEmpty(actionColumns)
|
|
59
55
|
? ArrayExtensions.createCommaSeparatedString(actionColumns)
|
|
60
|
-
: 'None')
|
|
61
|
-
|
|
56
|
+
: 'None' });
|
|
57
|
+
const domProps = {
|
|
58
|
+
className: 'twa:flex-1 twa:min-h-0 twa:w-full',
|
|
62
59
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
60
|
+
keyValuePairs.map((keyValuePair) => {
|
|
61
|
+
return {
|
|
62
|
+
Key: keyValuePair.Key,
|
|
63
|
+
Value: keyValuePair.Value === 'Ignore' ? null : keyValuePair.Value,
|
|
64
|
+
};
|
|
65
|
+
})
|
|
66
|
+
.filter((x) => x.Value);
|
|
67
|
+
const columnsMap = {
|
|
68
|
+
Key: { field: 'Key', header: 'Property', defaultFlex: 1 },
|
|
69
|
+
Value: { field: 'Value', header: 'Value', defaultFlex: 3 },
|
|
72
70
|
};
|
|
73
|
-
let propValueColItems = [
|
|
74
|
-
{ Content: 'Property', Size: 5 },
|
|
75
|
-
{ Content: 'Value', Size: 7 },
|
|
76
|
-
];
|
|
77
|
-
let gridSummaries = CreateGridSummaries(propValueColItems).map((x, index) => {
|
|
78
|
-
return React.createElement(AdaptableObjectRow, { key: index, colItems: x });
|
|
79
|
-
});
|
|
80
71
|
const baseClassName = 'ab-GridInfo';
|
|
81
72
|
return (React.createElement(PopupPanel, { className: clsx(baseClassName), headerText: 'Grid Info', glyphicon: 'info', scrollable: false },
|
|
82
73
|
React.createElement(Panel, { className: "twa:flex-1 twa:border-none twa:shadow-md twa:overflow-hidden" },
|
|
@@ -85,7 +76,8 @@ export const GridInfoPopup = (props) => {
|
|
|
85
76
|
React.createElement(Tabs.Tab, null, "Grid Summary"),
|
|
86
77
|
React.createElement(Tabs.Tab, null, "Grid State"),
|
|
87
78
|
React.createElement(Tabs.Content, null,
|
|
88
|
-
React.createElement(
|
|
79
|
+
React.createElement(DataSource, { data: keyValuePairs, primaryKey: "Key" },
|
|
80
|
+
React.createElement(InfiniteTableGrid, { domProps: domProps, columns: columnsMap }))),
|
|
89
81
|
React.createElement(Tabs.Content, null,
|
|
90
82
|
React.createElement(AdaptableObjectsSummary, { className: "twa:min-h-0 twa:overflow-auto twa:p-2" })))))));
|
|
91
83
|
};
|
|
@@ -7,6 +7,7 @@ import { useOnePageAdaptableWizardContext } from '../../../Wizard/OnePageAdaptab
|
|
|
7
7
|
import { columnFilter } from './Utilities';
|
|
8
8
|
import ArrayExtensions from '../../../../Utilities/Extensions/ArrayExtensions';
|
|
9
9
|
import { Box } from '../../../../components/Flex';
|
|
10
|
+
import { CheckBox } from '../../../../components/CheckBox';
|
|
10
11
|
export const PivotColumnsSectionSummary = () => {
|
|
11
12
|
const adaptable = useAdaptable();
|
|
12
13
|
const { data: layout } = useOnePageAdaptableWizardContext();
|
|
@@ -28,5 +29,12 @@ export const PivotColumnsSection = (props) => {
|
|
|
28
29
|
return (React.createElement(Tabs, { className: "twa:h-full" },
|
|
29
30
|
React.createElement(Tabs.Tab, null, "Pivot Columns"),
|
|
30
31
|
React.createElement(Tabs.Content, null,
|
|
32
|
+
React.createElement(Box, { className: "twa:mb-3 twa:px-2" },
|
|
33
|
+
React.createElement(CheckBox, { checked: !!layout.PivotResultColumns, onChange: (checked) => {
|
|
34
|
+
props.onChange({
|
|
35
|
+
...layout,
|
|
36
|
+
PivotResultColumns: checked,
|
|
37
|
+
});
|
|
38
|
+
} }, "Persist Order of Pivot Result Columns")),
|
|
31
39
|
React.createElement(ValueSelector, { showFilterInput: true, filter: columnFilter, toIdentifier: (option) => `${option.columnId}`, toLabel: (option) => option.friendlyName ?? option.columnId, options: sortedPivotColumns, value: layout.PivotColumns ?? [], allowReorder: true, onChange: handleColumnsChange }))));
|
|
32
40
|
};
|