@adaptabletools/adaptable 23.0.1 → 23.0.2
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/package.json +1 -1
- package/src/View/Components/ColumnFilter/FloatingFilter.js +2 -1
- package/src/components/Combobox/index.js +4 -0
- package/src/components/NewSelect/index.d.ts +11 -0
- package/src/components/NewSelect/index.js +5 -2
- package/src/env.js +2 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -44,11 +44,12 @@ export const FloatingFilter = (props) => {
|
|
|
44
44
|
const operatorOptions = props.predicateDefs.map((predicateDef) => ({
|
|
45
45
|
label: (_jsxs(Box, { className: "twa:flex twa:items-center", children: [_jsx(Box, { className: "twa:mr-2 twa:flex twa:items-center", children: predicateDef.icon }), _jsx(Box, { className: "twa:truncate", "data-name": "filter-predicate-label", "data-label": predicateDef.label, children: predicateDef.label })] })),
|
|
46
46
|
tooltip: predicateDef.label,
|
|
47
|
+
ariaLabel: predicateDef.label,
|
|
47
48
|
value: predicateDef.operator,
|
|
48
49
|
}));
|
|
49
50
|
const renderTriggerValue = () => (_jsxs(Flex, { alignItems: "center", className: "twa:min-w-0", children: [_jsx(Box, { className: "twa:flex twa:items-center", children: !isManualApply && singleFilterPredicateDef?.icon ? (singleFilterPredicateDef?.icon) : (_jsx(AdaptableIconComponent, { icon: { name: 'filter' } })) }), showLabel && (_jsx(Box, { className: "ab-FloatingFilter-label twa:ml-2 twa:flex-1 twa:truncate", title: label, children: label }))] }));
|
|
50
51
|
let filterDropdown = null;
|
|
51
|
-
const filterDropdownSelect = (_jsx(SingleSelect, { chevronIcon: null, "data-name": "floating-filter-button", ariaLabel:
|
|
52
|
+
const filterDropdownSelect = (_jsx(SingleSelect, { chevronIcon: null, "data-name": "floating-filter-button", ariaLabel: `Column Filter Operator Dropdown: current operator is ${label}`, size: "small", stopMouseDownPropagation: true, disabled: props.disabled, open: selectOpen, extraWidthChars: 5, onOpenChange: (nextOpen) => {
|
|
52
53
|
// In non-inline mode the select doesn't pick an operator inline; opening it
|
|
53
54
|
// instead opens the full column filter popup, so keep the dropdown closed.
|
|
54
55
|
if (nextOpen && !isInlineEditable) {
|
|
@@ -54,6 +54,10 @@ const AdaptableComboboxList = (props) => {
|
|
|
54
54
|
: false;
|
|
55
55
|
return (_jsx(CheckBox, { checked: allChecked, onChange: (checked) => {
|
|
56
56
|
props.onCheckAllChange?.(checked);
|
|
57
|
+
}, onKeyDown: (e) => {
|
|
58
|
+
if (e.key === 'Enter') {
|
|
59
|
+
props.onCheckAllChange?.(!allChecked);
|
|
60
|
+
}
|
|
57
61
|
}, onMouseDown: (e) => {
|
|
58
62
|
// Prevent focus from moving to the checkbox input;
|
|
59
63
|
// keeps focus on the combobox input so arrow-key navigation still works.
|
|
@@ -3,6 +3,17 @@ type SelectItemType = {
|
|
|
3
3
|
label: React.ReactNode;
|
|
4
4
|
value: any;
|
|
5
5
|
disabled?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Explicit accessible name for the item. Use when `label` is a React node
|
|
8
|
+
* (so a readable string can't be derived) and the `value` is not meaningful
|
|
9
|
+
* to assistive technologies.
|
|
10
|
+
*/
|
|
11
|
+
ariaLabel?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Tooltip content shown on hover when `showItemTooltip` is enabled. Takes
|
|
14
|
+
* precedence over the label-derived text.
|
|
15
|
+
*/
|
|
16
|
+
tooltip?: React.ReactNode;
|
|
6
17
|
};
|
|
7
18
|
type SelectGroupType<T extends SelectItemType> = {
|
|
8
19
|
label: React.ReactNode;
|
|
@@ -65,9 +65,12 @@ const NewSelect = (props) => {
|
|
|
65
65
|
: undefined, children: _jsx(SelectValue, { placeholder: props.placeholder, className: 'twa:truncate twa:block!', children: renderValueChild }) }), _jsx(SelectContent, { "aria-label": props.ariaLabel ? `${props.ariaLabel} content` : undefined, alignItemWithTrigger: false, container: props.container, stopMouseDownPropagation: props.stopMouseDownPropagation, style: contentStyle, children: groups.map((group, index) => {
|
|
66
66
|
return (_jsxs(React.Fragment, { children: [_jsxs(SelectGroup, { children: [group.label && _jsx(SelectLabel, { children: group.label }), group.items.map((item) => {
|
|
67
67
|
const itemTitle = getItemTitle(item.label, item.value);
|
|
68
|
-
const tooltipText = props.showItemTooltip ? itemTitle : undefined;
|
|
68
|
+
const tooltipText = props.showItemTooltip ? item.tooltip ?? itemTitle : undefined;
|
|
69
69
|
const itemContent = item.label;
|
|
70
|
-
const itemElement = (_jsx(SelectItem, { value: item.value, "aria-label":
|
|
70
|
+
const itemElement = (_jsx(SelectItem, { value: item.value, "aria-label": item.ariaLabel ||
|
|
71
|
+
itemTitle ||
|
|
72
|
+
(typeof item.tooltip === 'string' ? item.tooltip : undefined) ||
|
|
73
|
+
undefined, className: 'ab-Select-Row', disabled: item.disabled, children: itemContent }, item.value));
|
|
71
74
|
if (tooltipText != null) {
|
|
72
75
|
return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: itemElement, children: itemContent }), _jsx(TooltipContent, { side: "right", children: tooltipText })] }, item.value));
|
|
73
76
|
}
|
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: "23.0.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1782298993334 || Date.now(),
|
|
4
|
+
VERSION: "23.0.2" || '--current-version--',
|
|
5
5
|
};
|