@abpjs/ui 0.2.0-next.33 → 0.2.0-next.34

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 CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0-next.34
4
+
5
+ A prerelease under npm's `next` tag.
6
+
7
+ - `EmptyState variant="page"`: on a screen narrower than its drawing (375 px), the drawing is clipped at its faded
8
+ sides instead of pushing the page sideways.
9
+ - `FormDialog`: a change that puts a field right (picking in a select, typing the missing value) takes its red border
10
+ and its line in the "Fix these fields" summary away at once, rather than when the field is left. A field still wrong
11
+ keeps them until it's left.
12
+ - guard › Anonymous access, the design canvas's board:
13
+ - **Give a role** opens a wide `FormDialog`. The role and the place are chosen from AbpGuard's places
14
+ (`GET /anonymous/places`): a place offers only its own roles, and a role only the places offering it. The preview
15
+ shows anonymous visitors, the role, where, and what the role can do, beside the warning that anyone on the
16
+ internet gets it.
17
+ - The rows show the role as a tag, the place's name and code (as the places list names them), and since when.
18
+ - A row's menu changes the role in one step or removes it.
19
+ - With no roles given, the page is its empty state, with Give a role.
20
+ - A role already given in a place isn't offered there again, and a place with nothing left to give isn't offered.
21
+ Change role saves only a different role.
22
+
23
+ `roleDescription` joins `roleName` for a host's own roles. `anonymousRules.ts` holds the choosing, tested in
24
+ `tests/anonymous-rules.test.mjs`. New words: `giveRole`, `dialogTitle`, `changeTitle`, `chooseRole`, `chooseWhere`,
25
+ `warning`, `who`, `can`, `give`, `change`, `given`, `changed`, `emptyTitle`, `emptyText`, `emptyTextNoPlaces`,
26
+ `placeWithCode`, `tableLabel`, `actions`, `menuLabel` and `notListed`. `revoke`, `revokeTitle` and `revoked` now say Remove role, and `empty` is gone.
27
+ - `PreviewCard`: an item's `wrap` lets a long value (a description) run to three lines.
28
+
3
29
  ## 0.2.0-next.33
4
30
 
5
31
  A prerelease under npm's `next` tag.
package/dist/guard.d.ts CHANGED
@@ -1375,14 +1375,19 @@ 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. Grants are made where the role is given (a place's members); any can be revoked here.
1381
- * `roleName` names a role the host ships in the reader's language; the server's name otherwise.
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
1393
  * The site's directories, in the order sign-in tries them: added, reordered, synced now. A connector a directory needs