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