@adaptabletools/adaptable 23.0.1 → 23.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +4 -4
- package/src/Utilities/Services/ThemeService.d.ts +1 -1
- package/src/Utilities/Services/ThemeService.js +2 -2
- package/src/View/Components/ColumnFilter/FloatingFilter.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +2 -2
- package/src/agGrid/agGridDataTypeDefinitions.js +4 -0
- 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/components/WindowModal/WindowModal.js +14 -1
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +1198 -259
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ import { CustomRenderContext } from '../agGrid/AdaptableFrameworkComponent';
|
|
|
7
7
|
*/
|
|
8
8
|
export interface SettingsPanelOptions {
|
|
9
9
|
/**
|
|
10
|
-
* Title for
|
|
10
|
+
* Title for Settings Panel
|
|
11
11
|
*
|
|
12
12
|
* @defaultValue 'Settings Panel'
|
|
13
13
|
*/
|
|
@@ -45,7 +45,7 @@ export interface SettingsPanelOptions {
|
|
|
45
45
|
*/
|
|
46
46
|
navigation?: SettingsPanelNavigationConfigurer;
|
|
47
47
|
/**
|
|
48
|
-
* Initial position of Settings Panel window
|
|
48
|
+
* Initial position of Settings Panel — pixel offset of top-left corner from top-left of viewport (requires `popupType` to be `'window'`)
|
|
49
49
|
*
|
|
50
50
|
* @defaultValue Middle of Screen
|
|
51
51
|
*/
|
|
@@ -54,7 +54,7 @@ export interface SettingsPanelOptions {
|
|
|
54
54
|
y: number;
|
|
55
55
|
};
|
|
56
56
|
/**
|
|
57
|
-
* Initial size of Settings Panel
|
|
57
|
+
* Initial size (in pixels) of Settings Panel (requires `popupType` to be `'window'`)
|
|
58
58
|
*
|
|
59
59
|
* @defaultValue Computed based on size of screen
|
|
60
60
|
*/
|
|
@@ -63,7 +63,7 @@ export interface SettingsPanelOptions {
|
|
|
63
63
|
height: number;
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
66
|
+
* How the Settings Panel is rendered: `'modal'` (centred and unmovable and resizable) or `'window'` (supports size, position, drag and resize)
|
|
67
67
|
*
|
|
68
68
|
* @defaultValue 'modal'
|
|
69
69
|
*/
|
|
@@ -7,7 +7,7 @@ export declare class ThemeService implements IThemeService {
|
|
|
7
7
|
constructor(api: AdaptableApi);
|
|
8
8
|
destroy(): void;
|
|
9
9
|
subscribe(): void;
|
|
10
|
-
|
|
10
|
+
onThemeSelected: () => void;
|
|
11
11
|
applyNewThemeVariables(theme: AdaptableTheme): void;
|
|
12
12
|
showMissingThemeFiles(theme: AdaptableTheme): void;
|
|
13
13
|
getDOMPrefferedColorScheme(): 'dark' | 'light';
|
|
@@ -20,14 +20,14 @@ export class ThemeService {
|
|
|
20
20
|
document.adoptedStyleSheets = [...document.adoptedStyleSheets].filter((sheet) => sheet !== this.styleSheetObject);
|
|
21
21
|
}
|
|
22
22
|
subscribe() {
|
|
23
|
-
const themeChangedUnsubscribe = this.api.eventApi.on('ThemeSelected', this.
|
|
23
|
+
const themeChangedUnsubscribe = this.api.eventApi.on('ThemeSelected', this.onThemeSelected);
|
|
24
24
|
const prefferedColorSchemeUnsubscribe = this.attachPrefferedColorSchemeListener();
|
|
25
25
|
this.unsubscribe = () => {
|
|
26
26
|
themeChangedUnsubscribe();
|
|
27
27
|
prefferedColorSchemeUnsubscribe();
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
onThemeSelected = () => {
|
|
31
31
|
let currentTheme = this.api.themeApi.getCurrentThemeObject();
|
|
32
32
|
currentTheme = this.mapOsTheme(currentTheme);
|
|
33
33
|
this.applyNewThemeVariables(currentTheme);
|
|
@@ -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) {
|
|
@@ -7,7 +7,7 @@ import { useAdaptable } from '../../../AdaptableContext';
|
|
|
7
7
|
import { getActionPanelSize, getMiddlePosition, getSettingsPanelSize } from '../Utilities';
|
|
8
8
|
import { cn } from '../../../../lib/utils';
|
|
9
9
|
const WindowDialog = (props) => {
|
|
10
|
-
const { onChange, style, baseClassName, className, isActionModule, settingsPanelOptionsKey, onHide, ...dialogProps } = props;
|
|
10
|
+
const { onChange, style, baseClassName, className, isActionModule, settingsPanelOptionsKey, onHide, dataName, ...dialogProps } = props;
|
|
11
11
|
const adaptable = useAdaptable();
|
|
12
12
|
const dispatch = useDispatch();
|
|
13
13
|
const settingsPanelOptions = adaptable.adaptableOptions.settingsPanelOptions;
|
|
@@ -34,7 +34,7 @@ const WindowDialog = (props) => {
|
|
|
34
34
|
position: popupSettings.position,
|
|
35
35
|
onChange: handleWindowSettings,
|
|
36
36
|
};
|
|
37
|
-
return (_jsx(Dialog, { windowModal: true, fixed: false, windowModalProps: windowModalProps, style: props.style, onDismiss: onHide, isOpen: true, showCloseButton: true, ...dialogProps, className: cn('twa:p-0 twa:h-full', className) }));
|
|
37
|
+
return (_jsx(Dialog, { "data-name": dataName, windowModal: true, fixed: false, windowModalProps: windowModalProps, style: props.style, onDismiss: onHide, isOpen: true, showCloseButton: true, ...dialogProps, className: cn('twa:p-0 twa:h-full', className) }));
|
|
38
38
|
};
|
|
39
39
|
const PopupDialog = (props) => {
|
|
40
40
|
const { style, className, onHide, children, ...dialogProps } = props;
|
|
@@ -35,6 +35,10 @@ export const agGridDataTypeDefinitions = {
|
|
|
35
35
|
// boolean: is kept as is
|
|
36
36
|
// object: is kept as is
|
|
37
37
|
// Adaptable specific types
|
|
38
|
+
unknown: {
|
|
39
|
+
baseDataType: 'text',
|
|
40
|
+
extendsDataType: 'text',
|
|
41
|
+
},
|
|
38
42
|
[TEXT_ARRAY_DATA_TYPE]: {
|
|
39
43
|
baseDataType: 'text',
|
|
40
44
|
extendsDataType: 'text',
|
|
@@ -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
|
}
|
|
@@ -100,9 +100,22 @@ export const WindowModal = (props) => {
|
|
|
100
100
|
}
|
|
101
101
|
}, []);
|
|
102
102
|
const ResizableCmp = Resizable;
|
|
103
|
+
// React propagates events through the component tree, not the DOM tree. A
|
|
104
|
+
// nested popup (e.g. a modal wizard) rendered as a React child of this window
|
|
105
|
+
// is portaled elsewhere in the DOM, so a mousedown inside it would bubble here
|
|
106
|
+
// and incorrectly bring this window to the front (covering the popup). Guard
|
|
107
|
+
// against this by only reacting to mousedowns that happen inside this window's
|
|
108
|
+
// own DOM subtree.
|
|
109
|
+
const handleMouseDown = (event) => {
|
|
110
|
+
const node = targetRef.current;
|
|
111
|
+
if (node && event.target instanceof Node && !node.contains(event.target)) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
stacking.bringInFront();
|
|
115
|
+
};
|
|
103
116
|
return createPortal(_jsx("div", { style: style,
|
|
104
117
|
//@ts-ignore
|
|
105
|
-
ref: targetRef, onMouseDown:
|
|
118
|
+
ref: targetRef, onMouseDown: handleMouseDown, children: _jsx(ResizableCmp, { minWidth: props.minWidth, minHeight: props.minHeight, onResizeStop: handleResizeStop, onResize: handleResize, bounds: "window", defaultSize: {
|
|
106
119
|
width: props.size.width,
|
|
107
120
|
height: props.size.height,
|
|
108
121
|
}, children: props.children }) }), portalElement);
|
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: 1782392443346 || Date.now(),
|
|
4
|
+
VERSION: "23.0.3" || '--current-version--',
|
|
5
5
|
};
|