@dxos/react-client 2.28.1-dev.fd53c1da → 2.28.2-dev.45b56c52

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,31 +1,31 @@
1
1
  {
2
2
  "name": "@dxos/react-client",
3
- "version": "2.28.1-dev.fd53c1da",
3
+ "version": "2.28.2-dev.45b56c52",
4
4
  "description": "React client API",
5
5
  "keywords": [],
6
- "license": "AGPL-3.0",
6
+ "license": "MIT",
7
7
  "author": "DXOS.org",
8
8
  "main": "dist/src/index.js",
9
9
  "types": "dist/src/index.d.ts",
10
10
  "dependencies": {
11
- "@dxos/async": "2.28.1-dev.fd53c1da",
12
- "@dxos/bot-factory-client": "2.28.1-dev.fd53c1da",
13
- "@dxos/client": "2.28.1-dev.fd53c1da",
14
- "@dxos/config": "2.28.1-dev.fd53c1da",
15
- "@dxos/credentials": "2.28.1-dev.fd53c1da",
16
- "@dxos/crypto": "2.28.1-dev.fd53c1da",
17
- "@dxos/debug": "2.28.1-dev.fd53c1da",
18
- "@dxos/echo-db": "2.28.1-dev.fd53c1da",
19
- "@dxos/network-manager": "2.28.1-dev.fd53c1da",
20
- "@dxos/util": "2.28.1-dev.fd53c1da",
11
+ "@dxos/async": "2.28.2-dev.45b56c52",
12
+ "@dxos/bot-factory-client": "2.28.2-dev.45b56c52",
13
+ "@dxos/client": "2.28.2-dev.45b56c52",
14
+ "@dxos/config": "2.28.2-dev.45b56c52",
15
+ "@dxos/credentials": "2.28.2-dev.45b56c52",
16
+ "@dxos/crypto": "2.28.2-dev.45b56c52",
17
+ "@dxos/debug": "2.28.2-dev.45b56c52",
18
+ "@dxos/echo-db": "2.28.2-dev.45b56c52",
19
+ "@dxos/network-manager": "2.28.2-dev.45b56c52",
20
+ "@dxos/util": "2.28.2-dev.45b56c52",
21
21
  "assert": "^2.0.0",
22
22
  "debug": "^4.3.3",
23
23
  "react-display-name": "^0.2.5",
24
24
  "use-subscription": "^1.4.1"
25
25
  },
26
26
  "devDependencies": {
27
- "@dxos/esbuild-plugins": "2.28.1-dev.fd53c1da",
28
- "@dxos/toolchain-node-library": "2.28.0",
27
+ "@dxos/esbuild-plugins": "2.28.2-dev.45b56c52",
28
+ "@dxos/toolchain-node-library": "2.28.1",
29
29
  "@mui/material": "^5.4.2",
30
30
  "@testing-library/react": "^11.0.4",
31
31
  "@testing-library/react-hooks": "5.1.2",
@@ -22,12 +22,12 @@ export const useSelection = <T extends Entity<any>> (
22
22
  selection: Selection<T> | SelectionResult<T> | Falsy,
23
23
  deps: readonly any[] = []
24
24
  ): T[] | undefined => {
25
- const [result, setResult] = useState(() => coerseSelection(selection));
25
+ const [result, setResult] = useState(() => coerceSelection(selection));
26
26
  const [data, setData] = useState(() => result ? result.result : undefined);
27
27
 
28
28
  // Update selection when the query or customs deps change.
29
29
  useEffect(() => {
30
- const newResult = coerseSelection(selection);
30
+ const newResult = coerceSelection(selection);
31
31
  const newData = newResult?.result;
32
32
  setResult(newResult);
33
33
  setData(newData);
@@ -45,8 +45,6 @@ export const useSelection = <T extends Entity<any>> (
45
45
  return data;
46
46
  };
47
47
 
48
- // TODO(burdon): Typo (coerce).
49
- const coerseSelection = <T extends Entity>(arg: Selection<T> | SelectionResult<T> | Falsy): SelectionResult<T> | undefined =>
50
- !arg ? undefined
51
- : arg instanceof Selection ? arg.query()
52
- : arg;
48
+ const coerceSelection = <T extends Entity>(
49
+ arg: Selection<T> | SelectionResult<T> | Falsy
50
+ ): SelectionResult<T> | undefined => !arg ? undefined : arg instanceof Selection ? arg.query() : arg;
@@ -7,5 +7,5 @@ import { Client } from '@dxos/client';
7
7
  import { useInvitations } from './useInvitations';
8
8
 
9
9
  export const useHaloInvitations = (client: Client) => {
10
- return useInvitations(client.halo);
10
+ return useInvitations(client.halo.invitationProxy);
11
11
  };
@@ -9,5 +9,5 @@ import { useInvitations } from './useInvitations';
9
9
 
10
10
  export const usePartyInvitations = (partyKey?: PublicKey) => {
11
11
  const party = useParty(partyKey);
12
- return useInvitations(party);
12
+ return useInvitations(party?.invitationProxy);
13
13
  };
@@ -2,7 +2,7 @@
2
2
  // Copyright 2021 DXOS.org
3
3
  //
4
4
 
5
- import React, { useEffect, useState } from 'react';
5
+ import React, { ChangeEvent, useEffect, useState } from 'react';
6
6
 
7
7
  import { Box, Button, TextField, Toolbar } from '@mui/material';
8
8
 
@@ -48,7 +48,7 @@ export const PartyJoinPanel = (
48
48
  multiline
49
49
  fullWidth
50
50
  value={invitationCode}
51
- onChange={(event: React.ChangeEvent<HTMLTextAreaElement>) => {
51
+ onChange={(event: ChangeEvent<HTMLTextAreaElement>) => {
52
52
  setInvitationCode(event.target.value);
53
53
  setPin('');
54
54
  }}
@@ -60,7 +60,7 @@ export const PartyJoinPanel = (
60
60
  <TextField
61
61
  disabled={!invitationCode}
62
62
  value={pin}
63
- onChange={(event: React.ChangeEvent<HTMLInputElement>) => setPin(event.target.value)}
63
+ onChange={(event: ChangeEvent<HTMLInputElement>) => setPin(event.target.value)}
64
64
  size='small'
65
65
  label='PIN'
66
66
  />