@idp.global/catalog 3.3.0 → 3.4.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/changelog.md +9 -0
- package/dist_bundle/bundle.js +541 -527
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/idp-admin-shell.d.ts +17 -0
- package/dist_ts_web/elements/idp-admin-shell.js +65 -3
- package/package.json +1 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/idp-admin-shell.ts +51 -1
package/package.json
CHANGED
|
@@ -94,6 +94,19 @@ export interface IIdpAdminGaUserActionEventDetail {
|
|
|
94
94
|
action: 'suspend' | 'unsuspend';
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
export interface IIdpAdminGaUserDeleteEventDetail {
|
|
98
|
+
userId: string;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface IIdpAdminAccountDeleteEventDetail {
|
|
102
|
+
password: string;
|
|
103
|
+
confirmEmail: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface IIdpAdminOrgExportEventDetail {
|
|
107
|
+
orgId: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
97
110
|
export interface IIdpAdminProfileUpdateEventDetail {
|
|
98
111
|
name: string;
|
|
99
112
|
username: string;
|
|
@@ -1036,6 +1049,23 @@ export class IdpAdminShell extends DeesElement {
|
|
|
1036
1049
|
@property({ type: Boolean })
|
|
1037
1050
|
public accessor profileSaving = false;
|
|
1038
1051
|
|
|
1052
|
+
/** shows the account danger zone (delete account) on the profile page */
|
|
1053
|
+
@property({ type: Boolean })
|
|
1054
|
+
public accessor dangerZoneEnabled = false;
|
|
1055
|
+
|
|
1056
|
+
/** host sets this while the delete-account request is in flight */
|
|
1057
|
+
@property({ type: Boolean })
|
|
1058
|
+
public accessor accountDeleting = false;
|
|
1059
|
+
|
|
1060
|
+
@state()
|
|
1061
|
+
private accessor deleteAccountOpen = false;
|
|
1062
|
+
|
|
1063
|
+
@state()
|
|
1064
|
+
private accessor deleteAccountPassword = '';
|
|
1065
|
+
|
|
1066
|
+
@state()
|
|
1067
|
+
private accessor deleteAccountConfirmEmail = '';
|
|
1068
|
+
|
|
1039
1069
|
@state()
|
|
1040
1070
|
private accessor profileDraft: { name: string; username: string; mobileNumber: string } | null = null;
|
|
1041
1071
|
|
|
@@ -1943,6 +1973,20 @@ export class IdpAdminShell extends DeesElement {
|
|
|
1943
1973
|
: html``}
|
|
1944
1974
|
`)}
|
|
1945
1975
|
${this.renderSectionCard('Account status', '', html`<div class="split-row"><div><div class="section-title">Status</div><div class="muted">Your account is currently ${status}.</div></div><idp-badge variant=${status === 'active' ? 'ok' : status === 'suspended' ? 'error' : 'warn'}>${status}</idp-badge></div>${this.globalAdmin ? html`<div class="divider"></div><div class="split-row"><div><div class="section-title">Global admin</div><div class="muted">You have platform-wide administrative access.</div></div><idp-badge variant="accent">Admin</idp-badge></div>` : html``}`)}
|
|
1976
|
+
${this.dangerZoneEnabled
|
|
1977
|
+
? this.renderSectionCard('Danger zone', 'Deleting your account locks it immediately and permanently erases it after a 7-day grace period.', html`
|
|
1978
|
+
${this.deleteAccountOpen
|
|
1979
|
+
? html`
|
|
1980
|
+
${this.renderFormRow('Confirm your email', 'Type your account email to confirm', html`<input class="input" .value=${this.deleteAccountConfirmEmail} ?disabled=${this.accountDeleting} @input=${(eventArg: Event) => { this.deleteAccountConfirmEmail = (eventArg.target as HTMLInputElement).value; }} />`, true)}
|
|
1981
|
+
${this.renderFormRow('Password', 'Required when your account has one', html`<input class="input" type="password" autocomplete="current-password" .value=${this.deleteAccountPassword} ?disabled=${this.accountDeleting} @input=${(eventArg: Event) => { this.deleteAccountPassword = (eventArg.target as HTMLInputElement).value; }} />`)}
|
|
1982
|
+
<div class="split-row" style="justify-content:flex-end;gap:10px;margin-top:14px">
|
|
1983
|
+
<idp-button variant="outline" shape="rect" ?disabled=${this.accountDeleting} @click=${() => { this.deleteAccountOpen = false; this.deleteAccountPassword = ''; this.deleteAccountConfirmEmail = ''; }}>Cancel</idp-button>
|
|
1984
|
+
<idp-button variant="accent" shape="rect" ?loading=${this.accountDeleting} ?disabled=${this.deleteAccountConfirmEmail.trim().toLowerCase() !== (this.user?.email || '').trim().toLowerCase()} @click=${() => this.dispatchShellEvent<IIdpAdminAccountDeleteEventDetail>('idp-admin-account-delete', { password: this.deleteAccountPassword, confirmEmail: this.deleteAccountConfirmEmail.trim() })}>Delete my account</idp-button>
|
|
1985
|
+
</div>
|
|
1986
|
+
`
|
|
1987
|
+
: html`<div class="split-row"><div><div class="section-title">Delete this account</div><div class="muted">Organisations you own must be transferred or deleted first.</div></div><idp-button variant="outline" shape="rect" @click=${() => { this.deleteAccountOpen = true; }}>Delete account…</idp-button></div>`}
|
|
1988
|
+
`)
|
|
1989
|
+
: html``}
|
|
1946
1990
|
${this.delegationApps.length
|
|
1947
1991
|
? html`<idp-delegation-section .apps=${this.delegationApps} .delegations=${this.delegations}></idp-delegation-section>`
|
|
1948
1992
|
: html``}
|
|
@@ -2214,6 +2258,7 @@ export class IdpAdminShell extends DeesElement {
|
|
|
2214
2258
|
<button class="plain-button primary" ?disabled=${!identityChanged} @click=${() => this.submitOrgSettingsUpdate()}>Apply identity changes</button>
|
|
2215
2259
|
`)}
|
|
2216
2260
|
${this.renderSectionCard('Organisation ID', 'Use this identifier when making API calls.', this.renderCodeBlock(org.id))}
|
|
2261
|
+
${this.renderSectionCard('Data export', 'Download all organisation data (members, invitations, SSO configuration, activity) as JSON. Owner only.', html`<div class="split-row"><div><div class="section-title">Export organisation data</div><div class="muted">Streams every record; token secrets and credentials are never included.</div></div><idp-button variant="outline" shape="rect" @click=${() => this.dispatchShellEvent<IIdpAdminOrgExportEventDetail>('idp-admin-org-export', { orgId: org.id })}>Export JSON</idp-button></div>`)}
|
|
2217
2262
|
${this.renderSectionCard('Transfer ownership', `Owner-only operation. Type ${transferConfirmText} to confirm.`, html`
|
|
2218
2263
|
${transferCandidates.length ? html`
|
|
2219
2264
|
${this.renderFormRow('New owner', 'The target user must already be an organisation member.', html`
|
|
@@ -2447,7 +2492,12 @@ export class IdpAdminShell extends DeesElement {
|
|
|
2447
2492
|
html`<idp-badge variant=${statusVariant(userArg.status)}>${userArg.status}</idp-badge>`,
|
|
2448
2493
|
userArg.isGlobalAdmin ? html`<idp-badge variant="accent">Admin</idp-badge>` : '-',
|
|
2449
2494
|
this.formatTimeAgo(userArg.createdAt),
|
|
2450
|
-
html`<
|
|
2495
|
+
html`<span style="display:inline-flex;gap:8px">
|
|
2496
|
+
<button class="plain-button ghost" style="font-size:11px" @click=${() => this.dispatchShellEvent<IIdpAdminGaUserActionEventDetail>('idp-admin-ga-user-action', { userId: userArg.id, action: userArg.status === 'suspended' ? 'unsuspend' : 'suspend' })}>${userArg.status === 'suspended' ? 'Unsuspend' : 'Suspend'}</button>
|
|
2497
|
+
${userArg.status === 'suspended'
|
|
2498
|
+
? html`<button class="plain-button ghost" style="font-size:11px;color:#d70015" @click=${() => this.dispatchShellEvent<IIdpAdminGaUserDeleteEventDetail>('idp-admin-ga-user-delete', { userId: userArg.id })}>Delete permanently</button>`
|
|
2499
|
+
: html``}
|
|
2500
|
+
</span>`,
|
|
2451
2501
|
],
|
|
2452
2502
|
}));
|
|
2453
2503
|
|