@chem-po/react-web 0.0.16 → 0.0.17
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/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
- package/src/components/feed/MediaFeed.tsx +1 -1
- package/src/components/list/Body/InfiniteScrollGridBody.tsx +2 -2
- package/src/components/list/Body/InfiniteScrollListBody.tsx +3 -3
- package/src/components/list/Body/PagedGridBody.tsx +1 -1
- package/src/components/list/Body/PagedListBody.tsx +1 -1
- package/src/components/list/ListItem/ListCell.tsx +1 -1
- package/src/components/list/ListItem/ListRow.tsx +1 -1
- package/src/components/list/ListItemView.tsx +1 -1
- package/src/components/list/utils.ts +1 -0
- package/src/components/view/RedirectView.tsx +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chem-po/react-web",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,14 +16,16 @@
|
|
|
16
16
|
"author": "",
|
|
17
17
|
"license": "ISC",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@
|
|
20
|
-
"@
|
|
21
|
-
"@chakra-ui/
|
|
22
|
-
"@chakra-ui/
|
|
23
|
-
"@
|
|
24
|
-
"@
|
|
19
|
+
"@chem-po/core": "0.0.17",
|
|
20
|
+
"@chem-po/react": "0.0.17",
|
|
21
|
+
"@chakra-ui/anatomy": "^2.3.4",
|
|
22
|
+
"@chakra-ui/icons": "^2.2.4",
|
|
23
|
+
"@chakra-ui/react": "^2.10.7",
|
|
24
|
+
"@chakra-ui/theme-tools": "^2.2.6",
|
|
25
|
+
"@emotion/react": "^11.14.0",
|
|
26
|
+
"@emotion/styled": "^11.14.0",
|
|
25
27
|
"@react-hook/resize-observer": "^2.0.2",
|
|
26
|
-
"firebase": "^
|
|
28
|
+
"firebase": "^11.4.0",
|
|
27
29
|
"framer-motion": "^12.6.3",
|
|
28
30
|
"howler": "^2.2.4",
|
|
29
31
|
"lottie-react": "^2.4.0",
|
|
@@ -39,9 +41,7 @@
|
|
|
39
41
|
"react-window": "^1.8.10",
|
|
40
42
|
"react-window-infinite-loader": "^1.0.9",
|
|
41
43
|
"@hello-pangea/dnd": "^18.0.1",
|
|
42
|
-
"zustand": "^4.3.3"
|
|
43
|
-
"@chem-po/core": "0.0.16",
|
|
44
|
-
"@chem-po/react": "0.0.16"
|
|
44
|
+
"zustand": "^4.3.3"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"react": "^19.0.0",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"@types/react-window": "^1.8.8",
|
|
56
56
|
"@types/react-window-infinite-loader": "^1.0.9",
|
|
57
57
|
"replace-in-file": "^8.1.0",
|
|
58
|
-
"vite": "^
|
|
59
|
-
"tsup": "^8.
|
|
58
|
+
"vite": "^6.2.2",
|
|
59
|
+
"tsup": "^8.4.0"
|
|
60
60
|
},
|
|
61
61
|
"description": "",
|
|
62
62
|
"scripts": {
|
|
@@ -141,7 +141,7 @@ export const MediaFeed = <T extends AnyObject = AnyObject>({
|
|
|
141
141
|
|
|
142
142
|
const handleItemLoad = useCallback(
|
|
143
143
|
(data: WithId<T> | null) => {
|
|
144
|
-
const isCurr = panels.find(p => p.status === 'current')?.id === data?.
|
|
144
|
+
const isCurr = panels.find(p => p.status === 'current')?.id === data?.id
|
|
145
145
|
if (isCurr) setCurr(data)
|
|
146
146
|
},
|
|
147
147
|
[panels],
|
|
@@ -42,7 +42,7 @@ export const InfiniteScrollGridBody = <T extends AnyObject>({
|
|
|
42
42
|
grid: options,
|
|
43
43
|
colorMode,
|
|
44
44
|
numCols,
|
|
45
|
-
onSelect: (item: WithId<T>) => onSelectItem(item.
|
|
45
|
+
onSelect: (item: WithId<T>) => onSelectItem(item.id),
|
|
46
46
|
refetch: refetchItem,
|
|
47
47
|
}),
|
|
48
48
|
[items, list, refetchItem, onSelectItem, mobileLayout, numCols, options, colorMode],
|
|
@@ -83,7 +83,7 @@ export const InfiniteScrollGridBody = <T extends AnyObject>({
|
|
|
83
83
|
data: ListItemProps<T>
|
|
84
84
|
}) => {
|
|
85
85
|
const index = rowIndex * numCols + columnIndex
|
|
86
|
-
return data.items[index]?.
|
|
86
|
+
return data.items[index]?.id || `${index}`
|
|
87
87
|
},
|
|
88
88
|
[numCols],
|
|
89
89
|
)
|
|
@@ -26,7 +26,7 @@ export const InfiniteScrollListBody = ({ height }: { height: number }) => {
|
|
|
26
26
|
items,
|
|
27
27
|
mobileLayout,
|
|
28
28
|
colorMode,
|
|
29
|
-
onSelect: (item: WithId<AnyObject>) => onSelectItem(item.
|
|
29
|
+
onSelect: (item: WithId<AnyObject>) => onSelectItem(item.id),
|
|
30
30
|
refetch: refetchItem,
|
|
31
31
|
}),
|
|
32
32
|
[items, list, refetchItem, onSelectItem, mobileLayout, colorMode],
|
|
@@ -78,7 +78,7 @@ export const InfiniteScrollListBody = ({ height }: { height: number }) => {
|
|
|
78
78
|
itemCount={totalCount ?? 0}
|
|
79
79
|
itemData={itemData}
|
|
80
80
|
style={{ overflowX: 'hidden' }}
|
|
81
|
-
itemKey={index => items[index]?.
|
|
81
|
+
itemKey={index => items[index]?.id || `${index}`}
|
|
82
82
|
onItemsRendered={i => {
|
|
83
83
|
onItemsRendered(i)
|
|
84
84
|
}}
|
|
@@ -100,7 +100,7 @@ export const InfiniteScrollListBody = ({ height }: { height: number }) => {
|
|
|
100
100
|
itemSize={itemHeight as number}
|
|
101
101
|
itemCount={totalCount ?? 0}
|
|
102
102
|
itemData={itemData}
|
|
103
|
-
itemKey={index => items[index]?.
|
|
103
|
+
itemKey={index => items[index]?.id || `${index}`}
|
|
104
104
|
style={{
|
|
105
105
|
overflowX: 'hidden',
|
|
106
106
|
}}
|
|
@@ -22,7 +22,7 @@ const BasePagedListBody = ({ height }: { height: number }) => {
|
|
|
22
22
|
list,
|
|
23
23
|
colorMode,
|
|
24
24
|
items,
|
|
25
|
-
onSelect: item => onSelectItem(item.
|
|
25
|
+
onSelect: item => onSelectItem(item.id),
|
|
26
26
|
mobileLayout,
|
|
27
27
|
}),
|
|
28
28
|
[items, list, onSelectItem, mobileLayout, colorMode],
|
|
@@ -13,7 +13,7 @@ export const ListItemView = () => {
|
|
|
13
13
|
// refetchItem,
|
|
14
14
|
} = usePaginatedList()
|
|
15
15
|
const item = useMemo(
|
|
16
|
-
() => data.find(d => d.
|
|
16
|
+
() => data.find(d => d.id === selectedItemId) ?? null,
|
|
17
17
|
[data, selectedItemId],
|
|
18
18
|
)
|
|
19
19
|
const { colorMode } = useColorMode()
|
|
@@ -30,6 +30,7 @@ export const getSearchQueries = <T extends AnyObject>(
|
|
|
30
30
|
baseQuery: Query<T>,
|
|
31
31
|
searchData: BaseQuery<T>['search'],
|
|
32
32
|
): Array<Query<T>> => {
|
|
33
|
+
if (!searchData) return [baseQuery]
|
|
33
34
|
const { paths, query: search } = searchData
|
|
34
35
|
if (!paths?.length || !search) return [baseQuery]
|
|
35
36
|
return paths.map(path => getTextSearchQuery(baseQuery, search, path))
|
|
@@ -8,7 +8,8 @@ import { Loading } from '../loading/Loading'
|
|
|
8
8
|
|
|
9
9
|
export const RedirectView: React.FC<{ loading?: boolean }> = ({ loading }) => {
|
|
10
10
|
const timer = useRef<ReturnType<typeof setTimeout> | null>(null)
|
|
11
|
-
const authLoading = useAuth(s => s.
|
|
11
|
+
const authLoading = useAuth(s => s.signInLoading)
|
|
12
|
+
const multiFactorLoading = useAuth(s => s.multiFactorLoading)
|
|
12
13
|
|
|
13
14
|
const navigate = useNavigate()
|
|
14
15
|
useEffect(() => {
|