@nocobase/app-template-default 1.0.0-beta.77 → 1.0.0-beta.78
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,4 +1,4 @@
|
|
|
1
|
-
import { useToaster } from '@nocobase/app-client';
|
|
1
|
+
import { copyText, useToaster } from '@nocobase/app-client';
|
|
2
2
|
import { useTranslation } from '@nocobase/i18n/client';
|
|
3
3
|
import { useCallback, useEffect, useState } from 'react';
|
|
4
4
|
|
|
@@ -23,11 +23,14 @@ export function useCopy(): CopyState {
|
|
|
23
23
|
const copy = useCallback(
|
|
24
24
|
async (text: string): Promise<void> => {
|
|
25
25
|
try {
|
|
26
|
-
await
|
|
26
|
+
if (!(await copyText(text))) {
|
|
27
|
+
toaster.show({ type: 'error', title: t('home.prompt.copyFailed') });
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
27
30
|
setCopied(true);
|
|
28
31
|
toaster.show({ type: 'success', title: t('home.prompt.copied') });
|
|
29
32
|
} catch {
|
|
30
|
-
//
|
|
33
|
+
// Copying can fail when neither browser mechanism is available.
|
|
31
34
|
toaster.show({ type: 'error', title: t('home.prompt.copyFailed') });
|
|
32
35
|
}
|
|
33
36
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/app-template-default",
|
|
3
3
|
"displayName": "Default Template",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.78",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"prettier": "@nocobase/dev-config/prettier",
|
|
7
7
|
"engines": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"nocobase": {
|
|
11
11
|
"templateKind": "app",
|
|
12
|
-
"defaultTemplateVersion": "1.0.0-beta.
|
|
12
|
+
"defaultTemplateVersion": "1.0.0-beta.78"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@ai-sdk/react": "4.0.131",
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
"tar": "^7.5.22",
|
|
73
73
|
"@xyflow/react": "^12.11.5",
|
|
74
74
|
"elkjs": "^0.10.2",
|
|
75
|
-
"@nocobase/app-client": "^4.0.0-beta.
|
|
75
|
+
"@nocobase/app-client": "^4.0.0-beta.3",
|
|
76
76
|
"@nocobase/app-plugin-template-print": "0.0.2-beta.2",
|
|
77
|
-
"@nocobase/app-skills": "0.1.0-beta.
|
|
77
|
+
"@nocobase/app-skills": "0.1.0-beta.48",
|
|
78
78
|
"@nocobase/app-testing": "0.1.0-beta.6",
|
|
79
79
|
"@nocobase/app-websocket": "^0.1.0-beta.1",
|
|
80
|
-
"@nocobase/dev-config": "0.1.0-beta.
|
|
80
|
+
"@nocobase/dev-config": "0.1.0-beta.25",
|
|
81
81
|
"@nocobase/drive": "^0.1.0-beta.7",
|
|
82
82
|
"@nocobase/logging": "^0.1.0-beta.7",
|
|
83
83
|
"@nocobase/session": "^0.1.0-beta.3"
|
|
@@ -139,20 +139,20 @@
|
|
|
139
139
|
"@oclif/core": "^4.14.0",
|
|
140
140
|
"better-auth": "1.7.5",
|
|
141
141
|
"hono": "^4.13.2",
|
|
142
|
-
"@nocobase/app-plugin-agents": "^1.0.0-beta.
|
|
142
|
+
"@nocobase/app-plugin-agents": "^1.0.0-beta.23",
|
|
143
143
|
"@nocobase/app-plugin-api-keys": "^1.0.0-beta.18",
|
|
144
|
-
"@nocobase/app-plugin-authorization": "^1.0.0-beta.31",
|
|
145
144
|
"@nocobase/app-plugin-authentication": "^2.0.0-beta.13",
|
|
145
|
+
"@nocobase/app-plugin-authorization": "^1.0.0-beta.31",
|
|
146
146
|
"@nocobase/app-plugin-database-explorer": "^1.0.0-beta.16",
|
|
147
147
|
"@nocobase/app-plugin-file": "^1.0.0-beta.26",
|
|
148
|
-
"@nocobase/app-plugin-foundation": "^0.1.0-beta.
|
|
148
|
+
"@nocobase/app-plugin-foundation": "^0.1.0-beta.4",
|
|
149
149
|
"@nocobase/app-plugin-i18n": "^1.0.0-beta.18",
|
|
150
|
-
"@nocobase/app-plugin-knowledge": "^0.1.0-beta.
|
|
151
|
-
"@nocobase/app-plugin-mail": "^1.0.0-beta.
|
|
150
|
+
"@nocobase/app-plugin-knowledge": "^0.1.0-beta.11",
|
|
151
|
+
"@nocobase/app-plugin-mail": "^1.0.0-beta.17",
|
|
152
152
|
"@nocobase/app-plugin-notification": "^2.0.0-beta.0",
|
|
153
153
|
"@nocobase/app-plugin-notification-in-app": "^2.0.0-beta.0",
|
|
154
154
|
"@nocobase/app-plugin-notification-providers": "^1.0.0-beta.15",
|
|
155
|
-
"@nocobase/app-plugin-scheduler": "^1.0.0-beta.
|
|
155
|
+
"@nocobase/app-plugin-scheduler": "^1.0.0-beta.20",
|
|
156
156
|
"@nocobase/app-plugin-users": "^2.0.0-beta.9",
|
|
157
157
|
"@nocobase/app-server": "^3.0.0-beta.3",
|
|
158
158
|
"@nocobase/config": "^0.1.0-beta.3",
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
"@nocobase/app-plugin-authz-restriction-rules": "^1.0.0-beta.14",
|
|
166
166
|
"@nocobase/authorization": "^1.0.0-beta.15",
|
|
167
167
|
"@nocobase/queue": "^0.1.0-beta.9",
|
|
168
|
-
"@nocobase/jobs": "^0.1.0-beta.
|
|
168
|
+
"@nocobase/jobs": "^0.1.0-beta.4",
|
|
169
169
|
"@nocobase/lifecycle": "^0.1.0-beta.3",
|
|
170
170
|
"@nocobase/i18n": "^2.0.0-beta.1",
|
|
171
171
|
"@nocobase/caching": "^0.1.0-beta.3",
|
|
@@ -254,9 +254,20 @@ it.each(['/users', '/settings/users'])(
|
|
|
254
254
|
},
|
|
255
255
|
}),
|
|
256
256
|
);
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
257
|
+
// Refreshing remounts cells; permission loading can replace the name span with a link.
|
|
258
|
+
await waitFor(() => {
|
|
259
|
+
const table = screen.getByRole('table');
|
|
260
|
+
expect(table).toHaveAttribute('aria-busy', 'false');
|
|
261
|
+
const row = within(table).getByRole('row', {
|
|
262
|
+
name: /alice@example\.test/u,
|
|
263
|
+
});
|
|
264
|
+
const updated = within(row).getByRole('link', {
|
|
265
|
+
name: 'Alice updated',
|
|
266
|
+
exact: true,
|
|
267
|
+
});
|
|
268
|
+
expect(updated).toBeVisible();
|
|
269
|
+
expect(updated).toHaveAttribute('href', `${base}/alice/edit${search}`);
|
|
270
|
+
});
|
|
260
271
|
expect(screen.getByTestId('location')).toHaveTextContent(
|
|
261
272
|
`${base}${search}`,
|
|
262
273
|
);
|