onekijs-ui 0.16.0 → 0.16.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/dist/components/list/DropdownList.d.ts +0 -1
- package/dist/components/list/components/ArrayListComponent.d.ts +0 -1
- package/dist/components/list/components/CollectionListComponent.d.ts +0 -1
- package/dist/components/list/components/ListBodyComponent.d.ts +0 -1
- package/dist/components/list/components/ListComponent.d.ts +0 -1
- package/dist/components/list/components/VirtualListComponent.d.ts +0 -1
- package/dist/components/list/index.d.ts +0 -1
- package/dist/components/select/FormSelect.d.ts +0 -1
- package/dist/components/select/components/ArraySelectComponent.d.ts +0 -1
- package/dist/components/select/components/ArrayTreeSelectComponent.d.ts +0 -1
- package/dist/components/select/components/ControlledSelectComponent.d.ts +0 -1
- package/dist/components/select/components/SelectComponent.d.ts +0 -1
- package/dist/components/select/components/SelectOptionComponent.d.ts +0 -1
- package/dist/components/select/components/SelectTokenComponent.d.ts +0 -1
- package/dist/components/select/components/SelectTokensComponent.d.ts +0 -1
- package/dist/components/select/components/TreeSelectComponent.d.ts +0 -1
- package/dist/components/select/components/TreeSelectOptionContent.d.ts +0 -1
- package/dist/components/select/typings.d.ts +3 -1
- package/dist/components/table/typings.d.ts +5 -1
- package/dist/components/tree/components/ArrayTreeComponent.d.ts +0 -1
- package/dist/components/tree/components/ControllerTreeComponent.d.ts +0 -1
- package/dist/components/tree/components/TreeBodyComponent.d.ts +0 -1
- package/dist/components/tree/components/TreeComponent.d.ts +0 -1
- package/dist/components/tree/components/TreeItemComponent.d.ts +0 -1
- package/dist/components/tree/components/TreeListComponent.d.ts +0 -1
- package/dist/components/tree/components/VirtualTreeBodyComponent.d.ts +0 -1
- package/dist/components/tree/components/VirtualTreeListComponent.d.ts +0 -1
- package/dist/components/tree/index.d.ts +0 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +94 -40
- package/dist/index.js.map +1 -1
- package/dist/index.module.js +94 -40
- package/dist/index.module.js.map +1 -1
- package/dist/styles/size.d.ts +6 -6
- package/dist/styles/typography.d.ts +1 -1
- package/package.json +5 -5
- package/src/components/list/hooks/useListView.tsx +0 -1
- package/src/components/select/components/ControlledSelectComponent.tsx +73 -35
- package/src/components/select/components/SelectOptionComponent.tsx +18 -4
- package/src/components/select/typings.ts +7 -1
- package/src/components/table/components/cells/SelectCellComponent.tsx +3 -1
- package/src/components/table/typings.ts +15 -1
- package/src/components/wizard/style.ts +1 -0
- package/src/index.ts +3 -1
- package/src/vendor/reactVirtual.js +5 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare const _default: {
|
|
3
2
|
<T = any, I extends import("./typings").ListItem<T> = import("./typings").ListItem<T>>(props: import("./typings").ListProps<T, I, import("./typings").ListState<T, I>, import("./typings").ListCollection<T, I, import("./typings").ListState<T, I>>>): JSX.Element;
|
|
4
3
|
displayName: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CollectionListProps, ListItem } from '../typings';
|
|
3
2
|
declare const CollectionListComponent: <T = any, I extends ListItem<T> = ListItem<T>>({ className, controller, height, ItemComponent, ItemLoadingComponent, ItemContentComponent, NotFoundComponent, itemHeight, preload, keyboardNavigable, increment, multiSelect, onItemActivate, onItemHighlight, onItemSelect, onItemDeactivate, onItemUnhighlight, onItemUnselect, paddingEnd, paddingStart, virtual, style, }: CollectionListProps<T, I, import("../typings").ListState<T, I>, import("../typings").ListCollection<T, I, import("../typings").ListState<T, I>>>) => JSX.Element;
|
|
4
3
|
export default CollectionListComponent;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ListBodyProps, ListItem } from '../typings';
|
|
3
2
|
declare const ListBodyComponent: <T = any, I extends ListItem<T> = ListItem<T>>({ bodyRef, className, height, items, ItemComponent, ItemLoadingComponent, ItemContentComponent, NotFoundComponent, keyboardNavigable, ListComponent, multiSelect, onItemActivate, onItemDeactivate, onItemSelect, onItemUnselect, onItemHighlight, onItemUnhighlight, parentRef, scrollToIndex, service, state, style, totalSize, virtualItems, VirtualListComponent, LoadingComponent, }: ListBodyProps<T, I, import("../typings").ListState<T, I>, import("../typings").ListCollection<T, I, import("../typings").ListState<T, I>>>) => JSX.Element | null;
|
|
4
3
|
export default ListBodyComponent;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ListItem, ListProps } from '../typings';
|
|
3
2
|
declare const _default: {
|
|
4
3
|
<T = any, I extends ListItem<T> = ListItem<T>>(props: ListProps<T, I, import("../typings").ListState<T, I>, import("../typings").ListCollection<T, I, import("../typings").ListState<T, I>>>): JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ListItem, VirtualListProps } from '../typings';
|
|
3
2
|
declare const VirtualListComponent: <T = any, I extends ListItem<T> = ListItem<T>>({ items, ItemComponent, ItemLoadingComponent, ItemContentComponent, onItemClick, onItemMouseEnter, onItemMouseLeave, virtualItems, }: VirtualListProps<T, I>) => JSX.Element;
|
|
4
3
|
export default VirtualListComponent;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare const _default: {
|
|
3
2
|
<T = any, I extends import("./typings").ListItem<T> = import("./typings").ListItem<T>>(props: import("./typings").ListProps<T, I, import("./typings").ListState<T, I>, import("./typings").ListCollection<T, I, import("./typings").ListState<T, I>>>): JSX.Element;
|
|
4
3
|
displayName: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ArrayTreeSelectProps, TreeSelectItem } from '../typings';
|
|
3
2
|
declare const ArrayTreeSelectComponent: <T = any, I extends TreeSelectItem<T> = TreeSelectItem<T>>(props: ArrayTreeSelectProps<T, I>) => JSX.Element;
|
|
4
3
|
export default ArrayTreeSelectComponent;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ControllerSelectProps, SelectController, SelectItem, SelectState } from '../typings';
|
|
3
2
|
declare const ControlledSelectComponent: <T = any, I extends SelectItem<T> = SelectItem<T>, S extends SelectState<T, I> = SelectState<T, I>, C extends SelectController<T, I, S> = SelectController<T, I, S>>({ attachDropdownToBody, className, placeholder, controller, InputComponent, IconComponent, OptionContentComponent, OptionComponent, OptionLoadingComponent, MultiOptionsComponent, NotFoundComponent, autoFocus, value, onChange, onBlur: forwardBlur, onFocus: forwardFocus, height, multiple, status, size, nullable, minChars, openOnFocus, searchable, dropdownWidthModifier, preload, increment, animationMs, disabled, defaultValue, required, sameWidth, overscan, clickable, ListComponent, autoCompleteSearch, }: ControllerSelectProps<T, I, S, C>) => JSX.Element;
|
|
4
3
|
export default ControlledSelectComponent;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { SelectController, SelectItem, SelectProps, SelectState } from '../typings';
|
|
3
2
|
declare const _default: {
|
|
4
3
|
<T = any, I extends SelectItem<T> = SelectItem<T>, S extends SelectState<T, I> = SelectState<T, I>, C extends SelectController<T, I, S> = SelectController<T, I, S>>(props: SelectProps<T, I, S, C>): JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TreeSelectController, TreeSelectItem, TreeSelectProps, TreeSelectState } from '../typings';
|
|
3
2
|
declare const _default: {
|
|
4
3
|
<T = any, I extends TreeSelectItem<T> = TreeSelectItem<T>, S extends TreeSelectState<T, I> = TreeSelectState<T, I>, C extends TreeSelectController<T, I, S> = TreeSelectController<T, I, S>>(props: TreeSelectProps<T, I, S, C>): JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ListItemProps } from '../../list/typings';
|
|
3
2
|
import { TreeSelectItem } from '../typings';
|
|
4
3
|
export declare const TreeSelectOptionContent: <T, I extends TreeSelectItem<T> = TreeSelectItem<T>>(props: ListItemProps<T, I>) => JSX.Element;
|
|
@@ -5,6 +5,7 @@ import { DropdownWidthModifier } from '../dropdown/typings';
|
|
|
5
5
|
import { FieldLayoutProps } from '../field/typings';
|
|
6
6
|
import { CollectionListProps, ListConfig, ListItem, ListItemAdaptee, ListItemHandler, ListItemProps, ListNotFoundProps, ListState, UseListOptions } from '../list/typings';
|
|
7
7
|
import { TreeController, TreeItem, TreeProps, TreeState } from '../tree/typings';
|
|
8
|
+
import SelectService from './SelectService';
|
|
8
9
|
export declare type ArraySelectProps<T = any, I extends SelectItem<T> = SelectItem<T>> = SelectConfig<T, I> & {
|
|
9
10
|
adapter?: SelectItemAdapter<T>;
|
|
10
11
|
dataSource: T[] | [T, string][] | string;
|
|
@@ -75,7 +76,7 @@ export declare type SelectProps<T = any, I extends SelectItem<T> = SelectItem<T>
|
|
|
75
76
|
dataSource?: T[] | [T, string][] | string;
|
|
76
77
|
fetchOnce?: boolean;
|
|
77
78
|
};
|
|
78
|
-
export declare type SelectBroker<T, I extends SelectItem<T> = SelectItem<T>, S extends SelectState<T, I> = SelectState<T, I>, C extends SelectController<T, I, S> = SelectController<T, I, S>> = CollectionBroker<T, I, S, C> & {
|
|
79
|
+
export declare type SelectBroker<T = any, I extends SelectItem<T> = SelectItem<T>, S extends SelectState<T, I> = SelectState<T, I>, C extends SelectController<T, I, S> = SelectController<T, I, S>> = CollectionBroker<T, I, S, C> & {
|
|
79
80
|
setDefaultValue: (defaultValue: T | T[] | null | undefined, subscriberId?: string) => void;
|
|
80
81
|
};
|
|
81
82
|
export declare type SelectConfig<T = any, I extends SelectItem<T> = SelectItem<T>> = Omit<ListConfig<T, I>, 'ItemComponent'> & {
|
|
@@ -135,3 +136,4 @@ export declare type TreeSelectItem<T = any> = SelectItem<T> & TreeItem<T>;
|
|
|
135
136
|
export declare type TreeSelectProps<T = any, I extends TreeSelectItem<T> = TreeSelectItem<T>, S extends TreeSelectState<T, I> = TreeSelectState<T, I>, C extends TreeSelectController<T, I, S> = TreeSelectController<T, I, S>> = SelectProps<T, I, S, C> & TreeProps<T, I, S, C>;
|
|
136
137
|
export declare type TreeSelectState<T = any, I extends TreeSelectItem<T> = TreeSelectItem<T>> = SelectState<T, I> & TreeState<T, I>;
|
|
137
138
|
export declare type UseSelectOptions<T, I extends SelectItem<T> = SelectItem<T>> = UseListOptions<T, I>;
|
|
139
|
+
export declare type UseSelectController<T = any, I extends SelectItem<T> = SelectItem<T>> = (dataSource: T[] | [T, string][] | string | undefined, options?: UseSelectOptions<T, I>) => CollectionProxy<T, I, SelectState<T, I>, SelectService<T, I, SelectState<T, I>>>;
|
|
@@ -5,8 +5,9 @@ import { CheckboxProps } from '../checkbox/typings';
|
|
|
5
5
|
import { FieldLayoutProps } from '../field/typings';
|
|
6
6
|
import { InputProps } from '../input/typings';
|
|
7
7
|
import { ListItemProps, ListItems, ListNotFoundProps, ListState, UseListOptions } from '../list/typings';
|
|
8
|
-
import { SelectBroker, SelectItem, SelectProps } from '../select/typings';
|
|
8
|
+
import { FormSelectProps, SelectBroker, SelectItem, SelectProps } from '../select/typings';
|
|
9
9
|
import { TextareaProps } from '../textarea/typings';
|
|
10
|
+
import TableService from './TableService';
|
|
10
11
|
export declare type ArrayTableProps<T = any, I extends TableItem<T> = TableItem<T>> = TableConfig<T, I> & {
|
|
11
12
|
adapter?: TableItemAdapter<T>;
|
|
12
13
|
columns?: TableColumn<T, I>[];
|
|
@@ -233,6 +234,8 @@ export declare type InputColumnOptions<T = any, I extends TableItem<T> = TableIt
|
|
|
233
234
|
};
|
|
234
235
|
export declare type SelectColumnOptions<T = any, S = any, TI extends TableItem<T> = TableItem<T>, SI extends SelectItem<S> = SelectItem<S>> = Omit<TableColumnSpec<T, TI>, 'CellComponent' | 'id'> & Omit<SelectProps<S, SI>, 'className' | 'onFocus' | 'onChange' | 'onBlur' | 'items'> & Omit<FormFieldProps, 'name'> & UseCollectionOptions<S, SI> & {
|
|
235
236
|
CellComponent?: SelectCell<T, S, TI, SI>;
|
|
237
|
+
} & {
|
|
238
|
+
Component?: React.FC<FormSelectProps<S, SI>>;
|
|
236
239
|
};
|
|
237
240
|
export declare type TableColumnOptions<T = any, I extends TableItem<T> = TableItem<T>> = Omit<TableColumnSpec<T, I>, 'id'>;
|
|
238
241
|
export declare type TextareaColumnOptions<T = any, I extends TableItem<T> = TableItem<T>> = Omit<TableColumnSpec<T, I>, 'CellComponent' | 'id'> & Omit<FormFieldProps, 'name'> & Omit<TextareaProps, 'className' | 'onFocus' | 'onChange' | 'onBlur'> & {
|
|
@@ -243,3 +246,4 @@ export declare type UseTableOptions<T = any, I extends TableItem<T> = TableItem<
|
|
|
243
246
|
adapter?: TableItemAdapter<T>;
|
|
244
247
|
selected?: T[];
|
|
245
248
|
};
|
|
249
|
+
export declare type UseTableController<T = any> = (dataSource: T[] | string | undefined, initialColumns: TableColumn<T, TableItem<T>>[] | undefined, options: UseTableOptions<T, TableItem<T>>) => CollectionProxy<T, TableItem<T>, TableState<T, TableItem<T>>, TableService<T, TableItem<T>, TableState<T, TableItem<T>>>>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ControllerTreeProps, TreeItem } from '../typings';
|
|
3
2
|
declare const ControllerTreeComponent: {
|
|
4
3
|
<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, import("../typings").TreeState<T, I>, import("../typings").TreeController<T, I, import("../typings").TreeState<T, I>>>): JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ControllerTreeProps, TreeItem } from '../typings';
|
|
3
2
|
declare const TreeBodyComponent: {
|
|
4
3
|
<T = any, I extends TreeItem<T> = TreeItem<T>>({ className, controller, }: ControllerTreeProps<T, I, import("../typings").TreeState<T, I>, import("../typings").TreeController<T, I, import("../typings").TreeState<T, I>>>): JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TreeItem, TreeProps } from '../typings';
|
|
3
2
|
declare const _default: {
|
|
4
3
|
<T = any, I extends TreeItem<T> = TreeItem<T>>(props: TreeProps<T, I, import("../typings").TreeState<T, I>, import("../typings").TreeController<T, I, import("../typings").TreeState<T, I>>>): JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ListItemProps } from '../../list/typings';
|
|
3
2
|
import { TreeItem, TreeItemProps, TreeItemToggleProps } from '../typings';
|
|
4
3
|
export declare const TreeItemToggler: <T = any, I extends TreeItem<T> = TreeItem<T>>({ item, onExpand, onCollapse, index, }: TreeItemToggleProps<T, I>) => JSX.Element | null;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TreeItem, TreeListProps } from '../typings';
|
|
3
2
|
declare const TreeListComponent: <T = any, I extends TreeItem<T> = TreeItem<T>>({ items, onItemClick, onItemMouseEnter, onItemMouseLeave, }: TreeListProps<T, I>) => JSX.Element;
|
|
4
3
|
export default TreeListComponent;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ControllerTreeProps, TreeItem } from '../typings';
|
|
3
2
|
declare const VirtualTreeBodyComponent: {
|
|
4
3
|
<T = any, I extends TreeItem<T> = TreeItem<T>>({ className, controller, height, }: ControllerTreeProps<T, I, import("../typings").TreeState<T, I>, import("../typings").TreeController<T, I, import("../typings").TreeState<T, I>>>): JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TreeItem, VirtualTreeListProps } from '../typings';
|
|
3
2
|
declare const VirtualTreeListComponent: <T = any, I extends TreeItem<T> = TreeItem<T>>({ items, onItemClick, onItemMouseEnter, onItemMouseLeave, virtualItems, }: VirtualTreeListProps<T, I>) => JSX.Element;
|
|
4
3
|
export default VirtualTreeListComponent;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare const _default: {
|
|
3
2
|
<T = any, I extends import("./typings").TreeItem<T> = import("./typings").TreeItem<T>>(props: import("./typings").TreeProps<T, I, import("./typings").TreeState<T, I>, import("./typings").TreeController<T, I, import("./typings").TreeState<T, I>>>): JSX.Element;
|
|
4
3
|
displayName: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -104,7 +104,7 @@ export { default as TreeSelectComponent } from './components/select/components/T
|
|
|
104
104
|
export { default as useSelectController } from './components/select/hooks/useSelectController';
|
|
105
105
|
export { useSelectService } from './components/select/hooks/useSelectService';
|
|
106
106
|
export { default as useTreeSelectController } from './components/select/hooks/useTreeSelectController';
|
|
107
|
-
export { ArraySelectProps, ArrayTreeSelectProps, ControllerSelectProps, ControllerTreeSelectProps, FormSelectProps, SelectItemAdapter
|
|
107
|
+
export { ArraySelectProps, ArrayTreeSelectProps, ControllerSelectProps, ControllerTreeSelectProps, FormSelectProps, SelectItemAdapter, SelectBroker, SelectConfig, SelectController, SelectGroup, SelectIconProps, SelectInputProps, SelectItem, SelectItemAdaptee, SelectListComponentProps, SelectNotFoundProps, SelectOptionHandler, SelectOptionProps, SelectOptionSelectionHandler, SelectProps, SelectState, SelectTokenProps, SelectTokensProps, TreeSelectController, TreeSelectItem, TreeSelectProps, TreeSelectState, UseSelectOptions, UseSelectController, } from './components/select/typings';
|
|
108
108
|
export { findSelectItem, findSelectItemIndex, shouldCheckSelect } from './components/select/util';
|
|
109
109
|
export { default as Tabs } from './components/tab';
|
|
110
110
|
export { default as Tab } from './components/tab/components/Tab';
|
|
@@ -141,7 +141,7 @@ export { default as useSelectColumn } from './components/table/hooks/useSelectCo
|
|
|
141
141
|
export { default as useTableController } from './components/table/hooks/useTableController';
|
|
142
142
|
export { default as useTextColumn } from './components/table/hooks/useTextColumn';
|
|
143
143
|
export { default as useTextareaColumn } from './components/table/hooks/useTextareaColumn';
|
|
144
|
-
export { ArrayTableProps, Cell, CheckboxColumn, CheckboxColumnOptions, ControllerTableProps, EnumColumnOptions, FormTableContext, FormTableProps, InputColumn, InputColumnOptions, LinkColumnOptions, SelectCell, SelectColumn, SelectColumnOptions, TableBodyCellProps, TableBodyProps, TableBodyRowProps, TableColumn, TableColumnComputedWidth, TableColumnOptions, TableColumnSpec, TableColumnWidth, TableColumnsState, TableConfig, TableController, TableExpandedProps, TableFilterOperator, TableFilterOperatorProps, TableFooterCellProps, TableFooterProps, TableHeaderCellProps, TableHeaderProps, TableItem, TableItemAdaptee, TableItemAdapter, TableItems, TableNotFoundProps, TableProps, TableRowHandler, TableSortProps, TableState, TextareaColumn, TextareaColumnOptions, UseTableOptions, } from './components/table/typings';
|
|
144
|
+
export { ArrayTableProps, Cell, CheckboxColumn, CheckboxColumnOptions, ControllerTableProps, EnumColumnOptions, FormTableContext, FormTableProps, InputColumn, InputColumnOptions, LinkColumnOptions, SelectCell, SelectColumn, SelectColumnOptions, TableBodyCellProps, TableBodyProps, TableBodyRowProps, TableColumn, TableColumnComputedWidth, TableColumnOptions, TableColumnSpec, TableColumnWidth, TableColumnsState, TableConfig, TableController, TableExpandedProps, TableFilterOperator, TableFilterOperatorProps, TableFooterCellProps, TableFooterProps, TableHeaderCellProps, TableHeaderProps, TableItem, TableItemAdaptee, TableItemAdapter, TableItems, TableNotFoundProps, TableProps, TableRowHandler, TableSortProps, TableState, TextareaColumn, TextareaColumnOptions, UseTableOptions, UseTableController, } from './components/table/typings';
|
|
145
145
|
export { default as Tag } from './components/tag';
|
|
146
146
|
export { default as TagComponent } from './components/tag/components/TagComponent';
|
|
147
147
|
export { tagStyle } from './components/tag/style';
|
package/dist/index.js
CHANGED
|
@@ -4202,7 +4202,11 @@ function useVirtual({
|
|
|
4202
4202
|
measurements: [],
|
|
4203
4203
|
});
|
|
4204
4204
|
|
|
4205
|
-
const {
|
|
4205
|
+
const {
|
|
4206
|
+
outerSize,
|
|
4207
|
+
scrollOffset,
|
|
4208
|
+
scrollToFn: defaultScrollToFn,
|
|
4209
|
+
} = useScroll({
|
|
4206
4210
|
windowRef,
|
|
4207
4211
|
parentRef,
|
|
4208
4212
|
horizontal,
|
|
@@ -6116,6 +6120,15 @@ const SelectOptionComponent = (props) => {
|
|
|
6116
6120
|
}
|
|
6117
6121
|
return classNames.join(' ');
|
|
6118
6122
|
}, [item, clickable, hoverable]);
|
|
6123
|
+
const fixClickRef = React.useRef({
|
|
6124
|
+
mouseDown: '',
|
|
6125
|
+
clicked: false,
|
|
6126
|
+
});
|
|
6127
|
+
const onItemClick = React.useCallback((item, index) => {
|
|
6128
|
+
if (!fixClickRef.current.clicked) {
|
|
6129
|
+
clickable && onClick && item && onClick(item, index);
|
|
6130
|
+
}
|
|
6131
|
+
}, [clickable, onClick]);
|
|
6119
6132
|
if (onekijsFramework.isItemLoading(item)) {
|
|
6120
6133
|
return React__default["default"].createElement(OptionLoadingComponent, null);
|
|
6121
6134
|
}
|
|
@@ -6123,9 +6136,9 @@ const SelectOptionComponent = (props) => {
|
|
|
6123
6136
|
return null;
|
|
6124
6137
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
6125
6138
|
displayGroup && React__default["default"].createElement(OptionGroupComponent, { ...props }),
|
|
6126
|
-
React__default["default"].createElement("div", { className: classNames,
|
|
6127
|
-
service.config?.multiple && (React__default["default"].createElement(Checkbox, { value: item?.selected ? true : false, onChange: () =>
|
|
6128
|
-
React__default["default"].createElement(OptionContentComponent, { ...props }))));
|
|
6139
|
+
React__default["default"].createElement("div", { className: classNames, onClick: () => onItemClick(item, index), onMouseEnter: () => hoverable && onMouseEnter && item && onMouseEnter(item, index), onMouseLeave: () => hoverable && onMouseLeave && item && onMouseLeave(item, index) },
|
|
6140
|
+
service.config?.multiple && (React__default["default"].createElement(Checkbox, { value: item?.selected ? true : false, onChange: () => onItemClick(item, index), color: "currentColor", className: "o-select-option-multiple-checkbox" })),
|
|
6141
|
+
React__default["default"].createElement(OptionContentComponent, { ...props, onClick: () => onItemClick(item, index) }))));
|
|
6129
6142
|
};
|
|
6130
6143
|
SelectOptionComponent.displayName = 'SelectOptionComponent';
|
|
6131
6144
|
var SelectOptionComponent$1 = React__default["default"].memo(SelectOptionComponent);
|
|
@@ -6149,41 +6162,80 @@ const ControlledSelectComponent = ({ attachDropdownToBody = false, className = '
|
|
|
6149
6162
|
const [focus, setFocus] = React.useState(false);
|
|
6150
6163
|
const stateRef = React.useRef({});
|
|
6151
6164
|
const service = controller.asService();
|
|
6152
|
-
service.config
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6165
|
+
if (!service.config) {
|
|
6166
|
+
service.config = {
|
|
6167
|
+
attachDropdownToBody,
|
|
6168
|
+
className,
|
|
6169
|
+
placeholder,
|
|
6170
|
+
InputComponent,
|
|
6171
|
+
IconComponent,
|
|
6172
|
+
OptionContentComponent,
|
|
6173
|
+
OptionComponent,
|
|
6174
|
+
OptionLoadingComponent,
|
|
6175
|
+
MultiOptionsComponent,
|
|
6176
|
+
NotFoundComponent,
|
|
6177
|
+
autoFocus,
|
|
6178
|
+
value,
|
|
6179
|
+
onChange,
|
|
6180
|
+
onBlur: forwardBlur,
|
|
6181
|
+
onFocus: forwardFocus,
|
|
6182
|
+
height,
|
|
6183
|
+
multiple,
|
|
6184
|
+
status,
|
|
6185
|
+
size,
|
|
6186
|
+
nullable,
|
|
6187
|
+
minChars,
|
|
6188
|
+
openOnFocus,
|
|
6189
|
+
searchable,
|
|
6190
|
+
clickable,
|
|
6191
|
+
dropdownWidthModifier,
|
|
6192
|
+
preload,
|
|
6193
|
+
increment,
|
|
6194
|
+
animationMs,
|
|
6195
|
+
disabled,
|
|
6196
|
+
defaultValue,
|
|
6197
|
+
sameWidth,
|
|
6198
|
+
overscan,
|
|
6199
|
+
autoCompleteSearch,
|
|
6200
|
+
};
|
|
6201
|
+
}
|
|
6202
|
+
else {
|
|
6203
|
+
service.config = {
|
|
6204
|
+
attachDropdownToBody,
|
|
6205
|
+
className,
|
|
6206
|
+
placeholder,
|
|
6207
|
+
InputComponent: service.config.InputComponent,
|
|
6208
|
+
IconComponent: service.config.IconComponent,
|
|
6209
|
+
OptionContentComponent: service.config.OptionContentComponent,
|
|
6210
|
+
OptionComponent: service.config.OptionComponent,
|
|
6211
|
+
OptionLoadingComponent: service.config.OptionLoadingComponent,
|
|
6212
|
+
MultiOptionsComponent: service.config.MultiOptionsComponent,
|
|
6213
|
+
NotFoundComponent: service.config.NotFoundComponent,
|
|
6214
|
+
autoFocus,
|
|
6215
|
+
value,
|
|
6216
|
+
onChange,
|
|
6217
|
+
onBlur: forwardBlur,
|
|
6218
|
+
onFocus: forwardFocus,
|
|
6219
|
+
height,
|
|
6220
|
+
multiple,
|
|
6221
|
+
status,
|
|
6222
|
+
size,
|
|
6223
|
+
nullable,
|
|
6224
|
+
minChars,
|
|
6225
|
+
openOnFocus,
|
|
6226
|
+
searchable,
|
|
6227
|
+
clickable,
|
|
6228
|
+
dropdownWidthModifier,
|
|
6229
|
+
preload,
|
|
6230
|
+
increment,
|
|
6231
|
+
animationMs,
|
|
6232
|
+
disabled,
|
|
6233
|
+
defaultValue,
|
|
6234
|
+
sameWidth,
|
|
6235
|
+
overscan,
|
|
6236
|
+
autoCompleteSearch,
|
|
6237
|
+
};
|
|
6238
|
+
}
|
|
6187
6239
|
const id = React.useId();
|
|
6188
6240
|
const loading = onekijsFramework.isCollectionLoading(controller);
|
|
6189
6241
|
const fetching = onekijsFramework.isCollectionFetching(controller);
|
|
@@ -9869,13 +9921,14 @@ const SelectCellComponent = (options, broker) => {
|
|
|
9869
9921
|
// if the id is empty, it's a single table column and the value is the row itself
|
|
9870
9922
|
const name = column.id ? `${tableName}.${rowIndex}.${column.id}` : `${tableName}.${rowIndex}`;
|
|
9871
9923
|
const className = typeof options.className === 'function' ? options.className(item, column, rowIndex) : options.className;
|
|
9924
|
+
const Component = options.Component ?? FormSelect$1;
|
|
9872
9925
|
React.useEffect(() => {
|
|
9873
9926
|
broker.addSubscriber(name, service);
|
|
9874
9927
|
return () => {
|
|
9875
9928
|
broker.removeSubscriber(name);
|
|
9876
9929
|
};
|
|
9877
9930
|
}, [name, service]);
|
|
9878
|
-
return (React__default["default"].createElement(
|
|
9931
|
+
return (React__default["default"].createElement(Component, { size: "small", layout: "table", ...options, name: name, className: addClassname('o-table-select', className), controller: controller }));
|
|
9879
9932
|
};
|
|
9880
9933
|
SelectCellComponent.displayName = 'SelectCellComponent';
|
|
9881
9934
|
return SelectCellComponent;
|
|
@@ -10485,6 +10538,7 @@ const wizardStyle = ({ layout = 'vertical', theme, inModal }) => {
|
|
|
10485
10538
|
.o-wizard-content {
|
|
10486
10539
|
${flexGrow(1)}
|
|
10487
10540
|
${padding('lg')}
|
|
10541
|
+
${paddingBottom(0)}
|
|
10488
10542
|
${paddingRight('3xl')}
|
|
10489
10543
|
}
|
|
10490
10544
|
|