onekijs-ui 0.21.4 → 0.21.10
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/dist/components/contextmenu/components/ContextMenuComponent.d.ts +4 -0
- package/dist/components/contextmenu/index.d.ts +2 -0
- package/dist/components/contextmenu/style.d.ts +4 -0
- package/dist/components/contextmenu/typings.d.ts +7 -0
- package/dist/components/icon/util.d.ts +21 -21
- package/dist/components/select/SelectService.d.ts +3 -3
- package/dist/components/tree/components/ControllerTreeComponent.d.ts +1 -1
- package/dist/components/tree/typings.d.ts +4 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +107 -4
- package/dist/index.js.map +1 -1
- package/dist/index.module.js +105 -5
- package/dist/index.module.js.map +1 -1
- package/dist/styles/background.d.ts +1 -1
- package/dist/styles/border.d.ts +6 -6
- package/dist/styles/grid.d.ts +1 -1
- package/dist/styles/size.d.ts +6 -6
- package/dist/styles/svg.d.ts +1 -1
- package/dist/styles/typography.d.ts +4 -4
- package/package.json +3 -3
- package/src/components/contextmenu/components/ContextMenuComponent.tsx +96 -0
- package/src/components/contextmenu/index.tsx +9 -0
- package/src/components/contextmenu/style.ts +14 -0
- package/src/components/contextmenu/typings.ts +6 -0
- package/src/components/select/components/ControlledTreeSelectComponent.tsx +13 -0
- package/src/components/select/components/TreeSelectComponent.tsx +0 -1
- package/src/components/tree/components/ControllerTreeComponent.tsx +13 -1
- package/src/components/tree/components/TreeBodyComponent.tsx +4 -0
- package/src/components/tree/components/VirtualTreeBodyComponent.tsx +4 -0
- package/src/components/tree/typings.ts +4 -0
- package/src/index.ts +5 -0
|
@@ -42,16 +42,16 @@ export declare const getIconDivProps: (props: IconProps) => {
|
|
|
42
42
|
accessKey?: string | undefined;
|
|
43
43
|
autoFocus?: boolean | undefined;
|
|
44
44
|
className?: string | undefined;
|
|
45
|
-
contentEditable?: "inherit" | (boolean | "
|
|
45
|
+
contentEditable?: "inherit" | (boolean | "false" | "true") | undefined;
|
|
46
46
|
contextMenu?: string | undefined;
|
|
47
47
|
dir?: string | undefined;
|
|
48
|
-
draggable?: (boolean | "
|
|
48
|
+
draggable?: (boolean | "false" | "true") | undefined;
|
|
49
49
|
hidden?: boolean | undefined;
|
|
50
50
|
id?: string | undefined;
|
|
51
51
|
lang?: string | undefined;
|
|
52
52
|
nonce?: string | undefined;
|
|
53
53
|
slot?: string | undefined;
|
|
54
|
-
spellCheck?: (boolean | "
|
|
54
|
+
spellCheck?: (boolean | "false" | "true") | undefined;
|
|
55
55
|
style?: import("react").CSSProperties | undefined;
|
|
56
56
|
tabIndex?: number | undefined;
|
|
57
57
|
title?: string | undefined;
|
|
@@ -83,52 +83,52 @@ export declare const getIconDivProps: (props: IconProps) => {
|
|
|
83
83
|
inputMode?: "search" | "text" | "none" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined;
|
|
84
84
|
is?: string | undefined;
|
|
85
85
|
'aria-activedescendant'?: string | undefined;
|
|
86
|
-
'aria-atomic'?: (boolean | "
|
|
87
|
-
'aria-autocomplete'?: "
|
|
86
|
+
'aria-atomic'?: (boolean | "false" | "true") | undefined;
|
|
87
|
+
'aria-autocomplete'?: "both" | "none" | "inline" | "list" | undefined;
|
|
88
88
|
'aria-braillelabel'?: string | undefined;
|
|
89
89
|
'aria-brailleroledescription'?: string | undefined;
|
|
90
|
-
'aria-busy'?: (boolean | "
|
|
91
|
-
'aria-checked'?: boolean | "
|
|
90
|
+
'aria-busy'?: (boolean | "false" | "true") | undefined;
|
|
91
|
+
'aria-checked'?: boolean | "mixed" | "false" | "true" | undefined;
|
|
92
92
|
'aria-colcount'?: number | undefined;
|
|
93
93
|
'aria-colindex'?: number | undefined;
|
|
94
94
|
'aria-colindextext'?: string | undefined;
|
|
95
95
|
'aria-colspan'?: number | undefined;
|
|
96
96
|
'aria-controls'?: string | undefined;
|
|
97
|
-
'aria-current'?: boolean | "time" | "
|
|
97
|
+
'aria-current'?: boolean | "time" | "page" | "false" | "true" | "step" | "date" | "location" | undefined;
|
|
98
98
|
'aria-describedby'?: string | undefined;
|
|
99
99
|
'aria-description'?: string | undefined;
|
|
100
100
|
'aria-details'?: string | undefined;
|
|
101
|
-
'aria-disabled'?: (boolean | "
|
|
101
|
+
'aria-disabled'?: (boolean | "false" | "true") | undefined;
|
|
102
102
|
'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
103
103
|
'aria-errormessage'?: string | undefined;
|
|
104
|
-
'aria-expanded'?: (boolean | "
|
|
104
|
+
'aria-expanded'?: (boolean | "false" | "true") | undefined;
|
|
105
105
|
'aria-flowto'?: string | undefined;
|
|
106
|
-
'aria-grabbed'?: (boolean | "
|
|
107
|
-
'aria-haspopup'?: boolean | "dialog" | "menu" | "listbox" | "grid" | "
|
|
108
|
-
'aria-hidden'?: (boolean | "
|
|
109
|
-
'aria-invalid'?: boolean | "
|
|
106
|
+
'aria-grabbed'?: (boolean | "false" | "true") | undefined;
|
|
107
|
+
'aria-haspopup'?: boolean | "dialog" | "menu" | "listbox" | "grid" | "false" | "true" | "tree" | undefined;
|
|
108
|
+
'aria-hidden'?: (boolean | "false" | "true") | undefined;
|
|
109
|
+
'aria-invalid'?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
110
110
|
'aria-keyshortcuts'?: string | undefined;
|
|
111
111
|
'aria-label'?: string | undefined;
|
|
112
112
|
'aria-labelledby'?: string | undefined;
|
|
113
113
|
'aria-level'?: number | undefined;
|
|
114
114
|
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
115
|
-
'aria-modal'?: (boolean | "
|
|
116
|
-
'aria-multiline'?: (boolean | "
|
|
117
|
-
'aria-multiselectable'?: (boolean | "
|
|
115
|
+
'aria-modal'?: (boolean | "false" | "true") | undefined;
|
|
116
|
+
'aria-multiline'?: (boolean | "false" | "true") | undefined;
|
|
117
|
+
'aria-multiselectable'?: (boolean | "false" | "true") | undefined;
|
|
118
118
|
'aria-orientation'?: "horizontal" | "vertical" | undefined;
|
|
119
119
|
'aria-owns'?: string | undefined;
|
|
120
120
|
'aria-placeholder'?: string | undefined;
|
|
121
121
|
'aria-posinset'?: number | undefined;
|
|
122
|
-
'aria-pressed'?: boolean | "
|
|
123
|
-
'aria-readonly'?: (boolean | "
|
|
122
|
+
'aria-pressed'?: boolean | "mixed" | "false" | "true" | undefined;
|
|
123
|
+
'aria-readonly'?: (boolean | "false" | "true") | undefined;
|
|
124
124
|
'aria-relevant'?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
125
|
-
'aria-required'?: (boolean | "
|
|
125
|
+
'aria-required'?: (boolean | "false" | "true") | undefined;
|
|
126
126
|
'aria-roledescription'?: string | undefined;
|
|
127
127
|
'aria-rowcount'?: number | undefined;
|
|
128
128
|
'aria-rowindex'?: number | undefined;
|
|
129
129
|
'aria-rowindextext'?: string | undefined;
|
|
130
130
|
'aria-rowspan'?: number | undefined;
|
|
131
|
-
'aria-selected'?: (boolean | "
|
|
131
|
+
'aria-selected'?: (boolean | "false" | "true") | undefined;
|
|
132
132
|
'aria-setsize'?: number | undefined;
|
|
133
133
|
'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
134
134
|
'aria-valuemax'?: number | undefined;
|
|
@@ -5,16 +5,16 @@ declare class SelectService<T = any, I extends SelectItem<T> = SelectItem<T>, S
|
|
|
5
5
|
protected lastCheckQuery: Query | undefined;
|
|
6
6
|
get defaultValue(): T | T[] | null | undefined;
|
|
7
7
|
get defaultValueLoading(): boolean | undefined;
|
|
8
|
-
check(): Generator<void | import("redux-saga/effects").AllEffect<import("redux-saga/effects").CallEffect<Generator<I[] | Generator<void | import("redux-saga/effects").
|
|
8
|
+
check(): Generator<void | import("redux-saga/effects").AllEffect<import("redux-saga/effects").CallEffect<Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | CollectionFetcherResult<T> | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>>> | import("redux-saga/effects").AllEffect<Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | CollectionFetcherResult<T> | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>> | import("redux-saga/effects").CallEffect<void>, void, (I | undefined)[]>;
|
|
9
9
|
get status(): CollectionStatus;
|
|
10
10
|
setData(data: T[], query?: Query): void;
|
|
11
|
-
setDefaultValue(value: T | T[] | null | undefined): Generator<void | Generator<void | import("redux-saga/effects").AllEffect<import("redux-saga/effects").CallEffect<Generator<I[] | Generator<void | import("redux-saga/effects").
|
|
11
|
+
setDefaultValue(value: T | T[] | null | undefined): Generator<void | Generator<void | import("redux-saga/effects").AllEffect<import("redux-saga/effects").CallEffect<Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | CollectionFetcherResult<T> | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>>> | import("redux-saga/effects").AllEffect<Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | CollectionFetcherResult<T> | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>> | import("redux-saga/effects").CallEffect<void>, void, (I | undefined)[]>, void, unknown>;
|
|
12
12
|
setDefaultValueLoading(loading: boolean): void;
|
|
13
13
|
setItemWidth(_item: I, value: number): void;
|
|
14
14
|
setValue(value: null | T | T[]): void;
|
|
15
15
|
setUrl(url: string, query?: Query): void;
|
|
16
16
|
_buildItem(data: T | null | undefined, adaptee: unknown, context?: AnonymousObject): I;
|
|
17
|
-
_filterItem(item: I | undefined, query: Query, valid: boolean): Generator<I[] | Generator<void | import("redux-saga/effects").
|
|
17
|
+
_filterItem(item: I | undefined, query: Query, valid: boolean): Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | CollectionFetcherResult<T> | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>;
|
|
18
18
|
_compareItem(a: I | undefined, b: I | undefined): boolean;
|
|
19
19
|
_doSearch(search: Primitive | undefined): boolean;
|
|
20
20
|
_setDefaultValue(value: T | T[] | null | undefined): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ControllerTreeProps, TreeItem } from '../typings';
|
|
3
3
|
declare const ControllerTreeComponent: {
|
|
4
|
-
<T = any, I extends TreeItem<T> = TreeItem<T>>({ controller, className, onActivate, onSelect, height, virtual, gap, TreeIconComponent, TreeItemComponent, TreeItemContentComponent, treeItemClassName, TreeTogglerComponent, paddingLeft, paddingRight, animate, keyboardNavigable, listRef, }: ControllerTreeProps<T, I>): React.JSX.Element;
|
|
4
|
+
<T extends unknown = any, I extends TreeItem<T> = TreeItem<T>>({ controller, className, onActivate, onDeactivate, onSelect, onUnselect, onHighlight, onUnhighlight, height, virtual, gap, TreeIconComponent, TreeItemComponent, TreeItemContentComponent, treeItemClassName, TreeTogglerComponent, paddingLeft, paddingRight, animate, keyboardNavigable, listRef, }: ControllerTreeProps<T, I>): React.JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
7
7
|
export default ControllerTreeComponent;
|
|
@@ -19,7 +19,11 @@ export type TreeConfig<T = any, I extends TreeItem<T> = TreeItem<T>> = {
|
|
|
19
19
|
TreeIconComponent?: React.FC<TreeItemProps<T, I>>;
|
|
20
20
|
TreeTogglerComponent?: React.FC<TreeItemToggleProps<T, I>>;
|
|
21
21
|
onActivate?: TreeItemHandler<T, I>;
|
|
22
|
+
onDeactivate?: TreeItemHandler<T, I>;
|
|
23
|
+
onHighlight?: TreeItemHandler<T, I>;
|
|
24
|
+
onUnhighlight?: TreeItemHandler<T, I>;
|
|
22
25
|
onSelect?: TreeItemHandler<T, I>;
|
|
26
|
+
onUnselect?: TreeItemHandler<T, I>;
|
|
23
27
|
virtual?: boolean;
|
|
24
28
|
gap?: number;
|
|
25
29
|
paddingLeft?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -40,6 +40,11 @@ export { default as Dropdown } from './components/dropdown';
|
|
|
40
40
|
export { default as DropdownComponent } from './components/dropdown/components/DropdownComponent';
|
|
41
41
|
export { default as useDropdown } from './components/dropdown/hooks/useDropdown';
|
|
42
42
|
export { default as dropdownStyle } from './components/dropdown/style';
|
|
43
|
+
export { DropdownComponentProps, DropdownProps, DropdownWidthModifier } from './components/dropdown/typings';
|
|
44
|
+
export { default as ContextMenu } from './components/contextmenu';
|
|
45
|
+
export { default as ContextMenuComponent } from './components/contextmenu/components/ContextMenuComponent';
|
|
46
|
+
export { default as contextMenuStyle } from './components/contextmenu/style';
|
|
47
|
+
export { ContextMenuProps } from './components/contextmenu/typings';
|
|
43
48
|
export { default as FieldDescription } from './components/field/FieldDescription';
|
|
44
49
|
export { default as FieldDisplayer } from './components/field/FieldDisplayer';
|
|
45
50
|
export { default as FieldHelp } from './components/field/FieldHelp';
|
package/dist/index.js
CHANGED
|
@@ -4117,6 +4117,86 @@ const useDashoardBodyPanel = () => {
|
|
|
4117
4117
|
return state.body;
|
|
4118
4118
|
};
|
|
4119
4119
|
|
|
4120
|
+
const contextMenuStyle = () => {
|
|
4121
|
+
return styled.css `
|
|
4122
|
+
${preflight()}
|
|
4123
|
+
${zIndex(9999)}
|
|
4124
|
+
`;
|
|
4125
|
+
};
|
|
4126
|
+
|
|
4127
|
+
const ContextMenuComponent = ({ refElement, className, children, offsetX = 0, offsetY = 0 }) => {
|
|
4128
|
+
const [visible, setVisible] = React.useState(false);
|
|
4129
|
+
// State for the anchor (the mouse coordinates) and the menu element
|
|
4130
|
+
const [virtualElement, setVirtualElement] = React.useState(null);
|
|
4131
|
+
const [popperElement, setPopperElement] = React.useState(null);
|
|
4132
|
+
// Initialize Popper with a virtual reference
|
|
4133
|
+
const { styles, attributes } = reactPopper.usePopper(virtualElement, popperElement, {
|
|
4134
|
+
placement: 'bottom-start',
|
|
4135
|
+
modifiers: [
|
|
4136
|
+
{
|
|
4137
|
+
name: 'offset',
|
|
4138
|
+
options: {
|
|
4139
|
+
offset: [offsetX, offsetY], // Slight offset so the menu isn't directly under the cursor
|
|
4140
|
+
},
|
|
4141
|
+
},
|
|
4142
|
+
],
|
|
4143
|
+
});
|
|
4144
|
+
// Handle the right-click event
|
|
4145
|
+
const handleContextMenu = React.useCallback((e) => {
|
|
4146
|
+
e.preventDefault(); // Prevent the browser's default context menu
|
|
4147
|
+
const x = e.clientX;
|
|
4148
|
+
const y = e.clientY;
|
|
4149
|
+
// Define a VirtualElement object that implements getBoundingClientRect
|
|
4150
|
+
const newVirtualElement = {
|
|
4151
|
+
getBoundingClientRect: () => ({
|
|
4152
|
+
width: 0,
|
|
4153
|
+
height: 0,
|
|
4154
|
+
top: y,
|
|
4155
|
+
right: x,
|
|
4156
|
+
bottom: y,
|
|
4157
|
+
left: x,
|
|
4158
|
+
x: x,
|
|
4159
|
+
y: y,
|
|
4160
|
+
toJSON: () => { }
|
|
4161
|
+
}),
|
|
4162
|
+
};
|
|
4163
|
+
setVirtualElement(newVirtualElement);
|
|
4164
|
+
setVisible(true);
|
|
4165
|
+
}, []);
|
|
4166
|
+
// Close the menu on left click or scroll
|
|
4167
|
+
React.useEffect(() => {
|
|
4168
|
+
const closeMenu = () => setVisible(false);
|
|
4169
|
+
window.addEventListener('click', closeMenu);
|
|
4170
|
+
window.addEventListener('scroll', closeMenu);
|
|
4171
|
+
if (refElement instanceof HTMLElement) {
|
|
4172
|
+
refElement.addEventListener('contextmenu', handleContextMenu);
|
|
4173
|
+
}
|
|
4174
|
+
else if (refElement.current !== null) {
|
|
4175
|
+
refElement.current.addEventListener('contextmenu', handleContextMenu);
|
|
4176
|
+
}
|
|
4177
|
+
return () => {
|
|
4178
|
+
window.removeEventListener('click', closeMenu);
|
|
4179
|
+
window.removeEventListener('scroll', closeMenu);
|
|
4180
|
+
if (refElement instanceof HTMLElement) {
|
|
4181
|
+
refElement.removeEventListener('contextmenu', handleContextMenu);
|
|
4182
|
+
}
|
|
4183
|
+
else if (refElement.current !== null) {
|
|
4184
|
+
refElement.current.removeEventListener('contextmenu', handleContextMenu);
|
|
4185
|
+
}
|
|
4186
|
+
};
|
|
4187
|
+
}, []);
|
|
4188
|
+
if (visible) {
|
|
4189
|
+
return (React.createElement("div", { ref: setPopperElement, className: addClassname('o-context-menu', className), style: {
|
|
4190
|
+
...styles.popper,
|
|
4191
|
+
}, ...attributes.popper }, children));
|
|
4192
|
+
}
|
|
4193
|
+
return null;
|
|
4194
|
+
};
|
|
4195
|
+
|
|
4196
|
+
const ContextMenu = styled(ContextMenuComponent) `
|
|
4197
|
+
${contextMenuStyle}
|
|
4198
|
+
`;
|
|
4199
|
+
|
|
4120
4200
|
const IconComponent$8 = ({ className, onClick }) => {
|
|
4121
4201
|
return (React.createElement("div", { className: className, onClick: onClick },
|
|
4122
4202
|
React.createElement("svg", { className: "o-icon-close-all-svg", viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -8650,7 +8730,7 @@ const TreeBodyComponent = ({ className, controller, }) => {
|
|
|
8650
8730
|
const service = useTreeService();
|
|
8651
8731
|
const ref = React.useRef(null);
|
|
8652
8732
|
const config = useTreeConfig();
|
|
8653
|
-
return (React.createElement(ListBodyComponent, { className: addClassname('o-tree-body', className), items: controller.items, ListComponent: TreeListComponent, parentRef: ref, bodyRef: config.listRef || ref, service: service, state: service.state, onItemSelect: config.onSelect, onItemActivate: config.onActivate, keyboardNavigable: config.keyboardNavigable }));
|
|
8733
|
+
return (React.createElement(ListBodyComponent, { className: addClassname('o-tree-body', className), items: controller.items, ListComponent: TreeListComponent, parentRef: ref, bodyRef: config.listRef || ref, service: service, state: service.state, onItemSelect: config.onSelect, onItemUnselect: config.onUnselect, onItemActivate: config.onActivate, onItemDeactivate: config.onDeactivate, onItemHighlight: config.onHighlight, onItemUnhighlight: config.onUnhighlight, keyboardNavigable: config.keyboardNavigable }));
|
|
8654
8734
|
};
|
|
8655
8735
|
TreeBodyComponent.displayName = 'TreeBody';
|
|
8656
8736
|
|
|
@@ -8804,17 +8884,21 @@ const VirtualTreeBodyComponent = ({ className, controller, height, }) => {
|
|
|
8804
8884
|
ref: config.listRef || ref,
|
|
8805
8885
|
overscan: 20,
|
|
8806
8886
|
});
|
|
8807
|
-
return (React.createElement(ListBodyComponent, { className: addClassname('o-tree-body', className), items: items, parentRef: config.listRef || ref, bodyRef: config.listRef || ref, totalSize: totalSize, virtualItems: virtualItems, service: service, state: service.state, VirtualListComponent: VirtualTreeListComponent, height: height, onItemSelect: config.onSelect, onItemActivate: config.onActivate, keyboardNavigable: config.keyboardNavigable, scrollToIndex: scrollToIndex }));
|
|
8887
|
+
return (React.createElement(ListBodyComponent, { className: addClassname('o-tree-body', className), items: items, parentRef: config.listRef || ref, bodyRef: config.listRef || ref, totalSize: totalSize, virtualItems: virtualItems, service: service, state: service.state, VirtualListComponent: VirtualTreeListComponent, height: height, onItemSelect: config.onSelect, onItemUnselect: config.onUnselect, onItemActivate: config.onActivate, onItemDeactivate: config.onDeactivate, onItemHighlight: config.onHighlight, onItemUnhighlight: config.onUnhighlight, keyboardNavigable: config.keyboardNavigable, scrollToIndex: scrollToIndex }));
|
|
8808
8888
|
};
|
|
8809
8889
|
VirtualTreeBodyComponent.displayName = 'VirtualTreeBody';
|
|
8810
8890
|
|
|
8811
|
-
const ControllerTreeComponent = ({ controller, className, onActivate, onSelect, height, virtual, gap, TreeIconComponent, TreeItemComponent, TreeItemContentComponent, treeItemClassName, TreeTogglerComponent, paddingLeft, paddingRight, animate = true, keyboardNavigable, listRef, }) => {
|
|
8891
|
+
const ControllerTreeComponent = ({ controller, className, onActivate, onDeactivate, onSelect, onUnselect, onHighlight, onUnhighlight, height, virtual, gap, TreeIconComponent, TreeItemComponent, TreeItemContentComponent, treeItemClassName, TreeTogglerComponent, paddingLeft, paddingRight, animate = true, keyboardNavigable, listRef, }) => {
|
|
8812
8892
|
const config = React.useMemo(() => {
|
|
8813
8893
|
return {
|
|
8814
8894
|
className,
|
|
8815
8895
|
onActivate,
|
|
8896
|
+
onDeactivate,
|
|
8816
8897
|
animate,
|
|
8817
8898
|
onSelect,
|
|
8899
|
+
onUnselect,
|
|
8900
|
+
onHighlight,
|
|
8901
|
+
onUnhighlight,
|
|
8818
8902
|
height,
|
|
8819
8903
|
virtual,
|
|
8820
8904
|
gap,
|
|
@@ -8831,8 +8915,12 @@ const ControllerTreeComponent = ({ controller, className, onActivate, onSelect,
|
|
|
8831
8915
|
}, [
|
|
8832
8916
|
className,
|
|
8833
8917
|
onActivate,
|
|
8918
|
+
onDeactivate,
|
|
8834
8919
|
animate,
|
|
8835
8920
|
onSelect,
|
|
8921
|
+
onUnselect,
|
|
8922
|
+
onHighlight,
|
|
8923
|
+
onUnhighlight,
|
|
8836
8924
|
height,
|
|
8837
8925
|
virtual,
|
|
8838
8926
|
gap,
|
|
@@ -8945,7 +9033,19 @@ const TreeSelectListComponent = (props) => {
|
|
|
8945
9033
|
return false;
|
|
8946
9034
|
}
|
|
8947
9035
|
};
|
|
8948
|
-
|
|
9036
|
+
const onUnselect = (item, index) => {
|
|
9037
|
+
if (item.selectable !== false && props.onItemUnselect) {
|
|
9038
|
+
props.onItemUnselect(item, index);
|
|
9039
|
+
return true;
|
|
9040
|
+
}
|
|
9041
|
+
else {
|
|
9042
|
+
isTreeItemExpanded(item, treeProps.controller)
|
|
9043
|
+
? treeProps.controller.collapse(item, index)
|
|
9044
|
+
: treeProps.controller.expand(item, index);
|
|
9045
|
+
return false;
|
|
9046
|
+
}
|
|
9047
|
+
};
|
|
9048
|
+
return (React.createElement(Tree, { ...props, ...treeProps, TreeItemComponent: SelectOptionComponent$1, className: addClassname('o-select-options', treeProps.className), onSelect: onSelect, onUnselect: onUnselect, onActivate: props.onItemActivate, onDeactivate: props.onItemDeactivate, keyboardNavigable: true, listRef: props.optionsRef }));
|
|
8949
9049
|
};
|
|
8950
9050
|
const ControlledTreeSelectComponent = (props) => {
|
|
8951
9051
|
return (React.createElement(TreeSelectPropsContext.Provider, { value: props },
|
|
@@ -14083,6 +14183,8 @@ exports.CheckboxCellComponent = CheckboxCellComponent;
|
|
|
14083
14183
|
exports.CheckboxComponent = CheckboxComponent;
|
|
14084
14184
|
exports.CloseAllIcon = CloseAllIcon;
|
|
14085
14185
|
exports.Col = Col;
|
|
14186
|
+
exports.ContextMenu = ContextMenu;
|
|
14187
|
+
exports.ContextMenuComponent = ContextMenuComponent;
|
|
14086
14188
|
exports.ControlledSelectComponent = ControlledSelectComponent;
|
|
14087
14189
|
exports.ControlledTimerComponent = ControlledTimerComponent;
|
|
14088
14190
|
exports.ControlledWizardComponent = ControlledWizardComponent;
|
|
@@ -14318,6 +14420,7 @@ exports.columnSpan = columnSpan;
|
|
|
14318
14420
|
exports.columnWidth = columnWidth;
|
|
14319
14421
|
exports.columns = columns;
|
|
14320
14422
|
exports.container = container;
|
|
14423
|
+
exports.contextMenuStyle = contextMenuStyle;
|
|
14321
14424
|
exports.cssProperty = cssProperty;
|
|
14322
14425
|
exports.cursor = cursor;
|
|
14323
14426
|
exports.darken = darken;
|