@adaptabletools/adaptable 22.0.0-canary.2 → 22.0.0-canary.3
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 +52 -23
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableStyle.d.ts +8 -0
- package/src/AdaptableState/FormatColumnState.d.ts +0 -8
- package/src/Api/DataSetApi.d.ts +1 -1
- package/src/Api/GridApi.d.ts +3 -3
- package/src/Api/Implementation/GridApiImpl.d.ts +9 -9
- package/src/Api/Implementation/GridApiImpl.js +16 -16
- 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/NoteRedux.js +1 -1
- 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/Helpers/StyleHelper.js +14 -0
- package/src/Utilities/ObjectFactory.js +1 -1
- 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/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/Selectors/BulkUpdateValueSelector.js +19 -18
- package/src/View/Components/StyleComponent.js +20 -1
- package/src/View/Dashboard/DashboardPopup.js +4 -5
- 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/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +0 -23
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +2 -2
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +57 -65
- package/src/View/QuickSearch/QuickSearchPopup.js +4 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +2 -2
- 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/metamodel/adaptable.metamodel.d.ts +9 -7
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/AdaptableUpgradeHelper.js +2 -0
- package/src/migration/VersionUpgrade22.d.ts +6 -0
- package/src/migration/VersionUpgrade22.js +27 -0
- package/src/types.d.ts +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -129,6 +129,14 @@ export const StyleComponent = (props) => {
|
|
|
129
129
|
}
|
|
130
130
|
setComponentStyle(newStyle);
|
|
131
131
|
};
|
|
132
|
+
const onAlignmentChange = (alignment) => {
|
|
133
|
+
const newStyle = { ...componentStyle };
|
|
134
|
+
newStyle.Alignment = alignment;
|
|
135
|
+
if (alignment == 'Default') {
|
|
136
|
+
delete newStyle.Alignment;
|
|
137
|
+
}
|
|
138
|
+
setComponentStyle(newStyle);
|
|
139
|
+
};
|
|
132
140
|
const Cmp = props.headless ? Box : Panel;
|
|
133
141
|
const headerText = props.headerText ?? 'Style';
|
|
134
142
|
const cmpProps = props.headless
|
|
@@ -216,7 +224,18 @@ export const StyleComponent = (props) => {
|
|
|
216
224
|
], value: componentStyle.FontSize?.toString() ?? '', onChange: (value) => onFontSizeChange(value) }))) : (React.createElement(Flex, { flexDirection: "row", alignItems: "center", className: "twa:gap-2 twa:flex-wrap" }, fontSizes.map((enumName) => {
|
|
217
225
|
return (React.createElement(Radio, { onClick: () => onFontSizeChange(enumName), checked: (enumName == 'Default' && !componentStyle.FontSize) ||
|
|
218
226
|
componentStyle.FontSize === enumName, key: enumName }, enumName));
|
|
219
|
-
})))
|
|
227
|
+
}))),
|
|
228
|
+
React.createElement("span", null, "Alignment"),
|
|
229
|
+
React.createElement(ToggleGroup, null,
|
|
230
|
+
React.createElement(Toggle, { icon: "align-left", pressed: componentStyle.Alignment === 'Left', onPressedChange: (pressed) => pressed
|
|
231
|
+
? onAlignmentChange('Left')
|
|
232
|
+
: onAlignmentChange('Default') }),
|
|
233
|
+
React.createElement(Toggle, { icon: "align-center", pressed: componentStyle.Alignment === 'Center', onPressedChange: (pressed) => pressed
|
|
234
|
+
? onAlignmentChange('Center')
|
|
235
|
+
: onAlignmentChange('Default') }),
|
|
236
|
+
React.createElement(Toggle, { icon: "align-right", pressed: componentStyle.Alignment === 'Right', onPressedChange: (pressed) => pressed
|
|
237
|
+
? onAlignmentChange('Right')
|
|
238
|
+
: onAlignmentChange('Default') })))))),
|
|
220
239
|
!props.hidePreview && (React.createElement(Card, { shadow: false },
|
|
221
240
|
React.createElement(Card.Title, null, "Preview"),
|
|
222
241
|
React.createElement(Card.Body, { className: "twa:grid twa:place-items-center" },
|
|
@@ -69,18 +69,17 @@ class DashboardPopupComponent extends React.Component {
|
|
|
69
69
|
React.createElement(Flex, { flexDirection: "column", className: "twa:h-full twa:gap-4" },
|
|
70
70
|
areDashboardSettingsVisible && (React.createElement(React.Fragment, null,
|
|
71
71
|
React.createElement(Card, null,
|
|
72
|
-
React.createElement(Card.Title, { gap: 8 },
|
|
73
|
-
"Display Settings",
|
|
74
|
-
React.createElement(ToggleButton, { className: "twa:self-end", onChange: (visible) => this.props.onSetDashboardHidden(!visible), checked: !this.props.IsHidden, "data-name": "dashboard-visibility" }, this.props.IsHidden ? 'Hidden' : 'Visible')),
|
|
72
|
+
React.createElement(Card.Title, { gap: 8 }, "Display Settings"),
|
|
75
73
|
React.createElement(Card.Body, { gap: 2, className: "twa:p-2" },
|
|
76
|
-
React.createElement(ToggleButton, {
|
|
74
|
+
React.createElement(ToggleButton, { className: "twa:w-24", onChange: (visible) => this.props.onSetDashboardHidden(!visible), checked: !this.props.IsHidden, "data-name": "dashboard-visibility" }, this.props.IsHidden ? 'Hidden' : 'Visible'),
|
|
75
|
+
this.props.DashboardState.Tabs?.length > 0 ? (React.createElement(ToggleButton, { disabled: this.props.IsFloating, className: "twa:w-24", onChange: (expanded) => this.props.onSetDashboardCollapsed(!expanded), checked: !this.props.IsCollapsed, "data-name": "expand-state" }, this.props.IsCollapsed ? 'Collapsed' : 'Expanded')) : null,
|
|
77
76
|
this.props.api.optionsApi.getDashboardOptions().canFloat ? (React.createElement(ToggleButton, { className: "twa:w-24", onChange: (pinned) => this.props.onSetDashboardFloating(!pinned), checked: !this.props.IsFloating, "data-name": "floating" }, this.props.IsFloating ? 'Floating' : 'Pinned')) : null)))),
|
|
78
77
|
React.createElement(Card, { className: "twa:flex-1 twa:overflow-hidden", gap: 0 },
|
|
79
78
|
React.createElement(Card.Title, null, "Contents"),
|
|
80
79
|
React.createElement(Card.Body, { className: "twa:p-2" },
|
|
81
80
|
React.createElement(Tabs, { className: "twa:flex-1 twa:min-h-0" },
|
|
82
81
|
React.createElement(Tabs.Tab, { value: "pinned-toolbars" }, "Pinned Toolbars"),
|
|
83
|
-
React.createElement(Tabs.Tab, { value: "tabbed-toolbars" }, "
|
|
82
|
+
React.createElement(Tabs.Tab, { value: "tabbed-toolbars" }, "Tabs & Toolbars"),
|
|
84
83
|
React.createElement(Tabs.Tab, { value: "buttons" }, "Buttons"),
|
|
85
84
|
React.createElement(Tabs.Content, { value: "pinned-toolbars", className: contentCls },
|
|
86
85
|
React.createElement(PinnedToolbarsSelector, null)),
|
|
@@ -12,7 +12,7 @@ export const ExportDestinationPicker = ({ reportName, reportFormat, viewType, })
|
|
|
12
12
|
};
|
|
13
13
|
const supportedDestinations = exportApi.getSupportedExportDestinations(reportFormat);
|
|
14
14
|
if (supportedDestinations.length === 0 || supportedDestinations.length === 1) {
|
|
15
|
-
return (React.createElement(ButtonExport, { className: clsx(viewType !== 'StatusBar' ? '
|
|
15
|
+
return (React.createElement(ButtonExport, { className: clsx(viewType !== 'StatusBar' ? '' : undefined, ''), onClick: () => handleExport(supportedDestinations[0]), tooltip: "Export Report", disabled: reportName == undefined || reportFormat == undefined }));
|
|
16
16
|
}
|
|
17
17
|
const destinationItems = supportedDestinations.map((destination) => ({
|
|
18
18
|
label: destination,
|
|
@@ -4,13 +4,15 @@ import { ReportNameSelector } from './ReportNameSelector';
|
|
|
4
4
|
import { ReportFormatSelector } from './ReportFormatSelector';
|
|
5
5
|
import { ExportDestinationPicker } from './ExportDestinationPicker';
|
|
6
6
|
import { useAdaptable } from '../AdaptableContext';
|
|
7
|
+
import { Flex } from '../../components/Flex';
|
|
7
8
|
export const ExportStatusBar = () => {
|
|
8
9
|
const adaptable = useAdaptable();
|
|
9
10
|
const exportApi = adaptable.api.exportApi;
|
|
10
11
|
const currentReportName = useSelector((state) => state.Export.CurrentReport);
|
|
11
12
|
const currentFormat = useSelector((state) => state.Export.CurrentFormat);
|
|
12
13
|
return (React.createElement(React.Fragment, null,
|
|
13
|
-
React.createElement(
|
|
14
|
-
|
|
14
|
+
React.createElement(Flex, { className: "twa:gap-1" },
|
|
15
|
+
React.createElement(ReportNameSelector, { viewType: "StatusBar", reportName: currentReportName, onReportNameSelected: (reportName) => exportApi.selectReport(reportName) }),
|
|
16
|
+
React.createElement(ReportFormatSelector, { viewType: "StatusBar", reportName: currentReportName, reportFormat: currentFormat, onReportFormatSelected: (reportFormat) => exportApi.selectFormat(reportFormat) })),
|
|
15
17
|
React.createElement(ExportDestinationPicker, { viewType: "StatusBar", reportName: currentReportName, reportFormat: currentFormat })));
|
|
16
18
|
};
|
|
@@ -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
|
};
|
|
@@ -3,16 +3,11 @@ 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
8
|
import { Card } from '../../../components/Card';
|
|
11
9
|
export const renderFormatColumnSettingsSummary = (data) => {
|
|
12
10
|
return (React.createElement(Box, { className: "twa:p-2" },
|
|
13
|
-
React.createElement(Box, null,
|
|
14
|
-
"Cell alignment ",
|
|
15
|
-
React.createElement(Tag, null, data.CellAlignment ?? 'default')),
|
|
16
11
|
React.createElement(Box, { className: "twa:mt-3" },
|
|
17
12
|
"Data Rows ",
|
|
18
13
|
React.createElement(Tag, null, data.RowScope?.ExcludeDataRows ? 'no' : 'yes')),
|
|
@@ -35,13 +30,6 @@ export const renderFormatColumnSettingsSummary = (data) => {
|
|
|
35
30
|
};
|
|
36
31
|
export const FormatColumnSettingsWizardSection = (props) => {
|
|
37
32
|
const { data } = useOnePageAdaptableWizardContext();
|
|
38
|
-
const onCellAlignmentSelectChanged = (CellAlignment) => {
|
|
39
|
-
const newData = { ...data, CellAlignment };
|
|
40
|
-
if (CellAlignment === null) {
|
|
41
|
-
delete newData.CellAlignment;
|
|
42
|
-
}
|
|
43
|
-
props.onChange(newData);
|
|
44
|
-
};
|
|
45
33
|
const onExcludeDataRowsChanged = (ExcludeDataRows) => {
|
|
46
34
|
props.onChange({
|
|
47
35
|
...data,
|
|
@@ -83,17 +71,6 @@ export const FormatColumnSettingsWizardSection = (props) => {
|
|
|
83
71
|
React.createElement(Card.Body, null,
|
|
84
72
|
React.createElement(Flex, { flexDirection: "row" },
|
|
85
73
|
React.createElement(FormLayout, null,
|
|
86
|
-
React.createElement(FormRow, { label: "Cell Alignment" },
|
|
87
|
-
React.createElement(ToggleGroup, null,
|
|
88
|
-
React.createElement(Toggle, { icon: "align-left", pressed: data.CellAlignment === 'Left', onPressedChange: (pressed) => pressed
|
|
89
|
-
? onCellAlignmentSelectChanged('Left')
|
|
90
|
-
: onCellAlignmentSelectChanged(null) }),
|
|
91
|
-
React.createElement(Toggle, { icon: "align-center", pressed: data.CellAlignment === 'Center', onPressedChange: (pressed) => pressed
|
|
92
|
-
? onCellAlignmentSelectChanged('Center')
|
|
93
|
-
: onCellAlignmentSelectChanged(null) }),
|
|
94
|
-
React.createElement(Toggle, { icon: "align-right", pressed: data.CellAlignment === 'Right', onPressedChange: (pressed) => pressed
|
|
95
|
-
? onCellAlignmentSelectChanged('Right')
|
|
96
|
-
: onCellAlignmentSelectChanged(null) }))),
|
|
97
74
|
data.Target === 'cell' && (React.createElement(React.Fragment, null,
|
|
98
75
|
React.createElement(FormRow, { label: "Exclude Data Rows:" },
|
|
99
76
|
React.createElement(Flex, { alignItems: "center", className: "twa:ml-2" },
|
|
@@ -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) => {
|
|
@@ -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
|
};
|
|
@@ -35,7 +35,10 @@ const QuickSearchPopupComponent = (props) => {
|
|
|
35
35
|
React.createElement(Card, null,
|
|
36
36
|
React.createElement(Card.Title, null, "Behaviour"),
|
|
37
37
|
React.createElement(Card.Body, { className: "twa:p-1", gap: 2 },
|
|
38
|
-
React.createElement(HelpBlock, { className: "twa:text-2 twa:w-fit" },
|
|
38
|
+
React.createElement(HelpBlock, { className: "twa:text-2 twa:w-fit" },
|
|
39
|
+
"Filter Grid when searching to only show rows with matching cells; ",
|
|
40
|
+
React.createElement("b", null, "use with care"),
|
|
41
|
+
" as can cause performance issues"),
|
|
39
42
|
React.createElement(CheckBox, { "data-name": "filter-quick-search-results", value: "existing", checked: state.RunQueryAfterQuickSearch, disabled: StringExtensions.IsNotNullOrEmpty(searchText), onChange: onQuickSearchBehaviourChange }, "Filter using Quick Search Results"))),
|
|
40
43
|
React.createElement(Card.Title, { border: false, className: "twa:pt-3" }, "Cell Matching Style"),
|
|
41
44
|
React.createElement(Card, null,
|
|
@@ -20,13 +20,13 @@ export const ScheduleSettingsReminder = (props) => {
|
|
|
20
20
|
const handleHeaderChange = (event) => {
|
|
21
21
|
props.onChange({
|
|
22
22
|
...props.reminderSchedule,
|
|
23
|
-
Header: event.target
|
|
23
|
+
Header: event.target.value,
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
26
|
const handleMessageChange = (event) => {
|
|
27
27
|
props.onChange({
|
|
28
28
|
...props.reminderSchedule,
|
|
29
|
-
Message: event.target
|
|
29
|
+
Message: event.target.value,
|
|
30
30
|
});
|
|
31
31
|
};
|
|
32
32
|
const handleDisplayNotificationChange = (checked) => {
|
package/src/View/UIHelper.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export declare function getMessageTypeByStatusColour(statusColour: StatusColour)
|
|
|
38
38
|
export declare function getButtonToneByMessageType(messageType: AdaptableMessageType): 'success' | 'error' | 'neutral' | 'none' | 'warning' | 'info' | 'accent';
|
|
39
39
|
export declare function getGlyphByMessageType(messageType: AdaptableMessageType): AdaptableSystemIconName;
|
|
40
40
|
export declare function getColorByMessageType(messageType: AdaptableMessageType): string;
|
|
41
|
+
export declare function getCSSColorByMessageType(messageType: AdaptableMessageType): string;
|
|
41
42
|
export declare function getStyleForStatusColour(statusColour: StatusColour): CSSProperties;
|
|
42
43
|
export declare function getStyleForMessageType(messageType: AdaptableMessageType): CSSProperties;
|
|
43
44
|
export declare function getGlyphForStatusColour(statusColour: StatusColour): string;
|
|
@@ -75,6 +76,7 @@ export declare const UIHelper: {
|
|
|
75
76
|
getGlyphForMessageType: typeof getGlyphForMessageType;
|
|
76
77
|
getStyleForMessageType: typeof getStyleForMessageType;
|
|
77
78
|
getMessageTypeFromAdaptableAlerts: typeof getMessageTypeFromAdaptableAlerts;
|
|
79
|
+
getCSSColorByMessageType: typeof getCSSColorByMessageType;
|
|
78
80
|
getButtonColourForAdaptableAlerts: typeof getButtonColourForAdaptableAlerts;
|
|
79
81
|
getButtonTextColourForArrayandMessageType: typeof getButtonTextColourForArrayandMessageType;
|
|
80
82
|
getButtonTextColourForMessageType: typeof getButtonTextColourForMessageType;
|
package/src/View/UIHelper.js
CHANGED
|
@@ -202,6 +202,20 @@ export function getColorByMessageType(messageType) {
|
|
|
202
202
|
return 'var(--ab-color-info)';
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
+
export function getCSSColorByMessageType(messageType) {
|
|
206
|
+
switch (messageType) {
|
|
207
|
+
case 'Error':
|
|
208
|
+
return 'error';
|
|
209
|
+
case 'Warning':
|
|
210
|
+
return 'warn';
|
|
211
|
+
case 'Success':
|
|
212
|
+
return 'success';
|
|
213
|
+
case 'Info':
|
|
214
|
+
return 'info';
|
|
215
|
+
default:
|
|
216
|
+
return '';
|
|
217
|
+
}
|
|
218
|
+
}
|
|
205
219
|
export function getStyleForStatusColour(statusColour) {
|
|
206
220
|
let result;
|
|
207
221
|
switch (statusColour) {
|
|
@@ -449,6 +463,7 @@ export const UIHelper = {
|
|
|
449
463
|
getGlyphForMessageType,
|
|
450
464
|
getStyleForMessageType,
|
|
451
465
|
getMessageTypeFromAdaptableAlerts,
|
|
466
|
+
getCSSColorByMessageType,
|
|
452
467
|
getButtonColourForAdaptableAlerts,
|
|
453
468
|
getButtonTextColourForArrayandMessageType,
|
|
454
469
|
getButtonTextColourForMessageType,
|
|
@@ -257,10 +257,10 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
257
257
|
added: IRowNode[];
|
|
258
258
|
updated: IRowNode[];
|
|
259
259
|
}>;
|
|
260
|
-
|
|
260
|
+
manageGridRows(dataRows: {
|
|
261
261
|
add?: any[];
|
|
262
262
|
update?: any[];
|
|
263
|
-
|
|
263
|
+
delete?: any[];
|
|
264
264
|
}, config?: DataUpdateConfig): Promise<{
|
|
265
265
|
addedRows: IRowNode[];
|
|
266
266
|
updatedRows: IRowNode[];
|
|
@@ -2467,18 +2467,18 @@ You need to define at least one Layout!`);
|
|
|
2467
2467
|
});
|
|
2468
2468
|
}
|
|
2469
2469
|
}
|
|
2470
|
-
async
|
|
2470
|
+
async manageGridRows(dataRows, config = {}) {
|
|
2471
2471
|
const result = {
|
|
2472
2472
|
addedRows: [],
|
|
2473
2473
|
updatedRows: [],
|
|
2474
2474
|
removedRows: [],
|
|
2475
2475
|
};
|
|
2476
|
-
if (!
|
|
2476
|
+
if (!dataRows) {
|
|
2477
2477
|
return result;
|
|
2478
2478
|
}
|
|
2479
|
-
const addDataRows =
|
|
2480
|
-
const updateDataRows =
|
|
2481
|
-
const removeDataRows =
|
|
2479
|
+
const addDataRows = dataRows.add;
|
|
2480
|
+
const updateDataRows = dataRows.update;
|
|
2481
|
+
const removeDataRows = dataRows.delete;
|
|
2482
2482
|
if (this.hasAutogeneratedPrimaryKey) {
|
|
2483
2483
|
this.addSyntheticPrimaryKeyIfMissing(addDataRows);
|
|
2484
2484
|
}
|
|
@@ -302,12 +302,10 @@ export class AgGridColumnAdapter {
|
|
|
302
302
|
// see #header_text_align
|
|
303
303
|
const formatColumnWithTextAlignment = this.getRelevantFormatColumnHeaderStyles(abColumn)
|
|
304
304
|
// we take the first one only, even if multiple are defined
|
|
305
|
-
.find((fc) => fc.
|
|
305
|
+
.find((fc) => fc.Style?.Alignment != undefined);
|
|
306
306
|
if (formatColumnWithTextAlignment) {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
`ab-header__align-${formatColumnWithTextAlignment.CellAlignment.toLowerCase()}`,
|
|
310
|
-
];
|
|
307
|
+
const alignment = formatColumnWithTextAlignment.Style.Alignment.toLowerCase();
|
|
308
|
+
baseHeaderClass = [...baseHeaderClass, `ab-header__align-${alignment}`];
|
|
311
309
|
}
|
|
312
310
|
const formatColumns = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnWithStyleClassNameForColumn(abColumn, {
|
|
313
311
|
target,
|
|
@@ -1263,19 +1261,6 @@ export class AgGridColumnAdapter {
|
|
|
1263
1261
|
const formatColumnStyle = formatColumn.Style
|
|
1264
1262
|
? convertAdaptableStyleToCSS(formatColumn.Style)
|
|
1265
1263
|
: {};
|
|
1266
|
-
if (formatColumn.CellAlignment) {
|
|
1267
|
-
switch (formatColumn.CellAlignment) {
|
|
1268
|
-
case 'Left':
|
|
1269
|
-
style.textAlign = 'left';
|
|
1270
|
-
break;
|
|
1271
|
-
case 'Right':
|
|
1272
|
-
style.textAlign = 'right';
|
|
1273
|
-
break;
|
|
1274
|
-
case 'Center':
|
|
1275
|
-
style.textAlign = 'center';
|
|
1276
|
-
break;
|
|
1277
|
-
}
|
|
1278
|
-
}
|
|
1279
1264
|
return { ...style, ...formatColumnStyle };
|
|
1280
1265
|
}, {});
|
|
1281
1266
|
}
|
|
@@ -8,5 +8,5 @@ export function DashboardToolbar(props) {
|
|
|
8
8
|
React.createElement(Flex, { className: "ab-Dashboard__toolbar-title twa:items-center twa:justify-center twa:px-2 twa:pb-1 twa:opacity-70", flexDirection: "row" },
|
|
9
9
|
React.createElement("span", { className: "twa:text-2" }, props.title),
|
|
10
10
|
props.showConfigure && (React.createElement(SimpleButton, { "aria-label": `Configure ${props.title}`, icon: "spanner", variant: "text", tone: "none", "data-name": "configure", iconSize: 16, className: "twa:ml-1", tooltip: props.tooltip || `Configure ${props.title}`, onClick: () => props.onConfigure() })),
|
|
11
|
-
props.showClose && (React.createElement(SimpleButton, { "aria-label": `Close ${props.title}`, style: { alignSelf: 'flex-end' }, disabled: props.accessLevel == 'ReadOnly', "data-name": "close", icon: "close", variant: "text", tone: "none", iconSize: 16, className: "twa:ml-1", tooltip: props.tooltip || `Close ${props.title} Toolbar`, onClick: () => props.onClose() })))));
|
|
11
|
+
props.showClose && (React.createElement(SimpleButton, { "aria-label": `Close ${props.title}`, style: { alignSelf: 'flex-end' }, disabled: props.accessLevel == 'ReadOnly', "data-name": "close", icon: "close", variant: "text", tone: "none", iconSize: 16, className: "twa:ml-1", tooltip: props.tooltip || `Close ${props.title} Toolbar`, onClick: () => props.onClose?.() })))));
|
|
12
12
|
}
|
|
@@ -3,7 +3,6 @@ import { useMemo } from 'react';
|
|
|
3
3
|
import { BaseEditorInput } from './BaseEditorInput';
|
|
4
4
|
import { editorButtonsSearch } from './editorButtonsSearch';
|
|
5
5
|
import { useExpressionEditor } from './EditorContext';
|
|
6
|
-
import StringExtensions from '../../Utilities/Extensions/StringExtensions';
|
|
7
6
|
import { editorButtonsAggregatedScalar } from './editorButtonsAggregatedScalar';
|
|
8
7
|
import { cumulativeAggregatedExpressionFunctions, quantileAggregatedExpressionFunctions, } from '../../Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions';
|
|
9
8
|
import { editorButtonsCumulativeAggregatedScalar } from './editorButtonsCumulativeAggregatedScalar';
|
|
@@ -49,8 +48,25 @@ function EditorInput(props) {
|
|
|
49
48
|
};
|
|
50
49
|
}, [props.type]);
|
|
51
50
|
const { setSelectedFunction } = useExpressionEditor();
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
let queryName;
|
|
52
|
+
switch (props.type) {
|
|
53
|
+
case 'boolean':
|
|
54
|
+
queryName = 'Create an Expression that returns true / false';
|
|
55
|
+
break;
|
|
56
|
+
case 'scalar':
|
|
57
|
+
queryName = "Create an Expression that returns a single value of any type";
|
|
58
|
+
break;
|
|
59
|
+
case 'aggregatedScalar':
|
|
60
|
+
queryName = "Create an Expression that evaluates multiple rows and returns a value of any type";
|
|
61
|
+
break;
|
|
62
|
+
case 'cumulativeAggregatedScalar':
|
|
63
|
+
queryName = "Create a Cumulative Expression";
|
|
64
|
+
break;
|
|
65
|
+
case 'quantileAggregatedScalar':
|
|
66
|
+
queryName = "Create a Quantile Expression";
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
return (React.createElement(BaseEditorInput, { type: 'main', value: props.value, placeholder: queryName, onChange: props.onChange, onSelectedFunctionChange: setSelectedFunction, expressionFunctions: expressionFunctions, editorButtons: props.type === 'aggregatedScalar'
|
|
54
70
|
? editorButtonsAggregatedScalar
|
|
55
71
|
: props.type === 'cumulativeAggregatedScalar'
|
|
56
72
|
? editorButtonsCumulativeAggregatedScalar
|
|
@@ -249,7 +249,7 @@ export function TreeDropdown(props) {
|
|
|
249
249
|
} }, children));
|
|
250
250
|
} },
|
|
251
251
|
React.createElement(FieldWrap, { style: props.fieldStyle, className: "twa:w-full" },
|
|
252
|
-
React.createElement(Input, { type: "text", readOnly: true, "data-name": "Select Values", placeholder: props.placeholder ?? 'Select a value', className: `twa:w-full ${props.clearable ? 'twa:pr-0' : ''}`, value: props.toDisplayValue ? props.toDisplayValue(value) : toDisplayValueDefault(value), onFocus: () => {
|
|
252
|
+
React.createElement(Input, { type: "text", readOnly: true, "data-name": "Select Values", "aria-expanded": visible, placeholder: props.placeholder ?? 'Select a value', className: `twa:w-full ${props.clearable ? 'twa:pr-0' : ''}`, value: props.toDisplayValue ? props.toDisplayValue(value) : toDisplayValueDefault(value), onFocus: () => {
|
|
253
253
|
if (!visible) {
|
|
254
254
|
setVisible(true);
|
|
255
255
|
}
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "22.0.0-canary.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1770107045244 || Date.now(),
|
|
4
|
+
VERSION: "22.0.0-canary.3" || '--current-version--',
|
|
5
5
|
};
|