@1771technologies/lytenyte-pro 2.1.1-dev.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/smart-select/root.js +2 -2
- package/dist/components/smart-select/smart-select.play.js +4 -7
- package/dist/components/smart-select/triggers/basic-trigger.js +2 -2
- package/dist/components/smart-select/triggers/use-trigger-controls.d.ts +1 -1
- package/dist/components/smart-select/triggers/use-trigger-controls.js +1 -1
- package/dist/data-source-client/hooks/use-pivot/use-pivot-columns.js +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +7 -8
- package/SECURITY.md +0 -22
|
@@ -154,10 +154,10 @@ export function SmartSelectRoot(p) {
|
|
|
154
154
|
]);
|
|
155
155
|
const lightDismiss = useCallback((el) => {
|
|
156
156
|
const closest = getNearestMatching(el, (el) => el === triggerEl);
|
|
157
|
-
if (!closest)
|
|
157
|
+
if (!closest || p.kind === "basic" || p.kind === "multi")
|
|
158
158
|
return true;
|
|
159
159
|
return false;
|
|
160
|
-
}, [triggerEl]);
|
|
160
|
+
}, [p.kind, triggerEl]);
|
|
161
161
|
return (_jsx(SmartSelectProvider, { value: value, children: _jsxs(Popover, { open: open, onOpenChange: onOpenChange, onOpenChangeComplete: p.onOpenChangeComplete, focusTrap: false, modal: false, anchor: triggerEl, lightDismiss: lightDismiss, children: [trigger, triggerEl && createPortal(container, p.kind === "combo" ? triggerEl.parentElement : triggerEl)] }) }));
|
|
162
162
|
}
|
|
163
163
|
function DefaultChildren(p) {
|
|
@@ -4,8 +4,7 @@ import { useState } from "react";
|
|
|
4
4
|
import { SmartSelectRoot } from "./root.js";
|
|
5
5
|
import { Option } from "./option.js";
|
|
6
6
|
import { SmartSelectContainer } from "./container.js";
|
|
7
|
-
import {
|
|
8
|
-
import { MultiTrigger } from "./triggers/multi-trigger.js";
|
|
7
|
+
import { BasicSelectTrigger } from "./triggers/basic-trigger.js";
|
|
9
8
|
const options = [
|
|
10
9
|
{ id: "js", label: "JavaScript" },
|
|
11
10
|
{ id: "ts", label: "TypeScript" },
|
|
@@ -20,17 +19,15 @@ const options = [
|
|
|
20
19
|
{ id: "swift", label: "Swift" },
|
|
21
20
|
];
|
|
22
21
|
export default function SmartSelect() {
|
|
23
|
-
const [value, setValue] = useState(
|
|
22
|
+
const [value, setValue] = useState(options[0]);
|
|
24
23
|
void setValue;
|
|
25
24
|
return (_jsx("div", { style: { display: "flex", justifyContent: "center", padding: 20 }, children: _jsx(SmartSelectRoot, { options: options, value: value, onOptionChange: (v) => {
|
|
26
25
|
if (!v)
|
|
27
26
|
return;
|
|
28
27
|
setValue(v);
|
|
29
|
-
}, closeOnSelect: false, kind: "
|
|
28
|
+
}, closeOnSelect: false, kind: "basic", container: (p) => {
|
|
30
29
|
return (_jsxs(SmartSelectContainer, { children: [p.loading && _jsx("div", { children: "Loading...." }), p.children] }));
|
|
31
|
-
}, trigger: _jsx(
|
|
32
|
-
return (_jsx(Chip, { option: x, render: (p) => (_jsxs("div", { children: [x.label, p.active && "A"] })) }, x.id));
|
|
33
|
-
}) }), children: (p) => {
|
|
30
|
+
}, trigger: _jsx(BasicSelectTrigger, { children: value.label }), children: (p) => {
|
|
34
31
|
return (_jsxs(Option, { ...p, children: [_jsx("div", { children: p.option.label }), _jsx("div", { children: p.selected && "✔️" })] }));
|
|
35
32
|
} }) }));
|
|
36
33
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { useSmartSelect } from "../context.js";
|
|
4
4
|
import { mergeProps } from "../../../hooks/use-slot/merge-props.js";
|
|
@@ -13,6 +13,6 @@ function BasicSelectTriggerBase(props, ref) {
|
|
|
13
13
|
const triggerControls = useSelectControls(false, noop);
|
|
14
14
|
const p = mergeProps(props, triggerControls);
|
|
15
15
|
const combined = useCombinedRefs(setTrigger, ref, inputRef);
|
|
16
|
-
return _jsx("button", { ...p, ref: combined, "data-ln-smart-select-trigger": true, "data-ln-open": open });
|
|
16
|
+
return (_jsx("button", { ...p, ref: combined, "data-ln-smart-select-trigger": true, "data-ln-open": open, children: _jsx(_Fragment, { children: props.children }) }));
|
|
17
17
|
}
|
|
18
18
|
export const BasicSelectTrigger = forwardRef(BasicSelectTriggerBase);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare function useSelectControls(isMulti: boolean, setActiveChip: (s: string | null) => void): {
|
|
2
|
-
|
|
2
|
+
onClickCapture: () => void;
|
|
3
3
|
onBlur: (e: import("react").FocusEvent<HTMLButtonElement, Element>) => void;
|
|
4
4
|
onKeyDown: (e: import("react").KeyboardEvent<HTMLButtonElement>) => void;
|
|
5
5
|
};
|
|
@@ -5,7 +5,7 @@ export function useSelectControls(isMulti, setActiveChip) {
|
|
|
5
5
|
const { open, onOpenChange, openOnClick, setActiveId, container, rtl, trigger, onOptionsChange, kindAndValue: { value }, openKeys, closeKeys, options, onOptionSelect, } = useSmartSelect();
|
|
6
6
|
return useMemo(() => {
|
|
7
7
|
return {
|
|
8
|
-
|
|
8
|
+
onClickCapture: () => {
|
|
9
9
|
if (!open && openOnClick)
|
|
10
10
|
onOpenChange(true);
|
|
11
11
|
},
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { useMemo, useRef } from "react";
|
|
2
2
|
import { computeField } from "@1771technologies/lytenyte-core/internal";
|
|
3
|
-
import {
|
|
3
|
+
import {} from "@1771technologies/lytenyte-shared";
|
|
4
4
|
import { pivotPaths } from "./auxiliary-functions/pivot-paths.js";
|
|
5
5
|
import { applyReferenceColumn } from "./auxiliary-functions/apply-reference-column.js";
|
|
6
6
|
import { equal, itemsWithIdToMap } from "@1771technologies/js-utils";
|
|
7
|
+
import { measureText } from "@1771technologies/dom-utils";
|
|
7
8
|
export function usePivotColumns(pivotMode, pivotControlled, model, leafs, filtered, processor) {
|
|
8
9
|
const measures = model?.measures;
|
|
9
10
|
const columns = model?.columns;
|
package/dist/index.d.ts
CHANGED
|
@@ -113,7 +113,7 @@ export { useServerDataSource } from "./data-source-server/use-server-data-source
|
|
|
113
113
|
export type * from "./data-source-server/types.js";
|
|
114
114
|
export type { RowSourceTree, UseTreeDataSourceParams } from "./data-source-tree/use-tree-data-source.js";
|
|
115
115
|
export { useTreeDataSource } from "./data-source-tree/use-tree-data-source.js";
|
|
116
|
-
export { measureText } from "@1771technologies/
|
|
116
|
+
export { measureText } from "@1771technologies/dom-utils";
|
|
117
117
|
export { moveRelative, equal, arrayShallow } from "@1771technologies/js-utils";
|
|
118
118
|
export { getRowDragData, computeField } from "@1771technologies/lytenyte-core/internal";
|
|
119
119
|
export { virtualFromXY } from "./components/virtual-from-coordinates.js";
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ Grid.Viewport = GridCore.Viewport;
|
|
|
17
17
|
export { useClientDataSource } from "./data-source-client/use-client-data-source.js";
|
|
18
18
|
export { useServerDataSource } from "./data-source-server/use-server-data-source.js";
|
|
19
19
|
export { useTreeDataSource } from "./data-source-tree/use-tree-data-source.js";
|
|
20
|
-
export { measureText } from "@1771technologies/
|
|
20
|
+
export { measureText } from "@1771technologies/dom-utils";
|
|
21
21
|
export { moveRelative, equal, arrayShallow } from "@1771technologies/js-utils";
|
|
22
22
|
export { getRowDragData, computeField } from "@1771technologies/lytenyte-core/internal";
|
|
23
23
|
export { virtualFromXY } from "./components/virtual-from-coordinates.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1771technologies/lytenyte-pro",
|
|
3
3
|
"description": "Blazingly fast headless React data grid with 100s of features.",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "COMMERCIAL",
|
|
7
7
|
"files": [
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
"css",
|
|
10
10
|
"skills",
|
|
11
11
|
"LICENSE",
|
|
12
|
-
"SECURITY.md",
|
|
13
12
|
"README.md"
|
|
14
13
|
],
|
|
15
14
|
"keywords": [
|
|
@@ -86,14 +85,14 @@
|
|
|
86
85
|
"access": "public"
|
|
87
86
|
},
|
|
88
87
|
"dependencies": {
|
|
89
|
-
"@1771technologies/
|
|
90
|
-
"@1771technologies/lytenyte-
|
|
91
|
-
"@1771technologies/
|
|
92
|
-
"@1771technologies/lytenyte-design": "2.1.
|
|
93
|
-
"@1771technologies/
|
|
88
|
+
"@1771technologies/js-utils": "2.1.2",
|
|
89
|
+
"@1771technologies/lytenyte-shared": "2.1.2",
|
|
90
|
+
"@1771technologies/dom-utils": "2.1.2",
|
|
91
|
+
"@1771technologies/lytenyte-design": "2.1.2",
|
|
92
|
+
"@1771technologies/lytenyte-core": "2.1.2"
|
|
94
93
|
},
|
|
95
94
|
"devDependencies": {
|
|
96
|
-
"@1771technologies/grid-sample-data": "2.1.
|
|
95
|
+
"@1771technologies/grid-sample-data": "2.1.2"
|
|
97
96
|
},
|
|
98
97
|
"peerDependencies": {
|
|
99
98
|
"react": "18.0.0 || ^19.0.0",
|
package/SECURITY.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Security Policy
|
|
2
|
-
|
|
3
|
-
## Supported Versions
|
|
4
|
-
|
|
5
|
-
| Version | Security Updates |
|
|
6
|
-
| ----------------- | -------------------------------- |
|
|
7
|
-
| Latest | ✅ All security vulnerabilities |
|
|
8
|
-
| Previous versions | ⚠️ Critical vulnerabilities only |
|
|
9
|
-
|
|
10
|
-
The team at 1771 Technologies addresses security vulnerabilities as follows:
|
|
11
|
-
|
|
12
|
-
- **Critical vulnerabilities**: Patched for all supported versions of LyteNyte Grid.
|
|
13
|
-
- **Non-critical vulnerabilities**: Patched only for the latest version.
|
|
14
|
-
|
|
15
|
-
## Reporting a Vulnerability
|
|
16
|
-
|
|
17
|
-
We take the security of LyteNyte Grid seriously. Please report security vulnerabilities through our confidential reporting process:
|
|
18
|
-
|
|
19
|
-
1. Email [support@1771technologies.com](mailto:support@1771technologies.com) with details about the vulnerability.
|
|
20
|
-
2. Include steps to reproduce, potential impact, and any relevant documentation.
|
|
21
|
-
3. Our security team will acknowledge receipt within 24 hours.
|
|
22
|
-
4. You'll receive regular updates as we address the issue.
|