@carlonicora/nextjs-jsonapi 6.21.0 → 6.22.0
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/{BlockNoteEditor-66ZACETR.mjs → BlockNoteEditor-2XSIQCEB.mjs} +2 -2
- package/dist/{BlockNoteEditor-NXCRWS2O.js → BlockNoteEditor-HW3TK7SM.js} +9 -9
- package/dist/{BlockNoteEditor-NXCRWS2O.js.map → BlockNoteEditor-HW3TK7SM.js.map} +1 -1
- package/dist/billing/index.js +378 -378
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-OHHA5BBX.mjs → chunk-EFQIMPCJ.mjs} +9 -7
- package/dist/chunk-EFQIMPCJ.mjs.map +1 -0
- package/dist/{chunk-3CGU6WXY.js → chunk-FXRRQ7Q6.js} +9 -7
- package/dist/chunk-FXRRQ7Q6.js.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/email-automations/index.js +78 -78
- package/dist/email-automations/index.mjs +1 -1
- package/dist/features/analytics/index.js +107 -107
- package/dist/features/analytics/index.mjs +1 -1
- package/dist/features/blog/index.js +93 -93
- package/dist/features/blog/index.mjs +1 -1
- package/dist/features/help/index.js +31 -31
- package/dist/features/help/index.mjs +1 -1
- package/dist/features/tokenusage/index.js +102 -102
- package/dist/features/tokenusage/index.mjs +1 -1
- package/dist/features/user/contexts/UserContext.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/forms/EditorSheet.tsx +2 -2
- package/src/components/forms/__tests__/EditorSheet.spec.tsx +16 -0
- package/src/features/oauth/components/OAuthClientDetail.tsx +1 -1
- package/src/features/user/contexts/UserContext.tsx +6 -2
- package/dist/chunk-3CGU6WXY.js.map +0 -1
- package/dist/chunk-OHHA5BBX.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-66ZACETR.mjs.map → BlockNoteEditor-2XSIQCEB.mjs.map} +0 -0
|
@@ -77,6 +77,22 @@ describe("EditorSheet", () => {
|
|
|
77
77
|
expect(screen.getByText("Custom")).toBeTruthy();
|
|
78
78
|
});
|
|
79
79
|
|
|
80
|
+
it("should render a labelled edit trigger as a primary button", () => {
|
|
81
|
+
render(<TestEditor isEdit={true} showLabel={true} />);
|
|
82
|
+
const trigger = document.querySelector('[data-help="editor.edit"]');
|
|
83
|
+
expect(trigger?.textContent).toContain("ui.buttons.edit");
|
|
84
|
+
expect(trigger?.className).toContain("bg-primary");
|
|
85
|
+
expect(trigger?.className).not.toContain("text-muted-foreground");
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
it("should render an unlabelled edit trigger as a muted glyph", () => {
|
|
89
|
+
render(<TestEditor isEdit={true} showLabel={false} />);
|
|
90
|
+
const trigger = document.querySelector('[data-help="editor.edit"]');
|
|
91
|
+
expect(trigger?.textContent).not.toContain("ui.buttons.edit");
|
|
92
|
+
expect(trigger?.className).not.toContain("bg-primary");
|
|
93
|
+
expect(trigger?.className).toContain("text-muted-foreground");
|
|
94
|
+
});
|
|
95
|
+
|
|
80
96
|
it("should not render trigger when dialogOpen is controlled", () => {
|
|
81
97
|
render(<TestEditor dialogOpen={false} />);
|
|
82
98
|
expect(screen.queryByText("ui.buttons.create")).toBeNull();
|
|
@@ -201,7 +201,7 @@ export function OAuthClientDetail({
|
|
|
201
201
|
{/* Actions */}
|
|
202
202
|
<div className="flex gap-3 pt-4">
|
|
203
203
|
{onEdit && (
|
|
204
|
-
<Button
|
|
204
|
+
<Button onClick={onEdit} disabled={isLoading}>
|
|
205
205
|
<Pencil className="h-4 w-4 me-2" />
|
|
206
206
|
{t("ui.buttons.edit")}
|
|
207
207
|
</Button>
|
|
@@ -76,6 +76,7 @@ export const UserProvider = ({ children, dehydratedUser }: UserProviderProps) =>
|
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
const functions: ReactNode[] = [];
|
|
79
|
+
const actionBar: ReactNode[] = [];
|
|
79
80
|
|
|
80
81
|
if (user) {
|
|
81
82
|
response.element = `${user.name}${user.isDeleted ? ` (${t(`user.deleted`)})` : ""}`;
|
|
@@ -86,17 +87,20 @@ export const UserProvider = ({ children, dehydratedUser }: UserProviderProps) =>
|
|
|
86
87
|
if (!user.isActivated)
|
|
87
88
|
functions.push(<UserResentInvitationEmail key={`UserResentInvitationEmail`} user={user} />);
|
|
88
89
|
|
|
89
|
-
|
|
90
|
+
actionBar.push(<UserDeleter key={`UserDeleter`} user={user} />);
|
|
90
91
|
|
|
91
92
|
// Opt-in: only apps that registered AccountDeletionModule, platform administrators only.
|
|
92
93
|
if (hasRole(getRoleId().Administrator) && isAccountDeletionEnabled())
|
|
93
94
|
functions.push(<AccountDeletionAdminTrigger key={`AccountDeletionAdminTrigger`} user={user} />);
|
|
94
95
|
}
|
|
95
96
|
|
|
96
|
-
|
|
97
|
+
// Delete and Edit live in the secondary header (action bar), where they
|
|
98
|
+
// render as labelled buttons, like every other entity page.
|
|
99
|
+
actionBar.push(<UserEditor key={`UserEditor`} user={user} propagateChanges={setUser} />);
|
|
97
100
|
}
|
|
98
101
|
|
|
99
102
|
if (functions.length > 0) response.functions = functions;
|
|
103
|
+
if (actionBar.length > 0) response.actionBar = actionBar;
|
|
100
104
|
|
|
101
105
|
return response;
|
|
102
106
|
};
|