@adaptabletools/adaptable 22.0.0-canary.4 → 22.0.0-canary.6
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 +46 -26
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableOptions/CustomSortOptions.d.ts +1 -2
- package/src/AdaptableState/AlertState.d.ts +6 -2
- package/src/AdaptableState/ChartingState.d.ts +5 -5
- package/src/AdaptableState/Common/AdaptableObject.d.ts +0 -9
- package/src/AdaptableState/Common/AdaptableStyle.d.ts +1 -1
- package/src/AdaptableState/Common/ColumnHighlightInfo.d.ts +18 -0
- package/src/AdaptableState/Common/Schedule.d.ts +6 -2
- package/src/AdaptableState/CustomSortState.d.ts +6 -2
- package/src/AdaptableState/DashboardState.d.ts +3 -3
- package/src/AdaptableState/ExportState.d.ts +3 -3
- package/src/AdaptableState/FlashingCellState.d.ts +6 -2
- package/src/AdaptableState/FormatColumnState.d.ts +6 -2
- package/src/AdaptableState/InternalState.d.ts +2 -0
- package/src/AdaptableState/LayoutState.d.ts +4 -4
- package/src/AdaptableState/NamedQueryState.d.ts +3 -3
- package/src/AdaptableState/PlusMinusState.d.ts +6 -2
- package/src/AdaptableState/ShortcutState.d.ts +6 -2
- package/src/AdaptableState/ThemeState.d.ts +3 -3
- package/src/Api/GridApi.d.ts +18 -3
- package/src/Api/Implementation/GridApiImpl.d.ts +4 -0
- package/src/Api/Implementation/GridApiImpl.js +15 -1
- package/src/Api/Implementation/LayoutHelpers.js +4 -4
- package/src/Redux/ActionsReducers/InternalRedux.d.ts +15 -0
- package/src/Redux/ActionsReducers/InternalRedux.js +36 -0
- package/src/Redux/Store/AdaptableStore.js +21 -0
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +2 -2
- package/src/View/Components/ColumnFilter/FloatingFilter.js +41 -3
- package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +54 -2
- package/src/View/Components/StyleComponent.d.ts +1 -0
- package/src/View/Components/StyleComponent.js +84 -33
- package/src/View/GridFilter/GridFilterExpressionEditor.js +6 -1
- package/src/View/GridFilter/GridFilterViewPanel.js +33 -70
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +2 -2
- package/src/agGrid/AdaptableAgGrid.js +9 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +1 -0
- package/src/agGrid/AgGridColumnAdapter.js +14 -3
- package/src/components/ColorPicker/ColorPicker.js +5 -4
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
- package/src/components/Select/Select.js +78 -15
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +1 -1
- package/src/layout-manager/src/index.js +5 -5
- package/src/layout-manager/src/normalizeLayoutModel.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +25 -18
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +2 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +0 -632
- package/src/View/Alert/AlertEntityRow.d.ts +0 -11
- package/src/View/Alert/AlertEntityRow.js +0 -28
- package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +0 -21
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +0 -58
- package/src/View/Components/Buttons/ButtonFunction.d.ts +0 -7
- package/src/View/Components/Buttons/ButtonFunction.js +0 -8
- package/src/View/Components/Buttons/ButtonGeneral.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonGeneral.js +0 -7
- package/src/View/Components/Buttons/ButtonPreviewDelete.d.ts +0 -4
- package/src/View/Components/Buttons/ButtonPreviewDelete.js +0 -5
- package/src/View/Components/Buttons/ButtonShow.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonShow.js +0 -7
- package/src/View/Components/Buttons/ButtonShowChart.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonShowChart.js +0 -7
- package/src/View/Components/Buttons/ButtonUndo.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonUndo.js +0 -7
- package/src/View/Components/ExpressionWizard.d.ts +0 -24
- package/src/View/Components/ExpressionWizard.js +0 -77
- package/src/View/Components/FilterForm/Waiting.d.ts +0 -10
- package/src/View/Components/FilterForm/Waiting.js +0 -14
- package/src/View/Components/Panels/PanelFooter.d.ts +0 -10
- package/src/View/Components/Panels/PanelFooter.js +0 -9
- package/src/View/Components/Panels/PanelWithTwoButtons.d.ts +0 -12
- package/src/View/Components/Panels/PanelWithTwoButtons.js +0 -15
- package/src/View/Components/Panels/ToolPanelSettingsPanel.d.ts +0 -8
- package/src/View/Components/Panels/ToolPanelSettingsPanel.js +0 -26
- package/src/View/Components/Selectors/ColumnSelectorOld.d.ts +0 -18
- package/src/View/Components/Selectors/ColumnSelectorOld.js +0 -45
- package/src/View/Components/SharedProps/WizardScopeState.d.ts +0 -4
- package/src/View/Components/SharedProps/WizardScopeState.js +0 -1
- package/src/View/Components/WizardSummaryRow.d.ts +0 -9
- package/src/View/Components/WizardSummaryRow.js +0 -11
- package/src/View/CustomSort/CustomSortSummary.d.ts +0 -23
- package/src/View/CustomSort/CustomSortSummary.js +0 -105
- package/src/View/DataImport/DataImportWizard/sections/ImportSection.d.ts +0 -9
- package/src/View/DataImport/DataImportWizard/sections/ImportSection.js +0 -19
- package/src/View/Export/Wizard/ReportColumnTypeWizard.d.ts +0 -19
- package/src/View/Export/Wizard/ReportColumnTypeWizard.js +0 -68
- package/src/View/Export/Wizard/ReportRowTypeWizard.d.ts +0 -19
- package/src/View/Export/Wizard/ReportRowTypeWizard.js +0 -68
- package/src/View/Export/Wizard/ReportSettingsWizard.d.ts +0 -21
- package/src/View/Export/Wizard/ReportSettingsWizard.js +0 -56
- package/src/View/Export/Wizard/ReportSummaryWizard.d.ts +0 -15
- package/src/View/Export/Wizard/ReportSummaryWizard.js +0 -35
- package/src/View/Filter/FilterSummary.d.ts +0 -18
- package/src/View/Filter/FilterSummary.js +0 -48
- package/src/View/FormatColumn/FormatColumnSummary.d.ts +0 -22
- package/src/View/FormatColumn/FormatColumnSummary.js +0 -90
- package/src/View/FreeTextColumn/FreeTextColumnSummary.d.ts +0 -22
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +0 -88
- package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.d.ts +0 -7
- package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.js +0 -94
- package/src/View/PlusMinus/PlusMinusSummary.d.ts +0 -22
- package/src/View/PlusMinus/PlusMinusSummary.js +0 -95
- package/src/View/Wizard/WizardLegend.d.ts +0 -12
- package/src/View/Wizard/WizardLegend.js +0 -23
- /package/src/{View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts → AdaptableState/Common/ColumnHighlightInfo.js} +0 -0
|
@@ -37,11 +37,19 @@ export const FloatingFilter = (props) => {
|
|
|
37
37
|
const handleClear = () => props.onClear?.();
|
|
38
38
|
const showEvent = 'click';
|
|
39
39
|
const hideEvent = 'blur';
|
|
40
|
+
const [overlayVisible, setOverlayVisible] = React.useState(false);
|
|
40
41
|
let filterDropdown = null;
|
|
41
|
-
|
|
42
|
+
const filterDropdownButton = (React.createElement(SimpleButton, { variant: "text", "data-name": "floating-filter-button", onBlur: () => {
|
|
43
|
+
if (isInlineEditable) {
|
|
44
|
+
setOverlayVisible(false);
|
|
45
|
+
}
|
|
46
|
+
}, "data-value": props.predicate?.args[0]?.operator, onClick: () => {
|
|
42
47
|
if (!isInlineEditable) {
|
|
43
48
|
adaptable.api.filterApi.columnFilterApi.internalApi.openColumnFilterPopup(props.columnId);
|
|
44
49
|
}
|
|
50
|
+
else {
|
|
51
|
+
setOverlayVisible(true);
|
|
52
|
+
}
|
|
45
53
|
}, style: {
|
|
46
54
|
textAlign: 'left',
|
|
47
55
|
marginRight: 1, // just so that the focus outline is not cut off
|
|
@@ -55,9 +63,10 @@ export const FloatingFilter = (props) => {
|
|
|
55
63
|
React.createElement(Box, null, !isManualApply && singleFilterPredicateDef?.icon ? (singleFilterPredicateDef?.icon) : (React.createElement(AdaptableIconComponent, { icon: { name: 'filter' } }))),
|
|
56
64
|
showLabel && (React.createElement(Box, { className: "ab-FloatingFilter-label twa:ml-2 twa:flex-1", title: label }, label))));
|
|
57
65
|
if (isInlineEditable) {
|
|
58
|
-
filterDropdown = showQuickFilterDropdown && (React.createElement(OverlayTrigger, { className: "ab-FloatingFilter-overlay", showEvent: showEvent, hideEvent: hideEvent, preventPortalEventPropagation: showEvent === 'click', targetOffset: 10, hideDelay: 50, "data-name": "floating-filter-overlay", render: () => {
|
|
66
|
+
filterDropdown = showQuickFilterDropdown && (React.createElement(OverlayTrigger, { className: "ab-FloatingFilter-overlay", showEvent: showEvent, hideEvent: hideEvent, visible: overlayVisible, onVisibleChange: setOverlayVisible, preventPortalEventPropagation: showEvent === 'click', targetOffset: 10, hideDelay: 50, "data-name": "floating-filter-overlay", render: () => {
|
|
59
67
|
// we render this only for single filter
|
|
60
68
|
return (React.createElement(ColumnFilterMenu, { columnId: props.columnId, disabled: props.disabled, predicate: props.predicate.args[0], predicateDefs: props.predicateDefs, onPredicateChange: (predicate) => {
|
|
69
|
+
setOverlayVisible(false);
|
|
61
70
|
props.onPredicateChange({
|
|
62
71
|
operator: props.predicate.operator,
|
|
63
72
|
args: [predicate],
|
|
@@ -68,7 +77,36 @@ export const FloatingFilter = (props) => {
|
|
|
68
77
|
else {
|
|
69
78
|
filterDropdown = filterDropdownButton;
|
|
70
79
|
}
|
|
71
|
-
return (React.createElement(Flex, { className: "ab-FloatingFilter twa:w-full"
|
|
80
|
+
return (React.createElement(Flex, { className: "ab-FloatingFilter twa:w-full", onKeyDownCapture: (e) => {
|
|
81
|
+
// AG Grid's header keyboard navigation intercepts Tab and calls preventDefault(),
|
|
82
|
+
// which prevents focus from moving between elements inside the floating filter.
|
|
83
|
+
// We handle Tab manually in the capture phase (before AG Grid's handlers).
|
|
84
|
+
if (e.key === 'Tab') {
|
|
85
|
+
const target = e.target;
|
|
86
|
+
const wrapper = e.currentTarget;
|
|
87
|
+
if (!e.shiftKey) {
|
|
88
|
+
// Tab forward: from filter button → select input
|
|
89
|
+
if (target.getAttribute('data-name') === 'floating-filter-button') {
|
|
90
|
+
const selectInput = wrapper.querySelector('[data-name="Select Values"] input');
|
|
91
|
+
if (selectInput) {
|
|
92
|
+
e.preventDefault();
|
|
93
|
+
e.nativeEvent.stopImmediatePropagation();
|
|
94
|
+
selectInput.focus();
|
|
95
|
+
// When the DummyInput gets focus, react-select sets isFocused=true,
|
|
96
|
+
// triggering a React re-render. During this re-render, unstable component
|
|
97
|
+
// references in selectComponents can cause the DummyInput to be removed
|
|
98
|
+
// from DOM and recreated, losing focus. We restore focus after the re-render.
|
|
99
|
+
requestAnimationFrame(() => {
|
|
100
|
+
if (document.activeElement === document.body || document.activeElement === null) {
|
|
101
|
+
const newInput = wrapper.querySelector('[data-name="Select Values"] input');
|
|
102
|
+
newInput?.focus();
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
} },
|
|
72
110
|
filterDropdown,
|
|
73
111
|
isInlineEditable && (React.createElement(Flex, { className: "twa:flex-1 twa:min-w-0" },
|
|
74
112
|
React.createElement(FloatingFilterInputList, { onKeyDown: props.onKeydown, columnId: props.columnId, disabled: props.disabled,
|
|
@@ -2,16 +2,68 @@ import * as React from 'react';
|
|
|
2
2
|
import Panel from '../../../../components/Panel';
|
|
3
3
|
import SimpleButton from '../../../../components/SimpleButton';
|
|
4
4
|
import { Box, Flex } from '../../../../components/Flex';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
import { useEffect, useLayoutEffect } from 'react';
|
|
5
7
|
const ColumnFilterMenuItem = ({ active, onClick, icon, label, }) => {
|
|
6
8
|
return (React.createElement(SimpleButton, { className: "twa:p-1 twa:w-full", variant: "text", tone: active ? 'info' : 'none', onClick: onClick },
|
|
7
9
|
React.createElement(Box, { className: "twa:mr-2" }, icon),
|
|
8
10
|
React.createElement(Box, { className: "twa:text-2" }, label)));
|
|
9
11
|
};
|
|
10
12
|
export const ColumnFilterMenu = (props) => {
|
|
13
|
+
const [activeIndex, setActiveIndex] = React.useState(() => {
|
|
14
|
+
const index = props.predicateDefs.findIndex((predicateDef) => predicateDef.operator === props.predicate.operator);
|
|
15
|
+
return index === -1 ? 0 : index;
|
|
16
|
+
});
|
|
17
|
+
const activeIndexRef = React.useRef(activeIndex);
|
|
18
|
+
const onPredicateChangeRef = React.useRef(props.onPredicateChange);
|
|
19
|
+
const predicateDefsRef = React.useRef(props.predicateDefs);
|
|
20
|
+
useLayoutEffect(() => {
|
|
21
|
+
activeIndexRef.current = activeIndex;
|
|
22
|
+
onPredicateChangeRef.current = props.onPredicateChange;
|
|
23
|
+
predicateDefsRef.current = props.predicateDefs;
|
|
24
|
+
});
|
|
25
|
+
const confirm = React.useCallback((predicateDef) => {
|
|
26
|
+
onPredicateChangeRef.current({ operator: predicateDef.operator, args: [] });
|
|
27
|
+
}, []);
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
const onKeyDown = (e) => {
|
|
30
|
+
// Only handle arrow keys and Enter - let other keys (like Tab) pass through
|
|
31
|
+
if (e.key !== 'ArrowDown' && e.key !== 'ArrowUp' && e.key !== 'Enter') {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const activeIndex = activeIndexRef.current;
|
|
35
|
+
const predicateDefs = predicateDefsRef.current;
|
|
36
|
+
if (e.key === 'Enter') {
|
|
37
|
+
const predicateDef = predicateDefs[activeIndex];
|
|
38
|
+
if (predicateDef) {
|
|
39
|
+
confirm(predicateDef);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
e.stopPropagation();
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
const dir = e.key === 'ArrowDown' ? 1 : e.key === 'ArrowUp' ? -1 : 0;
|
|
45
|
+
if (dir) {
|
|
46
|
+
let nextIndex = activeIndex + dir;
|
|
47
|
+
if (nextIndex < 0) {
|
|
48
|
+
nextIndex = predicateDefs.length - 1;
|
|
49
|
+
}
|
|
50
|
+
else if (nextIndex >= predicateDefs.length) {
|
|
51
|
+
nextIndex = 0;
|
|
52
|
+
}
|
|
53
|
+
setActiveIndex(nextIndex);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
document.addEventListener('keydown', onKeyDown);
|
|
57
|
+
return () => {
|
|
58
|
+
document.removeEventListener('keydown', onKeyDown);
|
|
59
|
+
};
|
|
60
|
+
}, [confirm]);
|
|
11
61
|
return (React.createElement(Panel, { className: "twa:min-w-max" }, props.predicateDefs?.map((predicateDef, index) => {
|
|
12
|
-
|
|
62
|
+
const active = activeIndex === index;
|
|
63
|
+
return (React.createElement(Flex, { className: clsx("twa:mb-1", active && "twa:bg-primarylight"), key: index, onMouseDownCapture: (e) => {
|
|
13
64
|
e.stopPropagation();
|
|
65
|
+
e.preventDefault();
|
|
14
66
|
} },
|
|
15
|
-
React.createElement(ColumnFilterMenuItem, { onClick: () =>
|
|
67
|
+
React.createElement(ColumnFilterMenuItem, { onClick: () => confirm(predicateDef), icon: predicateDef.icon, label: predicateDef.label, active: active })));
|
|
16
68
|
})));
|
|
17
69
|
};
|
|
@@ -10,6 +10,7 @@ export interface StyleComponentProps {
|
|
|
10
10
|
hidePreview?: boolean;
|
|
11
11
|
headerText?: string;
|
|
12
12
|
Style: AdaptableStyle;
|
|
13
|
+
/** @deprecated No longer used - font size is always displayed as dropdown */
|
|
13
14
|
showFontSizeAs?: 'radio' | 'dropdown';
|
|
14
15
|
UpdateStyle: (style: AdaptableStyle) => void;
|
|
15
16
|
}
|
|
@@ -5,7 +5,7 @@ import { CheckBox } from '../../components/CheckBox';
|
|
|
5
5
|
import { ColorPicker } from '../../components/ColorPicker';
|
|
6
6
|
import HelpBlock from '../../components/HelpBlock';
|
|
7
7
|
import Panel from '../../components/Panel';
|
|
8
|
-
import
|
|
8
|
+
import { Tabs } from '../../components/Tabs';
|
|
9
9
|
import { Select } from '../../components/Select';
|
|
10
10
|
import { StylePreview } from '../../components/StylePreview';
|
|
11
11
|
import { Toggle, ToggleGroup } from '../../components/Toggle';
|
|
@@ -148,25 +148,85 @@ export const StyleComponent = (props) => {
|
|
|
148
148
|
const styleClassNames = props.api.userInterfaceApi.getStyleClassNames();
|
|
149
149
|
const colourSpellingVariant = props.api.internalApi.getCorrectEnglishVariant('Colour');
|
|
150
150
|
const coloursSpellingVariant = props.api.internalApi.getCorrectEnglishVariant('colours');
|
|
151
|
-
const fontSizes = ['Default', ...EnumExtensions.getNames(FontSize)];
|
|
152
151
|
return (React.createElement(Cmp, { ...cmpProps, className: twMerge(clsx('ab-StyleComponent twa:text-3', props.className)) },
|
|
153
|
-
ArrayExtensions.IsNotNullOrEmpty(styleClassNames)
|
|
154
|
-
React.createElement(
|
|
155
|
-
|
|
156
|
-
React.createElement(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
152
|
+
ArrayExtensions.IsNotNullOrEmpty(styleClassNames) ? (React.createElement(Tabs, { value: showClassName ? 'classname' : 'createstyle', onValueChange: (value) => onShowClassNameChanged(value === 'classname') },
|
|
153
|
+
React.createElement(Tabs.Tab, { "data-name": "show-class-name", value: "classname" }, "Use Style Class Name"),
|
|
154
|
+
React.createElement(Tabs.Tab, { "data-name": "create-style", value: "createstyle" }, "Create Style"),
|
|
155
|
+
React.createElement(Tabs.Content, { value: "classname" },
|
|
156
|
+
React.createElement(Card, { shadow: false },
|
|
157
|
+
React.createElement(Card.Title, null, "CSS Class Name"),
|
|
158
|
+
React.createElement(Card.Body, { gap: 2, className: "twa:p-1" },
|
|
159
|
+
React.createElement(HelpBlock, null, "Select a CSS Class Name"),
|
|
160
|
+
React.createElement(Box, { className: "twa:max-w-[15rem]" },
|
|
161
|
+
React.createElement(Select, { options: ArrayExtensions.IsNullOrEmpty(styleClassNames)
|
|
162
|
+
? []
|
|
163
|
+
: styleClassNames.map((item) => ({
|
|
164
|
+
label: item,
|
|
165
|
+
value: item,
|
|
166
|
+
})), value: componentStyle.ClassName, onChange: (value) => onStyleClassNameChanged(value) })),
|
|
167
|
+
React.createElement(Box, { className: "twa:m-2 twa:flex-2 twa:text-warn" }, 'Please ensure that the styles listed are in the current stylesheet')))),
|
|
168
|
+
React.createElement(Tabs.Content, { value: "createstyle" },
|
|
169
|
+
React.createElement(Flex, { className: "twa:flex-1 twa:flex twa:flex-col twa:gap-2 twa:lg:flex-row" },
|
|
170
|
+
React.createElement(Card, { shadow: false, className: "twa:flex-1" },
|
|
171
|
+
React.createElement(Card.Body, { gap: 2, className: "twa:grid twa:grid-cols-[auto_1fr_auto_1fr] twa:items-center twa:p-1" },
|
|
172
|
+
React.createElement(Card.Title, { className: "twa:col-span-2" },
|
|
173
|
+
colourSpellingVariant,
|
|
174
|
+
" & Border Properties"),
|
|
175
|
+
React.createElement(HelpBlock, { className: "twa:col-span-2" },
|
|
176
|
+
"Set ",
|
|
177
|
+
coloursSpellingVariant,
|
|
178
|
+
" by ticking a checkbox and selecting from the dropdown; leave unchecked to use cell's existing ",
|
|
179
|
+
coloursSpellingVariant),
|
|
180
|
+
React.createElement(CheckBox, { "data-name": "set-background-color", value: "existing", checked: !!componentStyle.BackColor, onChange: (checked) => onUseBackColorCheckChange(checked) },
|
|
181
|
+
"Back ",
|
|
182
|
+
colourSpellingVariant),
|
|
183
|
+
React.createElement(ColorPicker, { disabled: componentStyle.BackColor == null, api: props.api, value: componentStyle.BackColor || '#ffffff', onChange: (x) => onBackColorSelectChange(x) }),
|
|
184
|
+
React.createElement(CheckBox, { "data-name": "set-foreground-color", value: "existing", className: "twa:row-start-4", checked: componentStyle.ForeColor ? true : false, onChange: (checked) => onUseForeColorCheckChange(checked) },
|
|
185
|
+
"Fore ",
|
|
186
|
+
colourSpellingVariant),
|
|
187
|
+
React.createElement(ColorPicker, { className: "twa:row-start-4 twa:col-start-2", disabled: componentStyle.ForeColor == null, api: props.api, value: componentStyle.ForeColor || '#ffffff', onChange: (x) => onForeColorSelectChange(x) }),
|
|
188
|
+
React.createElement(CheckBox, { "data-name": "set-border-color", value: "existing", className: "twa:row-start-5 twa:col-start-1", checked: componentStyle.BorderColor ? true : false, onChange: (checked) => onUseBorderColorCheckChange(checked) },
|
|
189
|
+
"Border ",
|
|
190
|
+
colourSpellingVariant),
|
|
191
|
+
React.createElement(ColorPicker, { disabled: componentStyle.BorderColor == null, api: props.api, className: "twa:row-start-5 twa:col-start-2", value: componentStyle.BorderColor || '#ffffff', onChange: (x) => onBorderColorSelectChange(x) }),
|
|
192
|
+
React.createElement("span", { className: "twa:row-start-6" }, "Border Radius"),
|
|
193
|
+
React.createElement(AdaptableInput, { className: "twa:w-[100px] twa:row-start-6", type: "number", min: "0", value: componentStyle.BorderRadius, onChange: (event) => {
|
|
194
|
+
const number = Number(event.target.value);
|
|
195
|
+
if (isNaN(number)) {
|
|
196
|
+
onBorderRadiusChange(0);
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
onBorderRadiusChange(number);
|
|
200
|
+
}
|
|
201
|
+
} }),
|
|
202
|
+
React.createElement(Card.Title, { className: "twa:col-span-2 twa:col-start-3 twa:row-start-1" }, "Font Properties"),
|
|
203
|
+
React.createElement(HelpBlock, { className: "twa:self-stretch twa:col-span-2 twa:col-start-3 twa:row-start-2" }, "Set the font properties of the Style"),
|
|
204
|
+
React.createElement("span", null, "Font Style"),
|
|
205
|
+
React.createElement(ToggleGroup, null,
|
|
206
|
+
React.createElement(Toggle, { pressed: componentStyle.FontStyle == FontStyle.Italic, onPressedChange: (checked) => onFontStyleChange(checked), icon: "italic" }),
|
|
207
|
+
React.createElement(Toggle, { pressed: componentStyle.FontWeight == FontWeight.Bold, onPressedChange: (checked) => onFontWeightChange(checked), icon: "bold" })),
|
|
208
|
+
React.createElement("span", null, "Text Decoration"),
|
|
209
|
+
React.createElement(ToggleGroup, null,
|
|
210
|
+
React.createElement(Toggle, { icon: "underline", pressed: componentStyle.TextDecoration === 'Underline', onPressedChange: (checked) => onTextDecorationChange(checked ? 'Underline' : 'None') }),
|
|
211
|
+
React.createElement(Toggle, { icon: "strikethrough", pressed: componentStyle.TextDecoration === 'LineThrough', onPressedChange: (checked) => onTextDecorationChange(checked ? 'LineThrough' : 'None') }),
|
|
212
|
+
React.createElement(Toggle, { icon: "overline", pressed: componentStyle.TextDecoration === 'Overline', onPressedChange: (checked) => onTextDecorationChange(checked ? 'Overline' : 'None') })),
|
|
213
|
+
React.createElement("span", null, "Font Size"),
|
|
214
|
+
React.createElement(Flex, { flexDirection: "row", alignItems: "center" },
|
|
215
|
+
React.createElement(Select, { placeholder: "Default", options: [
|
|
216
|
+
{
|
|
217
|
+
label: 'Default',
|
|
218
|
+
value: '',
|
|
219
|
+
},
|
|
220
|
+
...EnumExtensions.getNames(FontSize).map((enumName) => ({
|
|
221
|
+
label: enumName,
|
|
222
|
+
value: enumName,
|
|
223
|
+
})),
|
|
224
|
+
], value: componentStyle.FontSize?.toString() ?? '', onChange: (value) => onFontSizeChange(value) })),
|
|
225
|
+
React.createElement("span", null, "Alignment"),
|
|
226
|
+
React.createElement(ToggleGroup, null,
|
|
227
|
+
React.createElement(Toggle, { icon: "align-left", pressed: componentStyle.Alignment === 'Left', onPressedChange: (pressed) => pressed ? onAlignmentChange('Left') : onAlignmentChange('Default') }),
|
|
228
|
+
React.createElement(Toggle, { icon: "align-center", pressed: componentStyle.Alignment === 'Center', onPressedChange: (pressed) => pressed ? onAlignmentChange('Center') : onAlignmentChange('Default') }),
|
|
229
|
+
React.createElement(Toggle, { icon: "align-right", pressed: componentStyle.Alignment === 'Right', onPressedChange: (pressed) => pressed ? onAlignmentChange('Right') : onAlignmentChange('Default') })))))))) : (React.createElement(Flex, { className: "twa:flex-1 twa:flex twa:flex-col twa:gap-2 twa:lg:flex-row" },
|
|
170
230
|
React.createElement(Card, { shadow: false, className: "twa:flex-1" },
|
|
171
231
|
React.createElement(Card.Body, { gap: 2, className: "twa:grid twa:grid-cols-[auto_1fr_auto_1fr] twa:items-center twa:p-1" },
|
|
172
232
|
React.createElement(Card.Title, { className: "twa:col-span-2" },
|
|
@@ -211,7 +271,7 @@ export const StyleComponent = (props) => {
|
|
|
211
271
|
React.createElement(Toggle, { icon: "strikethrough", pressed: componentStyle.TextDecoration === 'LineThrough', onPressedChange: (checked) => onTextDecorationChange(checked ? 'LineThrough' : 'None') }),
|
|
212
272
|
React.createElement(Toggle, { icon: "overline", pressed: componentStyle.TextDecoration === 'Overline', onPressedChange: (checked) => onTextDecorationChange(checked ? 'Overline' : 'None') })),
|
|
213
273
|
React.createElement("span", null, "Font Size"),
|
|
214
|
-
|
|
274
|
+
React.createElement(Flex, { flexDirection: "row", alignItems: "center" },
|
|
215
275
|
React.createElement(Select, { placeholder: "Default", options: [
|
|
216
276
|
{
|
|
217
277
|
label: 'Default',
|
|
@@ -221,21 +281,12 @@ export const StyleComponent = (props) => {
|
|
|
221
281
|
label: enumName,
|
|
222
282
|
value: enumName,
|
|
223
283
|
})),
|
|
224
|
-
], value: componentStyle.FontSize?.toString() ?? '', onChange: (value) => onFontSizeChange(value) }))
|
|
225
|
-
return (React.createElement(Radio, { onClick: () => onFontSizeChange(enumName), checked: (enumName == 'Default' && !componentStyle.FontSize) ||
|
|
226
|
-
componentStyle.FontSize === enumName, key: enumName }, enumName));
|
|
227
|
-
}))),
|
|
284
|
+
], value: componentStyle.FontSize?.toString() ?? '', onChange: (value) => onFontSizeChange(value) })),
|
|
228
285
|
React.createElement("span", null, "Alignment"),
|
|
229
286
|
React.createElement(ToggleGroup, null,
|
|
230
|
-
React.createElement(Toggle, { icon: "align-left", pressed: componentStyle.Alignment === 'Left', onPressedChange: (pressed) => pressed
|
|
231
|
-
|
|
232
|
-
|
|
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') })))))),
|
|
287
|
+
React.createElement(Toggle, { icon: "align-left", pressed: componentStyle.Alignment === 'Left', onPressedChange: (pressed) => pressed ? onAlignmentChange('Left') : onAlignmentChange('Default') }),
|
|
288
|
+
React.createElement(Toggle, { icon: "align-center", pressed: componentStyle.Alignment === 'Center', onPressedChange: (pressed) => pressed ? onAlignmentChange('Center') : onAlignmentChange('Default') }),
|
|
289
|
+
React.createElement(Toggle, { icon: "align-right", pressed: componentStyle.Alignment === 'Right', onPressedChange: (pressed) => pressed ? onAlignmentChange('Right') : onAlignmentChange('Default') })))))),
|
|
239
290
|
!props.hidePreview && (React.createElement(Card, { shadow: false },
|
|
240
291
|
React.createElement(Card.Title, null, "Preview"),
|
|
241
292
|
React.createElement(Card.Body, { className: "twa:grid twa:place-items-center" },
|
|
@@ -28,6 +28,10 @@ export const GridFilterExpressionEditor = (props) => {
|
|
|
28
28
|
const onRunQuery = (expression) => {
|
|
29
29
|
api.filterApi.gridFilterApi.setGridFilterExpression(expression);
|
|
30
30
|
};
|
|
31
|
+
const onClearExpression = () => {
|
|
32
|
+
setExpression('');
|
|
33
|
+
api.filterApi.gridFilterApi.clearGridFilter();
|
|
34
|
+
};
|
|
31
35
|
const onAddNamedQuery = (namedQuery) => dispatch(NamedQueryRedux.NamedQueryAdd(namedQuery));
|
|
32
36
|
const handleSaveQuery = () => {
|
|
33
37
|
dispatch(PopupShowForm({
|
|
@@ -80,7 +84,7 @@ export const GridFilterExpressionEditor = (props) => {
|
|
|
80
84
|
}));
|
|
81
85
|
};
|
|
82
86
|
const expressionEditorProps = useGridFilterOptionsForExpressionEditorProps();
|
|
83
|
-
const actionsDisabled = !isExpressionValid || IsNullOrEmpty(expression) || hasNamedQueryError
|
|
87
|
+
const actionsDisabled = !isExpressionValid || IsNullOrEmpty(expression) || hasNamedQueryError;
|
|
84
88
|
return (React.createElement(NamedQueryContext.Provider, { value: {
|
|
85
89
|
namedQuery: namedQuery,
|
|
86
90
|
setNamedQuery: (newQuery) => {
|
|
@@ -95,6 +99,7 @@ export const GridFilterExpressionEditor = (props) => {
|
|
|
95
99
|
} }, "CLOSE")),
|
|
96
100
|
React.createElement(Box, { className: "twa:flex-1" }),
|
|
97
101
|
React.createElement(SimpleButton, { disabled: actionsDisabled, onClick: handleSaveQuery, icon: "save" }, "Save Query"),
|
|
102
|
+
React.createElement(SimpleButton, { "data-name": "action-clear", onClick: onClearExpression, icon: "close", disabled: IsNullOrEmpty(expression), className: "twa:ml-1" }, "Clear Query"),
|
|
98
103
|
React.createElement(SimpleButton, { variant: "raised", tone: "accent", "data-name": "action-run", className: "twa:m-1", icon: "play", onClick: () => {
|
|
99
104
|
if (namedQuery) {
|
|
100
105
|
onAddNamedQuery({
|
|
@@ -1,98 +1,61 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
2
3
|
import StringExtensions from '../../Utilities/Extensions/StringExtensions';
|
|
3
|
-
import DropdownButton from '../../components/DropdownButton';
|
|
4
4
|
import FieldWrap from '../../components/FieldWrap';
|
|
5
|
-
import Textarea from '../../components/Textarea';
|
|
6
|
-
import { Icon } from '../../components/icons';
|
|
7
5
|
import { ButtonClear } from '../Components/Buttons/ButtonClear';
|
|
8
6
|
import { ButtonExpand } from '../Components/Buttons/ButtonExpand';
|
|
9
7
|
import { ButtonInvalid } from '../Components/Buttons/ButtonInvalid';
|
|
10
8
|
import { ButtonPause } from '../Components/Buttons/ButtonPause';
|
|
11
|
-
import { ButtonPlay } from '../Components/Buttons/ButtonPlay';
|
|
12
9
|
import { ButtonSave } from '../Components/Buttons/ButtonSave';
|
|
13
10
|
import { ButtonUnsuspend } from '../Components/Buttons/ButtonUnsuspend';
|
|
14
11
|
import { NamedQuerySelector } from './NamedQuerySelector';
|
|
15
12
|
import { useGridFilterExpressionEditor } from './useGridFilterExpressionEditor';
|
|
16
13
|
import { Box, Flex } from '../../components/Flex';
|
|
14
|
+
import Tooltip from '../../components/Tooltip';
|
|
17
15
|
const QueryViewPanelComponent = (props) => {
|
|
18
|
-
const { cachedQueries, expression,
|
|
16
|
+
const { cachedQueries, expression, isExpressionNamedQuery, isExpressionValid, isSuspended, gridFilter, isAdaptableReady, namedQueries, runQuery, onExpand, clearQuery, namedQueryModuleAccessLevel, saveQuery, suspendGridFilter, unSuspendGridFilter, setGridFilterExpression, gridFilterAccessLevel, isReadOnly, } = useGridFilterExpressionEditor();
|
|
19
17
|
if (!isAdaptableReady) {
|
|
20
18
|
return null;
|
|
21
19
|
}
|
|
22
20
|
const elementType = props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
23
21
|
const disabled = isReadOnly || isSuspended || gridFilterAccessLevel === 'ReadOnly';
|
|
24
|
-
const handleEnter = (e) => {
|
|
25
|
-
if (e.key === 'Enter') {
|
|
26
|
-
e.preventDefault();
|
|
27
|
-
runQuery();
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
22
|
const buttonExpand = (React.createElement(ButtonExpand, { disabled: disabled, accessLevel: gridFilterAccessLevel, variant: "text", tone: "neutral", onClick: onExpand, tooltip: "Edit the Expression in UI", className: "twa:ml-1" }));
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
position: 'absolute',
|
|
41
|
-
resize: 'none',
|
|
42
|
-
fontFamily: 'monospace',
|
|
43
|
-
fontSize: 12,
|
|
44
|
-
maxHeight: 52,
|
|
45
|
-
height: '100%',
|
|
46
|
-
paddingTop: 6,
|
|
47
|
-
overflow: 'hidden',
|
|
48
|
-
zIndex: 100,
|
|
49
|
-
}, placeholder: "Grid Filter", onChange: (x) => setExpression(x.target.value), value: expression })),
|
|
50
|
-
isExpressionValid && (React.createElement(ButtonPlay, { onClick: () => runQuery(), tooltip: '', accessLevel: gridFilterAccessLevel, variant: "text", tone: "neutral", disabled: disabled || expression == '' || expression == gridFilter?.Expression, className: "twa:mr-1" })),
|
|
51
|
-
gridFilter && !isExpressionValid && (React.createElement(ButtonInvalid, { variant: "text", tone: "neutral", tooltip: "Invalid Grid Filter", className: "twa:mr-1" })),
|
|
52
|
-
' ',
|
|
53
|
-
StringExtensions.IsNotNullOrEmpty(expression) && (React.createElement(ButtonClear, { onClick: () => clearQuery(), tooltip: "Clear Grid Filter", accessLevel: gridFilterAccessLevel })))) : (React.createElement(FieldWrap, { className: "twa:w-full twa:overflow-visible" },
|
|
54
|
-
' ',
|
|
23
|
+
const renderExpressionLabel = () => {
|
|
24
|
+
const baseClasses = 'twa:font-mono twa:text-xs twa:py-1.5 twa:px-2 twa:overflow-hidden twa:text-ellipsis twa:whitespace-nowrap twa:bg-white twa:rounded twa:cursor-pointer twa:h-7 twa:leading-4';
|
|
25
|
+
const placeholderClasses = 'twa:text-gray-400 twa:italic';
|
|
26
|
+
const labelClassName = clsx(baseClasses, {
|
|
27
|
+
[placeholderClasses]: !expression,
|
|
28
|
+
});
|
|
29
|
+
const expressionLabel = (React.createElement(Tooltip, { label: expression || 'Click to edit Grid Filter' },
|
|
30
|
+
React.createElement(Box, { className: clsx('twa:flex-1 twa:h-full twa:min-w-0', labelClassName), "data-name": "grid-filter-input", onClick: onExpand }, expression || 'Grid Filter')));
|
|
31
|
+
return (React.createElement(FieldWrap, { className: "twa:flex-1 twa:min-w-0 twa:overflow-visible" },
|
|
55
32
|
buttonExpand,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
left: 0,
|
|
59
|
-
top: 0,
|
|
60
|
-
right: 0,
|
|
61
|
-
border: 0,
|
|
62
|
-
position: 'absolute',
|
|
63
|
-
resize: 'none',
|
|
64
|
-
fontFamily: 'monospace',
|
|
65
|
-
fontSize: 12,
|
|
66
|
-
maxHeight: 60,
|
|
67
|
-
paddingTop: 7,
|
|
68
|
-
zIndex: 100,
|
|
69
|
-
height: '100%',
|
|
70
|
-
overflow: 'hidden',
|
|
71
|
-
}, placeholder: "Grid Filter", onChange: (x) => setExpression(x.target.value), value: expression }))));
|
|
33
|
+
expressionLabel,
|
|
34
|
+
gridFilter && !isExpressionValid && (React.createElement(ButtonInvalid, { variant: "text", tone: "neutral", tooltip: "Invalid Grid Filter" }))));
|
|
72
35
|
};
|
|
73
|
-
const
|
|
74
|
-
const
|
|
75
|
-
const
|
|
76
|
-
const
|
|
77
|
-
const
|
|
78
|
-
|
|
36
|
+
const hasExpression = StringExtensions.IsNotNullOrEmpty(expression);
|
|
37
|
+
const hasActiveGridFilter = gridFilter != null && hasExpression;
|
|
38
|
+
const hasNamedQueries = namedQueries && namedQueries.length > 0;
|
|
39
|
+
const clearButton = hasExpression ? (React.createElement(ButtonClear, { onClick: () => clearQuery(), tooltip: "Clear Grid Filter", accessLevel: gridFilterAccessLevel, variant: "text", tone: "neutral" })) : null;
|
|
40
|
+
const saveButton = hasExpression ? (React.createElement(ButtonSave, { onClick: () => saveQuery(), tooltip: "Save as Named Query", accessLevel: namedQueryModuleAccessLevel, disabled: isReadOnly || gridFilterAccessLevel === 'ReadOnly' || !isExpressionValid || isExpressionNamedQuery, variant: "text", tone: "neutral" })) : null;
|
|
41
|
+
const suspendButton = hasActiveGridFilter ? (React.createElement(ButtonPause, { onClick: () => suspendGridFilter(), tooltip: "Suspend Grid Filter", accessLevel: gridFilterAccessLevel, disabled: disabled || !isExpressionValid, variant: "text", tone: "neutral" })) : null;
|
|
42
|
+
const unSuspendButton = hasActiveGridFilter ? (React.createElement(ButtonUnsuspend, { onClick: () => unSuspendGridFilter(), tooltip: "Unsuspend Grid Filter", accessLevel: gridFilterAccessLevel, disabled: !isExpressionValid, variant: "text", tone: "neutral" })) : null;
|
|
43
|
+
const namedQuerySelector = hasNamedQueries ? (React.createElement(NamedQuerySelector, { namedQueries: namedQueries, cachedQueries: cachedQueries, currentQuery: gridFilter?.Expression, onSelect: (query) => runQuery(query), setGridFilterExpression: (query) => setGridFilterExpression(query) })) : null;
|
|
79
44
|
const renderButtons = () => {
|
|
80
|
-
return
|
|
81
|
-
|
|
45
|
+
return (React.createElement(React.Fragment, null,
|
|
46
|
+
clearButton,
|
|
82
47
|
isSuspended ? unSuspendButton : suspendButton,
|
|
83
|
-
columnsDropdown,
|
|
84
|
-
namedQuerySelector,
|
|
85
|
-
' ')) : (React.createElement(React.Fragment, null,
|
|
86
|
-
React.createElement(ButtonPlay, { "aria-label": 'Run Grid Filter', onClick: () => runQuery(), tooltip: "Run Grid Filter", accessLevel: gridFilterAccessLevel, variant: "text", tone: "neutral", disabled: disabled || !isExpressionValid || expression == '' || expression == gridFilter, className: "twa:mr-1" }),
|
|
87
|
-
' ',
|
|
88
|
-
React.createElement(ButtonClear, { onClick: () => clearQuery(), tooltip: "Clear Grid Filter", accessLevel: gridFilterAccessLevel, disabled: expression == '' }),
|
|
89
|
-
' ',
|
|
90
48
|
saveButton,
|
|
91
|
-
isSuspended ? unSuspendButton : suspendButton,
|
|
92
49
|
namedQuerySelector));
|
|
93
50
|
};
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
51
|
+
const isToolbar = props.viewType === 'Toolbar';
|
|
52
|
+
return (React.createElement(Flex, { flexDirection: isToolbar ? 'row' : 'column', className: clsx(`ab-${elementType}__Query__wrap`, {
|
|
53
|
+
'twa:w-[500px]': isToolbar,
|
|
54
|
+
}) },
|
|
55
|
+
React.createElement(Flex, { className: clsx({ 'twa:flex-1 twa:min-w-0': isToolbar }) }, renderExpressionLabel()),
|
|
56
|
+
React.createElement(Flex, { className: clsx('twa:flex-shrink-0', {
|
|
57
|
+
'twa:pl-1': isToolbar,
|
|
58
|
+
'twa:pt-1': !isToolbar,
|
|
59
|
+
}) }, renderButtons())));
|
|
97
60
|
};
|
|
98
61
|
export const GridFilterPanelControl = QueryViewPanelComponent;
|
|
@@ -30,10 +30,10 @@ export const PivotColumnsSection = (props) => {
|
|
|
30
30
|
React.createElement(Tabs.Tab, null, "Pivot Columns"),
|
|
31
31
|
React.createElement(Tabs.Content, null,
|
|
32
32
|
React.createElement(Box, { className: "twa:mb-3 twa:px-2" },
|
|
33
|
-
React.createElement(CheckBox, { checked: !!layout.
|
|
33
|
+
React.createElement(CheckBox, { checked: !!layout.PivotResultColumnsOrder, onChange: (checked) => {
|
|
34
34
|
props.onChange({
|
|
35
35
|
...layout,
|
|
36
|
-
|
|
36
|
+
PivotResultColumnsOrder: checked,
|
|
37
37
|
});
|
|
38
38
|
} }, "Persist Order of Pivot Result Columns")),
|
|
39
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 }))));
|
|
@@ -3423,6 +3423,15 @@ You need to define at least one Layout!`);
|
|
|
3423
3423
|
suppressChartRanges: Boolean(chart.Model.suppressChartRanges),
|
|
3424
3424
|
aggFunc: chart.Model.aggFunc,
|
|
3425
3425
|
};
|
|
3426
|
+
// Skip the AG Grid API call if the upgradable properties haven't changed
|
|
3427
|
+
// to avoid unnecessary chartOptionsChanged events (see #ag_grid_update_chart_loop)
|
|
3428
|
+
const currentModel = this.getChartModels().find((model) => model.chartId === chart.Model.chartId);
|
|
3429
|
+
if (currentModel &&
|
|
3430
|
+
Boolean(currentModel.unlinkChart) === upgradableProperties.unlinkChart &&
|
|
3431
|
+
Boolean(currentModel.suppressChartRanges) === upgradableProperties.suppressChartRanges &&
|
|
3432
|
+
currentModel.aggFunc === upgradableProperties.aggFunc) {
|
|
3433
|
+
return;
|
|
3434
|
+
}
|
|
3426
3435
|
// see also #ag_grid_update_chart_loop
|
|
3427
3436
|
this.agGridAdapter.getAgGridApi().updateChart(upgradableProperties);
|
|
3428
3437
|
}
|
|
@@ -71,6 +71,7 @@ export declare class AgGridColumnAdapter {
|
|
|
71
71
|
private getAlertCellStyle;
|
|
72
72
|
private getFlashingCellStyle;
|
|
73
73
|
private getCellHighlightStyle;
|
|
74
|
+
private getColumnHighlightStyle;
|
|
74
75
|
isColGroupDef(columnDefinition: ColDef | ColGroupDef): columnDefinition is ColGroupDef;
|
|
75
76
|
private getRelevantFormatColumnHeaderStyles;
|
|
76
77
|
}
|
|
@@ -398,6 +398,7 @@ export class AgGridColumnAdapter {
|
|
|
398
398
|
...this.getAlertCellStyle(gridCell, params),
|
|
399
399
|
...this.getFlashingCellStyle(gridCell, params),
|
|
400
400
|
...this.getCellHighlightStyle(gridCell, params),
|
|
401
|
+
...this.getColumnHighlightStyle(gridCell, params),
|
|
401
402
|
};
|
|
402
403
|
return normalizeStyleForAgGrid(result);
|
|
403
404
|
};
|
|
@@ -1289,14 +1290,24 @@ export class AgGridColumnAdapter {
|
|
|
1289
1290
|
: flashingCell.flashingCellDefinition.NeutralChangeStyle) ?? {});
|
|
1290
1291
|
}
|
|
1291
1292
|
getCellHighlightStyle(gridCell, params) {
|
|
1292
|
-
const
|
|
1293
|
+
const cellHighlight = this.adaptableApi.internalApi
|
|
1293
1294
|
.getInternalState()
|
|
1294
1295
|
.CellHighlightInfo.find((cellHighlightInfo) => {
|
|
1295
1296
|
return (gridCell.column.columnId === cellHighlightInfo.columnId &&
|
|
1296
1297
|
cellHighlightInfo.primaryKeyValue === gridCell.primaryKeyValue);
|
|
1297
1298
|
});
|
|
1298
|
-
if (
|
|
1299
|
-
return convertAdaptableStyleToCSS(
|
|
1299
|
+
if (cellHighlight) {
|
|
1300
|
+
return convertAdaptableStyleToCSS(cellHighlight.highlightStyle);
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
getColumnHighlightStyle(gridCell, params) {
|
|
1304
|
+
const columnHighlight = this.adaptableApi.internalApi
|
|
1305
|
+
.getInternalState()
|
|
1306
|
+
.ColumnHighlightInfo.find((columnHighlightInfo) => {
|
|
1307
|
+
return (gridCell.column.columnId === columnHighlightInfo.columnId);
|
|
1308
|
+
});
|
|
1309
|
+
if (columnHighlight) {
|
|
1310
|
+
return convertAdaptableStyleToCSS(columnHighlight.highlightStyle);
|
|
1300
1311
|
}
|
|
1301
1312
|
}
|
|
1302
1313
|
isColGroupDef(columnDefinition) {
|
|
@@ -49,8 +49,9 @@ export const ColorPicker = React.forwardRef((props, ref) => {
|
|
|
49
49
|
ABcolorChoices,
|
|
50
50
|
includeAlpha && (React.createElement(Flex, { alignItems: "center", className: "twa:gap-1" },
|
|
51
51
|
React.createElement(Box, null, "Opacity"),
|
|
52
|
-
React.createElement(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
React.createElement(Flex, { alignItems: "center", className: "twa:min-h-input" },
|
|
53
|
+
React.createElement(Input, { disabled: props.disabled, className: "ab-ColorPicker-range", style: { background: rangeBackround }, value: alpha, onChange: (event) => {
|
|
54
|
+
const color = tinycolor(value).setAlpha(event.target.value).toRgbString();
|
|
55
|
+
debouncedOnChange(color);
|
|
56
|
+
}, min: 0, max: 1, step: 0.01, type: "range" }))))));
|
|
56
57
|
});
|
|
@@ -15,5 +15,5 @@ export const ExpressionFunctionDocumentation = (props) => {
|
|
|
15
15
|
React.createElement("pre", { className: signatureClassName }, example))))))),
|
|
16
16
|
props.expressionFunction.returnType && (React.createElement(Box, { "data-name": "expression-editor-documentation-examples" },
|
|
17
17
|
React.createElement("b", null, "Return Type"),
|
|
18
|
-
React.createElement(Tag, { className: "twa:bg-accentlight twa:text-accent twa:ml-3 twa:rounded-full" }, props.expressionFunction.returnType))))) : null;
|
|
18
|
+
React.createElement(Tag, { className: "twa:bg-accentlight twa:text-accent twa:ml-3 twa:rounded-full twa:py-1" }, props.expressionFunction.returnType))))) : null;
|
|
19
19
|
};
|