@abpjs/ui 0.2.0-next.15 → 0.2.0-next.17

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,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0-next.17
4
+
5
+ A prerelease under npm's `next` tag.
6
+
7
+ - guard: a second slot in an account's header, `guard.account.actions.end` (`{ account, detail, reload }`), after the
8
+ area's merge and lock, so a host's destructive action (an erasure) stays last.
9
+
10
+ ## 0.2.0-next.16
11
+
12
+ A prerelease under npm's `next` tag.
13
+
14
+ - guard: `CreateAccountPanel` and `CreateGroupPanel` exported, for a host that keeps its own accounts or groups list
15
+ (saved views, column choice) and takes the rest of the area.
16
+
3
17
  ## 0.2.0-next.15
4
18
 
5
19
  A prerelease under npm's `next` tag.
package/dist/guard.d.ts CHANGED
@@ -1259,9 +1259,10 @@ interface AccountScreenProps {
1259
1259
  /**
1260
1260
  * An account: its name, addresses and second factor, the directories it comes from and which one wins, the groups it's
1261
1261
  * in (directly or through others), and the merges it was in. Lock, unlock and merge are shown only where AbpGuard allows
1262
- * them for this very account (a helpdesk scoped to one directory, say). A host adds its own buttons through the
1263
- * `guard.account.actions` slot, notices above the panels through `guard.account.notices`, and panels below the account's
1264
- * through `guard.account.panels`; each gets `{ account, detail, reload }`.
1262
+ * them for this very account (a helpdesk scoped to one directory, say). A host adds its own buttons before the area's
1263
+ * through the `guard.account.actions` slot and after them through `guard.account.actions.end` (a destructive one last),
1264
+ * notices above the panels through `guard.account.notices`, and panels below the account's through
1265
+ * `guard.account.panels`; each gets `{ account, detail, reload }`.
1265
1266
  */
1266
1267
  declare function AccountScreen({ id, routes }: AccountScreenProps): react.JSX.Element;
1267
1268
 
@@ -1287,6 +1288,14 @@ interface AccountsScreenProps {
1287
1288
  * by any column but the directory. A site admin creates internal accounts here, and sees accounts that share an address.
1288
1289
  */
1289
1290
  declare function AccountsScreen({ routes, source }: AccountsScreenProps): react.JSX.Element;
1291
+ /**
1292
+ * Creating an internal account: username, display name, an optional address and a password, in AbpGuard's own internal
1293
+ * directory or another internal one when there are several. For a host's own accounts page too.
1294
+ */
1295
+ declare function CreateAccountPanel({ onDone, onCancel }: {
1296
+ onDone: (created: AccountDto) => void;
1297
+ onCancel: () => void;
1298
+ }): react.JSX.Element;
1290
1299
 
1291
1300
  /**
1292
1301
  * Anonymous access, for site admins: every role given to anonymous visitors, in one place, because anyone on the
@@ -1370,6 +1379,15 @@ interface GroupsScreenProps {
1370
1379
  * A site admin creates groups here: a group, or an organization customers join by their address's domain.
1371
1380
  */
1372
1381
  declare function GroupsScreen({ routes, source }: GroupsScreenProps): react.JSX.Element;
1382
+ /**
1383
+ * Creating a group: its name by language, a description, the directory it's in (the internal one by default), and its
1384
+ * kind; an organization takes the email domains whose people join it. For a host's own groups page too.
1385
+ */
1386
+ declare function CreateGroupPanel({ directories, onDone, onCancel }: {
1387
+ directories: DirectoryDto[];
1388
+ onDone: (created: GroupDto) => void;
1389
+ onCancel: () => void;
1390
+ }): react.JSX.Element;
1373
1391
 
1374
1392
  interface GroupTreeProps {
1375
1393
  rootId: string;
@@ -1544,4 +1562,4 @@ declare function useGuardNs(namespace: string): GuardText;
1544
1562
  */
1545
1563
  declare function withParts(text: string, parts: Record<string, ReactNode>): ReactNode;
1546
1564
 
1547
- export { type AccountAction, type AccountCanDto, type AccountDetailDto, type AccountDto, type AccountEmailsDto, AccountEmailsPanel, type AccountEmailsPanelProps, type AccountMergeDto, type AccountNameDto, AccountNameEditor, type AccountNameEditorProps, type AccountPage, AccountScreen, type AccountScreenProps, AccountSecondFactorPanel, type AccountSecondFactorPanelProps, type AccountStatus, AccountStatusPill, type AccountSummaryDto, AccountsScreen, type AccountsScreenProps, type AnonymousGrantDto, AnonymousScreen, type AppEnrolmentDto, AppSetup, type AppSetupProps, CodeInput, type ConnectionTestResult, CountList, DirectoriesScreen, type DirectoryDto, DirectoryForm, type DirectoryFormProps, type DirectoryInput, DirectoryScreen, type DirectorySettingDefinition, type DirectoryTypeDto, DirectoryWarnings, type DuplicateDto, DuplicatesPanel, type EffectiveGroupDto, type EffectiveMemberDto, FlagPill, type GroupDetailDto, type GroupDto, type GroupMemberDto, type GroupPage, GroupScreen, type GroupScreenProps, GroupTree, type GroupTreeProps, GroupTwoFactorPanel, GroupsScreen, type GroupsScreenProps, type GuardRoutes, type GuardText, type GuardTypes, type IdentityDto, type MergeCountDto, type MergePreviewDto, MergeScreen, type MergeScreenProps, MergesPanel, type MergesPanelProps, type MySecondFactorsDto, MySecondFactorsPanel, type MySecondFactorsPanelProps, PassFail, type PluginState, PluginStatePill, RecoveryCodes, type SecondFactorDto, type SecondFactorSenderDto, SignUpScreen, type SignUpSettingsDto, type SignUpSettingsInput, StrongFactorBanner, type StrongFactorState, SyncResultPill, type SyncRunDto, SyncStatus, TWO_FACTOR_MODES, type TestLoginResult, type TestLoginStepName, groupedKey, guardRoutes, num, useAccountCan, useCountLabel, useGuardNs, useGuardTexts, usePartLabel, useSenderName, useWrittenName, withParts };
1565
+ export { type AccountAction, type AccountCanDto, type AccountDetailDto, type AccountDto, type AccountEmailsDto, AccountEmailsPanel, type AccountEmailsPanelProps, type AccountMergeDto, type AccountNameDto, AccountNameEditor, type AccountNameEditorProps, type AccountPage, AccountScreen, type AccountScreenProps, AccountSecondFactorPanel, type AccountSecondFactorPanelProps, type AccountStatus, AccountStatusPill, type AccountSummaryDto, AccountsScreen, type AccountsScreenProps, type AnonymousGrantDto, AnonymousScreen, type AppEnrolmentDto, AppSetup, type AppSetupProps, CodeInput, type ConnectionTestResult, CountList, CreateAccountPanel, CreateGroupPanel, DirectoriesScreen, type DirectoryDto, DirectoryForm, type DirectoryFormProps, type DirectoryInput, DirectoryScreen, type DirectorySettingDefinition, type DirectoryTypeDto, DirectoryWarnings, type DuplicateDto, DuplicatesPanel, type EffectiveGroupDto, type EffectiveMemberDto, FlagPill, type GroupDetailDto, type GroupDto, type GroupMemberDto, type GroupPage, GroupScreen, type GroupScreenProps, GroupTree, type GroupTreeProps, GroupTwoFactorPanel, GroupsScreen, type GroupsScreenProps, type GuardRoutes, type GuardText, type GuardTypes, type IdentityDto, type MergeCountDto, type MergePreviewDto, MergeScreen, type MergeScreenProps, MergesPanel, type MergesPanelProps, type MySecondFactorsDto, MySecondFactorsPanel, type MySecondFactorsPanelProps, PassFail, type PluginState, PluginStatePill, RecoveryCodes, type SecondFactorDto, type SecondFactorSenderDto, SignUpScreen, type SignUpSettingsDto, type SignUpSettingsInput, StrongFactorBanner, type StrongFactorState, SyncResultPill, type SyncRunDto, SyncStatus, TWO_FACTOR_MODES, type TestLoginResult, type TestLoginStepName, groupedKey, guardRoutes, num, useAccountCan, useCountLabel, useGuardNs, useGuardTexts, usePartLabel, useSenderName, useWrittenName, withParts };
package/dist/guard.js CHANGED
@@ -1371,7 +1371,8 @@ function AccountScreen({ id, routes = guardRoutes() }) {
1371
1371
  actions: !merged && /* @__PURE__ */ jsxs6(HStack5, { gap: "2", children: [
1372
1372
  account && /* @__PURE__ */ jsx6(HostSlot, { name: "guard.account.actions", context: slotContext }),
1373
1373
  may("merge") && /* @__PURE__ */ jsx6(Button5, { onClick: () => navigate(routes.accountMerge(account?.id ?? id)), children: tm("mergeInto") }),
1374
- account?.status === "Locked" ? may("unlock") && /* @__PURE__ */ jsx6(Button5, { onClick: () => setLocked(false), loading: action.busy, children: t("unlock") }) : may("lock") && /* @__PURE__ */ jsx6(Button5, { danger: true, onClick: () => setLocked(true), loading: action.busy, children: t("lock") })
1374
+ account?.status === "Locked" ? may("unlock") && /* @__PURE__ */ jsx6(Button5, { onClick: () => setLocked(false), loading: action.busy, children: t("unlock") }) : may("lock") && /* @__PURE__ */ jsx6(Button5, { danger: true, onClick: () => setLocked(true), loading: action.busy, children: t("lock") }),
1375
+ account && /* @__PURE__ */ jsx6(HostSlot, { name: "guard.account.actions.end", context: slotContext })
1375
1376
  ] })
1376
1377
  }
1377
1378
  ),
@@ -1573,7 +1574,7 @@ function AccountsScreen({ routes = guardRoutes(), source }) {
1573
1574
  ),
1574
1575
  /* @__PURE__ */ jsxs8(Stack6, { gap: "section", children: [
1575
1576
  creating && /* @__PURE__ */ jsx8(
1576
- CreateAccount,
1577
+ CreateAccountPanel,
1577
1578
  {
1578
1579
  onDone: (created) => {
1579
1580
  setCreating(false);
@@ -1615,7 +1616,7 @@ function AccountsScreen({ routes = guardRoutes(), source }) {
1615
1616
  ] })
1616
1617
  ] });
1617
1618
  }
1618
- function CreateAccount({ onDone, onCancel }) {
1619
+ function CreateAccountPanel({ onDone, onCancel }) {
1619
1620
  const t = useGuardNs("accounts");
1620
1621
  const tc = useGuardNs("common");
1621
1622
  const request = useAreaRequest6("guard");
@@ -2774,7 +2775,7 @@ function GroupsScreen({ routes = guardRoutes(), source }) {
2774
2775
  ),
2775
2776
  /* @__PURE__ */ jsxs16(Stack12, { gap: "section", children: [
2776
2777
  creating && /* @__PURE__ */ jsx16(
2777
- CreateGroup,
2778
+ CreateGroupPanel,
2778
2779
  {
2779
2780
  directories: dirs.data ?? [],
2780
2781
  onCancel: () => setCreating(false),
@@ -2827,7 +2828,7 @@ function GroupsScreen({ routes = guardRoutes(), source }) {
2827
2828
  ] })
2828
2829
  ] });
2829
2830
  }
2830
- function CreateGroup({ directories, onDone, onCancel }) {
2831
+ function CreateGroupPanel({ directories, onDone, onCancel }) {
2831
2832
  const t = useGuardNs("groups");
2832
2833
  const tc = useGuardNs("common");
2833
2834
  const request = useAreaRequest13("guard");
@@ -3530,6 +3531,8 @@ export {
3530
3531
  AppSetup,
3531
3532
  CodeInput,
3532
3533
  CountList,
3534
+ CreateAccountPanel,
3535
+ CreateGroupPanel,
3533
3536
  DirectoriesScreen,
3534
3537
  DirectoryForm,
3535
3538
  DirectoryScreen,