frame.select 1.2.6 → 1.2.7
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/App.d.ts +5 -2
- package/dist/App.d.ts.map +1 -1
- package/dist/App.js +15 -35
- package/dist/FrameSelect.d.ts +22 -0
- package/dist/FrameSelect.d.ts.map +1 -0
- package/dist/FrameSelect.js +36 -0
- package/dist/components/BrandList.d.ts +1 -0
- package/dist/components/BrandList.d.ts.map +1 -1
- package/dist/components/BrandList.js +2 -2
- package/dist/components/FrameList.d.ts +1 -0
- package/dist/components/FrameList.d.ts.map +1 -1
- package/dist/components/FrameList.js +4 -4
- package/dist/components/ItemFilter.d.ts.map +1 -1
- package/dist/components/ItemFilter.js +7 -5
- package/dist/components/ItemList.d.ts.map +1 -1
- package/dist/components/ItemList.js +61 -71
- package/dist/main.js +2 -3
- package/package.json +25 -20
package/dist/App.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import './App.css';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export type TBrandFrame = {
|
|
3
|
+
brand: string;
|
|
4
|
+
frames: string[];
|
|
5
|
+
};
|
|
6
|
+
declare function App(): import("react/jsx-runtime").JSX.Element;
|
|
4
7
|
export default App;
|
|
5
8
|
//# sourceMappingURL=App.d.ts.map
|
package/dist/App.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AACA,OAAO,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AACA,OAAO,WAAW,CAAC;AAMnB,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF,iBAAS,GAAG,4CAoNX;AAED,eAAe,GAAG,CAAC"}
|
package/dist/App.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
import './App.css';
|
|
2
3
|
import { useState } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { FrameList } from './components/FrameList';
|
|
4
|
+
import { FrameSelect } from './FrameSelect';
|
|
5
|
+
import { Box } from '@mui/material';
|
|
6
6
|
function App() {
|
|
7
7
|
const [brand, setBrand] = useState('');
|
|
8
|
+
const [selectedFrames, setSelectedFrames] = useState(undefined);
|
|
8
9
|
const brands = [
|
|
9
10
|
{
|
|
10
11
|
name: 'Adidas',
|
|
@@ -122,55 +123,34 @@ function App() {
|
|
|
122
123
|
{ brand: 'Alpina', frames: frameAlpina },
|
|
123
124
|
{ brand: 'Brooks', frames: frameBrooks },
|
|
124
125
|
];
|
|
125
|
-
function convertFrames(
|
|
126
|
-
const foundFrames = frameArray.find((b) => b.brand === brand);
|
|
127
|
-
if (!foundFrames) {
|
|
128
|
-
return [];
|
|
129
|
-
}
|
|
126
|
+
function convertFrames(frames) {
|
|
130
127
|
const stripLeadingZeros = (s) => s.replace(/^0+/, '');
|
|
131
128
|
const stripOrZero = (s) => stripLeadingZeros(s) || '0';
|
|
132
|
-
|
|
129
|
+
const res = frames?.frames.map((frame) => ({
|
|
133
130
|
frame,
|
|
134
131
|
name: stripLeadingZeros(frame.substring(3, 23)),
|
|
135
132
|
sl: stripOrZero(frame.substring(23, 25)),
|
|
136
133
|
bw: stripOrZero(frame.substring(25, 27)),
|
|
137
134
|
rest: stripLeadingZeros(frame.substring(28, 33)),
|
|
138
135
|
}));
|
|
136
|
+
return res || [];
|
|
139
137
|
}
|
|
140
|
-
// const brandColumnHelper = createColumnHelper<TBrandObj>();
|
|
141
|
-
// const brandColumns = [
|
|
142
|
-
// brandColumnHelper.accessor((row) => row.description ?? '', {
|
|
143
|
-
// header: 'description',
|
|
144
|
-
// size: 300,
|
|
145
|
-
// cell: (info) => <div>{info.getValue()}</div>,
|
|
146
|
-
// }),
|
|
147
|
-
// ];
|
|
148
|
-
// const _extraBrandColumns: TColumn<TBrandObj>[] = [
|
|
149
|
-
// {
|
|
150
|
-
// column: brandColumns[0],
|
|
151
|
-
// },
|
|
152
|
-
// ];
|
|
153
138
|
const onClickBrand = (cell) => {
|
|
154
139
|
const brand = brands.find((b) => b.name === cell.row.original.name);
|
|
155
140
|
if (brand) {
|
|
156
141
|
setBrand(brand.name);
|
|
142
|
+
const foundFrames = frames.find((b) => b.brand === brand.name);
|
|
143
|
+
// const foundFrames = convertFrames(brand.name, frames);
|
|
144
|
+
setSelectedFrames(foundFrames);
|
|
157
145
|
}
|
|
158
146
|
};
|
|
159
147
|
const onClickFrame = (cell, index) => {
|
|
160
148
|
window.alert(`Frame clicked: ${JSON.stringify(cell.row.original)} at index ${index}`);
|
|
161
149
|
};
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
"
|
|
167
|
-
brand),
|
|
168
|
-
React.createElement(FrameList, { frameList: convertFrames(brand, frames), onClick: onClickFrame, slSize: 120, slFormat: (value) => {
|
|
169
|
-
return React.createElement("div", null, value);
|
|
170
|
-
}, bwSize: 160, bwFormat: (value) => {
|
|
171
|
-
return React.createElement("span", { style: { fontWeight: 'bold' } }, value);
|
|
172
|
-
}, formSize: 320, formFormat: (value) => {
|
|
173
|
-
return React.createElement("div", { style: { color: 'red' } }, value);
|
|
174
|
-
} })));
|
|
150
|
+
const width = 1100;
|
|
151
|
+
const height = 300;
|
|
152
|
+
return (_jsx(_Fragment, { children: _jsxs(Box, { sx: {
|
|
153
|
+
border: '10px solid black',
|
|
154
|
+
}, children: [_jsx("h1", { children: "Brand List" }), _jsx(FrameSelect, { currentBrand: brand, brands: brands, frames: selectedFrames, onClickBrand: onClickBrand, onClickFrame: onClickFrame, convertFrames: convertFrames, width: width, height: height, backgroundColor: "#CCC" }), _jsxs("h2", { children: ["Selected Brand: ", brand] })] }) }));
|
|
175
155
|
}
|
|
176
156
|
export default App;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Cell } from '@tanstack/react-table';
|
|
2
|
+
import { TBrandObj, TFrameObj } from './components/types';
|
|
3
|
+
type TBrandFrame = {
|
|
4
|
+
brand: string;
|
|
5
|
+
frames: string[];
|
|
6
|
+
};
|
|
7
|
+
export declare function FrameSelect(props: {
|
|
8
|
+
currentBrand: string;
|
|
9
|
+
brands: TBrandObj[];
|
|
10
|
+
frames?: TBrandFrame;
|
|
11
|
+
onClickBrand: (cell: Cell<{
|
|
12
|
+
name: string;
|
|
13
|
+
id: number;
|
|
14
|
+
}, unknown>, index: number) => void;
|
|
15
|
+
onClickFrame: (cell: Cell<TFrameObj, unknown>, index: number) => void;
|
|
16
|
+
convertFrames: (frameArray: TBrandFrame | undefined) => TFrameObj[];
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
backgroundColor: string;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=FrameSelect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FrameSelect.d.ts","sourceRoot":"","sources":["../src/FrameSelect.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAI7C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE1D,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF,wBAAgB,WAAW,CAAC,KAAK,EAAE;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,YAAY,EAAE,CACZ,IAAI,EAAE,IAAI,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,OAAO,CAAC,EACjD,KAAK,EAAE,MAAM,KACV,IAAI,CAAC;IACV,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtE,aAAa,EAAE,CAAC,UAAU,EAAE,WAAW,GAAG,SAAS,KAAK,SAAS,EAAE,CAAC;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;CACzB,2CA6DA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '@mui/material';
|
|
3
|
+
import { BrandList } from './components/BrandList';
|
|
4
|
+
import { FrameList } from './components/FrameList';
|
|
5
|
+
export function FrameSelect(props) {
|
|
6
|
+
const jsx = 'FrameSelect';
|
|
7
|
+
const listHeight = Math.max(props.height - 20, 0);
|
|
8
|
+
return (_jsxs(Box, { "data-testid": `${jsx}.box`, sx: {
|
|
9
|
+
display: 'flex',
|
|
10
|
+
width: props.width,
|
|
11
|
+
height: props.height,
|
|
12
|
+
overflow: 'hidden',
|
|
13
|
+
backgroundColor: props.backgroundColor,
|
|
14
|
+
// border: '10px solid black',
|
|
15
|
+
padding: '10px 50px 10px 30px',
|
|
16
|
+
gap: '40px',
|
|
17
|
+
}, children: [_jsx(Box, { "data-testid": `${jsx}.brand.box`, sx: {
|
|
18
|
+
height: '100%',
|
|
19
|
+
minHeight: 0,
|
|
20
|
+
}, children: _jsx(BrandList, { brandList: props.brands.map((brand, index) => {
|
|
21
|
+
console.log(`Mapping brand: ${brand.name} at index ${index}`);
|
|
22
|
+
return {
|
|
23
|
+
name: brand.name,
|
|
24
|
+
id: index,
|
|
25
|
+
};
|
|
26
|
+
}), onClick: props.onClickBrand, height: listHeight }) }), _jsx(Box, { "data-testid": `${jsx}.frame.box`, children: _jsx(FrameList, { frameList: props.convertFrames(props.frames), onClick: props.onClickFrame, slSize: 120, slFormat: (value) => {
|
|
27
|
+
return _jsx("div", { children: value });
|
|
28
|
+
}, bwSize: 160, bwFormat: (value) => {
|
|
29
|
+
return _jsx("span", { style: { fontWeight: 'bold' }, children: value });
|
|
30
|
+
}, formSize: 320, formFormat: (value) => {
|
|
31
|
+
return _jsx("div", { style: { color: 'red' }, children: value });
|
|
32
|
+
},
|
|
33
|
+
// extraColumns={extraFrameColumns}
|
|
34
|
+
// style={{ border: '1px solid black', padding: '0px' }}
|
|
35
|
+
height: listHeight }) })] }));
|
|
36
|
+
}
|
|
@@ -9,6 +9,7 @@ export declare function BrandList(props: {
|
|
|
9
9
|
renderItem?: (item: string) => React.ReactNode;
|
|
10
10
|
extraColumns?: TColumn<TBrandObj>[];
|
|
11
11
|
backgroundColor?: string;
|
|
12
|
+
height: number;
|
|
12
13
|
style?: React.CSSProperties;
|
|
13
14
|
}): JSX.Element;
|
|
14
15
|
//# sourceMappingURL=BrandList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrandList.d.ts","sourceRoot":"","sources":["../../src/components/BrandList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGpC,wBAAgB,SAAS,CAAC,KAAK,EAAE;IAC/B,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAC/C,YAAY,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,GAAG,GAAG,CAAC,OAAO,CAkBd"}
|
|
1
|
+
{"version":3,"file":"BrandList.d.ts","sourceRoot":"","sources":["../../src/components/BrandList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGpC,wBAAgB,SAAS,CAAC,KAAK,EAAE;IAC/B,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAC/C,YAAY,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,GAAG,GAAG,CAAC,OAAO,CAkBd"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ItemList } from './ItemList';
|
|
3
3
|
export function BrandList(props) {
|
|
4
4
|
const extraBrandColumns = [];
|
|
5
|
-
return (
|
|
5
|
+
return (_jsx(ItemList, { itemList: props.brandList, onClick: props.onClick, renderItem: props.renderItem, extraColumns: props.extraColumns ? props.extraColumns : extraBrandColumns, style: props.style, backgroundColor: props.backgroundColor, scrollbarWidth: 50, height: props.height, placeholder: "Brands", defaultHeader: "Brand", testId: "name" }));
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrameList.d.ts","sourceRoot":"","sources":["../../src/components/FrameList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAsB,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAY,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAKL,SAAS,EACV,MAAM,SAAS,CAAC;AAGjB,wBAAgB,SAAS,CAAC,KAAK,EAAE;IAC/B,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAChD,YAAY,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;IACpC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"FrameList.d.ts","sourceRoot":"","sources":["../../src/components/FrameList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAsB,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAY,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAKL,SAAS,EACV,MAAM,SAAS,CAAC;AAGjB,wBAAgB,SAAS,CAAC,KAAK,EAAE;IAC/B,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAChD,YAAY,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;IACpC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,GAAG,CAAC,OAAO,CAmHd"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { createColumnHelper } from '@tanstack/react-table';
|
|
2
3
|
import { useState } from 'react';
|
|
3
|
-
import React from 'react';
|
|
4
4
|
import { brueckenWeiteKey, scheibenFormKey, scheibenLaengeKey, } from './types';
|
|
5
5
|
import { ItemList } from './ItemList';
|
|
6
6
|
export function FrameList(props) {
|
|
@@ -36,7 +36,7 @@ export function FrameList(props) {
|
|
|
36
36
|
size: colSize,
|
|
37
37
|
cell: (info) => {
|
|
38
38
|
const value = info.getValue();
|
|
39
|
-
return colFormat ? colFormat(value) :
|
|
39
|
+
return colFormat ? colFormat(value) : _jsx("div", { children: value }); // Handle undefined case
|
|
40
40
|
},
|
|
41
41
|
}),
|
|
42
42
|
filter: {
|
|
@@ -55,11 +55,11 @@ export function FrameList(props) {
|
|
|
55
55
|
brueckenWeite,
|
|
56
56
|
scheibenForm,
|
|
57
57
|
];
|
|
58
|
-
return (
|
|
58
|
+
return (_jsx(ItemList, { itemList: props.frameList, onClick: props.onClick, renderItem: props.renderItem, extraColumns: props.extraColumns && props.extraColumns.length > 0
|
|
59
59
|
? props.extraColumns
|
|
60
60
|
: extraFrameColumns, style: props.style,
|
|
61
61
|
// backgroundColor="lightgreen"
|
|
62
62
|
// scrollbarWidth={100}
|
|
63
63
|
// height={400}
|
|
64
|
-
placeholder: "Modellnummer", defaultHeader: "Frame", testId: "frame" }));
|
|
64
|
+
height: props.height, placeholder: "Modellnummer", defaultHeader: "Frame", testId: "frame" }));
|
|
65
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemFilter.d.ts","sourceRoot":"","sources":["../../src/components/ItemFilter.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"ItemFilter.d.ts","sourceRoot":"","sources":["../../src/components/ItemFilter.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAwCzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import CancelPresentationIcon from '@mui/icons-material/CancelPresentation';
|
|
2
3
|
import { Button } from '@mui/material';
|
|
3
|
-
import React from 'react';
|
|
4
4
|
/**
|
|
5
5
|
* A React functional component that provides a filter input for items.
|
|
6
6
|
*
|
|
@@ -25,15 +25,17 @@ import React from 'react';
|
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
27
|
const ItemFilter = (props) => {
|
|
28
|
+
const jsx = 'ItemFilter';
|
|
28
29
|
function handleInputChange(e) {
|
|
29
30
|
props.itemFilter.filterHook.setValue(e.target.value);
|
|
30
31
|
}
|
|
31
32
|
function clearFilter() {
|
|
32
33
|
props.itemFilter.filterHook.setValue('');
|
|
33
34
|
}
|
|
34
|
-
return (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
return (_jsxs("div", { style: { display: 'flex', alignItems: 'center' }, children: [_jsx("input", { id: props.id, "data-testid": `${jsx}.input.filter.${props.id}`, type: "text", placeholder: props.itemFilter.placeholder ?? 'Items', value: props.itemFilter.filterHook.value || '', onChange: handleInputChange, style: { width: '80%' } }), _jsx(Button, { "data-testid": `${props.tableId}.button.clearFilter.${props.id}`, style: {
|
|
36
|
+
minWidth: 'unset',
|
|
37
|
+
padding: '1px',
|
|
38
|
+
visibility: props.itemFilter.filterHook.value !== '' ? 'visible' : 'hidden',
|
|
39
|
+
}, onClick: clearFilter, children: _jsx(CancelPresentationIcon, { sx: { color: 'white' } }) })] }));
|
|
38
40
|
};
|
|
39
41
|
export default ItemFilter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemList.d.ts","sourceRoot":"","sources":["../../src/components/ItemList.tsx"],"names":[],"mappings":"AAUA,OAAO,EAIL,IAAI,EAML,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAe,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,GAAG,EAA6C,MAAM,OAAO,CAAC;AACvE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,wBAAgB,QAAQ,CAAC,CAAC,SAAS,KAAK,EAAE,KAAK,EAAE;IAC/C,QAAQ,EAAE,CAAC,EAAE,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAC/C,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"ItemList.d.ts","sourceRoot":"","sources":["../../src/components/ItemList.tsx"],"names":[],"mappings":"AAUA,OAAO,EAIL,IAAI,EAML,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAe,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,GAAG,EAA6C,MAAM,OAAO,CAAC;AACvE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,wBAAgB,QAAQ,CAAC,CAAC,SAAS,KAAK,EAAE,KAAK,EAAE;IAC/C,QAAQ,EAAE,CAAC,EAAE,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAC/C,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,GAAG,CAAC,OAAO,CAiad"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { TableContainer, Table, TableHead, TableRow, TableCell, TableBody, Button, Box, } from '@mui/material';
|
|
2
3
|
import { useReactTable, getCoreRowModel, getFilteredRowModel, createColumnHelper, flexRender, } from '@tanstack/react-table';
|
|
3
4
|
import ItemFilter from './ItemFilter';
|
|
@@ -5,7 +6,10 @@ import { useMemo, useState, useCallback } from 'react';
|
|
|
5
6
|
import React from 'react';
|
|
6
7
|
export function ItemList(props) {
|
|
7
8
|
'use no memo'; // For React Compiler compatibility with TanStack Table
|
|
8
|
-
const
|
|
9
|
+
const jsx = 'ItemList';
|
|
10
|
+
const backgroundColorTable = '#EEE';
|
|
11
|
+
const backgroundColorHeader = 'grey';
|
|
12
|
+
const { itemList, backgroundColor = backgroundColorTable, selectColor = 'lightgrey', scrollbarWidth = 50, mainColumnWidth = 160, height = 300, placeholder = 'Items', defaultHeader = 'Name', } = props;
|
|
9
13
|
const scrollbarStyles = {
|
|
10
14
|
'&::-webkit-scrollbar': {
|
|
11
15
|
width: `${scrollbarWidth}px`,
|
|
@@ -16,13 +20,13 @@ export function ItemList(props) {
|
|
|
16
20
|
margin: '2px',
|
|
17
21
|
},
|
|
18
22
|
'&::-webkit-scrollbar-thumb': {
|
|
19
|
-
backgroundColor: '#
|
|
23
|
+
backgroundColor: '#BBB',
|
|
20
24
|
borderRadius: '10px',
|
|
21
25
|
border: '2px solid transparent',
|
|
22
26
|
backgroundClip: 'content-box',
|
|
23
27
|
},
|
|
24
28
|
'&::-webkit-scrollbar-thumb:hover': {
|
|
25
|
-
backgroundColor: '#
|
|
29
|
+
backgroundColor: '#AAA',
|
|
26
30
|
},
|
|
27
31
|
scrollbarGutter: 'stable',
|
|
28
32
|
};
|
|
@@ -71,7 +75,7 @@ export function ItemList(props) {
|
|
|
71
75
|
const defaultColumns = [
|
|
72
76
|
columnHelper.accessor((row) => row.name, {
|
|
73
77
|
header: defaultHeader,
|
|
74
|
-
cell: (info) => (
|
|
78
|
+
cell: (info) => (_jsx("div", { style: { fontWeight: 'bold' }, children: info.getValue() })),
|
|
75
79
|
footer: (info) => info.column.id,
|
|
76
80
|
size: 130,
|
|
77
81
|
minSize: 130,
|
|
@@ -99,45 +103,44 @@ export function ItemList(props) {
|
|
|
99
103
|
return baseWidth;
|
|
100
104
|
}, []);
|
|
101
105
|
const displayHeader = useCallback((header) => {
|
|
102
|
-
let filter =
|
|
106
|
+
let filter = _jsx("div", {});
|
|
103
107
|
if (header.id === defaultHeader) {
|
|
104
108
|
if (itemFilter) {
|
|
105
|
-
filter = (
|
|
109
|
+
filter = (_jsx("div", { style: {
|
|
106
110
|
width: '130px',
|
|
107
111
|
maxWidth: '130px',
|
|
108
112
|
overflow: 'hidden',
|
|
109
113
|
boxSizing: 'border-box',
|
|
110
|
-
} }
|
|
111
|
-
React.createElement(ItemFilter, { tableId: defaultHeader, id: defaultHeader, itemFilter: itemFilter })));
|
|
114
|
+
}, children: _jsx(ItemFilter, { tableId: defaultHeader, id: defaultHeader, itemFilter: itemFilter }) }));
|
|
112
115
|
}
|
|
113
116
|
}
|
|
114
117
|
else {
|
|
115
118
|
extraCols.forEach((col) => {
|
|
116
119
|
if (col && header.id === col.column.header) {
|
|
117
|
-
filter = col.filter ? (
|
|
120
|
+
filter = col.filter ? (_jsx("div", { style: {
|
|
118
121
|
width: '120px',
|
|
119
122
|
maxWidth: '120px',
|
|
120
123
|
overflow: 'hidden',
|
|
121
124
|
boxSizing: 'border-box',
|
|
122
|
-
} },
|
|
123
|
-
React.createElement(ItemFilter, { tableId: header.id, id: col.column.header, itemFilter: col.filter }))) : (React.createElement("div", null));
|
|
125
|
+
}, children: _jsx(ItemFilter, { tableId: header.id, id: col.column.header, itemFilter: col.filter }) })) : (_jsx("div", {}));
|
|
124
126
|
}
|
|
125
127
|
});
|
|
126
128
|
}
|
|
127
129
|
return filter;
|
|
128
130
|
}, [defaultHeader, itemFilter, extraCols]);
|
|
129
131
|
const displayHeaderCell = useCallback((header, baseWidth) => {
|
|
130
|
-
return (
|
|
131
|
-
backgroundColor,
|
|
132
|
+
return (_jsx(TableCell, { "data-testid": `${defaultHeader}.th.cell.${header.id}`, sx: {
|
|
133
|
+
backgroundColor: backgroundColorHeader,
|
|
132
134
|
width: baseWidth,
|
|
133
|
-
borderRight: '1px solid #999',
|
|
135
|
+
// borderRight: '1px solid #999',
|
|
136
|
+
borderBottom: '1px solid #999',
|
|
134
137
|
paddingLeft: '16px',
|
|
135
138
|
paddingRight: 0,
|
|
136
|
-
paddingTop:
|
|
137
|
-
paddingBottom:
|
|
139
|
+
paddingTop: '10px',
|
|
140
|
+
paddingBottom: '10px',
|
|
138
141
|
boxSizing: 'border-box',
|
|
139
|
-
}
|
|
140
|
-
}, [
|
|
142
|
+
}, children: displayHeader(header) }, header.id));
|
|
143
|
+
}, [defaultHeader, displayHeader]);
|
|
141
144
|
const displayBodyCell = useCallback((cell, index, width, bgColor) => {
|
|
142
145
|
const cll = cell.getValue();
|
|
143
146
|
// Calculate width to match header cells exactly
|
|
@@ -150,7 +153,7 @@ export function ItemList(props) {
|
|
|
150
153
|
const extraCol = extraCols.find((col) => col && cell.column.columnDef.header === col.column.header);
|
|
151
154
|
baseWidth = cellWidth(extraCol);
|
|
152
155
|
}
|
|
153
|
-
return (
|
|
156
|
+
return (_jsx(TableCell, { "data-testid": `${defaultHeader}.tb.cell.${index}`, style: { backgroundColor: bgColor }, sx: {
|
|
154
157
|
borderRight: '1px solid #999',
|
|
155
158
|
paddingLeft: '16px',
|
|
156
159
|
paddingRight: 0,
|
|
@@ -160,9 +163,9 @@ export function ItemList(props) {
|
|
|
160
163
|
// minWidth: baseWidth,
|
|
161
164
|
// maxWidth: baseWidth,
|
|
162
165
|
boxSizing: 'border-box',
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
|
|
166
|
+
}, children: cell.column.columnDef.header === defaultHeader ? (_jsx(Button, { "data-testid": `${defaultHeader}.tb.cell.${cell.row.original[props.testId]}.button`, onClick: onClick(cell, cell.row.index), children: props.renderItem
|
|
167
|
+
? props.renderItem(cll)
|
|
168
|
+
: flexRender(cell.column.columnDef.cell, cell.getContext()) })) : props.renderItem ? (props.renderItem(cll)) : (flexRender(cell.column.columnDef.cell, cell.getContext())) }, cell.id));
|
|
166
169
|
}, [cellWidth, defaultHeader, extraCols, onClick, props]);
|
|
167
170
|
const table = useReactTable({
|
|
168
171
|
data: filteredItems,
|
|
@@ -192,26 +195,26 @@ export function ItemList(props) {
|
|
|
192
195
|
return width;
|
|
193
196
|
}, [extraCols]);
|
|
194
197
|
const renderHeader = React.useCallback((headerGroups, width) => {
|
|
195
|
-
return headerGroups.map((headerGroup) => (
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
198
|
+
return headerGroups.map((headerGroup) => (_jsx(TableRow, { children: headerGroup.headers.map((header) => {
|
|
199
|
+
// Calculate width accounting for ItemFilter with CancelPresentationIcon
|
|
200
|
+
let baseWidth;
|
|
201
|
+
if (header.id === defaultHeader) {
|
|
202
|
+
baseWidth = width;
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
// Check if this extra column has a filter
|
|
206
|
+
const extraCol = extraCols.find((col) => col && header.id === col.column.header);
|
|
207
|
+
baseWidth = cellWidth(extraCol);
|
|
208
|
+
}
|
|
209
|
+
return displayHeaderCell(header, baseWidth);
|
|
210
|
+
}) }, headerGroup.id)));
|
|
208
211
|
}, [cellWidth, defaultHeader, displayHeaderCell, extraCols]);
|
|
209
212
|
const renderBody = React.useCallback((rows, width, bgColor = backgroundColor) => {
|
|
210
213
|
return rows.map((row, index) => {
|
|
211
214
|
const rowBgColor = selectedIndex === index ? selectColor : bgColor;
|
|
212
|
-
return (
|
|
213
|
-
|
|
214
|
-
|
|
215
|
+
return (_jsx(TableRow, { "data-testid": `${defaultHeader}.tb.row.${index}`, children: row.getVisibleCells().map((cell) => {
|
|
216
|
+
return displayBodyCell(cell, index, width, rowBgColor);
|
|
217
|
+
}) }, row.id));
|
|
215
218
|
});
|
|
216
219
|
}, [
|
|
217
220
|
backgroundColor,
|
|
@@ -220,44 +223,31 @@ export function ItemList(props) {
|
|
|
220
223
|
selectColor,
|
|
221
224
|
selectedIndex,
|
|
222
225
|
]);
|
|
223
|
-
return (
|
|
226
|
+
return (_jsxs("div", { "data-testid": `${jsx}.${defaultHeader}.table`, style: {
|
|
224
227
|
height,
|
|
225
228
|
overflow: 'hidden',
|
|
226
|
-
backgroundColor,
|
|
229
|
+
backgroundColor: backgroundColorHeader,
|
|
227
230
|
width: 'fit-content',
|
|
228
231
|
minWidth: 200,
|
|
229
232
|
boxSizing: 'border-box',
|
|
230
233
|
display: 'flex',
|
|
231
234
|
flexDirection: 'column',
|
|
232
|
-
} },
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
flex: 1,
|
|
251
|
-
overflow: 'auto',
|
|
252
|
-
backgroundColor,
|
|
253
|
-
...scrollbarStyles,
|
|
254
|
-
} },
|
|
255
|
-
React.createElement(Table, { sx: {
|
|
256
|
-
backgroundColor,
|
|
257
|
-
width: `${totalTableWidth}px`,
|
|
258
|
-
tableLayout: 'fixed',
|
|
259
|
-
borderCollapse: 'separate',
|
|
260
|
-
borderSpacing: 0,
|
|
261
|
-
} },
|
|
262
|
-
React.createElement(TableBody, { "data-testid": `${defaultHeader}.tableBody`, sx: { backgroundColor } }, renderBody(table.getRowModel().rows, mainColumnWidth, backgroundColor))))));
|
|
235
|
+
}, children: [_jsx(TableContainer, { "data-testid": `${jsx}.${defaultHeader}.tableContainer`, children: _jsx(Table, { stickyHeader: true, "aria-label": "sticky table", sx: {
|
|
236
|
+
backgroundColor: backgroundColor,
|
|
237
|
+
width: `${totalTableWidth}px`,
|
|
238
|
+
tableLayout: 'fixed',
|
|
239
|
+
borderCollapse: 'separate',
|
|
240
|
+
borderSpacing: 0,
|
|
241
|
+
}, children: _jsx(TableHead, { "data-testid": `${jsx}.${defaultHeader}.tableHeader`, sx: { backgroundColor: backgroundColor }, children: renderHeader(table.getHeaderGroups(), mainColumnWidth) }) }) }), _jsx(Box, { sx: {
|
|
242
|
+
flex: 1,
|
|
243
|
+
overflow: 'auto',
|
|
244
|
+
backgroundColor: backgroundColor,
|
|
245
|
+
...scrollbarStyles,
|
|
246
|
+
}, children: _jsx(Table, { sx: {
|
|
247
|
+
backgroundColor: backgroundColor,
|
|
248
|
+
width: `${totalTableWidth}px`,
|
|
249
|
+
tableLayout: 'fixed',
|
|
250
|
+
borderCollapse: 'separate',
|
|
251
|
+
borderSpacing: 0,
|
|
252
|
+
}, children: _jsx(TableBody, { "data-testid": `${jsx}.${defaultHeader}.tableBody`, sx: { backgroundColor: backgroundColor }, children: renderBody(table.getRowModel().rows, mainColumnWidth, backgroundColor) }) }) })] }));
|
|
263
253
|
}
|
package/dist/main.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { StrictMode } from 'react';
|
|
2
3
|
import { createRoot } from 'react-dom/client';
|
|
3
4
|
import './index.css';
|
|
4
5
|
import App from './App';
|
|
5
|
-
|
|
6
|
-
createRoot(document.getElementById('root')).render(React.createElement(StrictMode, null,
|
|
7
|
-
React.createElement(App, null)));
|
|
6
|
+
createRoot(document.getElementById('root')).render(_jsx(StrictMode, { children: _jsx(App, {}) }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "frame.select",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7",
|
|
4
4
|
"description": "A React component for selecting items from a list with a search bar.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -24,33 +24,38 @@
|
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@emotion/react": "^11.0.0",
|
|
26
26
|
"@emotion/styled": "^11.0.0",
|
|
27
|
-
"@mui/icons-material": "^
|
|
28
|
-
"@mui/material": "^
|
|
27
|
+
"@mui/icons-material": "^9.0.0",
|
|
28
|
+
"@mui/material": "^9.0.0",
|
|
29
29
|
"@tanstack/react-table": "^8.0.0",
|
|
30
30
|
"react": "^18.0.0 || ^19.0.0",
|
|
31
31
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
34
|
+
"@emotion/react": "^11.0.0",
|
|
35
|
+
"@emotion/styled": "^11.0.0",
|
|
36
|
+
"@eslint/js": "^10.0.1",
|
|
37
|
+
"@mui/icons-material": "^9.0.0",
|
|
38
|
+
"@mui/material": "^9.0.0",
|
|
39
|
+
"@playwright/test": "^1.59.1",
|
|
40
|
+
"@tanstack/react-table": "^8.0.0",
|
|
36
41
|
"@testing-library/dom": "^10.4.1",
|
|
37
42
|
"@testing-library/jest-dom": "^6.9.1",
|
|
38
|
-
"@testing-library/react": "^16.3.
|
|
39
|
-
"@types/node": "^25.0
|
|
40
|
-
"@types/react": "^19.2.
|
|
43
|
+
"@testing-library/react": "^16.3.2",
|
|
44
|
+
"@types/node": "^25.6.0",
|
|
45
|
+
"@types/react": "^19.2.14",
|
|
41
46
|
"@types/react-dom": "^19.2.3",
|
|
42
|
-
"@vitejs/plugin-react": "^
|
|
43
|
-
"eslint": "^
|
|
47
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
48
|
+
"eslint": "^10.2.0",
|
|
44
49
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
45
|
-
"eslint-plugin-react-refresh": "^0.
|
|
46
|
-
"globals": "^17.
|
|
47
|
-
"jsdom": "^
|
|
48
|
-
"playwright": "^1.
|
|
49
|
-
"react": "^19.2.
|
|
50
|
-
"react-dom": "^19.2.
|
|
51
|
-
"typescript": "~
|
|
52
|
-
"typescript-eslint": "^8.
|
|
53
|
-
"vite": "^
|
|
54
|
-
"vitest": "^4.
|
|
50
|
+
"eslint-plugin-react-refresh": "^0.5.2",
|
|
51
|
+
"globals": "^17.5.0",
|
|
52
|
+
"jsdom": "^29.0.2",
|
|
53
|
+
"playwright": "^1.59.1",
|
|
54
|
+
"react": "^19.2.5",
|
|
55
|
+
"react-dom": "^19.2.5",
|
|
56
|
+
"typescript": "~6.0.2",
|
|
57
|
+
"typescript-eslint": "^8.58.2",
|
|
58
|
+
"vite": "^8.0.0",
|
|
59
|
+
"vitest": "^4.1.4"
|
|
55
60
|
}
|
|
56
61
|
}
|