@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chem-po/react-web",
3
- "version": "0.0.16",
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
- "@chakra-ui/anatomy": "^2.2.2",
20
- "@chakra-ui/icons": "^2.1.1",
21
- "@chakra-ui/react": "^2.10.3",
22
- "@chakra-ui/theme-tools": "^2.1.2",
23
- "@emotion/react": "^11.13.3",
24
- "@emotion/styled": "^11.13.0",
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": "^10.13.1",
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": "^5.4.6",
59
- "tsup": "^8.3.0"
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?._id
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._id),
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]?._id || `${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._id),
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]?._id || `${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]?._id || `${index}`}
103
+ itemKey={index => items[index]?.id || `${index}`}
104
104
  style={{
105
105
  overflowX: 'hidden',
106
106
  }}
@@ -33,7 +33,7 @@ const BasePagedGridBody = <
33
33
  list,
34
34
  items,
35
35
  numCols,
36
- onSelect: item => onSelectItem(item._id),
36
+ onSelect: item => onSelectItem(item.id),
37
37
  mobileLayout,
38
38
  colorMode,
39
39
  grid: options,
@@ -22,7 +22,7 @@ const BasePagedListBody = ({ height }: { height: number }) => {
22
22
  list,
23
23
  colorMode,
24
24
  items,
25
- onSelect: item => onSelectItem(item._id),
25
+ onSelect: item => onSelectItem(item.id),
26
26
  mobileLayout,
27
27
  }),
28
28
  [items, list, onSelectItem, mobileLayout, colorMode],
@@ -41,7 +41,7 @@ export const ListCell = <T extends AnyObject>({
41
41
  <Render
42
42
  index={itemIdx}
43
43
  item={item}
44
- refetch={refetch ? () => refetch(item._id) : undefined}
44
+ refetch={refetch ? () => refetch(item.id) : undefined}
45
45
  colorMode={colorMode}
46
46
  />
47
47
  </Flex>
@@ -36,7 +36,7 @@ export const ListRow = <T extends AnyObject>({
36
36
  <Render
37
37
  index={index}
38
38
  item={item}
39
- refetch={refetch ? () => refetch(item._id) : undefined}
39
+ refetch={refetch ? () => refetch(item.id) : undefined}
40
40
  colorMode={colorMode}
41
41
  />
42
42
  </Flex>
@@ -13,7 +13,7 @@ export const ListItemView = () => {
13
13
  // refetchItem,
14
14
  } = usePaginatedList()
15
15
  const item = useMemo(
16
- () => data.find(d => d._id === selectedItemId) ?? null,
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.loading)
11
+ const authLoading = useAuth(s => s.signInLoading)
12
+ const multiFactorLoading = useAuth(s => s.multiFactorLoading)
12
13
 
13
14
  const navigate = useNavigate()
14
15
  useEffect(() => {