@protobase/ui 0.46.3 → 0.46.4
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/account/account-page.js +50 -0
- package/dist/account/account-pages.js +24 -9
- package/dist/account/account-tree.js +18 -0
- package/dist/account/blocks/account-loading.js +19 -0
- package/dist/account/blocks/connected-accounts-block.js +37 -0
- package/dist/account/blocks/connected-apps-block.js +21 -0
- package/dist/account/blocks/devices-block.js +23 -0
- package/dist/account/blocks/passkeys-block.js +25 -0
- package/dist/account/blocks/password-block.js +27 -0
- package/dist/account/blocks/profile-block.js +28 -0
- package/dist/account/blocks/two-factor-block.js +29 -0
- package/dist/account/blocks/use-account-data.js +24 -0
- package/dist/account/change-email-dialog.js +98 -0
- package/dist/account/connected-apps-section.js +4 -4
- package/dist/account/device-name.js +26 -0
- package/dist/account/devices-section.js +119 -0
- package/dist/account/messages.js +94 -2
- package/dist/account/passkeys-section.js +4 -4
- package/dist/account/password-change-dialog.js +119 -0
- package/dist/account/password-dialog.js +2 -2
- package/dist/account/password-section.js +51 -0
- package/dist/account/profile-section.js +107 -0
- package/dist/account/sign-in-policy-form.js +1 -1
- package/dist/account/sign-in-policy-page.js +1 -1
- package/dist/account/sign-in-providers-section.js +2 -2
- package/dist/account/staff-sign-in-log.js +1 -1
- package/dist/account/two-factor-section.js +1 -1
- package/dist/account/two-factor-setup.js +2 -2
- package/dist/activity-chart/activity-chart.js +2 -2
- package/dist/app/app.js +39 -23
- package/dist/app/charts/chart-view.js +2 -2
- package/dist/app/comments/comment-composer.js +1 -1
- package/dist/app/comments/comments-section.js +3 -3
- package/dist/app/create/create-page.js +4 -4
- package/dist/app/current-address.d.ts +1 -0
- package/dist/app/custom-section.js +4 -4
- package/dist/app/delete/use-delete-flow.js +1 -1
- package/dist/app/displays/board-column.js +1 -1
- package/dist/app/displays/board-display.js +2 -2
- package/dist/app/displays/calendar-display.js +2 -2
- package/dist/app/displays/custom-display.js +3 -3
- package/dist/app/displays/display-controls.js +1 -1
- package/dist/app/displays/map-display.js +2 -2
- package/dist/app/displays/period-controls.js +1 -1
- package/dist/app/displays/record-card.js +2 -2
- package/dist/app/displays/timeline-display.js +2 -2
- package/dist/app/displays/use-calendar-move.js +1 -1
- package/dist/app/document-title.js +2 -2
- package/dist/app/embedded-list/embedded-display.js +1 -1
- package/dist/app/embedded-list/embedded-list.js +1 -1
- package/dist/app/export/export-dialog.js +2 -2
- package/dist/app/export/use-export-flow.js +1 -1
- package/dist/app/field-editor.js +2 -2
- package/dist/app/file-field.js +3 -3
- package/dist/app/gallery/gallery-section.js +2 -2
- package/dist/app/gallery/photo-details.js +1 -1
- package/dist/app/gallery/use-gallery-photos.js +1 -1
- package/dist/app/hand-order/hand-sorted-list.js +3 -3
- package/dist/app/history/history-section.js +2 -2
- package/dist/app/import/import-button.js +1 -1
- package/dist/app/import/import-check-step.js +1 -1
- package/dist/app/incoming-card.js +2 -2
- package/dist/app/list-group-chart.js +1 -1
- package/dist/app/list-page.js +6 -6
- package/dist/app/messages.js +0 -2
- package/dist/app/meta-gate.js +1 -1
- package/dist/app/nav-from-meta.js +1 -1
- package/dist/app/new-version/new-version-banner.js +1 -1
- package/dist/app/new-version/new-version-button.js +1 -1
- package/dist/app/new-version/new-version-toast.js +1 -1
- package/dist/app/pages/action-inputs/action-inputs-dialog.js +2 -2
- package/dist/app/pages/action-inputs/input-answers.js +1 -1
- package/dist/app/pages/blocks/card-row.js +2 -2
- package/dist/app/pages/blocks/field.js +1 -1
- package/dist/app/pages/blocks/form-draft.js +19 -0
- package/dist/app/pages/blocks/modal-form.js +10 -24
- package/dist/app/pages/blocks/page-block.js +1 -1
- package/dist/app/pages/blocks/record-card.js +2 -2
- package/dist/app/pages/blocks/settings.js +179 -0
- package/dist/app/pages/blocks/stat.js +2 -2
- package/dist/app/pages/blocks/tabs.js +59 -0
- package/dist/app/pages/composed-page.js +16 -3
- package/dist/app/pages/custom-boundary.js +1 -1
- package/dist/app/pages/field-value.js +1 -1
- package/dist/app/pages/messages.js +6 -0
- package/dist/app/pages/page-tabs.js +27 -0
- package/dist/app/pages/record-actions.js +2 -2
- package/dist/app/pages/render-node.js +22 -3
- package/dist/app/pages/use-run-action.js +1 -1
- package/dist/app/project-logo.js +2 -2
- package/dist/app/record-chart/record-chart-section.js +4 -4
- package/dist/app/record-page.js +12 -12
- package/dist/app/record-row/record-row-body.js +1 -1
- package/dist/app/record-row/saved-record-row.js +1 -1
- package/dist/app/related-cards/related-card.js +1 -1
- package/dist/app/related-dots/related-dots-columns.js +1 -1
- package/dist/app/related-section.js +2 -2
- package/dist/app/relation-picker.js +1 -1
- package/dist/app/router.js +2 -2
- package/dist/app/saved/saved-list.js +1 -1
- package/dist/app/search/use-global-search.js +1 -1
- package/dist/app/searches/save-search-button.js +1 -1
- package/dist/app/searches/saved-search-rows.js +1 -1
- package/dist/app/searches/saved-search-section.js +2 -2
- package/dist/app/searches/saved-searches.js +3 -3
- package/dist/app/searches/search-controls.js +2 -2
- package/dist/app/searches/search-name-dialog.js +1 -1
- package/dist/app/searches/update-search-dialog.js +2 -2
- package/dist/app/searches/use-save-search.js +1 -1
- package/dist/app/sensitive-field.js +2 -2
- package/dist/app/source-notice.js +1 -1
- package/dist/app/staff-banner.js +2 -2
- package/dist/app/use-app-address.js +2 -2
- package/dist/app/use-incoming-counts.js +1 -1
- package/dist/app-shell/app-shell.js +2 -1
- package/dist/app-shell/breadcrumb.js +1 -1
- package/dist/app-shell/drawer.js +1 -1
- package/dist/app-shell/global-search.js +1 -1
- package/dist/app-shell/profile-menu.js +27 -12
- package/dist/app-shell/sidebar.js +2 -1
- package/dist/assistant-dock/widget-view.js +1 -1
- package/dist/auth/auth-gate.js +2 -2
- package/dist/auth/auth-messages.js +2 -2
- package/dist/auth/auth-provider.js +4 -0
- package/dist/auth/code-form.js +1 -1
- package/dist/auth/email-code-form.js +1 -1
- package/dist/auth/email-code-page.js +1 -1
- package/dist/auth/forgot-password-form.js +4 -4
- package/dist/auth/provider-sign-in-page.js +2 -2
- package/dist/auth/reset-password-form.js +1 -1
- package/dist/auth/setup-required-form.js +1 -1
- package/dist/auth/setup-required-page.js +2 -2
- package/dist/auth/sign-in-form.js +2 -2
- package/dist/auth/sign-in-page.js +1 -1
- package/dist/auth/sign-in-prompt.js +2 -2
- package/dist/auth/sign-up-code-form.js +1 -1
- package/dist/auth/sign-up-details-form.js +2 -2
- package/dist/auth/sign-up-email-form.js +1 -1
- package/dist/auth/sign-up-page.js +1 -1
- package/dist/auth/staff-sign-in-form.js +2 -2
- package/dist/auth/staff-sign-in-page.js +1 -1
- package/dist/auth/two-factor-form.js +3 -3
- package/dist/auth/two-factor-page.js +1 -1
- package/dist/chat/composer.js +1 -1
- package/dist/connect/connect-page.js +4 -4
- package/dist/data/meta-data.d.ts +3 -1
- package/dist/data/use-meta.js +1 -0
- package/dist/data-grid/cell-text.js +1 -1
- package/dist/data-grid/cells.js +3 -3
- package/dist/data-grid/grid-header.js +1 -1
- package/dist/data-grid/grid-row.js +2 -2
- package/dist/data-grid/row-menu.js +1 -1
- package/dist/filter-panel/facet-group.js +1 -1
- package/dist/forms/public-form-page.js +5 -5
- package/dist/index.js +20 -20
- package/dist/inline-child-table/line-row.js +1 -1
- package/dist/inline-child-table/totals-footer.js +1 -1
- package/dist/invitations/invite-form.js +1 -1
- package/dist/lists/paged-search-list.js +1 -1
- package/dist/live/columns-from-model.js +1 -1
- package/dist/live/use-filter-config.js +1 -1
- package/dist/live/use-reference-search.js +1 -1
- package/dist/notifications/bell/notification-bell.js +1 -1
- package/dist/notifications/bell/notification-item.js +2 -2
- package/dist/organizations/all-organizations.js +1 -1
- package/dist/organizations/invitation-page.js +6 -6
- package/dist/organizations/invitations-page.js +3 -3
- package/dist/organizations/members-page.js +5 -5
- package/dist/organizations/organization-page.js +3 -3
- package/dist/organizations/organization-row.js +1 -1
- package/dist/organizations/organizations-page.js +3 -3
- package/dist/organizations/use-organizations.js +1 -1
- package/dist/package.js +1 -1
- package/dist/plugins/before-sign-in.js +1 -1
- package/dist/plugins/plugin-gate.js +1 -1
- package/dist/primitives/sheet.js +1 -1
- package/dist/record-view/field.js +2 -2
- package/dist/record-view/record-header.js +1 -1
- package/dist/record-view/record-tabs.js +1 -1
- package/dist/roles/use-active-role.js +1 -1
- package/dist/shell/assets/app-BS1C66SI.js +9 -0
- package/dist/shell/assets/index-DMB4DCM1.js +2 -0
- package/dist/shell/assets/index-zVvlyz9B.css +2 -0
- package/dist/shell/assets/{maplibre-BlwO7zTh.js → maplibre-CjNYwEqW.js} +3 -3
- package/dist/shell/assets/{preload-helper-C24C2MCK.js → preload-helper-SYSsmQ2O.js} +2 -2
- package/dist/shell/assets/{record-map-QajKJid1.js → record-map-DjqQGqZ2.js} +2 -2
- package/dist/shell/assets/{records-map-DybHhZlM.js → records-map-peII4mzy.js} +2 -2
- package/dist/shell/assets/shared-protobase-ui-CQQebf-J.js +2 -0
- package/dist/shell/assets/vendor-BzlIWwX2.js +63 -0
- package/dist/shell/index.html +6 -6
- package/dist/shell/protobase.shell.json +1 -1
- package/dist/shell/protobase.sw.js +2 -2
- package/dist/shell-source-maps/assets/app-BS1C66SI.js.map +1 -0
- package/dist/shell-source-maps/assets/{index-CY22munM.js.map → index-DMB4DCM1.js.map} +1 -1
- package/dist/shell-source-maps/assets/{maplibre-BlwO7zTh.js.map → maplibre-CjNYwEqW.js.map} +1 -1
- package/dist/shell-source-maps/assets/{preload-helper-C24C2MCK.js.map → preload-helper-SYSsmQ2O.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-map-QajKJid1.js.map → record-map-DjqQGqZ2.js.map} +1 -1
- package/dist/shell-source-maps/assets/{records-map-DybHhZlM.js.map → records-map-peII4mzy.js.map} +1 -1
- package/dist/shell-source-maps/assets/{shared-protobase-ui-TOG-RVkz.js.map → shared-protobase-ui-CQQebf-J.js.map} +1 -1
- package/dist/shell-source-maps/assets/vendor-BzlIWwX2.js.map +1 -0
- package/dist/side-panel/side-panel.js +1 -1
- package/dist/toasts/toast.js +1 -1
- package/dist/users/create-user-form.js +1 -1
- package/dist/users/use-user-roles.js +1 -1
- package/dist/users/user-row.js +1 -1
- package/package.json +4 -4
- package/dist/account/account-security-page.js +0 -97
- package/dist/shell/assets/app-BDvKMNNB.js +0 -9
- package/dist/shell/assets/index-CY22munM.js +0 -2
- package/dist/shell/assets/index-DHaeB8cs.css +0 -2
- package/dist/shell/assets/shared-protobase-ui-TOG-RVkz.js +0 -2
- package/dist/shell/assets/vendor-C4-Hop1T.js +0 -63
- package/dist/shell-source-maps/assets/app-BDvKMNNB.js.map +0 -1
- package/dist/shell-source-maps/assets/vendor-C4-Hop1T.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useIsDesktop } from "../lib/use-media-query.js";
|
|
2
1
|
import { Button } from "../primitives/button.js";
|
|
2
|
+
import { useIsDesktop } from "../lib/use-media-query.js";
|
|
3
3
|
import { useVisualViewport } from "../lib/use-visual-viewport.js";
|
|
4
4
|
import { text } from "./messages.js";
|
|
5
5
|
import { X } from "lucide-react";
|
package/dist/toasts/toast.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn } from "../lib/cn.js";
|
|
2
|
-
import { inApp } from "../app-shell/breadcrumb.js";
|
|
3
2
|
import { Spinner } from "../primitives/spinner.js";
|
|
3
|
+
import { inApp } from "../app-shell/breadcrumb.js";
|
|
4
4
|
import { text } from "./messages.js";
|
|
5
5
|
import { CheckCircle2, RotateCw, TriangleAlert, X, XCircle } from "lucide-react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Input } from "../primitives/input.js";
|
|
2
1
|
import { useAuth } from "../auth/auth-provider.js";
|
|
3
2
|
import { Button } from "../primitives/button.js";
|
|
3
|
+
import { Input } from "../primitives/input.js";
|
|
4
4
|
import { AccountSection, SectionError } from "../account/account-section.js";
|
|
5
5
|
import { useAction } from "../organizations/use-action.js";
|
|
6
6
|
import { AppRolesPicker } from "../organizations/app-roles-picker.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { authMessage } from "../auth/auth-messages.js";
|
|
2
1
|
import { useAuth } from "../auth/auth-provider.js";
|
|
2
|
+
import { authMessage } from "../auth/auth-messages.js";
|
|
3
3
|
import { text } from "./messages.js";
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
5
|
import { AuthError } from "@protobase/client";
|
package/dist/users/user-row.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Badge } from "../primitives/badge.js";
|
|
2
1
|
import { useAuth } from "../auth/auth-provider.js";
|
|
3
2
|
import { Button } from "../primitives/button.js";
|
|
3
|
+
import { Badge } from "../primitives/badge.js";
|
|
4
4
|
import { useAction } from "../organizations/use-action.js";
|
|
5
5
|
import { AppRolesPicker } from "../organizations/app-roles-picker.js";
|
|
6
6
|
import { text } from "./messages.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/ui",
|
|
3
|
-
"version": "0.46.
|
|
3
|
+
"version": "0.46.4",
|
|
4
4
|
"description": "The Protobase admin app and the React hooks and components for custom UI.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@dnd-kit/core": "^6.3.1",
|
|
41
41
|
"@dnd-kit/sortable": "^10.0.0",
|
|
42
|
-
"@protobase/client": "0.46.
|
|
43
|
-
"@protobase/layout": "0.46.
|
|
44
|
-
"@protobase/schema": "0.46.
|
|
42
|
+
"@protobase/client": "0.46.4",
|
|
43
|
+
"@protobase/layout": "0.46.4",
|
|
44
|
+
"@protobase/schema": "0.46.4",
|
|
45
45
|
"@sentry/browser": "^11.7.0",
|
|
46
46
|
"@tanstack/react-query": "^5.104.1",
|
|
47
47
|
"@tanstack/react-table": "^9.2.6",
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { text } from "./messages.js";
|
|
2
|
-
import { Spinner } from "../primitives/spinner.js";
|
|
3
|
-
import { PageHeader } from "../app-shell/page-header.js";
|
|
4
|
-
import { authMessage, providerMessage } from "../auth/auth-messages.js";
|
|
5
|
-
import { readProviderError, withoutSignInLink } from "../auth/provider-link.js";
|
|
6
|
-
import { useAuth } from "../auth/auth-provider.js";
|
|
7
|
-
import { ConnectedAppsSection } from "./connected-apps-section.js";
|
|
8
|
-
import { PasskeysSection } from "./passkeys-section.js";
|
|
9
|
-
import { SignInProvidersSection } from "./sign-in-providers-section.js";
|
|
10
|
-
import { TwoFactorSection } from "./two-factor-section.js";
|
|
11
|
-
import { useCallback, useEffect, useState } from "react";
|
|
12
|
-
import { AuthError } from "@protobase/client";
|
|
13
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
-
//#region src/account/account-security-page.tsx
|
|
15
|
-
const takeLinkError = () => {
|
|
16
|
-
const code = readProviderError(window.location.href);
|
|
17
|
-
if (code) window.history.replaceState(window.history.state, "", withoutSignInLink(window.location.href));
|
|
18
|
-
return code;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* The signed-in person's passkeys, two-factor authentication and connected accounts, within what the sign-in policy
|
|
22
|
-
* allows, and with MCP on the apps they allowed to act as them.
|
|
23
|
-
*/
|
|
24
|
-
const AccountSecurityPage = ({ email }) => {
|
|
25
|
-
const { session, signInProviders, socialProviders, linkProvider, mcp } = useAuth();
|
|
26
|
-
const linkable = signInProviders.filter((provider) => socialProviders.includes(provider.id));
|
|
27
|
-
const { account } = session;
|
|
28
|
-
const [loaded, setLoaded] = useState();
|
|
29
|
-
const [error, setError] = useState();
|
|
30
|
-
const [linkError] = useState(takeLinkError);
|
|
31
|
-
const reload = useCallback(() => {
|
|
32
|
-
Promise.all([
|
|
33
|
-
account.signInMethods(),
|
|
34
|
-
account.passkeys(),
|
|
35
|
-
account.linkedProviders(),
|
|
36
|
-
mcp ? account.connectedApps() : []
|
|
37
|
-
]).then(([methods, passkeys, linked, apps]) => setLoaded({
|
|
38
|
-
methods,
|
|
39
|
-
passkeys,
|
|
40
|
-
linked,
|
|
41
|
-
apps
|
|
42
|
-
}), (failure) => setError(failure instanceof AuthError ? authMessage(failure) : text("couldNotReadMethods")));
|
|
43
|
-
}, [account, mcp]);
|
|
44
|
-
useEffect(reload, [reload]);
|
|
45
|
-
const thenReload = (change) => change.then((result) => (reload(), result));
|
|
46
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
47
|
-
className: "mx-auto flex w-full max-w-3xl flex-col gap-4 px-4 py-6 md:px-6",
|
|
48
|
-
children: [/* @__PURE__ */ jsx(PageHeader, {
|
|
49
|
-
title: text("signInSecurity"),
|
|
50
|
-
subtitle: email
|
|
51
|
-
}), loaded ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
52
|
-
/* @__PURE__ */ jsx(PasskeysSection, {
|
|
53
|
-
rule: loaded.methods.policy.passkey,
|
|
54
|
-
passkeys: loaded.passkeys,
|
|
55
|
-
onAdd: () => thenReload(account.addPasskey()),
|
|
56
|
-
onRename: (id, name) => thenReload(account.renamePasskey(id, name)),
|
|
57
|
-
onRemove: (id) => thenReload(account.removePasskey(id))
|
|
58
|
-
}),
|
|
59
|
-
/* @__PURE__ */ jsx(TwoFactorSection, {
|
|
60
|
-
rule: loaded.methods.policy.twoFactor,
|
|
61
|
-
enabled: loaded.methods.account.twoFactor,
|
|
62
|
-
authenticatorApp: loaded.methods.account.authenticatorApp,
|
|
63
|
-
mail: loaded.methods.mail,
|
|
64
|
-
needsPassword: loaded.methods.account.password,
|
|
65
|
-
onStartApp: (password) => account.startAuthenticatorApp(password),
|
|
66
|
-
onConfirmApp: (code) => account.confirmAuthenticatorApp(code),
|
|
67
|
-
onEmailedCodes: (password) => account.turnOnEmailedCodes(password),
|
|
68
|
-
onTurnOff: (password) => account.turnOffTwoFactor(password),
|
|
69
|
-
onNewBackupCodes: (password) => account.newBackupCodes(password),
|
|
70
|
-
onChanged: reload
|
|
71
|
-
}),
|
|
72
|
-
linkable.length > 0 && /* @__PURE__ */ jsx(SignInProvidersSection, {
|
|
73
|
-
providers: linkable,
|
|
74
|
-
linked: loaded.linked,
|
|
75
|
-
onConnect: linkProvider,
|
|
76
|
-
error: linkError && providerMessage(linkError, linkable.length === 1 ? linkable[0].name : text("theProvider"))
|
|
77
|
-
}),
|
|
78
|
-
mcp && /* @__PURE__ */ jsx(ConnectedAppsSection, {
|
|
79
|
-
apps: loaded.apps,
|
|
80
|
-
onDisconnect: (clientId) => thenReload(account.disconnectApp(clientId))
|
|
81
|
-
})
|
|
82
|
-
] }) : error ? /* @__PURE__ */ jsx("p", {
|
|
83
|
-
role: "alert",
|
|
84
|
-
className: "text-danger-text",
|
|
85
|
-
children: error
|
|
86
|
-
}) : /* @__PURE__ */ jsxs("div", {
|
|
87
|
-
className: "flex items-center gap-2 text-muted-foreground",
|
|
88
|
-
children: [
|
|
89
|
-
/* @__PURE__ */ jsx(Spinner, {}),
|
|
90
|
-
" ",
|
|
91
|
-
text("loading")
|
|
92
|
-
]
|
|
93
|
-
})]
|
|
94
|
-
});
|
|
95
|
-
};
|
|
96
|
-
//#endregion
|
|
97
|
-
export { AccountSecurityPage };
|