@abpjs/ui 0.2.0-next.33 → 0.2.0-next.35
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/CHANGELOG.md +47 -0
- package/dist/guard.d.ts +15 -7
- package/dist/guard.js +848 -485
- package/dist/guard.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.0-next.35
|
|
4
|
+
|
|
5
|
+
A prerelease under npm's `next` tag.
|
|
6
|
+
|
|
7
|
+
- guard › Directories, the design canvas's board:
|
|
8
|
+
- **New directory**, and a directory's name, open a wide `FormDialog` beside a preview: the name, the type, how often
|
|
9
|
+
it syncs ("On request only" when empty), and whether it's active and lets people sign in. A connector's settings
|
|
10
|
+
come once its type is chosen. Editing keeps the type, and **Delete directory** is the red link at the footer's start.
|
|
11
|
+
- A row's menu edits the directory, opens its page (sync runs, connection tests, everything else), syncs it now
|
|
12
|
+
(off for a type that doesn't sync), moves it up or down in priority, turns it off or on, or deletes it.
|
|
13
|
+
- Priority counts from 1. The internal type is named in the area's words, and a type that doesn't sync has no sync
|
|
14
|
+
interval.
|
|
15
|
+
|
|
16
|
+
`DirectoryFields` are the directory's fields without a form of their own, shared by the dialog and the directory's
|
|
17
|
+
page (`DirectoryForm`); `compact` gives one column. Active and sign-in are switches. `directoryRules.ts` holds the
|
|
18
|
+
editing start (a stored secret starts empty, so it's kept), which types sync, and moving, tested in
|
|
19
|
+
`tests/directory-rules.test.mjs`. New words in `directories` (`priority`, `internal`, `on`, `off`, `menuLabel`, `edit`,
|
|
20
|
+
`openPage`, `deactivate`, `activate`, `newTitle`, `editTitle`, `deleteDirectory`, `namePreview`, `sync`, `syncEvery`,
|
|
21
|
+
`onRequest`, `savedWithWarnings`) and `directoryForm` (`minutes`, `namePlaceholder`). `add`, `syncInterval`,
|
|
22
|
+
`syncIntervalHint` and `signInEnabled` say it as the canvas does, and `addedWithWarnings` is gone.
|
|
23
|
+
|
|
24
|
+
## 0.2.0-next.34
|
|
25
|
+
|
|
26
|
+
A prerelease under npm's `next` tag.
|
|
27
|
+
|
|
28
|
+
- `EmptyState variant="page"`: on a screen narrower than its drawing (375 px), the drawing is clipped at its faded
|
|
29
|
+
sides instead of pushing the page sideways.
|
|
30
|
+
- `FormDialog`: a change that puts a field right (picking in a select, typing the missing value) takes its red border
|
|
31
|
+
and its line in the "Fix these fields" summary away at once, rather than when the field is left. A field still wrong
|
|
32
|
+
keeps them until it's left.
|
|
33
|
+
- guard › Anonymous access, the design canvas's board:
|
|
34
|
+
- **Give a role** opens a wide `FormDialog`. The role and the place are chosen from AbpGuard's places
|
|
35
|
+
(`GET /anonymous/places`): a place offers only its own roles, and a role only the places offering it. The preview
|
|
36
|
+
shows anonymous visitors, the role, where, and what the role can do, beside the warning that anyone on the
|
|
37
|
+
internet gets it.
|
|
38
|
+
- The rows show the role as a tag, the place's name and code (as the places list names them), and since when.
|
|
39
|
+
- A row's menu changes the role in one step or removes it.
|
|
40
|
+
- With no roles given, the page is its empty state, with Give a role.
|
|
41
|
+
- A role already given in a place isn't offered there again, and a place with nothing left to give isn't offered.
|
|
42
|
+
Change role saves only a different role.
|
|
43
|
+
|
|
44
|
+
`roleDescription` joins `roleName` for a host's own roles. `anonymousRules.ts` holds the choosing, tested in
|
|
45
|
+
`tests/anonymous-rules.test.mjs`. New words: `giveRole`, `dialogTitle`, `changeTitle`, `chooseRole`, `chooseWhere`,
|
|
46
|
+
`warning`, `who`, `can`, `give`, `change`, `given`, `changed`, `emptyTitle`, `emptyText`, `emptyTextNoPlaces`,
|
|
47
|
+
`placeWithCode`, `tableLabel`, `actions`, `menuLabel` and `notListed`. `revoke`, `revokeTitle` and `revoked` now say Remove role, and `empty` is gone.
|
|
48
|
+
- `PreviewCard`: an item's `wrap` lets a long value (a description) run to three lines.
|
|
49
|
+
|
|
3
50
|
## 0.2.0-next.33
|
|
4
51
|
|
|
5
52
|
A prerelease under npm's `next` tag.
|
package/dist/guard.d.ts
CHANGED
|
@@ -1375,18 +1375,26 @@ declare function CreateAccountPanel({ onDone, onCancel }: {
|
|
|
1375
1375
|
onCancel: () => void;
|
|
1376
1376
|
}): react.JSX.Element;
|
|
1377
1377
|
|
|
1378
|
+
interface AnonymousScreenProps {
|
|
1379
|
+
/** A role the host ships, named in the reader's language (`key`, the server's `name`); the server's name otherwise. */
|
|
1380
|
+
roleName?: (key: string, name: string) => string;
|
|
1381
|
+
/** What a role the host ships lets one do, in the reader's language (the dialog's "Can"); the server's otherwise. */
|
|
1382
|
+
roleDescription?: (key: string, description: string | null) => string | null | undefined;
|
|
1383
|
+
}
|
|
1378
1384
|
/**
|
|
1379
1385
|
* Anonymous access, for site admins: every role given to anonymous visitors, in one place, because anyone on the
|
|
1380
|
-
* internet gets it.
|
|
1381
|
-
*
|
|
1386
|
+
* internet gets it. "Give a role" picks a role and one of the places the host lists (AbpGuard's `GET /anonymous/places`):
|
|
1387
|
+
* a place offers only the roles that keep to it, and the server checks again. A row's menu changes its role in one step
|
|
1388
|
+
* or removes it. A grant made elsewhere (a place's members) shows here too, named as the host names its scope.
|
|
1382
1389
|
*/
|
|
1383
|
-
declare function AnonymousScreen({ roleName }:
|
|
1384
|
-
roleName?: (key: string, name: string) => string;
|
|
1385
|
-
}): react.JSX.Element;
|
|
1390
|
+
declare function AnonymousScreen({ roleName, roleDescription }?: AnonymousScreenProps): react.JSX.Element;
|
|
1386
1391
|
|
|
1387
1392
|
/**
|
|
1388
|
-
* The site's directories, in the order sign-in tries them
|
|
1389
|
-
*
|
|
1393
|
+
* The site's directories, in the order sign-in tries them (the design canvas's board). New directory and a directory's
|
|
1394
|
+
* name open the dialog with a preview: its name, type, sync, whether it's active and signs people in, and its
|
|
1395
|
+
* connector's settings. A row's menu edits it, opens its page (sync runs, connection tests, everything else), syncs it
|
|
1396
|
+
* now, moves it up or down, turns it off or on, or deletes it. A connector that isn't there (its plugin turned off) says
|
|
1397
|
+
* so, and what a connector warns of in its settings is shown.
|
|
1390
1398
|
*/
|
|
1391
1399
|
declare function DirectoriesScreen({ routes }: {
|
|
1392
1400
|
routes?: GuardRoutes;
|