@columenlabs/lumen-ui 0.1.69 → 0.1.70

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.
@@ -1,7 +1,7 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // Invite people: many emails at once, a role, access per scope, how long the link works and a note.
3
3
  // Each result says whether the email went; when it did not, the link is there to copy.
4
- import { emailsIn, levelsOf, } from '@columenlabs/lumen-ui-types/people';
4
+ import { emailsIn, inviteGrants, levelsOf, } from '@columenlabs/lumen-ui-types/people';
5
5
  import { CheckIcon, CopyIcon, MailIcon, TriangleAlertIcon, UserPlusIcon } from 'lucide-react';
6
6
  import { useId, useMemo, useState } from 'react';
7
7
  import { DrawerSection } from '../drawer-section.js';
@@ -22,7 +22,7 @@ export function InviteDrawer({ adapter, view, open, onClose, onSetUpMail, }) {
22
22
  const ids = useId();
23
23
  const [text, setText] = useState('');
24
24
  const [role, setRole] = useState('member');
25
- const [grants, setGrants] = useState([]);
25
+ const [grants, setGrants] = useState(() => inviteGrants(view.scopes));
26
26
  const [days, setDays] = useState(view.inviteDays);
27
27
  const [note, setNote] = useState('');
28
28
  const [busy, setBusy] = useState(false);
@@ -47,7 +47,7 @@ export function InviteDrawer({ adapter, view, open, onClose, onSetUpMail, }) {
47
47
  const reset = () => {
48
48
  setText('');
49
49
  setRole('member');
50
- setGrants([]);
50
+ setGrants(inviteGrants(view.scopes));
51
51
  setDays(view.inviteDays);
52
52
  setNote('');
53
53
  setResults(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@columenlabs/lumen-ui",
3
- "version": "0.1.69",
3
+ "version": "0.1.70",
4
4
  "description": "Lumen: shared React components (frame, views, widgets, charts, drawers).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -45,7 +45,7 @@
45
45
  "@codemirror/lang-javascript": "6.2.5",
46
46
  "@codemirror/lang-json": "6.0.2",
47
47
  "@codemirror/lang-sql": "6.10.0",
48
- "@columenlabs/lumen-ui-types": "0.1.69",
48
+ "@columenlabs/lumen-ui-types": "0.1.70",
49
49
  "@dnd-kit/core": "6.3.1",
50
50
  "@dnd-kit/sortable": "10.0.0",
51
51
  "@dnd-kit/utilities": "3.2.2",