@1771technologies/lytenyte-pro 0.0.46 → 0.0.48
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 +1 -16
- package/dist/filter-manager.js +1 -1
- package/dist/index.js +40 -7
- package/dist/lytenyte-pro.css +41 -16
- package/dist/{select-qluHi8ET.js → select-CN-kFW8a.js} +33 -8
- package/dist/separator-BnPPeAk8.js +21 -0
- package/dist/sort-manager.js +19 -9
- package/dist/types/select/select.d.ts +10 -1
- package/dist/types/sort-manager/sort-column-select.d.ts +3 -2
- package/dist/types/sort-manager/sort-direction-select.d.ts +3 -2
- package/dist/types/sort-manager/sort-manager-impl.d.ts +8 -6
- package/dist/types/sort-manager/sort-sort-select.d.ts +3 -2
- package/package.json +15 -15
package/dist/column-manager.js
CHANGED
|
@@ -14,6 +14,7 @@ import { A as ArrowDownIcon } from "./arrow-down-icon-B-3ldODD.js";
|
|
|
14
14
|
import { D as DragIcon, M as MeasuresIcon, C as ColumnPivotIcon, R as RowGroupIcon } from "./row-group-icon-D8JA6sh9.js";
|
|
15
15
|
import { createPortal } from "react-dom";
|
|
16
16
|
import { D as DragGroupIcon, S as SearchIcon } from "./search-icon-CcG1lqsn.js";
|
|
17
|
+
import { S as Separator } from "./separator-BnPPeAk8.js";
|
|
17
18
|
import { M as MoreDotsIcon } from "./more-dots-icon-CzAH3xHG.js";
|
|
18
19
|
import { C as CrossIcon } from "./cross-icon-CEMLAlFX.js";
|
|
19
20
|
import { M as MenuRoot, a as MenuPortal } from "./column-menu-driver-cG-EZgLa.js";
|
|
@@ -1019,22 +1020,6 @@ function EmtpyDefault({ source }) {
|
|
|
1019
1020
|
/* @__PURE__ */ jsx("div", { className: "lng1771-column-manager__empty-default-label", children: label })
|
|
1020
1021
|
] });
|
|
1021
1022
|
}
|
|
1022
|
-
function Separator(props) {
|
|
1023
|
-
return /* @__PURE__ */ jsx(
|
|
1024
|
-
"div",
|
|
1025
|
-
{
|
|
1026
|
-
role: "separator",
|
|
1027
|
-
"aria-orientation": props.dir,
|
|
1028
|
-
className: clsx(
|
|
1029
|
-
props.dir === "horizontal" && "lng1771-separator--horizontal",
|
|
1030
|
-
props.dir === "vertical" && "lng1771-separator--vertical",
|
|
1031
|
-
props.soft && "lng1771-separator--soft",
|
|
1032
|
-
props.className
|
|
1033
|
-
),
|
|
1034
|
-
style: props.style
|
|
1035
|
-
}
|
|
1036
|
-
);
|
|
1037
|
-
}
|
|
1038
1023
|
const context = createContext({});
|
|
1039
1024
|
const useComponents = () => useContext(context);
|
|
1040
1025
|
const ColumnMangerContextProvider = context.Provider;
|
package/dist/filter-manager.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
4
|
+
import { S as Select } from "./select-CN-kFW8a.js";
|
|
5
5
|
import { I as Input, C as Checkbox } from "./drag-store-CO3z13Ju.js";
|
|
6
6
|
import "@1771technologies/react-sizer";
|
|
7
7
|
import "@1771technologies/react-utils";
|
package/dist/index.js
CHANGED
|
@@ -2743,7 +2743,25 @@ function GridFrame({
|
|
|
2743
2743
|
const frames = state.panelFrames.use();
|
|
2744
2744
|
const openId = state.internal.panelFrameOpen.use();
|
|
2745
2745
|
const frame = openId ? frames[openId] : null;
|
|
2746
|
+
const [width, setWidth] = useState(500);
|
|
2746
2747
|
const [frameSplit, setFrameSplit] = useState(70);
|
|
2748
|
+
useEffect(() => {
|
|
2749
|
+
if (width < 500) {
|
|
2750
|
+
setFrameSplit(1);
|
|
2751
|
+
return;
|
|
2752
|
+
}
|
|
2753
|
+
setFrameSplit(70);
|
|
2754
|
+
}, [width]);
|
|
2755
|
+
const [el, setEl] = useState(null);
|
|
2756
|
+
useEffect(() => {
|
|
2757
|
+
if (!el) return;
|
|
2758
|
+
const re = new ResizeObserver(() => {
|
|
2759
|
+
setWidth(el.clientWidth);
|
|
2760
|
+
api.panelFrameClose();
|
|
2761
|
+
});
|
|
2762
|
+
re.observe(el);
|
|
2763
|
+
return () => re.disconnect();
|
|
2764
|
+
}, [api, el]);
|
|
2747
2765
|
const template = useMemo(() => {
|
|
2748
2766
|
const f = ["1fr"];
|
|
2749
2767
|
if (buttons.length) f.push("32px");
|
|
@@ -2756,6 +2774,7 @@ function GridFrame({
|
|
|
2756
2774
|
"data-cell-selection-enabled": cellSelectionEnabled ? true : void 0,
|
|
2757
2775
|
className: "lng1771-grid-frame",
|
|
2758
2776
|
style: { gridTemplateColumns: template },
|
|
2777
|
+
ref: setEl,
|
|
2759
2778
|
children: [
|
|
2760
2779
|
frame ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
2761
2780
|
SplitPane,
|
|
@@ -2763,11 +2782,22 @@ function GridFrame({
|
|
|
2763
2782
|
axe: axe ?? splitPaneAxe,
|
|
2764
2783
|
orientation: "vertical",
|
|
2765
2784
|
primary: /* @__PURE__ */ jsx("div", { className: "lng1771-grid-frame__grid-area", children }),
|
|
2766
|
-
secondary: /* @__PURE__ */ jsx(Sizer, { className: "lng1771-grid-frame__open-panel", children: /* @__PURE__ */ jsx(
|
|
2785
|
+
secondary: /* @__PURE__ */ jsx(Sizer, { className: "lng1771-grid-frame__open-panel", children: /* @__PURE__ */ jsx(
|
|
2786
|
+
frame.component,
|
|
2787
|
+
{
|
|
2788
|
+
api,
|
|
2789
|
+
frame,
|
|
2790
|
+
context: state.internal.panelFrameContext.peek()
|
|
2791
|
+
}
|
|
2792
|
+
) }),
|
|
2767
2793
|
split: frame ? frameSplit : 100,
|
|
2768
|
-
onSplitChange: (n2) =>
|
|
2769
|
-
|
|
2770
|
-
|
|
2794
|
+
onSplitChange: (n2) => {
|
|
2795
|
+
console.log("n");
|
|
2796
|
+
setFrameSplit(n2);
|
|
2797
|
+
},
|
|
2798
|
+
min: width < 500 ? 0 : 20,
|
|
2799
|
+
max: width < 500 ? 100 : 80,
|
|
2800
|
+
disabled: width < 500,
|
|
2771
2801
|
splitterClassName: "lng1771-grid-frame__open-panel--splitter"
|
|
2772
2802
|
}
|
|
2773
2803
|
) }) : /* @__PURE__ */ jsx("div", { children }),
|
|
@@ -3217,6 +3247,7 @@ function DialogDriver() {
|
|
|
3217
3247
|
const grid = useGrid$1();
|
|
3218
3248
|
const frames = grid.state.dialogFrames.use();
|
|
3219
3249
|
const frameId = grid.state.internal.dialogFrameOpen.use();
|
|
3250
|
+
const context2 = grid.state.internal.dialogFrameContext.use();
|
|
3220
3251
|
const frame = frameId ? frames[frameId] : null;
|
|
3221
3252
|
const [open, setOpen] = useState(false);
|
|
3222
3253
|
useEffect(() => {
|
|
@@ -3234,7 +3265,7 @@ function DialogDriver() {
|
|
|
3234
3265
|
onOpenChangeComplete: (c) => {
|
|
3235
3266
|
if (!c) grid.api.dialogFrameClose();
|
|
3236
3267
|
},
|
|
3237
|
-
children: /* @__PURE__ */ jsx(DialogPortal, { children: frame && /* @__PURE__ */ jsx(frame.component, { api: grid.api, frame }) })
|
|
3268
|
+
children: /* @__PURE__ */ jsx(DialogPortal, { children: frame && /* @__PURE__ */ jsx(frame.component, { api: grid.api, frame, context: context2 }) })
|
|
3238
3269
|
}
|
|
3239
3270
|
);
|
|
3240
3271
|
}
|
|
@@ -3535,6 +3566,7 @@ function PopoverDriver() {
|
|
|
3535
3566
|
const frames = grid.state.popoverFrames.use();
|
|
3536
3567
|
const frameId = grid.state.internal.popoverFrameOpen.use();
|
|
3537
3568
|
const frameBB = grid.state.internal.popoverFrameBB.use();
|
|
3569
|
+
const frameContext = grid.state.internal.popoverFrameContext.use();
|
|
3538
3570
|
const frame = frameId ? frames[frameId] : null;
|
|
3539
3571
|
const [open, setOpen] = useState(false);
|
|
3540
3572
|
useEffect(() => {
|
|
@@ -3552,7 +3584,7 @@ function PopoverDriver() {
|
|
|
3552
3584
|
onOpenChangeComplete: (c) => {
|
|
3553
3585
|
if (!c) grid.api.popoverFrameClose();
|
|
3554
3586
|
},
|
|
3555
|
-
children: /* @__PURE__ */ jsx(AnchorProvider, { anchor: frameBB, children: /* @__PURE__ */ jsx(PopoverPortal, { children: frame && frameBB && /* @__PURE__ */ jsx(frame.component, { api: grid.api, frame }) }) })
|
|
3587
|
+
children: /* @__PURE__ */ jsx(AnchorProvider, { anchor: frameBB, children: /* @__PURE__ */ jsx(PopoverPortal, { children: frame && frameBB && /* @__PURE__ */ jsx(frame.component, { api: grid.api, frame, context: frameContext }) }) })
|
|
3556
3588
|
}
|
|
3557
3589
|
);
|
|
3558
3590
|
}
|
|
@@ -3561,6 +3593,7 @@ function MenuFrameDriver() {
|
|
|
3561
3593
|
const frames = grid.state.menuFrames.use();
|
|
3562
3594
|
const frameId = grid.state.internal.menuFrameOpen.use();
|
|
3563
3595
|
const frameBB = grid.state.internal.menuFrameBB.use();
|
|
3596
|
+
const context2 = grid.state.internal.menuFrameContext.use();
|
|
3564
3597
|
const frame = frameId ? frames[frameId] : null;
|
|
3565
3598
|
const [open, setOpen] = useState(false);
|
|
3566
3599
|
useEffect(() => {
|
|
@@ -3578,7 +3611,7 @@ function MenuFrameDriver() {
|
|
|
3578
3611
|
onOpenChangeComplete: (c) => {
|
|
3579
3612
|
if (!c) grid.api.menuFrameClose();
|
|
3580
3613
|
},
|
|
3581
|
-
children: /* @__PURE__ */ jsx(AnchorProvider, { anchor: frameBB, children: /* @__PURE__ */ jsx(MenuPortal, { children: frame && frameBB && /* @__PURE__ */ jsx(frame.component, { api: grid.api, frame }) }) })
|
|
3614
|
+
children: /* @__PURE__ */ jsx(AnchorProvider, { anchor: frameBB, children: /* @__PURE__ */ jsx(MenuPortal, { children: frame && frameBB && /* @__PURE__ */ jsx(frame.component, { api: grid.api, frame, context: context2 }) }) })
|
|
3582
3615
|
}
|
|
3583
3616
|
);
|
|
3584
3617
|
}
|
package/dist/lytenyte-pro.css
CHANGED
|
@@ -546,6 +546,9 @@ INPUT
|
|
|
546
546
|
|
|
547
547
|
transition: opacity 150ms;
|
|
548
548
|
|
|
549
|
+
color: var(--lng1771-gray-80);
|
|
550
|
+
font-family: var(--lng1771-typeface);
|
|
551
|
+
|
|
549
552
|
&:focus {
|
|
550
553
|
outline: none;
|
|
551
554
|
}
|
|
@@ -836,6 +839,7 @@ body.lng1771-drag-on .lng1771-pill-manager__pill-outer[data-pill-active="false"]
|
|
|
836
839
|
position: fixed;
|
|
837
840
|
top: 0px;
|
|
838
841
|
left: 0px;
|
|
842
|
+
z-index: 100;
|
|
839
843
|
pointer-events: none;
|
|
840
844
|
}
|
|
841
845
|
|
|
@@ -944,6 +948,9 @@ body.lng1771-drag-on .lng1771-pill-manager__pill-outer[data-pill-active="false"]
|
|
|
944
948
|
position: fixed;
|
|
945
949
|
z-index: 100;
|
|
946
950
|
|
|
951
|
+
color: var(--lng1771-gray-80);
|
|
952
|
+
font-family: var(--lng1771-typeface);
|
|
953
|
+
|
|
947
954
|
top: 20%;
|
|
948
955
|
left: 50%;
|
|
949
956
|
transform: translate(-50%, -50%);
|
|
@@ -987,6 +994,9 @@ body.lng1771-drag-on .lng1771-pill-manager__pill-outer[data-pill-active="false"]
|
|
|
987
994
|
border-radius: 6px;
|
|
988
995
|
height: 28px;
|
|
989
996
|
|
|
997
|
+
color: var(--lng1771-gray-80);
|
|
998
|
+
font-family: var(--lng1771-typeface);
|
|
999
|
+
|
|
990
1000
|
&:hover {
|
|
991
1001
|
background-color: var(--lng1771-gray-05);
|
|
992
1002
|
}
|
|
@@ -1000,6 +1010,7 @@ body.lng1771-drag-on .lng1771-pill-manager__pill-outer[data-pill-active="false"]
|
|
|
1000
1010
|
.lng1771-select__value {
|
|
1001
1011
|
flex: 1;
|
|
1002
1012
|
}
|
|
1013
|
+
|
|
1003
1014
|
.lng1771-select__trigger {
|
|
1004
1015
|
padding: 0px;
|
|
1005
1016
|
display: flex;
|
|
@@ -1019,6 +1030,8 @@ body.lng1771-drag-on .lng1771-pill-manager__pill-outer[data-pill-active="false"]
|
|
|
1019
1030
|
0px 3px 13px 0px rgba(30, 30, 41, 0.1);
|
|
1020
1031
|
width: var(--anchor-width);
|
|
1021
1032
|
|
|
1033
|
+
z-index: 100;
|
|
1034
|
+
|
|
1022
1035
|
&:focus {
|
|
1023
1036
|
outline: none;
|
|
1024
1037
|
}
|
|
@@ -1057,11 +1070,30 @@ body.lng1771-drag-on .lng1771-pill-manager__pill-outer[data-pill-active="false"]
|
|
|
1057
1070
|
}
|
|
1058
1071
|
}
|
|
1059
1072
|
|
|
1073
|
+
.lng1771-select__item-indicator {
|
|
1074
|
+
color: var(--lng1771-primary-50);
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1060
1077
|
.lng1771-select__item-text {
|
|
1061
1078
|
color: var(--lng1771-gray-80);
|
|
1062
1079
|
user-select: none;
|
|
1063
1080
|
font-size: 14px;
|
|
1064
1081
|
}
|
|
1082
|
+
.lng1771-separator--horizontal {
|
|
1083
|
+
width: 100%;
|
|
1084
|
+
height: 1px;
|
|
1085
|
+
background-color: var(--lng1771-gray-30);
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
.lng1771-separator--vertical {
|
|
1089
|
+
width: 1px;
|
|
1090
|
+
height: 100%;
|
|
1091
|
+
background-color: var(--lng1771-gray-30);
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
.lng1771-separator--soft {
|
|
1095
|
+
background-color: var(--lng1771-gray-20);
|
|
1096
|
+
}
|
|
1065
1097
|
.lng1771-sort-manager__button {
|
|
1066
1098
|
background-color: transparent;
|
|
1067
1099
|
border: none;
|
|
@@ -1097,6 +1129,9 @@ body.lng1771-drag-on .lng1771-pill-manager__pill-outer[data-pill-active="false"]
|
|
|
1097
1129
|
|
|
1098
1130
|
transition: opacity 150ms;
|
|
1099
1131
|
|
|
1132
|
+
color: var(--lng1771-gray-80);
|
|
1133
|
+
font-family: var(--lng1771-typeface);
|
|
1134
|
+
|
|
1100
1135
|
&:focus {
|
|
1101
1136
|
outline: none;
|
|
1102
1137
|
}
|
|
@@ -1221,6 +1256,7 @@ body.lng1771-drag-on .lng1771-pill-manager__pill-outer[data-pill-active="false"]
|
|
|
1221
1256
|
top: 0px;
|
|
1222
1257
|
left: 0px;
|
|
1223
1258
|
pointer-events: none;
|
|
1259
|
+
z-index: 100;
|
|
1224
1260
|
}
|
|
1225
1261
|
|
|
1226
1262
|
.lng1771-column-manager__drag-placeholder--default {
|
|
@@ -1294,7 +1330,7 @@ body.lng1771-drag-on .lng1771-pill-manager__pill-outer[data-pill-active="false"]
|
|
|
1294
1330
|
min-width: 260px;
|
|
1295
1331
|
border-radius: 6px;
|
|
1296
1332
|
border: 1px solid var(--lng1771-gray-30);
|
|
1297
|
-
background-color: var(--lng1771-gray-
|
|
1333
|
+
background-color: var(--lng1771-gray-02);
|
|
1298
1334
|
|
|
1299
1335
|
&[data-drop-visible="true"] {
|
|
1300
1336
|
border-style: dashed;
|
|
@@ -1453,21 +1489,6 @@ body.lng1771-drag-on .lng1771-pill-manager__pill-outer[data-pill-active="false"]
|
|
|
1453
1489
|
font-weight: 400;
|
|
1454
1490
|
line-height: 17px;
|
|
1455
1491
|
}
|
|
1456
|
-
.lng1771-separator--horizontal {
|
|
1457
|
-
width: 100%;
|
|
1458
|
-
height: 1px;
|
|
1459
|
-
background-color: var(--lng1771-gray-30);
|
|
1460
|
-
}
|
|
1461
|
-
|
|
1462
|
-
.lng1771-separator--vertical {
|
|
1463
|
-
width: 1px;
|
|
1464
|
-
height: 100%;
|
|
1465
|
-
background-color: var(--lng1771-gray-30);
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
.lng1771-separator--soft {
|
|
1469
|
-
background-color: var(--lng1771-gray-20);
|
|
1470
|
-
}
|
|
1471
1492
|
.lng1771-toggle {
|
|
1472
1493
|
position: relative;
|
|
1473
1494
|
width: 26px;
|
|
@@ -1897,6 +1918,10 @@ body.lng1771-drag-on .lng1771-pill-manager__pill-outer[data-pill-active="false"]
|
|
|
1897
1918
|
position: relative;
|
|
1898
1919
|
cursor: col-resize;
|
|
1899
1920
|
|
|
1921
|
+
&[data-disabled="true"] {
|
|
1922
|
+
cursor: initial;
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1900
1925
|
&::after {
|
|
1901
1926
|
position: absolute;
|
|
1902
1927
|
inset-inline-start: -4px;
|
|
@@ -2193,6 +2193,13 @@ function Select({
|
|
|
2193
2193
|
onSelect,
|
|
2194
2194
|
options,
|
|
2195
2195
|
placeholder,
|
|
2196
|
+
triggerClassName,
|
|
2197
|
+
triggerValueClassName,
|
|
2198
|
+
triggerIconClassName,
|
|
2199
|
+
popupClassName,
|
|
2200
|
+
itemClassName,
|
|
2201
|
+
itemIndicatorClassName,
|
|
2202
|
+
itemTextClassName,
|
|
2196
2203
|
...props
|
|
2197
2204
|
}) {
|
|
2198
2205
|
return /* @__PURE__ */ jsxs(
|
|
@@ -2206,21 +2213,39 @@ function Select({
|
|
|
2206
2213
|
},
|
|
2207
2214
|
alignItemToTrigger: false,
|
|
2208
2215
|
children: [
|
|
2209
|
-
/* @__PURE__ */ jsxs(SelectTrigger, { ...props, className: "lng1771-select", children: [
|
|
2216
|
+
/* @__PURE__ */ jsxs(SelectTrigger, { ...props, className: clsx("lng1771-select", triggerClassName), children: [
|
|
2210
2217
|
/* @__PURE__ */ jsx(
|
|
2211
2218
|
SelectValue,
|
|
2212
2219
|
{
|
|
2213
|
-
className: clsx(
|
|
2220
|
+
className: clsx(
|
|
2221
|
+
"lng1771-select__value",
|
|
2222
|
+
!selected && "lng1771-select__value--no-value",
|
|
2223
|
+
triggerValueClassName
|
|
2224
|
+
),
|
|
2214
2225
|
placeholder
|
|
2215
2226
|
}
|
|
2216
2227
|
),
|
|
2217
|
-
/* @__PURE__ */ jsx(SelectIcon, { className: "lng1771-select__trigger", children: /* @__PURE__ */ jsx(ArrowDownIcon, {}) })
|
|
2228
|
+
/* @__PURE__ */ jsx(SelectIcon, { className: clsx("lng1771-select__trigger", triggerIconClassName), children: /* @__PURE__ */ jsx(ArrowDownIcon, {}) })
|
|
2218
2229
|
] }),
|
|
2219
|
-
/* @__PURE__ */ jsx(SelectPortal, { children: /* @__PURE__ */ jsx(SelectPositioner, { sideOffset: 8, children: /* @__PURE__ */ jsx(SelectPopup, { className: "lng1771-select__popup", children: options.map((c) => {
|
|
2220
|
-
return /* @__PURE__ */ jsxs(
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2230
|
+
/* @__PURE__ */ jsx(SelectPortal, { children: /* @__PURE__ */ jsx(SelectPositioner, { sideOffset: 8, children: /* @__PURE__ */ jsx(SelectPopup, { className: clsx("lng1771-select__popup", popupClassName), children: options.map((c) => {
|
|
2231
|
+
return /* @__PURE__ */ jsxs(
|
|
2232
|
+
SelectItem,
|
|
2233
|
+
{
|
|
2234
|
+
value: c.value,
|
|
2235
|
+
className: clsx("lng1771-select__item", itemClassName),
|
|
2236
|
+
children: [
|
|
2237
|
+
/* @__PURE__ */ jsx(SelectItemText, { className: clsx("lng1771-select__item-text", itemIndicatorClassName), children: c.label }),
|
|
2238
|
+
/* @__PURE__ */ jsx(
|
|
2239
|
+
SelectItemIndicator,
|
|
2240
|
+
{
|
|
2241
|
+
className: clsx("lng1771-select__item-indicator", itemTextClassName),
|
|
2242
|
+
children: /* @__PURE__ */ jsx(CheckMark, {})
|
|
2243
|
+
}
|
|
2244
|
+
)
|
|
2245
|
+
]
|
|
2246
|
+
},
|
|
2247
|
+
c.value
|
|
2248
|
+
);
|
|
2224
2249
|
}) }) }) })
|
|
2225
2250
|
]
|
|
2226
2251
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { clsx } from "@1771technologies/js-utils";
|
|
3
|
+
function Separator(props) {
|
|
4
|
+
return /* @__PURE__ */ jsx(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
role: "separator",
|
|
8
|
+
"aria-orientation": props.dir,
|
|
9
|
+
className: clsx(
|
|
10
|
+
props.dir === "horizontal" && "lng1771-separator--horizontal",
|
|
11
|
+
props.dir === "vertical" && "lng1771-separator--vertical",
|
|
12
|
+
props.soft && "lng1771-separator--soft",
|
|
13
|
+
props.className
|
|
14
|
+
),
|
|
15
|
+
style: props.style
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
Separator as S
|
|
21
|
+
};
|
package/dist/sort-manager.js
CHANGED
|
@@ -2,9 +2,10 @@ 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-CN-kFW8a.js";
|
|
6
6
|
import { P as PlusIcon } from "./plus-icon-ToqW5CC-.js";
|
|
7
7
|
import { C as CrossIcon } from "./cross-icon-CEMLAlFX.js";
|
|
8
|
+
import { S as Separator } from "./separator-BnPPeAk8.js";
|
|
8
9
|
function useSortableColumnItems({ state, api }) {
|
|
9
10
|
const columns = state.columns.use();
|
|
10
11
|
const candidateColumns = useMemo(() => {
|
|
@@ -154,7 +155,8 @@ const sortDirectionValues = [
|
|
|
154
155
|
];
|
|
155
156
|
const SortColumnSelect = ({
|
|
156
157
|
item,
|
|
157
|
-
placeholder = "Sort by"
|
|
158
|
+
placeholder = "Sort by",
|
|
159
|
+
...props
|
|
158
160
|
}) => {
|
|
159
161
|
return /* @__PURE__ */ jsx(
|
|
160
162
|
Select,
|
|
@@ -162,13 +164,15 @@ const SortColumnSelect = ({
|
|
|
162
164
|
placeholder,
|
|
163
165
|
selected: item.columnSelected,
|
|
164
166
|
onSelect: item.columnOnSelect,
|
|
165
|
-
options: item.columnOptions
|
|
167
|
+
options: item.columnOptions,
|
|
168
|
+
...props
|
|
166
169
|
}
|
|
167
170
|
);
|
|
168
171
|
};
|
|
169
172
|
const SortSelect = ({
|
|
170
173
|
item,
|
|
171
|
-
placeholder = "Select"
|
|
174
|
+
placeholder = "Select",
|
|
175
|
+
...props
|
|
172
176
|
}) => {
|
|
173
177
|
return /* @__PURE__ */ jsx(
|
|
174
178
|
Select,
|
|
@@ -176,13 +180,15 @@ const SortSelect = ({
|
|
|
176
180
|
selected: item.sortSelected,
|
|
177
181
|
onSelect: item.sortOnSelect,
|
|
178
182
|
options: item.sortOptions,
|
|
179
|
-
placeholder
|
|
183
|
+
placeholder,
|
|
184
|
+
...props
|
|
180
185
|
}
|
|
181
186
|
);
|
|
182
187
|
};
|
|
183
188
|
const SortDirectionSelection = ({
|
|
184
189
|
item,
|
|
185
|
-
placeholder
|
|
190
|
+
placeholder,
|
|
191
|
+
...props
|
|
186
192
|
}) => {
|
|
187
193
|
return /* @__PURE__ */ jsx(
|
|
188
194
|
Select,
|
|
@@ -190,7 +196,8 @@ const SortDirectionSelection = ({
|
|
|
190
196
|
selected: item.sortDirectionSelected,
|
|
191
197
|
onSelect: item.sortDirectionOnSelect,
|
|
192
198
|
options: item.sortDirectionOptions,
|
|
193
|
-
placeholder
|
|
199
|
+
placeholder,
|
|
200
|
+
...props
|
|
194
201
|
}
|
|
195
202
|
);
|
|
196
203
|
};
|
|
@@ -220,14 +227,16 @@ function sortItemsToSortModel(sortItems) {
|
|
|
220
227
|
const SortApplyButton = forwardRef(
|
|
221
228
|
function SortApplyButton2({ className, onClick, children, ...props }, ref) {
|
|
222
229
|
const grid = useGrid();
|
|
223
|
-
const [state] = useSortManagerContext();
|
|
230
|
+
const [state, setState] = useSortManagerContext();
|
|
224
231
|
return /* @__PURE__ */ jsx(
|
|
225
232
|
"button",
|
|
226
233
|
{
|
|
227
234
|
...props,
|
|
228
235
|
className: clsx("lng1771-sort-manager__button", className),
|
|
229
236
|
onClick: (ev) => {
|
|
230
|
-
|
|
237
|
+
const model = sortItemsToSortModel(state);
|
|
238
|
+
grid.state.sortModel.set(model);
|
|
239
|
+
setState(sortModelToSortItems(model, grid));
|
|
231
240
|
onClick?.(ev);
|
|
232
241
|
},
|
|
233
242
|
ref,
|
|
@@ -289,6 +298,7 @@ const SortManager = {
|
|
|
289
298
|
SortDirectionSelect: SortDirectionSelection,
|
|
290
299
|
SortAdder,
|
|
291
300
|
SortRemove: SortRemover,
|
|
301
|
+
Separator,
|
|
292
302
|
SortApply: SortApplyButton,
|
|
293
303
|
SortCancel: SortCancelButton,
|
|
294
304
|
SortClear: SortClearButton
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
+
export interface SelectClassNames {
|
|
3
|
+
readonly triggerClassName?: string;
|
|
4
|
+
readonly triggerValueClassName?: string;
|
|
5
|
+
readonly triggerIconClassName?: string;
|
|
6
|
+
readonly popupClassName?: string;
|
|
7
|
+
readonly itemClassName?: string;
|
|
8
|
+
readonly itemIndicatorClassName?: string;
|
|
9
|
+
readonly itemTextClassName?: string;
|
|
10
|
+
}
|
|
2
11
|
export interface SelectProps {
|
|
3
12
|
readonly selected: {
|
|
4
13
|
value: string;
|
|
@@ -14,4 +23,4 @@ export interface SelectProps {
|
|
|
14
23
|
}) => void;
|
|
15
24
|
readonly placeholder?: string;
|
|
16
25
|
}
|
|
17
|
-
export declare function Select({ selected, onSelect, options, placeholder, ...props }: SelectProps & Omit<JSX.IntrinsicElements["div"], "onSelect">): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function Select({ selected, onSelect, options, placeholder, triggerClassName, triggerValueClassName, triggerIconClassName, popupClassName, itemClassName, itemIndicatorClassName, itemTextClassName, ...props }: SelectProps & SelectClassNames & Omit<JSX.IntrinsicElements["div"], "onSelect">): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { SelectClassNames } from '../select/select.js';
|
|
1
2
|
import { SortRowItem } from './sort-manager-container.js';
|
|
2
|
-
export declare const SortColumnSelect: ({ item, placeholder, }: {
|
|
3
|
+
export declare const SortColumnSelect: ({ item, placeholder, ...props }: {
|
|
3
4
|
item: SortRowItem;
|
|
4
5
|
placeholder?: string;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
} & SelectClassNames) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { SelectClassNames } from '../select/select.js';
|
|
1
2
|
import { SortRowItem } from './sort-manager-container.js';
|
|
2
|
-
export declare const SortDirectionSelection: ({ item, placeholder, }: {
|
|
3
|
+
export declare const SortDirectionSelection: ({ item, placeholder, ...props }: {
|
|
3
4
|
item: SortRowItem;
|
|
4
5
|
placeholder?: string;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
} & SelectClassNames) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,6 +2,7 @@ import { PropsWithChildren } from 'react';
|
|
|
2
2
|
import { SortAdder } from './sort-adder.js';
|
|
3
3
|
import { SortRemover } from './sort-remove.js';
|
|
4
4
|
import { GridProReact } from '../types';
|
|
5
|
+
import { Separator } from '../components-internal/separator/separator';
|
|
5
6
|
interface SortManagerRootProps<D = any> {
|
|
6
7
|
readonly grid: GridProReact<D>;
|
|
7
8
|
}
|
|
@@ -9,20 +10,21 @@ declare function SortManagerRoot<D>({ grid, children }: PropsWithChildren<SortMa
|
|
|
9
10
|
export declare const SortManager: {
|
|
10
11
|
Root: typeof SortManagerRoot;
|
|
11
12
|
Container: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "children"> & import('./sort-manager-container.js').SortContainerProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
12
|
-
SortColumnSelect: ({ item, placeholder, }: {
|
|
13
|
+
SortColumnSelect: ({ item, placeholder, ...props }: {
|
|
13
14
|
item: import('./sort-manager-container.js').SortRowItem;
|
|
14
15
|
placeholder?: string;
|
|
15
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
SortSelect: ({ item, placeholder, }: {
|
|
16
|
+
} & import('../select/select').SelectClassNames) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
SortSelect: ({ item, placeholder, ...props }: {
|
|
17
18
|
item: import('./sort-manager-container.js').SortRowItem;
|
|
18
19
|
placeholder?: string;
|
|
19
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
SortDirectionSelect: ({ item, placeholder, }: {
|
|
20
|
+
} & import('../select/select').SelectClassNames) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
SortDirectionSelect: ({ item, placeholder, ...props }: {
|
|
21
22
|
item: import('./sort-manager-container.js').SortRowItem;
|
|
22
23
|
placeholder?: string;
|
|
23
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
} & import('../select/select').SelectClassNames) => import("react/jsx-runtime").JSX.Element;
|
|
24
25
|
SortAdder: typeof SortAdder;
|
|
25
26
|
SortRemove: typeof SortRemover;
|
|
27
|
+
Separator: typeof Separator;
|
|
26
28
|
SortApply: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
27
29
|
SortCancel: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
28
30
|
SortClear: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { SelectClassNames } from '../select/select.js';
|
|
1
2
|
import { SortRowItem } from './sort-manager-container.js';
|
|
2
|
-
export declare const SortSelect: ({ item, placeholder, }: {
|
|
3
|
+
export declare const SortSelect: ({ item, placeholder, ...props }: {
|
|
3
4
|
item: SortRowItem;
|
|
4
5
|
placeholder?: string;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
} & SelectClassNames) => import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1771technologies/lytenyte-pro",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.48",
|
|
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.48",
|
|
74
|
+
"@1771technologies/grid-core": "0.0.48",
|
|
75
|
+
"@1771technologies/grid-design": "0.0.48",
|
|
76
|
+
"@1771technologies/grid-provider": "0.0.48",
|
|
77
|
+
"@1771technologies/grid-store-pro": "0.0.48",
|
|
78
|
+
"@1771technologies/grid-tree-data-source": "0.0.48",
|
|
79
|
+
"@1771technologies/grid-types": "0.0.48",
|
|
80
|
+
"@1771technologies/js-utils": "0.0.48",
|
|
81
|
+
"@1771technologies/lytenyte-core": "0.0.48",
|
|
82
|
+
"@1771technologies/react-cascada": "0.0.48",
|
|
83
|
+
"@1771technologies/react-dragon": "0.0.48",
|
|
84
|
+
"@1771technologies/react-sizer": "0.0.48",
|
|
85
|
+
"@1771technologies/react-split-pane": "0.0.48",
|
|
86
|
+
"@1771technologies/react-utils": "0.0.48",
|
|
87
87
|
"@base-ui-components/react": "1.0.0-alpha.7"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|