@almadar/ui 4.50.0 → 4.50.1
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/avl/index.cjs +18 -7
- package/dist/avl/index.js +18 -7
- package/dist/components/index.cjs +18 -7
- package/dist/components/index.js +18 -7
- package/dist/components/molecules/DataGrid.d.ts +1 -1
- package/dist/components/molecules/DataList.d.ts +1 -1
- package/dist/components/molecules/useDataDnd.d.ts +9 -0
- package/dist/providers/index.cjs +18 -7
- package/dist/providers/index.js +18 -7
- package/dist/runtime/index.cjs +18 -7
- package/dist/runtime/index.js +18 -7
- package/package.json +1 -1
package/dist/avl/index.cjs
CHANGED
|
@@ -24914,10 +24914,12 @@ function useDataDnd(args) {
|
|
|
24914
24914
|
dropEvent,
|
|
24915
24915
|
reorderEvent,
|
|
24916
24916
|
dndItemIdField = "id",
|
|
24917
|
+
dndRoot,
|
|
24917
24918
|
items,
|
|
24918
24919
|
layout
|
|
24919
24920
|
} = args;
|
|
24920
|
-
const
|
|
24921
|
+
const isZone = Boolean(dragGroup || accepts || sortable$1);
|
|
24922
|
+
const enabled = isZone || Boolean(dndRoot);
|
|
24921
24923
|
const eventBus = useEventBus();
|
|
24922
24924
|
const parentRoot = React93__namespace.default.useContext(RootCtx);
|
|
24923
24925
|
const isRoot = enabled && parentRoot === null;
|
|
@@ -25055,7 +25057,8 @@ function useDataDnd(args) {
|
|
|
25055
25057
|
Box,
|
|
25056
25058
|
{
|
|
25057
25059
|
ref: setNodeRef,
|
|
25058
|
-
|
|
25060
|
+
"data-dnd-zone": ownGroup,
|
|
25061
|
+
className: isOver ? "ring-2 ring-primary ring-offset-2 rounded-lg transition-all min-h-[3rem]" : "min-h-[3rem] rounded-lg transition-all",
|
|
25059
25062
|
children
|
|
25060
25063
|
}
|
|
25061
25064
|
);
|
|
@@ -25068,13 +25071,17 @@ function useDataDnd(args) {
|
|
|
25068
25071
|
(children) => {
|
|
25069
25072
|
if (!enabled) return children;
|
|
25070
25073
|
const strategy = layout === "grid" ? sortable.rectSortingStrategy : sortable.verticalListSortingStrategy;
|
|
25074
|
+
if (!isZone) {
|
|
25075
|
+
if (!isRoot) return children;
|
|
25076
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RootCtx.Provider, { value: rootContextValue, children: /* @__PURE__ */ jsxRuntime.jsx(core$1.DndContext, { sensors, collisionDetection: core$1.closestCenter, onDragEnd: handleDragEnd, children }) });
|
|
25077
|
+
}
|
|
25071
25078
|
const inner = /* @__PURE__ */ jsxRuntime.jsx(DropZoneShell, { children: /* @__PURE__ */ jsxRuntime.jsx(sortable.SortableContext, { items: itemIds, strategy, children }) });
|
|
25072
25079
|
if (isRoot) {
|
|
25073
25080
|
return /* @__PURE__ */ jsxRuntime.jsx(RootCtx.Provider, { value: rootContextValue, children: /* @__PURE__ */ jsxRuntime.jsx(core$1.DndContext, { sensors, collisionDetection: core$1.closestCenter, onDragEnd: handleDragEnd, children: inner }) });
|
|
25074
25081
|
}
|
|
25075
25082
|
return inner;
|
|
25076
25083
|
},
|
|
25077
|
-
[enabled, layout, sensors, handleDragEnd, itemIds, isRoot, rootContextValue]
|
|
25084
|
+
[enabled, isZone, layout, sensors, handleDragEnd, itemIds, isRoot, rootContextValue]
|
|
25078
25085
|
);
|
|
25079
25086
|
return {
|
|
25080
25087
|
enabled,
|
|
@@ -25161,7 +25168,8 @@ function DataGrid({
|
|
|
25161
25168
|
sortable,
|
|
25162
25169
|
dropEvent,
|
|
25163
25170
|
reorderEvent,
|
|
25164
|
-
dndItemIdField
|
|
25171
|
+
dndItemIdField,
|
|
25172
|
+
dndRoot
|
|
25165
25173
|
}) {
|
|
25166
25174
|
const eventBus = useEventBus();
|
|
25167
25175
|
const { t } = useTranslate();
|
|
@@ -25177,7 +25185,8 @@ function DataGrid({
|
|
|
25177
25185
|
sortable,
|
|
25178
25186
|
dropEvent,
|
|
25179
25187
|
reorderEvent,
|
|
25180
|
-
dndItemIdField
|
|
25188
|
+
dndItemIdField,
|
|
25189
|
+
dndRoot
|
|
25181
25190
|
});
|
|
25182
25191
|
const allData = dnd.orderedItems;
|
|
25183
25192
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
@@ -25567,7 +25576,8 @@ function DataList({
|
|
|
25567
25576
|
sortable: sortableProp,
|
|
25568
25577
|
dropEvent,
|
|
25569
25578
|
reorderEvent: dndReorderEvent,
|
|
25570
|
-
dndItemIdField
|
|
25579
|
+
dndItemIdField,
|
|
25580
|
+
dndRoot
|
|
25571
25581
|
}) {
|
|
25572
25582
|
const eventBus = useEventBus();
|
|
25573
25583
|
const { t } = useTranslate();
|
|
@@ -25582,7 +25592,8 @@ function DataList({
|
|
|
25582
25592
|
sortable: sortableProp,
|
|
25583
25593
|
dropEvent,
|
|
25584
25594
|
reorderEvent: dndReorderEvent,
|
|
25585
|
-
dndItemIdField
|
|
25595
|
+
dndItemIdField,
|
|
25596
|
+
dndRoot
|
|
25586
25597
|
});
|
|
25587
25598
|
const allData = dnd.orderedItems;
|
|
25588
25599
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
package/dist/avl/index.js
CHANGED
|
@@ -24868,10 +24868,12 @@ function useDataDnd(args) {
|
|
|
24868
24868
|
dropEvent,
|
|
24869
24869
|
reorderEvent,
|
|
24870
24870
|
dndItemIdField = "id",
|
|
24871
|
+
dndRoot,
|
|
24871
24872
|
items,
|
|
24872
24873
|
layout
|
|
24873
24874
|
} = args;
|
|
24874
|
-
const
|
|
24875
|
+
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
24876
|
+
const enabled = isZone || Boolean(dndRoot);
|
|
24875
24877
|
const eventBus = useEventBus();
|
|
24876
24878
|
const parentRoot = React93__default.useContext(RootCtx);
|
|
24877
24879
|
const isRoot = enabled && parentRoot === null;
|
|
@@ -25009,7 +25011,8 @@ function useDataDnd(args) {
|
|
|
25009
25011
|
Box,
|
|
25010
25012
|
{
|
|
25011
25013
|
ref: setNodeRef,
|
|
25012
|
-
|
|
25014
|
+
"data-dnd-zone": ownGroup,
|
|
25015
|
+
className: isOver ? "ring-2 ring-primary ring-offset-2 rounded-lg transition-all min-h-[3rem]" : "min-h-[3rem] rounded-lg transition-all",
|
|
25013
25016
|
children
|
|
25014
25017
|
}
|
|
25015
25018
|
);
|
|
@@ -25022,13 +25025,17 @@ function useDataDnd(args) {
|
|
|
25022
25025
|
(children) => {
|
|
25023
25026
|
if (!enabled) return children;
|
|
25024
25027
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
25028
|
+
if (!isZone) {
|
|
25029
|
+
if (!isRoot) return children;
|
|
25030
|
+
return /* @__PURE__ */ jsx(RootCtx.Provider, { value: rootContextValue, children: /* @__PURE__ */ jsx(DndContext, { sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd, children }) });
|
|
25031
|
+
}
|
|
25025
25032
|
const inner = /* @__PURE__ */ jsx(DropZoneShell, { children: /* @__PURE__ */ jsx(SortableContext, { items: itemIds, strategy, children }) });
|
|
25026
25033
|
if (isRoot) {
|
|
25027
25034
|
return /* @__PURE__ */ jsx(RootCtx.Provider, { value: rootContextValue, children: /* @__PURE__ */ jsx(DndContext, { sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd, children: inner }) });
|
|
25028
25035
|
}
|
|
25029
25036
|
return inner;
|
|
25030
25037
|
},
|
|
25031
|
-
[enabled, layout, sensors, handleDragEnd, itemIds, isRoot, rootContextValue]
|
|
25038
|
+
[enabled, isZone, layout, sensors, handleDragEnd, itemIds, isRoot, rootContextValue]
|
|
25032
25039
|
);
|
|
25033
25040
|
return {
|
|
25034
25041
|
enabled,
|
|
@@ -25115,7 +25122,8 @@ function DataGrid({
|
|
|
25115
25122
|
sortable,
|
|
25116
25123
|
dropEvent,
|
|
25117
25124
|
reorderEvent,
|
|
25118
|
-
dndItemIdField
|
|
25125
|
+
dndItemIdField,
|
|
25126
|
+
dndRoot
|
|
25119
25127
|
}) {
|
|
25120
25128
|
const eventBus = useEventBus();
|
|
25121
25129
|
const { t } = useTranslate();
|
|
@@ -25131,7 +25139,8 @@ function DataGrid({
|
|
|
25131
25139
|
sortable,
|
|
25132
25140
|
dropEvent,
|
|
25133
25141
|
reorderEvent,
|
|
25134
|
-
dndItemIdField
|
|
25142
|
+
dndItemIdField,
|
|
25143
|
+
dndRoot
|
|
25135
25144
|
});
|
|
25136
25145
|
const allData = dnd.orderedItems;
|
|
25137
25146
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
@@ -25521,7 +25530,8 @@ function DataList({
|
|
|
25521
25530
|
sortable: sortableProp,
|
|
25522
25531
|
dropEvent,
|
|
25523
25532
|
reorderEvent: dndReorderEvent,
|
|
25524
|
-
dndItemIdField
|
|
25533
|
+
dndItemIdField,
|
|
25534
|
+
dndRoot
|
|
25525
25535
|
}) {
|
|
25526
25536
|
const eventBus = useEventBus();
|
|
25527
25537
|
const { t } = useTranslate();
|
|
@@ -25536,7 +25546,8 @@ function DataList({
|
|
|
25536
25546
|
sortable: sortableProp,
|
|
25537
25547
|
dropEvent,
|
|
25538
25548
|
reorderEvent: dndReorderEvent,
|
|
25539
|
-
dndItemIdField
|
|
25549
|
+
dndItemIdField,
|
|
25550
|
+
dndRoot
|
|
25540
25551
|
});
|
|
25541
25552
|
const allData = dnd.orderedItems;
|
|
25542
25553
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
@@ -20081,10 +20081,12 @@ function useDataDnd(args) {
|
|
|
20081
20081
|
dropEvent,
|
|
20082
20082
|
reorderEvent,
|
|
20083
20083
|
dndItemIdField = "id",
|
|
20084
|
+
dndRoot,
|
|
20084
20085
|
items,
|
|
20085
20086
|
layout
|
|
20086
20087
|
} = args;
|
|
20087
|
-
const
|
|
20088
|
+
const isZone = Boolean(dragGroup || accepts || sortable$1);
|
|
20089
|
+
const enabled = isZone || Boolean(dndRoot);
|
|
20088
20090
|
const eventBus = useEventBus();
|
|
20089
20091
|
const parentRoot = React75__namespace.default.useContext(RootCtx);
|
|
20090
20092
|
const isRoot = enabled && parentRoot === null;
|
|
@@ -20222,7 +20224,8 @@ function useDataDnd(args) {
|
|
|
20222
20224
|
exports.Box,
|
|
20223
20225
|
{
|
|
20224
20226
|
ref: setNodeRef,
|
|
20225
|
-
|
|
20227
|
+
"data-dnd-zone": ownGroup,
|
|
20228
|
+
className: isOver ? "ring-2 ring-primary ring-offset-2 rounded-lg transition-all min-h-[3rem]" : "min-h-[3rem] rounded-lg transition-all",
|
|
20226
20229
|
children
|
|
20227
20230
|
}
|
|
20228
20231
|
);
|
|
@@ -20235,13 +20238,17 @@ function useDataDnd(args) {
|
|
|
20235
20238
|
(children) => {
|
|
20236
20239
|
if (!enabled) return children;
|
|
20237
20240
|
const strategy = layout === "grid" ? sortable.rectSortingStrategy : sortable.verticalListSortingStrategy;
|
|
20241
|
+
if (!isZone) {
|
|
20242
|
+
if (!isRoot) return children;
|
|
20243
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RootCtx.Provider, { value: rootContextValue, children: /* @__PURE__ */ jsxRuntime.jsx(core$1.DndContext, { sensors, collisionDetection: core$1.closestCenter, onDragEnd: handleDragEnd, children }) });
|
|
20244
|
+
}
|
|
20238
20245
|
const inner = /* @__PURE__ */ jsxRuntime.jsx(DropZoneShell, { children: /* @__PURE__ */ jsxRuntime.jsx(sortable.SortableContext, { items: itemIds, strategy, children }) });
|
|
20239
20246
|
if (isRoot) {
|
|
20240
20247
|
return /* @__PURE__ */ jsxRuntime.jsx(RootCtx.Provider, { value: rootContextValue, children: /* @__PURE__ */ jsxRuntime.jsx(core$1.DndContext, { sensors, collisionDetection: core$1.closestCenter, onDragEnd: handleDragEnd, children: inner }) });
|
|
20241
20248
|
}
|
|
20242
20249
|
return inner;
|
|
20243
20250
|
},
|
|
20244
|
-
[enabled, layout, sensors, handleDragEnd, itemIds, isRoot, rootContextValue]
|
|
20251
|
+
[enabled, isZone, layout, sensors, handleDragEnd, itemIds, isRoot, rootContextValue]
|
|
20245
20252
|
);
|
|
20246
20253
|
return {
|
|
20247
20254
|
enabled,
|
|
@@ -20328,7 +20335,8 @@ function DataGrid({
|
|
|
20328
20335
|
sortable,
|
|
20329
20336
|
dropEvent,
|
|
20330
20337
|
reorderEvent,
|
|
20331
|
-
dndItemIdField
|
|
20338
|
+
dndItemIdField,
|
|
20339
|
+
dndRoot
|
|
20332
20340
|
}) {
|
|
20333
20341
|
const eventBus = useEventBus();
|
|
20334
20342
|
const { t } = useTranslate();
|
|
@@ -20344,7 +20352,8 @@ function DataGrid({
|
|
|
20344
20352
|
sortable,
|
|
20345
20353
|
dropEvent,
|
|
20346
20354
|
reorderEvent,
|
|
20347
|
-
dndItemIdField
|
|
20355
|
+
dndItemIdField,
|
|
20356
|
+
dndRoot
|
|
20348
20357
|
});
|
|
20349
20358
|
const allData = dnd.orderedItems;
|
|
20350
20359
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
@@ -20734,7 +20743,8 @@ function DataList({
|
|
|
20734
20743
|
sortable: sortableProp,
|
|
20735
20744
|
dropEvent,
|
|
20736
20745
|
reorderEvent: dndReorderEvent,
|
|
20737
|
-
dndItemIdField
|
|
20746
|
+
dndItemIdField,
|
|
20747
|
+
dndRoot
|
|
20738
20748
|
}) {
|
|
20739
20749
|
const eventBus = useEventBus();
|
|
20740
20750
|
const { t } = useTranslate();
|
|
@@ -20749,7 +20759,8 @@ function DataList({
|
|
|
20749
20759
|
sortable: sortableProp,
|
|
20750
20760
|
dropEvent,
|
|
20751
20761
|
reorderEvent: dndReorderEvent,
|
|
20752
|
-
dndItemIdField
|
|
20762
|
+
dndItemIdField,
|
|
20763
|
+
dndRoot
|
|
20753
20764
|
});
|
|
20754
20765
|
const allData = dnd.orderedItems;
|
|
20755
20766
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
package/dist/components/index.js
CHANGED
|
@@ -20035,10 +20035,12 @@ function useDataDnd(args) {
|
|
|
20035
20035
|
dropEvent,
|
|
20036
20036
|
reorderEvent,
|
|
20037
20037
|
dndItemIdField = "id",
|
|
20038
|
+
dndRoot,
|
|
20038
20039
|
items,
|
|
20039
20040
|
layout
|
|
20040
20041
|
} = args;
|
|
20041
|
-
const
|
|
20042
|
+
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
20043
|
+
const enabled = isZone || Boolean(dndRoot);
|
|
20042
20044
|
const eventBus = useEventBus();
|
|
20043
20045
|
const parentRoot = React75__default.useContext(RootCtx);
|
|
20044
20046
|
const isRoot = enabled && parentRoot === null;
|
|
@@ -20176,7 +20178,8 @@ function useDataDnd(args) {
|
|
|
20176
20178
|
Box,
|
|
20177
20179
|
{
|
|
20178
20180
|
ref: setNodeRef,
|
|
20179
|
-
|
|
20181
|
+
"data-dnd-zone": ownGroup,
|
|
20182
|
+
className: isOver ? "ring-2 ring-primary ring-offset-2 rounded-lg transition-all min-h-[3rem]" : "min-h-[3rem] rounded-lg transition-all",
|
|
20180
20183
|
children
|
|
20181
20184
|
}
|
|
20182
20185
|
);
|
|
@@ -20189,13 +20192,17 @@ function useDataDnd(args) {
|
|
|
20189
20192
|
(children) => {
|
|
20190
20193
|
if (!enabled) return children;
|
|
20191
20194
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
20195
|
+
if (!isZone) {
|
|
20196
|
+
if (!isRoot) return children;
|
|
20197
|
+
return /* @__PURE__ */ jsx(RootCtx.Provider, { value: rootContextValue, children: /* @__PURE__ */ jsx(DndContext, { sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd, children }) });
|
|
20198
|
+
}
|
|
20192
20199
|
const inner = /* @__PURE__ */ jsx(DropZoneShell, { children: /* @__PURE__ */ jsx(SortableContext, { items: itemIds, strategy, children }) });
|
|
20193
20200
|
if (isRoot) {
|
|
20194
20201
|
return /* @__PURE__ */ jsx(RootCtx.Provider, { value: rootContextValue, children: /* @__PURE__ */ jsx(DndContext, { sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd, children: inner }) });
|
|
20195
20202
|
}
|
|
20196
20203
|
return inner;
|
|
20197
20204
|
},
|
|
20198
|
-
[enabled, layout, sensors, handleDragEnd, itemIds, isRoot, rootContextValue]
|
|
20205
|
+
[enabled, isZone, layout, sensors, handleDragEnd, itemIds, isRoot, rootContextValue]
|
|
20199
20206
|
);
|
|
20200
20207
|
return {
|
|
20201
20208
|
enabled,
|
|
@@ -20282,7 +20289,8 @@ function DataGrid({
|
|
|
20282
20289
|
sortable,
|
|
20283
20290
|
dropEvent,
|
|
20284
20291
|
reorderEvent,
|
|
20285
|
-
dndItemIdField
|
|
20292
|
+
dndItemIdField,
|
|
20293
|
+
dndRoot
|
|
20286
20294
|
}) {
|
|
20287
20295
|
const eventBus = useEventBus();
|
|
20288
20296
|
const { t } = useTranslate();
|
|
@@ -20298,7 +20306,8 @@ function DataGrid({
|
|
|
20298
20306
|
sortable,
|
|
20299
20307
|
dropEvent,
|
|
20300
20308
|
reorderEvent,
|
|
20301
|
-
dndItemIdField
|
|
20309
|
+
dndItemIdField,
|
|
20310
|
+
dndRoot
|
|
20302
20311
|
});
|
|
20303
20312
|
const allData = dnd.orderedItems;
|
|
20304
20313
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
@@ -20688,7 +20697,8 @@ function DataList({
|
|
|
20688
20697
|
sortable: sortableProp,
|
|
20689
20698
|
dropEvent,
|
|
20690
20699
|
reorderEvent: dndReorderEvent,
|
|
20691
|
-
dndItemIdField
|
|
20700
|
+
dndItemIdField,
|
|
20701
|
+
dndRoot
|
|
20692
20702
|
}) {
|
|
20693
20703
|
const eventBus = useEventBus();
|
|
20694
20704
|
const { t } = useTranslate();
|
|
@@ -20703,7 +20713,8 @@ function DataList({
|
|
|
20703
20713
|
sortable: sortableProp,
|
|
20704
20714
|
dropEvent,
|
|
20705
20715
|
reorderEvent: dndReorderEvent,
|
|
20706
|
-
dndItemIdField
|
|
20716
|
+
dndItemIdField,
|
|
20717
|
+
dndRoot
|
|
20707
20718
|
});
|
|
20708
20719
|
const allData = dnd.orderedItems;
|
|
20709
20720
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
@@ -103,7 +103,7 @@ export interface DataGridProps<T extends EntityRow = EntityRow> extends DataDndP
|
|
|
103
103
|
/** Max items to show before "Show More" button. Defaults to 0 (disabled). */
|
|
104
104
|
pageSize?: number;
|
|
105
105
|
}
|
|
106
|
-
export declare function DataGrid<T extends EntityRow = EntityRow>({ entity, fields, columns, itemActions, cols, gap, minCardWidth, className, isLoading, error, imageField, selectable, selectionEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, renderItem: schemaRenderItem, dragGroup, accepts, sortable, dropEvent, reorderEvent, dndItemIdField, }: DataGridProps<T>): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
|
|
106
|
+
export declare function DataGrid<T extends EntityRow = EntityRow>({ entity, fields, columns, itemActions, cols, gap, minCardWidth, className, isLoading, error, imageField, selectable, selectionEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, renderItem: schemaRenderItem, dragGroup, accepts, sortable, dropEvent, reorderEvent, dndItemIdField, dndRoot, }: DataGridProps<T>): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
|
|
107
107
|
export declare namespace DataGrid {
|
|
108
108
|
var displayName: string;
|
|
109
109
|
}
|
|
@@ -117,7 +117,7 @@ export interface DataListProps<T extends EntityRow = EntityRow> extends DataDndP
|
|
|
117
117
|
/** Max items to show before "Show More" button. Defaults to 5. Set to 0 to disable. */
|
|
118
118
|
pageSize?: number;
|
|
119
119
|
}
|
|
120
|
-
export declare function DataList<T extends EntityRow = EntityRow>({ entity, fields, columns, itemActions, gap, variant, groupBy, senderField, currentUser, className, isLoading, error, reorderable: _reorderable, reorderEvent: _reorderEvent, swipeLeftEvent: _swipeLeftEvent, swipeLeftActions: _swipeLeftActions, swipeRightEvent: _swipeRightEvent, swipeRightActions: _swipeRightActions, longPressEvent: _longPressEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, renderItem: schemaRenderItem, dragGroup, accepts, sortable: sortableProp, dropEvent, reorderEvent: dndReorderEvent, dndItemIdField, }: DataListProps<T>): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
|
|
120
|
+
export declare function DataList<T extends EntityRow = EntityRow>({ entity, fields, columns, itemActions, gap, variant, groupBy, senderField, currentUser, className, isLoading, error, reorderable: _reorderable, reorderEvent: _reorderEvent, swipeLeftEvent: _swipeLeftEvent, swipeLeftActions: _swipeLeftActions, swipeRightEvent: _swipeRightEvent, swipeRightActions: _swipeRightActions, longPressEvent: _longPressEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, renderItem: schemaRenderItem, dragGroup, accepts, sortable: sortableProp, dropEvent, reorderEvent: dndReorderEvent, dndItemIdField, dndRoot, }: DataListProps<T>): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
|
|
121
121
|
export declare namespace DataList {
|
|
122
122
|
var displayName: string;
|
|
123
123
|
}
|
|
@@ -26,6 +26,15 @@ export interface DataDndProps {
|
|
|
26
26
|
dropEvent?: EventKey;
|
|
27
27
|
reorderEvent?: EventKey;
|
|
28
28
|
dndItemIdField?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Mark this container as the DnD root for its subtree. Use on an outer
|
|
31
|
+
* container (e.g. a data-grid hosting inner data-lists) when the container
|
|
32
|
+
* itself is NOT a drop target or sortable, but descendant zones need to
|
|
33
|
+
* share one DndContext so items can be dragged between them. Inner zones
|
|
34
|
+
* with `accepts` / `dragGroup` / `sortable` detect this root and skip
|
|
35
|
+
* creating their own DndContext.
|
|
36
|
+
*/
|
|
37
|
+
dndRoot?: boolean;
|
|
29
38
|
}
|
|
30
39
|
interface UseDataDndArgs<T extends EntityRow> extends DataDndProps {
|
|
31
40
|
items: readonly T[];
|
package/dist/providers/index.cjs
CHANGED
|
@@ -21326,10 +21326,12 @@ function useDataDnd(args) {
|
|
|
21326
21326
|
dropEvent,
|
|
21327
21327
|
reorderEvent,
|
|
21328
21328
|
dndItemIdField = "id",
|
|
21329
|
+
dndRoot,
|
|
21329
21330
|
items,
|
|
21330
21331
|
layout
|
|
21331
21332
|
} = args;
|
|
21332
|
-
const
|
|
21333
|
+
const isZone = Boolean(dragGroup || accepts || sortable$1);
|
|
21334
|
+
const enabled = isZone || Boolean(dndRoot);
|
|
21333
21335
|
const eventBus = useEventBus();
|
|
21334
21336
|
const parentRoot = React81__namespace.default.useContext(RootCtx);
|
|
21335
21337
|
const isRoot = enabled && parentRoot === null;
|
|
@@ -21467,7 +21469,8 @@ function useDataDnd(args) {
|
|
|
21467
21469
|
Box,
|
|
21468
21470
|
{
|
|
21469
21471
|
ref: setNodeRef,
|
|
21470
|
-
|
|
21472
|
+
"data-dnd-zone": ownGroup,
|
|
21473
|
+
className: isOver ? "ring-2 ring-primary ring-offset-2 rounded-lg transition-all min-h-[3rem]" : "min-h-[3rem] rounded-lg transition-all",
|
|
21471
21474
|
children
|
|
21472
21475
|
}
|
|
21473
21476
|
);
|
|
@@ -21480,13 +21483,17 @@ function useDataDnd(args) {
|
|
|
21480
21483
|
(children) => {
|
|
21481
21484
|
if (!enabled) return children;
|
|
21482
21485
|
const strategy = layout === "grid" ? sortable.rectSortingStrategy : sortable.verticalListSortingStrategy;
|
|
21486
|
+
if (!isZone) {
|
|
21487
|
+
if (!isRoot) return children;
|
|
21488
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RootCtx.Provider, { value: rootContextValue, children: /* @__PURE__ */ jsxRuntime.jsx(core$1.DndContext, { sensors, collisionDetection: core$1.closestCenter, onDragEnd: handleDragEnd, children }) });
|
|
21489
|
+
}
|
|
21483
21490
|
const inner = /* @__PURE__ */ jsxRuntime.jsx(DropZoneShell, { children: /* @__PURE__ */ jsxRuntime.jsx(sortable.SortableContext, { items: itemIds, strategy, children }) });
|
|
21484
21491
|
if (isRoot) {
|
|
21485
21492
|
return /* @__PURE__ */ jsxRuntime.jsx(RootCtx.Provider, { value: rootContextValue, children: /* @__PURE__ */ jsxRuntime.jsx(core$1.DndContext, { sensors, collisionDetection: core$1.closestCenter, onDragEnd: handleDragEnd, children: inner }) });
|
|
21486
21493
|
}
|
|
21487
21494
|
return inner;
|
|
21488
21495
|
},
|
|
21489
|
-
[enabled, layout, sensors, handleDragEnd, itemIds, isRoot, rootContextValue]
|
|
21496
|
+
[enabled, isZone, layout, sensors, handleDragEnd, itemIds, isRoot, rootContextValue]
|
|
21490
21497
|
);
|
|
21491
21498
|
return {
|
|
21492
21499
|
enabled,
|
|
@@ -21573,7 +21580,8 @@ function DataGrid({
|
|
|
21573
21580
|
sortable,
|
|
21574
21581
|
dropEvent,
|
|
21575
21582
|
reorderEvent,
|
|
21576
|
-
dndItemIdField
|
|
21583
|
+
dndItemIdField,
|
|
21584
|
+
dndRoot
|
|
21577
21585
|
}) {
|
|
21578
21586
|
const eventBus = useEventBus();
|
|
21579
21587
|
const { t } = useTranslate();
|
|
@@ -21589,7 +21597,8 @@ function DataGrid({
|
|
|
21589
21597
|
sortable,
|
|
21590
21598
|
dropEvent,
|
|
21591
21599
|
reorderEvent,
|
|
21592
|
-
dndItemIdField
|
|
21600
|
+
dndItemIdField,
|
|
21601
|
+
dndRoot
|
|
21593
21602
|
});
|
|
21594
21603
|
const allData = dnd.orderedItems;
|
|
21595
21604
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
@@ -21979,7 +21988,8 @@ function DataList({
|
|
|
21979
21988
|
sortable: sortableProp,
|
|
21980
21989
|
dropEvent,
|
|
21981
21990
|
reorderEvent: dndReorderEvent,
|
|
21982
|
-
dndItemIdField
|
|
21991
|
+
dndItemIdField,
|
|
21992
|
+
dndRoot
|
|
21983
21993
|
}) {
|
|
21984
21994
|
const eventBus = useEventBus();
|
|
21985
21995
|
const { t } = useTranslate();
|
|
@@ -21994,7 +22004,8 @@ function DataList({
|
|
|
21994
22004
|
sortable: sortableProp,
|
|
21995
22005
|
dropEvent,
|
|
21996
22006
|
reorderEvent: dndReorderEvent,
|
|
21997
|
-
dndItemIdField
|
|
22007
|
+
dndItemIdField,
|
|
22008
|
+
dndRoot
|
|
21998
22009
|
});
|
|
21999
22010
|
const allData = dnd.orderedItems;
|
|
22000
22011
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
package/dist/providers/index.js
CHANGED
|
@@ -21280,10 +21280,12 @@ function useDataDnd(args) {
|
|
|
21280
21280
|
dropEvent,
|
|
21281
21281
|
reorderEvent,
|
|
21282
21282
|
dndItemIdField = "id",
|
|
21283
|
+
dndRoot,
|
|
21283
21284
|
items,
|
|
21284
21285
|
layout
|
|
21285
21286
|
} = args;
|
|
21286
|
-
const
|
|
21287
|
+
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
21288
|
+
const enabled = isZone || Boolean(dndRoot);
|
|
21287
21289
|
const eventBus = useEventBus();
|
|
21288
21290
|
const parentRoot = React81__default.useContext(RootCtx);
|
|
21289
21291
|
const isRoot = enabled && parentRoot === null;
|
|
@@ -21421,7 +21423,8 @@ function useDataDnd(args) {
|
|
|
21421
21423
|
Box,
|
|
21422
21424
|
{
|
|
21423
21425
|
ref: setNodeRef,
|
|
21424
|
-
|
|
21426
|
+
"data-dnd-zone": ownGroup,
|
|
21427
|
+
className: isOver ? "ring-2 ring-primary ring-offset-2 rounded-lg transition-all min-h-[3rem]" : "min-h-[3rem] rounded-lg transition-all",
|
|
21425
21428
|
children
|
|
21426
21429
|
}
|
|
21427
21430
|
);
|
|
@@ -21434,13 +21437,17 @@ function useDataDnd(args) {
|
|
|
21434
21437
|
(children) => {
|
|
21435
21438
|
if (!enabled) return children;
|
|
21436
21439
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
21440
|
+
if (!isZone) {
|
|
21441
|
+
if (!isRoot) return children;
|
|
21442
|
+
return /* @__PURE__ */ jsx(RootCtx.Provider, { value: rootContextValue, children: /* @__PURE__ */ jsx(DndContext, { sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd, children }) });
|
|
21443
|
+
}
|
|
21437
21444
|
const inner = /* @__PURE__ */ jsx(DropZoneShell, { children: /* @__PURE__ */ jsx(SortableContext, { items: itemIds, strategy, children }) });
|
|
21438
21445
|
if (isRoot) {
|
|
21439
21446
|
return /* @__PURE__ */ jsx(RootCtx.Provider, { value: rootContextValue, children: /* @__PURE__ */ jsx(DndContext, { sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd, children: inner }) });
|
|
21440
21447
|
}
|
|
21441
21448
|
return inner;
|
|
21442
21449
|
},
|
|
21443
|
-
[enabled, layout, sensors, handleDragEnd, itemIds, isRoot, rootContextValue]
|
|
21450
|
+
[enabled, isZone, layout, sensors, handleDragEnd, itemIds, isRoot, rootContextValue]
|
|
21444
21451
|
);
|
|
21445
21452
|
return {
|
|
21446
21453
|
enabled,
|
|
@@ -21527,7 +21534,8 @@ function DataGrid({
|
|
|
21527
21534
|
sortable,
|
|
21528
21535
|
dropEvent,
|
|
21529
21536
|
reorderEvent,
|
|
21530
|
-
dndItemIdField
|
|
21537
|
+
dndItemIdField,
|
|
21538
|
+
dndRoot
|
|
21531
21539
|
}) {
|
|
21532
21540
|
const eventBus = useEventBus();
|
|
21533
21541
|
const { t } = useTranslate();
|
|
@@ -21543,7 +21551,8 @@ function DataGrid({
|
|
|
21543
21551
|
sortable,
|
|
21544
21552
|
dropEvent,
|
|
21545
21553
|
reorderEvent,
|
|
21546
|
-
dndItemIdField
|
|
21554
|
+
dndItemIdField,
|
|
21555
|
+
dndRoot
|
|
21547
21556
|
});
|
|
21548
21557
|
const allData = dnd.orderedItems;
|
|
21549
21558
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
@@ -21933,7 +21942,8 @@ function DataList({
|
|
|
21933
21942
|
sortable: sortableProp,
|
|
21934
21943
|
dropEvent,
|
|
21935
21944
|
reorderEvent: dndReorderEvent,
|
|
21936
|
-
dndItemIdField
|
|
21945
|
+
dndItemIdField,
|
|
21946
|
+
dndRoot
|
|
21937
21947
|
}) {
|
|
21938
21948
|
const eventBus = useEventBus();
|
|
21939
21949
|
const { t } = useTranslate();
|
|
@@ -21948,7 +21958,8 @@ function DataList({
|
|
|
21948
21958
|
sortable: sortableProp,
|
|
21949
21959
|
dropEvent,
|
|
21950
21960
|
reorderEvent: dndReorderEvent,
|
|
21951
|
-
dndItemIdField
|
|
21961
|
+
dndItemIdField,
|
|
21962
|
+
dndRoot
|
|
21952
21963
|
});
|
|
21953
21964
|
const allData = dnd.orderedItems;
|
|
21954
21965
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -21095,10 +21095,12 @@ function useDataDnd(args) {
|
|
|
21095
21095
|
dropEvent,
|
|
21096
21096
|
reorderEvent,
|
|
21097
21097
|
dndItemIdField = "id",
|
|
21098
|
+
dndRoot,
|
|
21098
21099
|
items,
|
|
21099
21100
|
layout
|
|
21100
21101
|
} = args;
|
|
21101
|
-
const
|
|
21102
|
+
const isZone = Boolean(dragGroup || accepts || sortable$1);
|
|
21103
|
+
const enabled = isZone || Boolean(dndRoot);
|
|
21102
21104
|
const eventBus = useEventBus();
|
|
21103
21105
|
const parentRoot = React80__namespace.default.useContext(RootCtx);
|
|
21104
21106
|
const isRoot = enabled && parentRoot === null;
|
|
@@ -21236,7 +21238,8 @@ function useDataDnd(args) {
|
|
|
21236
21238
|
Box,
|
|
21237
21239
|
{
|
|
21238
21240
|
ref: setNodeRef,
|
|
21239
|
-
|
|
21241
|
+
"data-dnd-zone": ownGroup,
|
|
21242
|
+
className: isOver ? "ring-2 ring-primary ring-offset-2 rounded-lg transition-all min-h-[3rem]" : "min-h-[3rem] rounded-lg transition-all",
|
|
21240
21243
|
children
|
|
21241
21244
|
}
|
|
21242
21245
|
);
|
|
@@ -21249,13 +21252,17 @@ function useDataDnd(args) {
|
|
|
21249
21252
|
(children) => {
|
|
21250
21253
|
if (!enabled) return children;
|
|
21251
21254
|
const strategy = layout === "grid" ? sortable.rectSortingStrategy : sortable.verticalListSortingStrategy;
|
|
21255
|
+
if (!isZone) {
|
|
21256
|
+
if (!isRoot) return children;
|
|
21257
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RootCtx.Provider, { value: rootContextValue, children: /* @__PURE__ */ jsxRuntime.jsx(core$1.DndContext, { sensors, collisionDetection: core$1.closestCenter, onDragEnd: handleDragEnd, children }) });
|
|
21258
|
+
}
|
|
21252
21259
|
const inner = /* @__PURE__ */ jsxRuntime.jsx(DropZoneShell, { children: /* @__PURE__ */ jsxRuntime.jsx(sortable.SortableContext, { items: itemIds, strategy, children }) });
|
|
21253
21260
|
if (isRoot) {
|
|
21254
21261
|
return /* @__PURE__ */ jsxRuntime.jsx(RootCtx.Provider, { value: rootContextValue, children: /* @__PURE__ */ jsxRuntime.jsx(core$1.DndContext, { sensors, collisionDetection: core$1.closestCenter, onDragEnd: handleDragEnd, children: inner }) });
|
|
21255
21262
|
}
|
|
21256
21263
|
return inner;
|
|
21257
21264
|
},
|
|
21258
|
-
[enabled, layout, sensors, handleDragEnd, itemIds, isRoot, rootContextValue]
|
|
21265
|
+
[enabled, isZone, layout, sensors, handleDragEnd, itemIds, isRoot, rootContextValue]
|
|
21259
21266
|
);
|
|
21260
21267
|
return {
|
|
21261
21268
|
enabled,
|
|
@@ -21342,7 +21349,8 @@ function DataGrid({
|
|
|
21342
21349
|
sortable,
|
|
21343
21350
|
dropEvent,
|
|
21344
21351
|
reorderEvent,
|
|
21345
|
-
dndItemIdField
|
|
21352
|
+
dndItemIdField,
|
|
21353
|
+
dndRoot
|
|
21346
21354
|
}) {
|
|
21347
21355
|
const eventBus = useEventBus();
|
|
21348
21356
|
const { t } = useTranslate();
|
|
@@ -21358,7 +21366,8 @@ function DataGrid({
|
|
|
21358
21366
|
sortable,
|
|
21359
21367
|
dropEvent,
|
|
21360
21368
|
reorderEvent,
|
|
21361
|
-
dndItemIdField
|
|
21369
|
+
dndItemIdField,
|
|
21370
|
+
dndRoot
|
|
21362
21371
|
});
|
|
21363
21372
|
const allData = dnd.orderedItems;
|
|
21364
21373
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
@@ -21748,7 +21757,8 @@ function DataList({
|
|
|
21748
21757
|
sortable: sortableProp,
|
|
21749
21758
|
dropEvent,
|
|
21750
21759
|
reorderEvent: dndReorderEvent,
|
|
21751
|
-
dndItemIdField
|
|
21760
|
+
dndItemIdField,
|
|
21761
|
+
dndRoot
|
|
21752
21762
|
}) {
|
|
21753
21763
|
const eventBus = useEventBus();
|
|
21754
21764
|
const { t } = useTranslate();
|
|
@@ -21763,7 +21773,8 @@ function DataList({
|
|
|
21763
21773
|
sortable: sortableProp,
|
|
21764
21774
|
dropEvent,
|
|
21765
21775
|
reorderEvent: dndReorderEvent,
|
|
21766
|
-
dndItemIdField
|
|
21776
|
+
dndItemIdField,
|
|
21777
|
+
dndRoot
|
|
21767
21778
|
});
|
|
21768
21779
|
const allData = dnd.orderedItems;
|
|
21769
21780
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
package/dist/runtime/index.js
CHANGED
|
@@ -21049,10 +21049,12 @@ function useDataDnd(args) {
|
|
|
21049
21049
|
dropEvent,
|
|
21050
21050
|
reorderEvent,
|
|
21051
21051
|
dndItemIdField = "id",
|
|
21052
|
+
dndRoot,
|
|
21052
21053
|
items,
|
|
21053
21054
|
layout
|
|
21054
21055
|
} = args;
|
|
21055
|
-
const
|
|
21056
|
+
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
21057
|
+
const enabled = isZone || Boolean(dndRoot);
|
|
21056
21058
|
const eventBus = useEventBus();
|
|
21057
21059
|
const parentRoot = React80__default.useContext(RootCtx);
|
|
21058
21060
|
const isRoot = enabled && parentRoot === null;
|
|
@@ -21190,7 +21192,8 @@ function useDataDnd(args) {
|
|
|
21190
21192
|
Box,
|
|
21191
21193
|
{
|
|
21192
21194
|
ref: setNodeRef,
|
|
21193
|
-
|
|
21195
|
+
"data-dnd-zone": ownGroup,
|
|
21196
|
+
className: isOver ? "ring-2 ring-primary ring-offset-2 rounded-lg transition-all min-h-[3rem]" : "min-h-[3rem] rounded-lg transition-all",
|
|
21194
21197
|
children
|
|
21195
21198
|
}
|
|
21196
21199
|
);
|
|
@@ -21203,13 +21206,17 @@ function useDataDnd(args) {
|
|
|
21203
21206
|
(children) => {
|
|
21204
21207
|
if (!enabled) return children;
|
|
21205
21208
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
21209
|
+
if (!isZone) {
|
|
21210
|
+
if (!isRoot) return children;
|
|
21211
|
+
return /* @__PURE__ */ jsx(RootCtx.Provider, { value: rootContextValue, children: /* @__PURE__ */ jsx(DndContext, { sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd, children }) });
|
|
21212
|
+
}
|
|
21206
21213
|
const inner = /* @__PURE__ */ jsx(DropZoneShell, { children: /* @__PURE__ */ jsx(SortableContext, { items: itemIds, strategy, children }) });
|
|
21207
21214
|
if (isRoot) {
|
|
21208
21215
|
return /* @__PURE__ */ jsx(RootCtx.Provider, { value: rootContextValue, children: /* @__PURE__ */ jsx(DndContext, { sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd, children: inner }) });
|
|
21209
21216
|
}
|
|
21210
21217
|
return inner;
|
|
21211
21218
|
},
|
|
21212
|
-
[enabled, layout, sensors, handleDragEnd, itemIds, isRoot, rootContextValue]
|
|
21219
|
+
[enabled, isZone, layout, sensors, handleDragEnd, itemIds, isRoot, rootContextValue]
|
|
21213
21220
|
);
|
|
21214
21221
|
return {
|
|
21215
21222
|
enabled,
|
|
@@ -21296,7 +21303,8 @@ function DataGrid({
|
|
|
21296
21303
|
sortable,
|
|
21297
21304
|
dropEvent,
|
|
21298
21305
|
reorderEvent,
|
|
21299
|
-
dndItemIdField
|
|
21306
|
+
dndItemIdField,
|
|
21307
|
+
dndRoot
|
|
21300
21308
|
}) {
|
|
21301
21309
|
const eventBus = useEventBus();
|
|
21302
21310
|
const { t } = useTranslate();
|
|
@@ -21312,7 +21320,8 @@ function DataGrid({
|
|
|
21312
21320
|
sortable,
|
|
21313
21321
|
dropEvent,
|
|
21314
21322
|
reorderEvent,
|
|
21315
|
-
dndItemIdField
|
|
21323
|
+
dndItemIdField,
|
|
21324
|
+
dndRoot
|
|
21316
21325
|
});
|
|
21317
21326
|
const allData = dnd.orderedItems;
|
|
21318
21327
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
@@ -21702,7 +21711,8 @@ function DataList({
|
|
|
21702
21711
|
sortable: sortableProp,
|
|
21703
21712
|
dropEvent,
|
|
21704
21713
|
reorderEvent: dndReorderEvent,
|
|
21705
|
-
dndItemIdField
|
|
21714
|
+
dndItemIdField,
|
|
21715
|
+
dndRoot
|
|
21706
21716
|
}) {
|
|
21707
21717
|
const eventBus = useEventBus();
|
|
21708
21718
|
const { t } = useTranslate();
|
|
@@ -21717,7 +21727,8 @@ function DataList({
|
|
|
21717
21727
|
sortable: sortableProp,
|
|
21718
21728
|
dropEvent,
|
|
21719
21729
|
reorderEvent: dndReorderEvent,
|
|
21720
|
-
dndItemIdField
|
|
21730
|
+
dndItemIdField,
|
|
21731
|
+
dndRoot
|
|
21721
21732
|
});
|
|
21722
21733
|
const allData = dnd.orderedItems;
|
|
21723
21734
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|