frame.select 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.d.ts.map +1 -1
- package/dist/App.js +10 -15
- package/dist/components/types.d.ts +4 -3
- package/dist/components/types.d.ts.map +1 -1
- package/package.json +1 -1
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;AAGnB,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AACA,OAAO,WAAW,CAAC;AAGnB,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,iBAAS,GAAG,sBAuMX;AAED,eAAe,GAAG,CAAC"}
|
package/dist/App.js
CHANGED
|
@@ -4,7 +4,6 @@ import { useState } from 'react';
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { BrandList } from './components/BrandList';
|
|
6
6
|
import { FrameList } from './components/FrameList';
|
|
7
|
-
import { Box } from '@mui/material';
|
|
8
7
|
function App() {
|
|
9
8
|
const [brand, setBrand] = useState('');
|
|
10
9
|
const brands = [
|
|
@@ -109,10 +108,11 @@ function App() {
|
|
|
109
108
|
return [];
|
|
110
109
|
}
|
|
111
110
|
return foundFrames.frames.map((frame) => ({
|
|
112
|
-
|
|
111
|
+
frame,
|
|
113
112
|
name: frame.substring(18, 23),
|
|
114
|
-
|
|
115
|
-
width:
|
|
113
|
+
height: frame.substring(23, 25),
|
|
114
|
+
width: frame.substring(25, 27),
|
|
115
|
+
rest: frame.substring(27),
|
|
116
116
|
}));
|
|
117
117
|
}
|
|
118
118
|
const brandColumnHelper = createColumnHelper();
|
|
@@ -130,8 +130,8 @@ function App() {
|
|
|
130
130
|
];
|
|
131
131
|
const frameColumnHelper = createColumnHelper();
|
|
132
132
|
const frameColumns = [
|
|
133
|
-
frameColumnHelper.accessor((row) => row.
|
|
134
|
-
header: '
|
|
133
|
+
frameColumnHelper.accessor((row) => row.height.toString(), {
|
|
134
|
+
header: 'height',
|
|
135
135
|
size: 120,
|
|
136
136
|
cell: (info) => React.createElement("div", null, info.getValue()),
|
|
137
137
|
}),
|
|
@@ -150,7 +150,7 @@ function App() {
|
|
|
150
150
|
column: frameColumns[1],
|
|
151
151
|
},
|
|
152
152
|
];
|
|
153
|
-
const onClickBrand = (cell
|
|
153
|
+
const onClickBrand = (cell) => {
|
|
154
154
|
console.log(`cell: ${JSON.stringify(cell.row.original, null, 2)}`);
|
|
155
155
|
const brand = brands.find((b) => b.name === cell.row.original.name);
|
|
156
156
|
if (brand) {
|
|
@@ -162,14 +162,9 @@ function App() {
|
|
|
162
162
|
};
|
|
163
163
|
return (React.createElement(React.Fragment, null,
|
|
164
164
|
React.createElement("h1", null, "Brand List"),
|
|
165
|
-
React.createElement(
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
border: '10px solid black',
|
|
169
|
-
} },
|
|
170
|
-
React.createElement(BrandList, { brandList: brands, onClick: onClickBrand,
|
|
171
|
-
// renderItem={renderItem}
|
|
172
|
-
extraColumns: extraBrandColumns })),
|
|
165
|
+
React.createElement(BrandList, { brandList: brands, onClick: onClickBrand,
|
|
166
|
+
// renderItem={renderItem}
|
|
167
|
+
extraColumns: extraBrandColumns }),
|
|
173
168
|
React.createElement("h2", null, "Frame List"),
|
|
174
169
|
React.createElement(FrameList, { frameList: convertFrames(brand, frames), onClick: onClickFrame, extraColumns: extraFrameColumns, style: { border: '1px solid black', padding: '10px' } })));
|
|
175
170
|
}
|
|
@@ -4,9 +4,10 @@ export type TBrandObj = {
|
|
|
4
4
|
description: string;
|
|
5
5
|
};
|
|
6
6
|
export type TFrameObj = {
|
|
7
|
+
frame: string;
|
|
7
8
|
name: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
width: string;
|
|
10
|
+
height: string;
|
|
11
|
+
rest: string;
|
|
11
12
|
};
|
|
12
13
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AACF,MAAM,MAAM,SAAS,GAAG;IACtB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AACF,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
|