@1771technologies/lytenyte-pro 0.0.49 → 0.0.50
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/column-manager.js +9 -17
- package/dist/{drag-store-CO3z13Ju.js → drag-store-C056Fm0B.js} +13 -1
- package/dist/filter-manager.js +4 -4
- package/dist/icons.js +1 -1
- package/dist/index.js +2 -2
- package/dist/lytenyte-pro.css +2 -1
- package/dist/{pill-BkFH8z9v.js → pill-0vXb9g1m.js} +127 -101
- package/dist/pill-manager.js +5 -13
- package/dist/{row-group-icon-D8JA6sh9.js → row-group-icon-DFUMye0v.js} +6 -2
- package/dist/{select-DsanEUFk.js → select-CXCphiS3.js} +1 -1
- package/dist/sort-manager.js +1 -1
- package/package.json +15 -15
package/dist/column-manager.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { IsoResizeObserver, getPreciseElementDimensions, clsx } from "@1771technologies/js-utils";
|
|
3
|
-
import { u as useDragStore, a as useDrag, C as Checkbox, I as Input, D as DragProvider } from "./drag-store-
|
|
3
|
+
import { u as useDragStore, a as useDrag, C as Checkbox, I as Input, D as DragProvider } from "./drag-store-C056Fm0B.js";
|
|
4
4
|
import "@1771technologies/react-sizer";
|
|
5
5
|
import { useCombinedRefs, useEvent } from "@1771technologies/react-utils";
|
|
6
6
|
import "@1771technologies/grid-provider";
|
|
@@ -8,10 +8,10 @@ import { useRef, useState, useEffect, useCallback, useMemo, createContext, useCo
|
|
|
8
8
|
import "@1771technologies/react-dragon";
|
|
9
9
|
import "@1771technologies/grid-core";
|
|
10
10
|
import { c as useGrid, G as GridProvider } from "./useScrollLock-D4UY33Sb.js";
|
|
11
|
-
import { g as useEdgeScroll, h as useDraggable, c as canAgg, a as canMeasure, f as useDroppable, u as useAggregationSource, b as useMeasuresSource, d as useRowGroupsSource, e as useColumnPivotSource, P as Pill, M as MenuTrigger, i as PillManagerAggMenu, j as PillManagerMeasureMenu } from "./pill-
|
|
11
|
+
import { g as useEdgeScroll, h as useDraggable, c as canAgg, a as canMeasure, f as useDroppable, u as useAggregationSource, b as useMeasuresSource, d as useRowGroupsSource, e as useColumnPivotSource, P as Pill, M as MenuTrigger, i as PillManagerAggMenu, j as PillManagerMeasureMenu } from "./pill-0vXb9g1m.js";
|
|
12
12
|
import { A as ArrowRightIcon } from "./tickmark-icon-CoogRMoO.js";
|
|
13
13
|
import { A as ArrowDownIcon } from "./arrow-down-icon-B-3ldODD.js";
|
|
14
|
-
import { D as DragIcon, M as MeasuresIcon, C as ColumnPivotIcon, R as RowGroupIcon } from "./row-group-icon-
|
|
14
|
+
import { D as DragIcon, M as MeasuresIcon, C as ColumnPivotIcon, R as RowGroupIcon } from "./row-group-icon-DFUMye0v.js";
|
|
15
15
|
import { createPortal } from "react-dom";
|
|
16
16
|
import { D as DragGroupIcon, S as SearchIcon } from "./search-icon-CcG1lqsn.js";
|
|
17
17
|
import { S as Separator } from "./separator-BnPPeAk8.js";
|
|
@@ -678,7 +678,7 @@ const ColumnManagerTreeItem = forwardRef(function TreeItem({ className, depthPad
|
|
|
678
678
|
const ids = ci.data.type === "leaf" ? [ci.data.data.id] : allLeafs(ci.data).map((c) => c.id);
|
|
679
679
|
return { target: "columns", ids, isGroup: ci.data.type === "parent" };
|
|
680
680
|
}, [ci.data]);
|
|
681
|
-
const {
|
|
681
|
+
const { setDrag } = useDraggable({
|
|
682
682
|
id: ci.data.type === "leaf" ? ci.data.data.id : ci.data.occurrence,
|
|
683
683
|
getData: () => {
|
|
684
684
|
const columns2 = ci.data.type === "leaf" ? [ci.data.data] : allLeafs(ci.data);
|
|
@@ -772,7 +772,7 @@ const ColumnManagerTreeItem = forwardRef(function TreeItem({ className, depthPad
|
|
|
772
772
|
children: [
|
|
773
773
|
canDrop && yHalf === "top" && /* @__PURE__ */ jsx("div", { className: "lng1771-column-manager__tree-item-drop-indicator-top" }),
|
|
774
774
|
canDrop && yHalf === "bottom" && /* @__PURE__ */ jsx("div", { className: "lng1771-column-manager__tree-item-drop-indicator-bottom" }),
|
|
775
|
-
/* @__PURE__ */ jsx(DragIcon, { width: 16, height: 16,
|
|
775
|
+
/* @__PURE__ */ jsx(DragIcon, { width: 16, height: 16, dragRef: setDrag }),
|
|
776
776
|
/* @__PURE__ */ jsx(
|
|
777
777
|
Checkbox,
|
|
778
778
|
{
|
|
@@ -823,7 +823,7 @@ const ColumnManagerTreeItem = forwardRef(function TreeItem({ className, depthPad
|
|
|
823
823
|
children: ci.expanded ? /* @__PURE__ */ jsx(ArrowDownIcon, { width: 16, height: 16, id }) : /* @__PURE__ */ jsx(ArrowRightIcon, { id, width: 16, height: 16 })
|
|
824
824
|
}
|
|
825
825
|
),
|
|
826
|
-
/* @__PURE__ */ jsx(DragIcon, { width: 16, height: 16,
|
|
826
|
+
/* @__PURE__ */ jsx(DragIcon, { width: 16, height: 16, dragRef: setDrag }),
|
|
827
827
|
/* @__PURE__ */ jsx(
|
|
828
828
|
Checkbox,
|
|
829
829
|
{
|
|
@@ -1099,9 +1099,9 @@ function DragHandle({
|
|
|
1099
1099
|
item,
|
|
1100
1100
|
setIsDragging
|
|
1101
1101
|
}) {
|
|
1102
|
-
const {
|
|
1102
|
+
const { setDrag, isActive } = useDraggable({
|
|
1103
1103
|
id: item.label,
|
|
1104
|
-
getTags: () => item.dragTags,
|
|
1104
|
+
getTags: () => item.dragTags.filter((c) => c !== "columns"),
|
|
1105
1105
|
getData: () => item?.dragData,
|
|
1106
1106
|
onDragStart: () => {
|
|
1107
1107
|
document.body.classList.add("lng1771-drag-on");
|
|
@@ -1117,15 +1117,7 @@ function DragHandle({
|
|
|
1117
1117
|
useEffect(() => {
|
|
1118
1118
|
setIsDragging(isActive);
|
|
1119
1119
|
}, [isActive, setIsDragging]);
|
|
1120
|
-
return /* @__PURE__ */ jsx(
|
|
1121
|
-
"button",
|
|
1122
|
-
{
|
|
1123
|
-
tabIndex: -1,
|
|
1124
|
-
className: "lng1771-column-manager__pill-dragger",
|
|
1125
|
-
onPointerDown,
|
|
1126
|
-
children: /* @__PURE__ */ jsx(DragIcon, { width: 16, height: 16 })
|
|
1127
|
-
}
|
|
1128
|
-
);
|
|
1120
|
+
return /* @__PURE__ */ jsx("button", { tabIndex: -1, className: "lng1771-column-manager__pill-dragger", ref: setDrag, children: /* @__PURE__ */ jsx(DragIcon, { width: 16, height: 16 }) });
|
|
1129
1121
|
}
|
|
1130
1122
|
const ColumnManagerSearch = forwardRef(function ColumnManagerSearch2({ className, ...props }, ref) {
|
|
1131
1123
|
const { query, setQuery } = useColumnManagerState();
|
|
@@ -633,6 +633,18 @@ function useCellEvents(api, column, row, rowIndex, columnIndex) {
|
|
|
633
633
|
api.getState().internal.hoveredRow.set(null);
|
|
634
634
|
api.getState().internal.hoveredCol.set(null);
|
|
635
635
|
});
|
|
636
|
+
const onKeyDown = useEvent((event) => {
|
|
637
|
+
const sx = api.getState();
|
|
638
|
+
const mode = sx.rowSelectionMode.peek();
|
|
639
|
+
if (mode !== "none") {
|
|
640
|
+
if (event.key === " ") {
|
|
641
|
+
const x = sx.rowSelectionSelectedIds.peek();
|
|
642
|
+
if (x.has(row.id)) api.rowSelectionDeselect([row.id]);
|
|
643
|
+
else api.rowSelectionSelect([row.id]);
|
|
644
|
+
event.preventDefault();
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
});
|
|
636
648
|
const onClick = useEvent((event) => {
|
|
637
649
|
handleRowSelection(
|
|
638
650
|
api,
|
|
@@ -653,7 +665,7 @@ function useCellEvents(api, column, row, rowIndex, columnIndex) {
|
|
|
653
665
|
"double-click"
|
|
654
666
|
);
|
|
655
667
|
});
|
|
656
|
-
return { onClick, onDoubleClick, onPointerEnter, onPointerLeave };
|
|
668
|
+
return { onClick, onDoubleClick, onPointerEnter, onPointerLeave, onKeyDown };
|
|
657
669
|
}
|
|
658
670
|
function useCellPositionChange(api, rowIndex, columnIndex, rowSpan, columnSpan) {
|
|
659
671
|
const ref = useRef(null);
|
package/dist/filter-manager.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect, useCallback, createContext, useContext, useMemo, forwardRef } from "react";
|
|
3
3
|
import { c as useGrid, G as GridProvider } from "./useScrollLock-D4UY33Sb.js";
|
|
4
|
-
import { S as Select } from "./select-
|
|
5
|
-
import { I as Input, C as Checkbox } from "./drag-store-
|
|
4
|
+
import { S as Select } from "./select-CXCphiS3.js";
|
|
5
|
+
import { I as Input, C as Checkbox } from "./drag-store-C056Fm0B.js";
|
|
6
6
|
import "@1771technologies/react-sizer";
|
|
7
7
|
import "@1771technologies/react-utils";
|
|
8
8
|
import "@1771technologies/grid-provider";
|
|
@@ -100,7 +100,7 @@ function useInFilter(api, column) {
|
|
|
100
100
|
useEffect(() => {
|
|
101
101
|
setValues(() => {
|
|
102
102
|
const filter = filters[column.id]?.set;
|
|
103
|
-
if (!filter) return null;
|
|
103
|
+
if (!filter || !filter.set.size) return null;
|
|
104
104
|
return new Set(filter ? new Set(filter.set) : null);
|
|
105
105
|
});
|
|
106
106
|
}, [column.id, filters]);
|
|
@@ -606,7 +606,7 @@ const FilterManagerApplyButton = forwardRef(function FilterManagerApplyButton2({
|
|
|
606
606
|
newFilters[column.id] ??= {};
|
|
607
607
|
newFilters[column.id].simple = combined;
|
|
608
608
|
}
|
|
609
|
-
if (inFilterValue) {
|
|
609
|
+
if (inFilterValue || filters[column.id]?.set) {
|
|
610
610
|
newFilters[column.id] ??= {};
|
|
611
611
|
newFilters[column.id].set = inFilterValue?.size ? {
|
|
612
612
|
columnId: column.id,
|
package/dist/icons.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { A, T } from "./tickmark-icon-CoogRMoO.js";
|
|
3
3
|
import { A as A2 } from "./arrow-down-icon-B-3ldODD.js";
|
|
4
|
-
import { C, D, M, R } from "./row-group-icon-
|
|
4
|
+
import { C, D, M, R } from "./row-group-icon-DFUMye0v.js";
|
|
5
5
|
import { C as C2 } from "./cross-icon-CEMLAlFX.js";
|
|
6
6
|
import { D as D2, S } from "./search-icon-CcG1lqsn.js";
|
|
7
7
|
import { C as C3, E, M as M2 } from "./manage-columns-icon-D4CElo5H.js";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Checkbox, d as COLUMN_MARKER_ID, H as HEADER_CELL_POSITION, g as getTransform, e as COLUMN_EMPTY_PREFIX, f as HEADER_GROUP_CELL_POSITION, h as CollapseButton, F as FLOATING_CELL_POSITION, i as FULL_ENCODING, j as CellFullWidth, E as END_ENCODING, k as Cell, I as Input, G as GRID_CELL_POSITION, l as GridButton } from "./drag-store-
|
|
2
|
-
import { t, n, v, w, B, J, L, K, M, q, p, r, s, P, x, o, z, m, y, R, A } from "./drag-store-
|
|
1
|
+
import { C as Checkbox, d as COLUMN_MARKER_ID, H as HEADER_CELL_POSITION, g as getTransform, e as COLUMN_EMPTY_PREFIX, f as HEADER_GROUP_CELL_POSITION, h as CollapseButton, F as FLOATING_CELL_POSITION, i as FULL_ENCODING, j as CellFullWidth, E as END_ENCODING, k as Cell, I as Input, G as GRID_CELL_POSITION, l as GridButton } from "./drag-store-C056Fm0B.js";
|
|
2
|
+
import { t, n, v, w, B, J, L, K, M, q, p, r, s, P, x, o, z, m, y, R, A } from "./drag-store-C056Fm0B.js";
|
|
3
3
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
4
4
|
import { Sizer } from "@1771technologies/react-sizer";
|
|
5
5
|
import { useEvent, useIsoEffect } from "@1771technologies/react-utils";
|
package/dist/lytenyte-pro.css
CHANGED
|
@@ -1037,7 +1037,7 @@ body.lng1771-drag-on .lng1771-pill-manager__pill-outer[data-pill-active="false"]
|
|
|
1037
1037
|
box-shadow:
|
|
1038
1038
|
0px 14px 18px -6px rgba(30, 30, 41, 0.07),
|
|
1039
1039
|
0px 3px 13px 0px rgba(30, 30, 41, 0.1);
|
|
1040
|
-
width: var(--anchor-width);
|
|
1040
|
+
min-width: var(--anchor-width);
|
|
1041
1041
|
|
|
1042
1042
|
&:focus {
|
|
1043
1043
|
outline: none;
|
|
@@ -1066,6 +1066,7 @@ body.lng1771-drag-on .lng1771-pill-manager__pill-outer[data-pill-active="false"]
|
|
|
1066
1066
|
height: 28px;
|
|
1067
1067
|
justify-content: space-between;
|
|
1068
1068
|
border-radius: 6px;
|
|
1069
|
+
white-space: nowrap;
|
|
1069
1070
|
|
|
1070
1071
|
&:hover {
|
|
1071
1072
|
background-color: var(--lng1771-gray-30);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { useRef, useState,
|
|
3
|
-
import { u as useDragStore, b as useStore } from "./drag-store-
|
|
2
|
+
import { useRef, useState, useEffect, useCallback, useMemo, forwardRef } from "react";
|
|
3
|
+
import { u as useDragStore, b as useStore } from "./drag-store-C056Fm0B.js";
|
|
4
4
|
import { arrayOverlap, clsx } from "@1771technologies/js-utils";
|
|
5
5
|
import { m as mergeProps, E as contains, P as PropTypes } from "./proptypes-BjYr2nFr.js";
|
|
6
6
|
import { u as useButton } from "./useButton-DWXzFgcr.js";
|
|
@@ -101,107 +101,133 @@ function useDraggable({
|
|
|
101
101
|
const hasDragStartedRef = useRef(false);
|
|
102
102
|
const [isActive, setIsActive] = useState(false);
|
|
103
103
|
const store = useDragStore();
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
(
|
|
121
|
-
|
|
122
|
-
const
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
c.abort();
|
|
171
|
-
setTimeout(() => globalThis.removeEventListener("click", clickFix, { capture: true }));
|
|
172
|
-
if (!hasDragStartedRef.current) return;
|
|
173
|
-
if (ev2.key === "Escape") {
|
|
174
|
-
ev2.preventDefault();
|
|
175
|
-
ev2.stopPropagation();
|
|
176
|
-
const s = store.getState().active;
|
|
177
|
-
endDrag(s.x, s.y, true);
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
{ signal: c.signal, capture: true }
|
|
181
|
-
);
|
|
182
|
-
function endDrag(x, y, isCancel = false) {
|
|
183
|
-
const s = store.getState();
|
|
184
|
-
setIsActive(false);
|
|
185
|
-
const next = computeActiveDrag(
|
|
186
|
-
s.mounted,
|
|
187
|
-
s.active.tags,
|
|
188
|
-
s.active.data,
|
|
189
|
-
s.active.id,
|
|
190
|
-
x,
|
|
191
|
-
y
|
|
104
|
+
const [drag, setDrag] = useState(null);
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
if (!drag) return;
|
|
107
|
+
const c = new AbortController();
|
|
108
|
+
drag.addEventListener(
|
|
109
|
+
"touchstart",
|
|
110
|
+
(ev) => {
|
|
111
|
+
ev.preventDefault();
|
|
112
|
+
},
|
|
113
|
+
{ passive: false, signal: c.signal }
|
|
114
|
+
);
|
|
115
|
+
drag.addEventListener(
|
|
116
|
+
"pointerdown",
|
|
117
|
+
(ev) => {
|
|
118
|
+
const startX = ev.clientX;
|
|
119
|
+
const startY = ev.clientY;
|
|
120
|
+
if (ev.pointerType === "touch") {
|
|
121
|
+
hasDragStartedRef.current = true;
|
|
122
|
+
const data = getData();
|
|
123
|
+
const tags = getTags();
|
|
124
|
+
const s = store.getState();
|
|
125
|
+
const next = computeActiveDrag(s.mounted, tags, data, id, startX, startY);
|
|
126
|
+
store.setState({ active: next });
|
|
127
|
+
onDragStart?.(next);
|
|
128
|
+
setIsActive(true);
|
|
129
|
+
ev.stopPropagation();
|
|
130
|
+
ev.preventDefault();
|
|
131
|
+
}
|
|
132
|
+
if (ev.pointerType === "mouse" && ev.button !== 0) return;
|
|
133
|
+
const c2 = new AbortController();
|
|
134
|
+
let anim = null;
|
|
135
|
+
const clickFix = (ev2) => {
|
|
136
|
+
ev2.preventDefault();
|
|
137
|
+
ev2.stopPropagation();
|
|
138
|
+
ev2.stopImmediatePropagation();
|
|
139
|
+
globalThis.removeEventListener("click", clickFix, { capture: true });
|
|
140
|
+
};
|
|
141
|
+
globalThis.addEventListener("click", clickFix, { capture: true });
|
|
142
|
+
document.addEventListener(
|
|
143
|
+
"pointermove",
|
|
144
|
+
(ev2) => {
|
|
145
|
+
if (!hasDragStartedRef.current && !shouldDragStart(ev2, startX, startY)) return;
|
|
146
|
+
const x = ev2.clientX;
|
|
147
|
+
const y = ev2.clientY;
|
|
148
|
+
if (!hasDragStartedRef.current) {
|
|
149
|
+
hasDragStartedRef.current = true;
|
|
150
|
+
const data = getData();
|
|
151
|
+
const tags = getTags();
|
|
152
|
+
const s = store.getState();
|
|
153
|
+
const next = computeActiveDrag(s.mounted, tags, data, id, x, y);
|
|
154
|
+
store.setState({ active: next });
|
|
155
|
+
onDragStart?.(next);
|
|
156
|
+
setIsActive(true);
|
|
157
|
+
}
|
|
158
|
+
if (anim) return;
|
|
159
|
+
anim = requestAnimationFrame(() => {
|
|
160
|
+
const s = store.getState();
|
|
161
|
+
const data = s.active.data;
|
|
162
|
+
const tags = s.active.tags;
|
|
163
|
+
const next = computeActiveDrag(s.mounted, tags, data, id, x, y);
|
|
164
|
+
store.setState({ active: next });
|
|
165
|
+
onDragMove?.(next);
|
|
166
|
+
anim = null;
|
|
167
|
+
});
|
|
168
|
+
},
|
|
169
|
+
{ signal: c2.signal }
|
|
192
170
|
);
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
171
|
+
document.addEventListener(
|
|
172
|
+
"pointerup",
|
|
173
|
+
(ev2) => {
|
|
174
|
+
c2.abort();
|
|
175
|
+
setTimeout(() => globalThis.removeEventListener("click", clickFix, { capture: true }));
|
|
176
|
+
if (!hasDragStartedRef.current) return;
|
|
177
|
+
endDrag(ev2.clientX, ev2.clientY);
|
|
178
|
+
},
|
|
179
|
+
{ signal: c2.signal, capture: true }
|
|
180
|
+
);
|
|
181
|
+
document.addEventListener(
|
|
182
|
+
"pointercancel",
|
|
183
|
+
(ev2) => {
|
|
184
|
+
c2.abort();
|
|
185
|
+
setTimeout(() => globalThis.removeEventListener("click", clickFix, { capture: true }));
|
|
186
|
+
if (!hasDragStartedRef.current) return;
|
|
187
|
+
endDrag(ev2.clientX, ev2.clientY, true);
|
|
188
|
+
},
|
|
189
|
+
{ signal: c2.signal }
|
|
190
|
+
);
|
|
191
|
+
document.addEventListener(
|
|
192
|
+
"keydown",
|
|
193
|
+
(ev2) => {
|
|
194
|
+
c2.abort();
|
|
195
|
+
setTimeout(() => globalThis.removeEventListener("click", clickFix, { capture: true }));
|
|
196
|
+
if (!hasDragStartedRef.current) return;
|
|
197
|
+
if (ev2.key === "Escape") {
|
|
198
|
+
ev2.preventDefault();
|
|
199
|
+
ev2.stopPropagation();
|
|
200
|
+
const s = store.getState().active;
|
|
201
|
+
endDrag(s.x, s.y, true);
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{ signal: c2.signal, capture: true }
|
|
205
|
+
);
|
|
206
|
+
function endDrag(x, y, isCancel = false) {
|
|
207
|
+
const s = store.getState();
|
|
208
|
+
setIsActive(false);
|
|
209
|
+
const next = computeActiveDrag(
|
|
210
|
+
s.mounted,
|
|
211
|
+
s.active.tags,
|
|
212
|
+
s.active.data,
|
|
213
|
+
s.active.id,
|
|
214
|
+
x,
|
|
215
|
+
y
|
|
216
|
+
);
|
|
217
|
+
if (isCancel) {
|
|
218
|
+
onDragCancel?.(next);
|
|
219
|
+
} else {
|
|
220
|
+
onDragEnd?.(next);
|
|
221
|
+
}
|
|
222
|
+
hasDragStartedRef.current = false;
|
|
223
|
+
store.setState({ active: null });
|
|
197
224
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
return { onPointerDown, isActive };
|
|
225
|
+
},
|
|
226
|
+
{ passive: false, signal: c.signal }
|
|
227
|
+
);
|
|
228
|
+
return () => c.abort();
|
|
229
|
+
}, [drag, getData, getTags, id, onDragCancel, onDragEnd, onDragMove, onDragStart, store]);
|
|
230
|
+
return { setDrag, isActive };
|
|
205
231
|
}
|
|
206
232
|
function shouldDragStart(ev, startX, startY) {
|
|
207
233
|
const deltaY = Math.abs(ev.clientY - startY);
|
package/dist/pill-manager.js
CHANGED
|
@@ -3,13 +3,13 @@ import { c as useGrid, G as GridProvider } from "./useScrollLock-D4UY33Sb.js";
|
|
|
3
3
|
import { useMemo, createContext, useState, useContext, forwardRef, useEffect, useCallback } from "react";
|
|
4
4
|
import { clsx } from "@1771technologies/js-utils";
|
|
5
5
|
import { useDroppable as useDroppable$1 } from "@1771technologies/react-dragon";
|
|
6
|
-
import { c as canAgg, a as canMeasure, u as useAggregationSource, b as useMeasuresSource, d as useRowGroupsSource, e as useColumnPivotSource, f as useDroppable, g as useEdgeScroll, P as Pill, M as MenuTrigger, h as useDraggable, i as PillManagerAggMenu, j as PillManagerMeasureMenu } from "./pill-
|
|
7
|
-
import { u as useDragStore, a as useDrag, D as DragProvider } from "./drag-store-
|
|
6
|
+
import { c as canAgg, a as canMeasure, u as useAggregationSource, b as useMeasuresSource, d as useRowGroupsSource, e as useColumnPivotSource, f as useDroppable, g as useEdgeScroll, P as Pill, M as MenuTrigger, h as useDraggable, i as PillManagerAggMenu, j as PillManagerMeasureMenu } from "./pill-0vXb9g1m.js";
|
|
7
|
+
import { u as useDragStore, a as useDrag, D as DragProvider } from "./drag-store-C056Fm0B.js";
|
|
8
8
|
import "@1771technologies/react-sizer";
|
|
9
9
|
import { useCombinedRefs } from "@1771technologies/react-utils";
|
|
10
10
|
import "@1771technologies/grid-provider";
|
|
11
11
|
import "@1771technologies/grid-core";
|
|
12
|
-
import { D as DragIcon, M as MeasuresIcon, C as ColumnPivotIcon, R as RowGroupIcon } from "./row-group-icon-
|
|
12
|
+
import { D as DragIcon, M as MeasuresIcon, C as ColumnPivotIcon, R as RowGroupIcon } from "./row-group-icon-DFUMye0v.js";
|
|
13
13
|
import { M as MoreDotsIcon } from "./more-dots-icon-CzAH3xHG.js";
|
|
14
14
|
import { M as MenuRoot, a as MenuPortal } from "./column-menu-driver-cG-EZgLa.js";
|
|
15
15
|
import { M as MenuPositioner } from "./menu-DvnPbFP7.js";
|
|
@@ -389,7 +389,7 @@ function DragHandle({
|
|
|
389
389
|
item,
|
|
390
390
|
setIsDragging
|
|
391
391
|
}) {
|
|
392
|
-
const {
|
|
392
|
+
const { setDrag, isActive } = useDraggable({
|
|
393
393
|
id: item.label,
|
|
394
394
|
getTags: () => item.dragTags,
|
|
395
395
|
getData: () => item?.dragData,
|
|
@@ -407,15 +407,7 @@ function DragHandle({
|
|
|
407
407
|
useEffect(() => {
|
|
408
408
|
setIsDragging(isActive);
|
|
409
409
|
}, [isActive, setIsDragging]);
|
|
410
|
-
return /* @__PURE__ */ jsx(
|
|
411
|
-
"button",
|
|
412
|
-
{
|
|
413
|
-
tabIndex: -1,
|
|
414
|
-
className: "lng1771-pill-manager__pill-dragger",
|
|
415
|
-
onPointerDown,
|
|
416
|
-
children: /* @__PURE__ */ jsx(DragIcon, { width: 16, height: 16 })
|
|
417
|
-
}
|
|
418
|
-
);
|
|
410
|
+
return /* @__PURE__ */ jsx("button", { tabIndex: -1, className: "lng1771-pill-manager__pill-dragger", ref: setDrag, children: /* @__PURE__ */ jsx(DragIcon, { width: 16, height: 16 }) });
|
|
419
411
|
}
|
|
420
412
|
const PillManagerRowLabel = forwardRef(
|
|
421
413
|
function PillManagerRowLabel2(props, ref) {
|
|
@@ -64,7 +64,10 @@ const ColumnPivotIcon = (props) => {
|
|
|
64
64
|
}
|
|
65
65
|
);
|
|
66
66
|
};
|
|
67
|
-
|
|
67
|
+
const DragIcon = ({
|
|
68
|
+
dragRef,
|
|
69
|
+
...props
|
|
70
|
+
}) => {
|
|
68
71
|
return /* @__PURE__ */ jsx(
|
|
69
72
|
"svg",
|
|
70
73
|
{
|
|
@@ -74,6 +77,7 @@ function DragIcon(props) {
|
|
|
74
77
|
fill: "none",
|
|
75
78
|
xmlns: "http://www.w3.org/2000/svg",
|
|
76
79
|
...props,
|
|
80
|
+
ref: dragRef,
|
|
77
81
|
children: /* @__PURE__ */ jsx(
|
|
78
82
|
"path",
|
|
79
83
|
{
|
|
@@ -85,7 +89,7 @@ function DragIcon(props) {
|
|
|
85
89
|
)
|
|
86
90
|
}
|
|
87
91
|
);
|
|
88
|
-
}
|
|
92
|
+
};
|
|
89
93
|
const MeasuresIcon = (props) => {
|
|
90
94
|
return /* @__PURE__ */ jsx(
|
|
91
95
|
"svg",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { clsx } from "@1771technologies/js-utils";
|
|
3
3
|
import { A as ArrowDownIcon } from "./arrow-down-icon-B-3ldODD.js";
|
|
4
|
-
import { c as CheckMark } from "./drag-store-
|
|
4
|
+
import { c as CheckMark } from "./drag-store-C056Fm0B.js";
|
|
5
5
|
import "@1771technologies/react-sizer";
|
|
6
6
|
import "@1771technologies/react-utils";
|
|
7
7
|
import "@1771technologies/grid-provider";
|
package/dist/sort-manager.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useMemo, useState, useEffect, createContext, useContext, forwardRef } from "react";
|
|
3
3
|
import { c as useGrid, G as GridProvider } from "./useScrollLock-D4UY33Sb.js";
|
|
4
4
|
import { clsx } from "@1771technologies/js-utils";
|
|
5
|
-
import { S as Select } from "./select-
|
|
5
|
+
import { S as Select } from "./select-CXCphiS3.js";
|
|
6
6
|
import { P as PlusIcon } from "./plus-icon-ToqW5CC-.js";
|
|
7
7
|
import { C as CrossIcon } from "./cross-icon-CEMLAlFX.js";
|
|
8
8
|
import { S as Separator } from "./separator-BnPPeAk8.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1771technologies/lytenyte-pro",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.50",
|
|
4
4
|
"license": "COMMERCIAL",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -70,20 +70,20 @@
|
|
|
70
70
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@1771technologies/grid-client-data-source-pro": "0.0.
|
|
74
|
-
"@1771technologies/grid-core": "0.0.
|
|
75
|
-
"@1771technologies/grid-design": "0.0.
|
|
76
|
-
"@1771technologies/grid-provider": "0.0.
|
|
77
|
-
"@1771technologies/grid-store-pro": "0.0.
|
|
78
|
-
"@1771technologies/grid-tree-data-source": "0.0.
|
|
79
|
-
"@1771technologies/grid-types": "0.0.
|
|
80
|
-
"@1771technologies/js-utils": "0.0.
|
|
81
|
-
"@1771technologies/lytenyte-core": "0.0.
|
|
82
|
-
"@1771technologies/react-cascada": "0.0.
|
|
83
|
-
"@1771technologies/react-dragon": "0.0.
|
|
84
|
-
"@1771technologies/react-sizer": "0.0.
|
|
85
|
-
"@1771technologies/react-split-pane": "0.0.
|
|
86
|
-
"@1771technologies/react-utils": "0.0.
|
|
73
|
+
"@1771technologies/grid-client-data-source-pro": "0.0.50",
|
|
74
|
+
"@1771technologies/grid-core": "0.0.50",
|
|
75
|
+
"@1771technologies/grid-design": "0.0.50",
|
|
76
|
+
"@1771technologies/grid-provider": "0.0.50",
|
|
77
|
+
"@1771technologies/grid-store-pro": "0.0.50",
|
|
78
|
+
"@1771technologies/grid-tree-data-source": "0.0.50",
|
|
79
|
+
"@1771technologies/grid-types": "0.0.50",
|
|
80
|
+
"@1771technologies/js-utils": "0.0.50",
|
|
81
|
+
"@1771technologies/lytenyte-core": "0.0.50",
|
|
82
|
+
"@1771technologies/react-cascada": "0.0.50",
|
|
83
|
+
"@1771technologies/react-dragon": "0.0.50",
|
|
84
|
+
"@1771technologies/react-sizer": "0.0.50",
|
|
85
|
+
"@1771technologies/react-split-pane": "0.0.50",
|
|
86
|
+
"@1771technologies/react-utils": "0.0.50",
|
|
87
87
|
"@base-ui-components/react": "1.0.0-alpha.7"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|