onekijs-ui 1.0.2 → 1.0.4
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/typings.d.ts +1 -1
- package/dist/components/select/SelectService.d.ts +3 -3
- package/dist/components/tree/components/VirtualTreeListComponent.d.ts +1 -1
- package/dist/components/wizard/WizardModal.d.ts +2 -2
- package/dist/components/wizard/index.d.ts +2 -2
- package/dist/index.js +53 -17
- package/dist/index.js.map +1 -1
- package/dist/index.module.js +53 -17
- package/dist/index.module.js.map +1 -1
- package/package.json +3 -3
- package/src/components/list/components/ListBodyComponent.tsx +1 -0
- package/src/components/list/components/VirtualListComponent.tsx +2 -0
- package/src/components/list/hooks/useListView.tsx +0 -2
- package/src/components/list/typings.ts +1 -1
- package/src/components/table/components/FormTableComponent.tsx +1 -1
- package/src/components/tooltip/components/TooltipComponent.tsx +7 -2
- package/src/components/tree/components/VirtualTreeListComponent.tsx +61 -24
- package/src/vendor/reactVirtual.js +12 -3
|
@@ -77,7 +77,7 @@ export type ListConfig<T = any, I extends ListItem<T> = ListItem<T>> = {
|
|
|
77
77
|
onItemUnselect?: ListItemHandler<T, I>;
|
|
78
78
|
paddingEnd?: number;
|
|
79
79
|
paddingStart?: number;
|
|
80
|
-
parentRef?: React.RefObject<HTMLDivElement>;
|
|
80
|
+
parentRef?: React.RefObject<HTMLDivElement | null>;
|
|
81
81
|
overscan?: number;
|
|
82
82
|
preload?: number;
|
|
83
83
|
style?: React.CSSProperties;
|
|
@@ -5,17 +5,17 @@ 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
|
setInputValue(value: string | null): Generator<void | T | Promise<T | null> | null, void, T>;
|
|
14
14
|
setItemWidth(_item: I, value: number): void;
|
|
15
15
|
setValue(value: null | T | T[]): void;
|
|
16
16
|
setUrl(url: string, query?: Query): void;
|
|
17
17
|
_buildItem(data: T | null | undefined, adaptee: unknown, context?: AnonymousObject): I;
|
|
18
|
-
_filterItem(item: I | undefined, query: Query, valid: boolean): Generator<I[] | Generator<void | import("redux-saga/effects").
|
|
18
|
+
_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>>;
|
|
19
19
|
_compareItem(a: I | undefined, b: I | undefined): boolean;
|
|
20
20
|
_doSearch(search: Primitive | undefined): boolean;
|
|
21
21
|
_setDefaultValue(value: T | T[] | null | undefined): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TreeItem, VirtualTreeListProps } from '../typings';
|
|
3
|
-
declare const VirtualTreeListComponent: <T = any, I extends TreeItem<T> = TreeItem<T>>({ items, onItemClick, onItemMouseEnter, onItemMouseLeave, virtualItems, }: VirtualTreeListProps<T, I>) => React.JSX.Element;
|
|
3
|
+
declare const VirtualTreeListComponent: <T extends any = any, I extends TreeItem<T> = TreeItem<T>>({ items, onItemClick, onItemMouseEnter, onItemMouseLeave, virtualItems, }: VirtualTreeListProps<T, I>) => React.JSX.Element;
|
|
4
4
|
export default VirtualTreeListComponent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const WizardModal: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("../..").ModalProps & Omit<import("../..").TabsProps, "
|
|
1
|
+
declare const WizardModal: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("../..").ModalProps & Omit<import("../..").TabsProps, "controller" | "TitleComponent" | "Component"> & {
|
|
2
2
|
cancelLabel?: import("react").ReactNode;
|
|
3
3
|
controller?: import("./WizardService").WizardService;
|
|
4
4
|
Component?: import("onekijs-framework").FCC<Omit<import("./typings").WizardProps, "Component">>;
|
|
@@ -19,7 +19,7 @@ declare const WizardModal: import("styled-components/dist/types").IStyledCompone
|
|
|
19
19
|
hasSummaryStep?: boolean;
|
|
20
20
|
} & {
|
|
21
21
|
children?: import("react").ReactNode | undefined;
|
|
22
|
-
}, never> & Partial<Pick<import("../..").ModalProps & Omit<import("../..").TabsProps, "
|
|
22
|
+
}, never> & Partial<Pick<import("../..").ModalProps & Omit<import("../..").TabsProps, "controller" | "TitleComponent" | "Component"> & {
|
|
23
23
|
cancelLabel?: import("react").ReactNode;
|
|
24
24
|
controller?: import("./WizardService").WizardService;
|
|
25
25
|
Component?: import("onekijs-framework").FCC<Omit<import("./typings").WizardProps, "Component">>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const Wizard: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("../..").TabsProps, "
|
|
1
|
+
declare const Wizard: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("../..").TabsProps, "controller" | "TitleComponent" | "Component"> & {
|
|
2
2
|
cancelLabel?: import("react").ReactNode;
|
|
3
3
|
controller?: import("./WizardService").WizardService;
|
|
4
4
|
Component?: import("onekijs-framework").FCC<Omit<import("./typings").WizardProps, "Component">>;
|
|
@@ -19,7 +19,7 @@ declare const Wizard: import("styled-components/dist/types").IStyledComponentBas
|
|
|
19
19
|
hasSummaryStep?: boolean;
|
|
20
20
|
} & {
|
|
21
21
|
children?: import("react").ReactNode | undefined;
|
|
22
|
-
}, never> & Partial<Pick<Omit<import("../..").TabsProps, "
|
|
22
|
+
}, never> & Partial<Pick<Omit<import("../..").TabsProps, "controller" | "TitleComponent" | "Component"> & {
|
|
23
23
|
cancelLabel?: import("react").ReactNode;
|
|
24
24
|
controller?: import("./WizardService").WizardService;
|
|
25
25
|
Component?: import("onekijs-framework").FCC<Omit<import("./typings").WizardProps, "Component">>;
|
package/dist/index.js
CHANGED
|
@@ -1705,7 +1705,7 @@ const TooltipComponent = (props) => {
|
|
|
1705
1705
|
const [show, setShow] = React.useState(true);
|
|
1706
1706
|
const [open, setOpen] = React.useState(false);
|
|
1707
1707
|
const arrowRef = React.useRef(null);
|
|
1708
|
-
const { context, floatingStyles, middlewareData, refs } = react.useFloating({
|
|
1708
|
+
const { context, floatingStyles, middlewareData, placement: resolvedPlacement, refs } = react.useFloating({
|
|
1709
1709
|
open,
|
|
1710
1710
|
onOpenChange: setOpen,
|
|
1711
1711
|
placement,
|
|
@@ -1737,7 +1737,7 @@ const TooltipComponent = (props) => {
|
|
|
1737
1737
|
document.removeEventListener('tooltipVisible', listener);
|
|
1738
1738
|
};
|
|
1739
1739
|
}, [uid]);
|
|
1740
|
-
const element = (jsxRuntimeExports.jsxs("div", { ref: refs.setFloating, style: floatingStyles, ...getFloatingProps({ className: 'o-tooltip-container' }), children: [jsxRuntimeExports.jsx("div", { ref: arrowRef, className: "o-tooltip-arrow", style: { left: middlewareData.arrow?.x, top: middlewareData.arrow?.y } }), content] }));
|
|
1740
|
+
const element = (jsxRuntimeExports.jsxs("div", { ref: refs.setFloating, style: floatingStyles, "data-popper-placement": resolvedPlacement, ...getFloatingProps({ className: 'o-tooltip-container' }), children: [jsxRuntimeExports.jsx("div", { ref: arrowRef, className: "o-tooltip-arrow", style: { left: middlewareData.arrow?.x, top: middlewareData.arrow?.y } }), content] }));
|
|
1741
1741
|
if (attachToBody) {
|
|
1742
1742
|
return (jsxRuntimeExports.jsxs("div", { ref: refs.setReference, ...getReferenceProps(), children: [children, show && open && content && ReactDOM.createPortal(jsxRuntimeExports.jsx("div", { className: classNames, children: element }), document.body)] }));
|
|
1743
1743
|
}
|
|
@@ -5183,7 +5183,10 @@ const useElementScroll = ({ parentRef, horizontal, useObserver, initialRect }) =
|
|
|
5183
5183
|
const [scrollOffset, setScrollOffset] = React.useState(0);
|
|
5184
5184
|
const [element, setElement] = React.useState(parentRef.current);
|
|
5185
5185
|
useIsomorphicLayoutEffect(() => {
|
|
5186
|
-
|
|
5186
|
+
const currentElement = parentRef.current;
|
|
5187
|
+
if (currentElement !== element) {
|
|
5188
|
+
setElement(currentElement);
|
|
5189
|
+
}
|
|
5187
5190
|
});
|
|
5188
5191
|
useIsomorphicLayoutEffect(() => {
|
|
5189
5192
|
if (!element) {
|
|
@@ -5220,7 +5223,10 @@ const useWindowRect = (windowRef, initialRect = { width: 0, height: 0 }) => {
|
|
|
5220
5223
|
const [rect, setRect] = React.useState(initialRect);
|
|
5221
5224
|
const [element, setElement] = React.useState(windowRef.current);
|
|
5222
5225
|
useIsomorphicLayoutEffect(() => {
|
|
5223
|
-
|
|
5226
|
+
const currentElement = windowRef.current;
|
|
5227
|
+
if (currentElement !== element) {
|
|
5228
|
+
setElement(currentElement);
|
|
5229
|
+
}
|
|
5224
5230
|
});
|
|
5225
5231
|
useIsomorphicLayoutEffect(() => {
|
|
5226
5232
|
if (!element) {
|
|
@@ -5248,7 +5254,10 @@ const useWindowScroll = ({ windowRef, parentRef, horizontal, useWindowObserver,
|
|
|
5248
5254
|
const rectKey = horizontal ? 'left' : 'top';
|
|
5249
5255
|
const scrollKey = horizontal ? 'scrollX' : 'scrollY';
|
|
5250
5256
|
useIsomorphicLayoutEffect(() => {
|
|
5251
|
-
|
|
5257
|
+
const currentElement = windowRef.current;
|
|
5258
|
+
if (currentElement !== element) {
|
|
5259
|
+
setElement(currentElement);
|
|
5260
|
+
}
|
|
5252
5261
|
});
|
|
5253
5262
|
useIsomorphicLayoutEffect(() => {
|
|
5254
5263
|
if (!element) {
|
|
@@ -5508,17 +5517,13 @@ const useListView = ({ controller, height, itemHeight = defaultItemHeight, overs
|
|
|
5508
5517
|
return itemHeight(index) || defaultItemHeight;
|
|
5509
5518
|
}
|
|
5510
5519
|
return itemHeight;
|
|
5511
|
-
},
|
|
5512
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5513
|
-
[itemHeight]);
|
|
5520
|
+
}, [itemHeight]);
|
|
5514
5521
|
// Trick for force recalcutate position without losing measurementCache
|
|
5515
5522
|
// In the react-virtual code, the position are recalculate if the forceExtractor function change
|
|
5516
5523
|
const forceKeyExtractor = React.useCallback((index) => {
|
|
5517
5524
|
const fn = keyExtractor || defaultKeyExtractor;
|
|
5518
5525
|
return fn(index);
|
|
5519
|
-
},
|
|
5520
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5521
|
-
[keyExtractor, force]);
|
|
5526
|
+
}, [keyExtractor, force]);
|
|
5522
5527
|
const state = controller.state;
|
|
5523
5528
|
const { totalSize, virtualItems, scrollToIndex, scrollToOffset } = useVirtual({
|
|
5524
5529
|
size: state.total ? state.total : state.items?.length || 0,
|
|
@@ -5686,6 +5691,7 @@ const StandardListComponent = ({ items, ItemComponent = ListItemComponent$1, Ite
|
|
|
5686
5691
|
}) }));
|
|
5687
5692
|
};
|
|
5688
5693
|
|
|
5694
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
|
|
5689
5695
|
const VirtualItemWrapper = ({ virtualItem, listItem, ItemComponent = ListItemComponent$1, ItemContentComponent = ListItemContent, ItemLoadingComponent = LoadingItem$1, onItemClick, onItemMouseEnter, onItemMouseLeave, }) => {
|
|
5690
5696
|
const { index, measureRef, start } = virtualItem;
|
|
5691
5697
|
const ref = React.useRef(null);
|
|
@@ -5724,6 +5730,7 @@ const VirtualItemWrapper = ({ virtualItem, listItem, ItemComponent = ListItemCom
|
|
|
5724
5730
|
transform: `translateY(${start}px)`,
|
|
5725
5731
|
}, children: jsxRuntimeExports.jsxs("div", { ref: ref, children: [listItem?.loadingStatus === onekijsFramework.LoadingStatus.Loading && jsxRuntimeExports.jsx(ItemLoadingComponent, {}), listItem?.loadingStatus !== onekijsFramework.LoadingStatus.Loading && listItem && listItem.data !== undefined && (jsxRuntimeExports.jsx(ItemComponent, { index: index, item: listItem, data: listItem.data, onClick: onItemClick, onMouseEnter: onItemMouseEnter, onMouseLeave: onItemMouseLeave, ItemContentComponent: ItemContentComponent }, `item-${listItem.uid || index}`))] }) }));
|
|
5726
5732
|
};
|
|
5733
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
|
|
5727
5734
|
const VirtualListComponent = ({ items, ItemComponent = ListItemComponent$1, ItemLoadingComponent = LoadingItem$1, ItemContentComponent = ListItemContent, onItemClick, onItemMouseEnter, onItemMouseLeave, virtualItems, }) => {
|
|
5728
5735
|
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: virtualItems.map((virtualItem) => {
|
|
5729
5736
|
const listItem = items[virtualItem.index];
|
|
@@ -5745,6 +5752,7 @@ const findItemIndex = (items, uid) => {
|
|
|
5745
5752
|
return i.uid === uid;
|
|
5746
5753
|
});
|
|
5747
5754
|
};
|
|
5755
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
|
|
5748
5756
|
const ListBodyComponent = ({ autoRefresh, bodyRef, className, follow, height, items, ItemComponent = ListItemComponent$1, ItemLoadingComponent = LoadingItem$1, ItemContentComponent = ListItemContent, NotFoundComponent, keyboardNavigable, ListComponent = StandardListComponent, multiSelect, onItemActivate, onItemDeactivate, onItemSelect, onItemUnselect, onItemHighlight, onItemUnhighlight, parentRef, scrollToIndex, service, state, style, tail, totalSize, virtualItems, VirtualListComponent: VirtualListComponent$1 = VirtualListComponent, LoadingComponent = ListLoadingComponent$1, }) => {
|
|
5749
5757
|
const scrollAlignRef = React.useRef('center');
|
|
5750
5758
|
const lastActiveItemUid = React.useRef(undefined);
|
|
@@ -9122,12 +9130,15 @@ const TreeBodyComponent = ({ className, controller, NotFoundComponent, }) => {
|
|
|
9122
9130
|
TreeBodyComponent.displayName = 'TreeBody';
|
|
9123
9131
|
|
|
9124
9132
|
const timeout$1 = 500;
|
|
9133
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
|
|
9125
9134
|
const VirtualTreeListItemComponent = ({ itemClassName, ItemComponent, virtualItem, onClick, onMouseEnter, onMouseLeave, }) => {
|
|
9126
9135
|
const { index, measureRef, children, item } = virtualItem;
|
|
9127
9136
|
const className = typeof itemClassName !== 'function' ? itemClassName : item ? itemClassName(item) : undefined;
|
|
9128
9137
|
const service = useTreeService();
|
|
9129
9138
|
const { animate } = useTreeConfig();
|
|
9130
9139
|
const childrenRef = React.useRef(null);
|
|
9140
|
+
const ref = React.useRef(null);
|
|
9141
|
+
const previousHeightRef = React.useRef(undefined);
|
|
9131
9142
|
const expand = (item, index) => {
|
|
9132
9143
|
if (animate) {
|
|
9133
9144
|
service.expanding(item, index);
|
|
@@ -9163,11 +9174,35 @@ const VirtualTreeListItemComponent = ({ itemClassName, ItemComponent, virtualIte
|
|
|
9163
9174
|
}
|
|
9164
9175
|
};
|
|
9165
9176
|
const expanded = !!(item && isTreeItemExpanded(item, service));
|
|
9166
|
-
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
|
|
9177
|
+
const measure = React.useCallback((el) => {
|
|
9178
|
+
if (el?.offsetHeight !== previousHeightRef.current && el?.offsetHeight) {
|
|
9179
|
+
previousHeightRef.current = el.offsetHeight;
|
|
9180
|
+
measureRef(el);
|
|
9181
|
+
}
|
|
9182
|
+
}, [measureRef]);
|
|
9183
|
+
const measureThrottle = onekijsFramework.useThrottle(measure, 50);
|
|
9184
|
+
const resizeObserver = React.useMemo(() => {
|
|
9185
|
+
return new ResizeObserver(() => {
|
|
9186
|
+
measureThrottle(ref.current);
|
|
9187
|
+
});
|
|
9188
|
+
}, [measureThrottle]);
|
|
9189
|
+
React.useEffect(() => {
|
|
9190
|
+
const el = ref.current;
|
|
9191
|
+
if (el) {
|
|
9192
|
+
previousHeightRef.current = el.offsetHeight;
|
|
9193
|
+
resizeObserver.observe(el);
|
|
9194
|
+
}
|
|
9195
|
+
return () => {
|
|
9196
|
+
if (el) {
|
|
9197
|
+
resizeObserver.unobserve(el);
|
|
9198
|
+
}
|
|
9199
|
+
};
|
|
9200
|
+
}, [resizeObserver]);
|
|
9201
|
+
return (jsxRuntimeExports.jsxs("div", { children: [jsxRuntimeExports.jsx("div", { className: "o-virtual-item", ref: measureRef, children: jsxRuntimeExports.jsxs("div", { ref: ref, children: [(!item || !item.data) && jsxRuntimeExports.jsx(LoadingItem$1, {}), item && item.data && (jsxRuntimeExports.jsx(DefaultTreeItemContext.Provider, { value: {
|
|
9202
|
+
onExpand: expand,
|
|
9203
|
+
onCollapse: collapse,
|
|
9204
|
+
className,
|
|
9205
|
+
}, children: jsxRuntimeExports.jsx(ItemComponent, { index: index, item: item, data: item.data, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave }, `item-${item?.uid || index}`) }))] }) }, `virtual-item-${item?.uid || index}`), jsxRuntimeExports.jsx(reactTransitionGroup.CSSTransition, { in: expanded, nodeRef: childrenRef, classNames: "o-tree-item-children", timeout: timeout$1, mountOnEnter: true, appear: false, unmountOnExit: true, onExiting: () => {
|
|
9171
9206
|
if (childrenRef.current)
|
|
9172
9207
|
onExiting(childrenRef.current);
|
|
9173
9208
|
}, onEntering: () => {
|
|
@@ -9177,6 +9212,7 @@ const VirtualTreeListItemComponent = ({ itemClassName, ItemComponent, virtualIte
|
|
|
9177
9212
|
return (jsxRuntimeExports.jsx(VirtualTreeListItemComponent, { virtualItem: child, ItemComponent: ItemComponent, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave }, `virtual-item-${child.item?.uid || child.index}`));
|
|
9178
9213
|
}) }) }) })] }));
|
|
9179
9214
|
};
|
|
9215
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
|
|
9180
9216
|
const VirtualTreeListComponent = ({ items, onItemClick, onItemMouseEnter, onItemMouseLeave, virtualItems, }) => {
|
|
9181
9217
|
const logger = onekijsFramework.useLogger();
|
|
9182
9218
|
logger.debug('virtualItems', virtualItems);
|
|
@@ -11045,7 +11081,7 @@ const DefaultDeleteRowComponent = ({ rowIndex }) => {
|
|
|
11045
11081
|
};
|
|
11046
11082
|
const metadata = onekijsFramework.useFormMetadata(tableName);
|
|
11047
11083
|
let disabled = false;
|
|
11048
|
-
if (metadata.readOnly || (metadata.editable === false && form.config.reconfigure)) {
|
|
11084
|
+
if (metadata.disabled || metadata.readOnly || (metadata.editable === false && form.config.reconfigure)) {
|
|
11049
11085
|
disabled = true;
|
|
11050
11086
|
}
|
|
11051
11087
|
return (jsxRuntimeExports.jsx("div", { className: `o-form-table-remove${disabled ? ' o-form-table-remove-disabled' : ''}`, onClick: removeRow, children: jsxRuntimeExports.jsx(RemoveIcon$1, { width: "14px", height: "14px" }) }));
|