@idp.global/catalog 3.2.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 +17 -0
- package/dist_bundle/bundle.js +487 -306
- 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/dist_ts_web/elements/idp-secure-account-card.d.ts +37 -0
- package/dist_ts_web/elements/idp-secure-account-card.js +348 -0
- package/dist_ts_web/elements/index.d.ts +1 -0
- package/dist_ts_web/elements/index.js +2 -1
- 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/ts_web/elements/idp-secure-account-card.ts +267 -0
- package/ts_web/elements/index.ts +1 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { DeesElement, type TemplateResult } from '@design.estate/dees-element';
|
|
2
|
+
import './idp-auth-card.js';
|
|
3
|
+
import './idp-option-row.js';
|
|
4
|
+
import './idp-otp-input.js';
|
|
5
|
+
import './idp-status-icon.js';
|
|
6
|
+
import './idp-button.js';
|
|
7
|
+
export type TIdpSecureAccountStage = 'choice' | 'totp' | 'backup-codes' | 'done';
|
|
8
|
+
declare global {
|
|
9
|
+
interface HTMLElementTagNameMap {
|
|
10
|
+
'idp-secure-account-card': IdpSecureAccountCard;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Post-registration security enrollment card. Purely presentational: the host
|
|
15
|
+
* runs the WebAuthn/TOTP requests and drives `stage`, reacting to
|
|
16
|
+
* idp-secure-passkey, idp-secure-totp, idp-secure-totp-verify, idp-secure-skip
|
|
17
|
+
* and idp-secure-continue.
|
|
18
|
+
*/
|
|
19
|
+
export declare class IdpSecureAccountCard extends DeesElement {
|
|
20
|
+
static demo: () => TemplateResult<1>;
|
|
21
|
+
static demoGroups: string[];
|
|
22
|
+
accessor stage: TIdpSecureAccountStage;
|
|
23
|
+
/** disables actions while the host performs a request */
|
|
24
|
+
accessor busy: boolean;
|
|
25
|
+
accessor errorText: string;
|
|
26
|
+
/** manual-entry TOTP secret shown during the totp stage */
|
|
27
|
+
accessor totpSecret: string;
|
|
28
|
+
/** otpauth:// URL; rendered as a tappable link for phone authenticators */
|
|
29
|
+
accessor totpOtpauthUrl: string;
|
|
30
|
+
/** one-time backup codes shown after successful TOTP verification */
|
|
31
|
+
accessor backupCodes: string[];
|
|
32
|
+
/** which method completed, for the done stage copy */
|
|
33
|
+
accessor doneMethod: 'passkey' | 'totp' | '';
|
|
34
|
+
static styles: import("@design.estate/dees-element").CSSResult[];
|
|
35
|
+
render(): TemplateResult;
|
|
36
|
+
private emit;
|
|
37
|
+
}
|
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
2
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
3
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
4
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
5
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
6
|
+
var _, done = false;
|
|
7
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8
|
+
var context = {};
|
|
9
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
10
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
11
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
12
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
13
|
+
if (kind === "accessor") {
|
|
14
|
+
if (result === void 0) continue;
|
|
15
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
16
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
17
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
18
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
19
|
+
}
|
|
20
|
+
else if (_ = accept(result)) {
|
|
21
|
+
if (kind === "field") initializers.unshift(_);
|
|
22
|
+
else descriptor[key] = _;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
26
|
+
done = true;
|
|
27
|
+
};
|
|
28
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
29
|
+
var useValue = arguments.length > 2;
|
|
30
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
31
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
32
|
+
}
|
|
33
|
+
return useValue ? value : void 0;
|
|
34
|
+
};
|
|
35
|
+
import { DeesElement, html, property, customElement, css } from '@design.estate/dees-element';
|
|
36
|
+
import { idpElementStyles } from './tokens.js';
|
|
37
|
+
import './idp-auth-card.js';
|
|
38
|
+
import './idp-option-row.js';
|
|
39
|
+
import './idp-otp-input.js';
|
|
40
|
+
import './idp-status-icon.js';
|
|
41
|
+
import './idp-button.js';
|
|
42
|
+
/**
|
|
43
|
+
* Post-registration security enrollment card. Purely presentational: the host
|
|
44
|
+
* runs the WebAuthn/TOTP requests and drives `stage`, reacting to
|
|
45
|
+
* idp-secure-passkey, idp-secure-totp, idp-secure-totp-verify, idp-secure-skip
|
|
46
|
+
* and idp-secure-continue.
|
|
47
|
+
*/
|
|
48
|
+
let IdpSecureAccountCard = (() => {
|
|
49
|
+
let _classDecorators = [customElement('idp-secure-account-card')];
|
|
50
|
+
let _classDescriptor;
|
|
51
|
+
let _classExtraInitializers = [];
|
|
52
|
+
let _classThis;
|
|
53
|
+
let _classSuper = DeesElement;
|
|
54
|
+
let _stage_decorators;
|
|
55
|
+
let _stage_initializers = [];
|
|
56
|
+
let _stage_extraInitializers = [];
|
|
57
|
+
let _busy_decorators;
|
|
58
|
+
let _busy_initializers = [];
|
|
59
|
+
let _busy_extraInitializers = [];
|
|
60
|
+
let _errorText_decorators;
|
|
61
|
+
let _errorText_initializers = [];
|
|
62
|
+
let _errorText_extraInitializers = [];
|
|
63
|
+
let _totpSecret_decorators;
|
|
64
|
+
let _totpSecret_initializers = [];
|
|
65
|
+
let _totpSecret_extraInitializers = [];
|
|
66
|
+
let _totpOtpauthUrl_decorators;
|
|
67
|
+
let _totpOtpauthUrl_initializers = [];
|
|
68
|
+
let _totpOtpauthUrl_extraInitializers = [];
|
|
69
|
+
let _backupCodes_decorators;
|
|
70
|
+
let _backupCodes_initializers = [];
|
|
71
|
+
let _backupCodes_extraInitializers = [];
|
|
72
|
+
let _doneMethod_decorators;
|
|
73
|
+
let _doneMethod_initializers = [];
|
|
74
|
+
let _doneMethod_extraInitializers = [];
|
|
75
|
+
var IdpSecureAccountCard = class extends _classSuper {
|
|
76
|
+
static { _classThis = this; }
|
|
77
|
+
static {
|
|
78
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
79
|
+
_stage_decorators = [property({ type: String, reflect: true })];
|
|
80
|
+
_busy_decorators = [property({ type: Boolean })];
|
|
81
|
+
_errorText_decorators = [property({ type: String })];
|
|
82
|
+
_totpSecret_decorators = [property({ type: String })];
|
|
83
|
+
_totpOtpauthUrl_decorators = [property({ type: String })];
|
|
84
|
+
_backupCodes_decorators = [property({ type: Array })];
|
|
85
|
+
_doneMethod_decorators = [property({ type: String })];
|
|
86
|
+
__esDecorate(this, null, _stage_decorators, { kind: "accessor", name: "stage", static: false, private: false, access: { has: obj => "stage" in obj, get: obj => obj.stage, set: (obj, value) => { obj.stage = value; } }, metadata: _metadata }, _stage_initializers, _stage_extraInitializers);
|
|
87
|
+
__esDecorate(this, null, _busy_decorators, { kind: "accessor", name: "busy", static: false, private: false, access: { has: obj => "busy" in obj, get: obj => obj.busy, set: (obj, value) => { obj.busy = value; } }, metadata: _metadata }, _busy_initializers, _busy_extraInitializers);
|
|
88
|
+
__esDecorate(this, null, _errorText_decorators, { kind: "accessor", name: "errorText", static: false, private: false, access: { has: obj => "errorText" in obj, get: obj => obj.errorText, set: (obj, value) => { obj.errorText = value; } }, metadata: _metadata }, _errorText_initializers, _errorText_extraInitializers);
|
|
89
|
+
__esDecorate(this, null, _totpSecret_decorators, { kind: "accessor", name: "totpSecret", static: false, private: false, access: { has: obj => "totpSecret" in obj, get: obj => obj.totpSecret, set: (obj, value) => { obj.totpSecret = value; } }, metadata: _metadata }, _totpSecret_initializers, _totpSecret_extraInitializers);
|
|
90
|
+
__esDecorate(this, null, _totpOtpauthUrl_decorators, { kind: "accessor", name: "totpOtpauthUrl", static: false, private: false, access: { has: obj => "totpOtpauthUrl" in obj, get: obj => obj.totpOtpauthUrl, set: (obj, value) => { obj.totpOtpauthUrl = value; } }, metadata: _metadata }, _totpOtpauthUrl_initializers, _totpOtpauthUrl_extraInitializers);
|
|
91
|
+
__esDecorate(this, null, _backupCodes_decorators, { kind: "accessor", name: "backupCodes", static: false, private: false, access: { has: obj => "backupCodes" in obj, get: obj => obj.backupCodes, set: (obj, value) => { obj.backupCodes = value; } }, metadata: _metadata }, _backupCodes_initializers, _backupCodes_extraInitializers);
|
|
92
|
+
__esDecorate(this, null, _doneMethod_decorators, { kind: "accessor", name: "doneMethod", static: false, private: false, access: { has: obj => "doneMethod" in obj, get: obj => obj.doneMethod, set: (obj, value) => { obj.doneMethod = value; } }, metadata: _metadata }, _doneMethod_initializers, _doneMethod_extraInitializers);
|
|
93
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
94
|
+
IdpSecureAccountCard = _classThis = _classDescriptor.value;
|
|
95
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
96
|
+
}
|
|
97
|
+
static demo = () => html `
|
|
98
|
+
<div style="background: var(--sh-bg, #f5f5f7); padding: 40px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: center;">
|
|
99
|
+
<idp-secure-account-card stage="choice"></idp-secure-account-card>
|
|
100
|
+
<idp-secure-account-card stage="totp" totpSecret="JBSWY3DPEHPK3PXP" totpOtpauthUrl="otpauth://totp/idp.global:alex%40lossless.com?secret=JBSWY3DPEHPK3PXP&issuer=idp.global"></idp-secure-account-card>
|
|
101
|
+
<idp-secure-account-card stage="backup-codes" .backupCodes=${['1111-2222', '3333-4444', '5555-6666', '7777-8888', '9999-0000', '1234-5678']}></idp-secure-account-card>
|
|
102
|
+
<idp-secure-account-card stage="done" doneMethod="passkey"></idp-secure-account-card>
|
|
103
|
+
</div>
|
|
104
|
+
`;
|
|
105
|
+
static demoGroups = ['idp.global v5 auth'];
|
|
106
|
+
#stage_accessor_storage = __runInitializers(this, _stage_initializers, 'choice');
|
|
107
|
+
get stage() { return this.#stage_accessor_storage; }
|
|
108
|
+
set stage(value) { this.#stage_accessor_storage = value; }
|
|
109
|
+
#busy_accessor_storage = (__runInitializers(this, _stage_extraInitializers), __runInitializers(this, _busy_initializers, false));
|
|
110
|
+
/** disables actions while the host performs a request */
|
|
111
|
+
get busy() { return this.#busy_accessor_storage; }
|
|
112
|
+
set busy(value) { this.#busy_accessor_storage = value; }
|
|
113
|
+
#errorText_accessor_storage = (__runInitializers(this, _busy_extraInitializers), __runInitializers(this, _errorText_initializers, ''));
|
|
114
|
+
get errorText() { return this.#errorText_accessor_storage; }
|
|
115
|
+
set errorText(value) { this.#errorText_accessor_storage = value; }
|
|
116
|
+
#totpSecret_accessor_storage = (__runInitializers(this, _errorText_extraInitializers), __runInitializers(this, _totpSecret_initializers, ''));
|
|
117
|
+
/** manual-entry TOTP secret shown during the totp stage */
|
|
118
|
+
get totpSecret() { return this.#totpSecret_accessor_storage; }
|
|
119
|
+
set totpSecret(value) { this.#totpSecret_accessor_storage = value; }
|
|
120
|
+
#totpOtpauthUrl_accessor_storage = (__runInitializers(this, _totpSecret_extraInitializers), __runInitializers(this, _totpOtpauthUrl_initializers, ''));
|
|
121
|
+
/** otpauth:// URL; rendered as a tappable link for phone authenticators */
|
|
122
|
+
get totpOtpauthUrl() { return this.#totpOtpauthUrl_accessor_storage; }
|
|
123
|
+
set totpOtpauthUrl(value) { this.#totpOtpauthUrl_accessor_storage = value; }
|
|
124
|
+
#backupCodes_accessor_storage = (__runInitializers(this, _totpOtpauthUrl_extraInitializers), __runInitializers(this, _backupCodes_initializers, []));
|
|
125
|
+
/** one-time backup codes shown after successful TOTP verification */
|
|
126
|
+
get backupCodes() { return this.#backupCodes_accessor_storage; }
|
|
127
|
+
set backupCodes(value) { this.#backupCodes_accessor_storage = value; }
|
|
128
|
+
#doneMethod_accessor_storage = (__runInitializers(this, _backupCodes_extraInitializers), __runInitializers(this, _doneMethod_initializers, ''));
|
|
129
|
+
/** which method completed, for the done stage copy */
|
|
130
|
+
get doneMethod() { return this.#doneMethod_accessor_storage; }
|
|
131
|
+
set doneMethod(value) { this.#doneMethod_accessor_storage = value; }
|
|
132
|
+
static styles = [
|
|
133
|
+
...idpElementStyles,
|
|
134
|
+
css `
|
|
135
|
+
:host {
|
|
136
|
+
display: block;
|
|
137
|
+
font-family: var(--idp-font);
|
|
138
|
+
}
|
|
139
|
+
.option-list {
|
|
140
|
+
display: flex;
|
|
141
|
+
flex-direction: column;
|
|
142
|
+
gap: 10px;
|
|
143
|
+
margin-top: 16px;
|
|
144
|
+
}
|
|
145
|
+
.skip-row {
|
|
146
|
+
margin-top: 16px;
|
|
147
|
+
text-align: center;
|
|
148
|
+
font-size: 13px;
|
|
149
|
+
}
|
|
150
|
+
.skip-row a {
|
|
151
|
+
color: var(--idp-fg-3);
|
|
152
|
+
cursor: pointer;
|
|
153
|
+
text-decoration: none;
|
|
154
|
+
}
|
|
155
|
+
.skip-row a:hover {
|
|
156
|
+
color: var(--idp-fg-2);
|
|
157
|
+
text-decoration: underline;
|
|
158
|
+
}
|
|
159
|
+
.error-note {
|
|
160
|
+
margin-top: 14px;
|
|
161
|
+
padding: 9px 12px;
|
|
162
|
+
background: color-mix(in srgb, #ff3b30 8%, transparent);
|
|
163
|
+
border: 1px solid color-mix(in srgb, #ff3b30 30%, transparent);
|
|
164
|
+
border-radius: 11px;
|
|
165
|
+
font-size: 12.5px;
|
|
166
|
+
color: #d70015;
|
|
167
|
+
}
|
|
168
|
+
.totp-block {
|
|
169
|
+
display: flex;
|
|
170
|
+
flex-direction: column;
|
|
171
|
+
gap: 12px;
|
|
172
|
+
margin-top: 16px;
|
|
173
|
+
}
|
|
174
|
+
.code-block {
|
|
175
|
+
padding: 10px 12px;
|
|
176
|
+
background: var(--idp-bg);
|
|
177
|
+
border: 1px solid var(--idp-border);
|
|
178
|
+
border-radius: 11px;
|
|
179
|
+
font-family: ui-monospace, 'SF Mono', monospace;
|
|
180
|
+
font-size: 12px;
|
|
181
|
+
word-break: break-all;
|
|
182
|
+
user-select: all;
|
|
183
|
+
}
|
|
184
|
+
.code-label {
|
|
185
|
+
font-size: 11.5px;
|
|
186
|
+
color: var(--idp-fg-3);
|
|
187
|
+
margin-bottom: 4px;
|
|
188
|
+
}
|
|
189
|
+
.otp-row {
|
|
190
|
+
display: flex;
|
|
191
|
+
justify-content: center;
|
|
192
|
+
margin-top: 4px;
|
|
193
|
+
}
|
|
194
|
+
.backup-grid {
|
|
195
|
+
display: grid;
|
|
196
|
+
grid-template-columns: 1fr 1fr;
|
|
197
|
+
gap: 8px;
|
|
198
|
+
margin-top: 16px;
|
|
199
|
+
}
|
|
200
|
+
.backup-code {
|
|
201
|
+
padding: 8px 10px;
|
|
202
|
+
background: var(--idp-bg);
|
|
203
|
+
border: 1px solid var(--idp-border);
|
|
204
|
+
border-radius: 9px;
|
|
205
|
+
font-family: ui-monospace, 'SF Mono', monospace;
|
|
206
|
+
font-size: 12.5px;
|
|
207
|
+
text-align: center;
|
|
208
|
+
user-select: all;
|
|
209
|
+
}
|
|
210
|
+
.status-block {
|
|
211
|
+
display: flex;
|
|
212
|
+
flex-direction: column;
|
|
213
|
+
align-items: center;
|
|
214
|
+
gap: 14px;
|
|
215
|
+
padding: 18px 0 6px;
|
|
216
|
+
text-align: center;
|
|
217
|
+
}
|
|
218
|
+
.status-text {
|
|
219
|
+
font-size: 13px;
|
|
220
|
+
color: var(--idp-fg-2);
|
|
221
|
+
line-height: 1.5;
|
|
222
|
+
max-width: 280px;
|
|
223
|
+
}
|
|
224
|
+
.actions {
|
|
225
|
+
display: flex;
|
|
226
|
+
flex-direction: column;
|
|
227
|
+
gap: 10px;
|
|
228
|
+
margin-top: 18px;
|
|
229
|
+
}
|
|
230
|
+
`,
|
|
231
|
+
];
|
|
232
|
+
render() {
|
|
233
|
+
const renderers = {
|
|
234
|
+
choice: () => ({
|
|
235
|
+
heading: 'Secure your account',
|
|
236
|
+
description: 'Add a second factor now. You can also set this up later under Security in your console.',
|
|
237
|
+
body: html `
|
|
238
|
+
<div class="option-list">
|
|
239
|
+
<idp-option-row
|
|
240
|
+
tileTone="accent"
|
|
241
|
+
tileSize="34"
|
|
242
|
+
icon="fingerprint"
|
|
243
|
+
label="Add a passkey"
|
|
244
|
+
description="Sign in with Face ID, Touch ID, or a security key"
|
|
245
|
+
trailing="chevron"
|
|
246
|
+
@click=${() => { if (!this.busy)
|
|
247
|
+
this.emit('idp-secure-passkey'); }}
|
|
248
|
+
></idp-option-row>
|
|
249
|
+
<idp-option-row
|
|
250
|
+
tileTone="accent"
|
|
251
|
+
tileSize="34"
|
|
252
|
+
icon="lucide:Smartphone"
|
|
253
|
+
label="Use an authenticator app"
|
|
254
|
+
description="Time-based codes from an app like 1Password or Google Authenticator"
|
|
255
|
+
trailing="chevron"
|
|
256
|
+
@click=${() => { if (!this.busy)
|
|
257
|
+
this.emit('idp-secure-totp'); }}
|
|
258
|
+
></idp-option-row>
|
|
259
|
+
</div>
|
|
260
|
+
${this.errorText ? html `<div class="error-note" role="alert">${this.errorText}</div>` : html ``}
|
|
261
|
+
<div class="skip-row"><a @click=${() => this.emit('idp-secure-skip')}>Skip for now</a></div>
|
|
262
|
+
`,
|
|
263
|
+
}),
|
|
264
|
+
totp: () => ({
|
|
265
|
+
heading: 'Set up your authenticator',
|
|
266
|
+
description: 'Add the secret to your authenticator app, then enter the current 6-digit code.',
|
|
267
|
+
body: html `
|
|
268
|
+
<div class="totp-block">
|
|
269
|
+
<div>
|
|
270
|
+
<div class="code-label">Manual secret</div>
|
|
271
|
+
<div class="code-block">${this.totpSecret}</div>
|
|
272
|
+
</div>
|
|
273
|
+
${this.totpOtpauthUrl
|
|
274
|
+
? html `
|
|
275
|
+
<div>
|
|
276
|
+
<div class="code-label">Or open directly on this device</div>
|
|
277
|
+
<div class="code-block"><a href=${this.totpOtpauthUrl}>${this.totpOtpauthUrl}</a></div>
|
|
278
|
+
</div>
|
|
279
|
+
`
|
|
280
|
+
: html ``}
|
|
281
|
+
<div class="otp-row">
|
|
282
|
+
<idp-otp-input
|
|
283
|
+
@idp-otp-complete=${(eventArg) => {
|
|
284
|
+
this.dispatchEvent(new CustomEvent('idp-secure-totp-verify', {
|
|
285
|
+
detail: { code: eventArg.detail.value },
|
|
286
|
+
bubbles: true,
|
|
287
|
+
composed: true,
|
|
288
|
+
}));
|
|
289
|
+
}}
|
|
290
|
+
></idp-otp-input>
|
|
291
|
+
</div>
|
|
292
|
+
</div>
|
|
293
|
+
${this.errorText ? html `<div class="error-note" role="alert">${this.errorText}</div>` : html ``}
|
|
294
|
+
<div class="skip-row"><a @click=${() => this.emit('idp-secure-back')}>Choose a different method</a></div>
|
|
295
|
+
`,
|
|
296
|
+
}),
|
|
297
|
+
'backup-codes': () => ({
|
|
298
|
+
heading: 'Save your backup codes',
|
|
299
|
+
description: 'Each code works once if you lose access to your authenticator. Store them somewhere safe.',
|
|
300
|
+
body: html `
|
|
301
|
+
<div class="backup-grid">
|
|
302
|
+
${this.backupCodes.map((codeArg) => html `<div class="backup-code">${codeArg}</div>`)}
|
|
303
|
+
</div>
|
|
304
|
+
<div class="actions">
|
|
305
|
+
<idp-button variant="accent" shape="rect" block @click=${() => this.emit('idp-secure-continue')}>I saved these codes</idp-button>
|
|
306
|
+
</div>
|
|
307
|
+
`,
|
|
308
|
+
}),
|
|
309
|
+
done: () => ({
|
|
310
|
+
heading: this.doneMethod === 'totp' ? 'Authenticator added' : 'Passkey added',
|
|
311
|
+
description: '',
|
|
312
|
+
body: html `
|
|
313
|
+
<div class="status-block">
|
|
314
|
+
<idp-status-icon tone="ok" icon="check"></idp-status-icon>
|
|
315
|
+
<div class="status-text">
|
|
316
|
+
${this.doneMethod === 'totp'
|
|
317
|
+
? 'Sign-ins now require a code from your authenticator app.'
|
|
318
|
+
: 'You can now sign in with your passkey instead of a password.'}
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
<div class="actions">
|
|
322
|
+
<idp-button variant="accent" shape="rect" block @click=${() => this.emit('idp-secure-continue')}>Continue</idp-button>
|
|
323
|
+
</div>
|
|
324
|
+
`,
|
|
325
|
+
}),
|
|
326
|
+
};
|
|
327
|
+
const view = renderers[this.stage]();
|
|
328
|
+
return html `
|
|
329
|
+
<idp-auth-card heading=${view.heading} description=${view.description}>
|
|
330
|
+
${view.body}
|
|
331
|
+
</idp-auth-card>
|
|
332
|
+
`;
|
|
333
|
+
}
|
|
334
|
+
emit(eventName) {
|
|
335
|
+
this.dispatchEvent(new CustomEvent(eventName, { bubbles: true, composed: true }));
|
|
336
|
+
}
|
|
337
|
+
constructor() {
|
|
338
|
+
super(...arguments);
|
|
339
|
+
__runInitializers(this, _doneMethod_extraInitializers);
|
|
340
|
+
}
|
|
341
|
+
static {
|
|
342
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+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QUksQ0FBQyxxQkFBcUIsQ0FBQzs7U0FFbEc7aUJBQ0YsQ0FBQzthQUNILENBQUM7WUFDRixNQUFNLElBQUksR0FBRyxTQUFTLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxFQUFFLENBQUM7WUFDckMsT0FBTyxJQUFJLENBQUE7K0JBQ2dCLElBQUksQ0FBQyxPQUFPLGdCQUFnQixJQUFJLENBQUMsV0FBVztVQUNqRSxJQUFJLENBQUMsSUFBSTs7S0FFZCxDQUFDO1FBQ0osQ0FBQztRQUVPLElBQUksQ0FBQyxTQUFpQjtZQUM1QixJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksV0FBVyxDQUFDLFNBQVMsRUFBRSxFQUFFLE9BQU8sRUFBRSxJQUFJLEVBQUUsUUFBUSxFQUFFLElBQUksRUFBRSxDQUFDLENBQUMsQ0FBQztRQUNwRixDQUFDOzs7Ozs7WUFqUFUsdURBQW9COzs7OztTQUFwQixvQkFBb0IifQ==
|
|
@@ -23,6 +23,7 @@ export * from './idp-app-pair.js';
|
|
|
23
23
|
export * from './idp-auth-card.js';
|
|
24
24
|
export * from './idp-consent-card.js';
|
|
25
25
|
export * from './idp-invite-card.js';
|
|
26
|
+
export * from './idp-secure-account-card.js';
|
|
26
27
|
export * from './idp-approval-card.js';
|
|
27
28
|
export * from './idp-mobile-frame.js';
|
|
28
29
|
export * from './idp-inbox-preview.js';
|
|
@@ -23,6 +23,7 @@ export * from './idp-app-pair.js';
|
|
|
23
23
|
export * from './idp-auth-card.js';
|
|
24
24
|
export * from './idp-consent-card.js';
|
|
25
25
|
export * from './idp-invite-card.js';
|
|
26
|
+
export * from './idp-secure-account-card.js';
|
|
26
27
|
export * from './idp-approval-card.js';
|
|
27
28
|
export * from './idp-mobile-frame.js';
|
|
28
29
|
export * from './idp-inbox-preview.js';
|
|
@@ -37,4 +38,4 @@ export * from './idp-landing-page.js';
|
|
|
37
38
|
export * from './idp-mobile-showcase.js';
|
|
38
39
|
export * from './idp-sso-connection-form.js';
|
|
39
40
|
export * from './idp-scim-token-panel.js';
|
|
40
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90c193ZWIvZWxlbWVudHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxlQUFlLENBQUM7QUFDOUIsY0FBYyxpQkFBaUIsQ0FBQztBQUNoQyxjQUFjLGdCQUFnQixDQUFDO0FBQy9CLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsaUNBQWlDLENBQUM7QUFDaEQsY0FBYyxxQkFBcUIsQ0FBQztBQUNwQyxjQUFjLGlCQUFpQixDQUFDO0FBQ2hDLGNBQWMsa0JBQWtCLENBQUM7QUFDakMsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLHNCQUFzQixDQUFDO0FBQ3JDLGNBQWMsZ0JBQWdCLENBQUM7QUFDL0IsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLGVBQWUsQ0FBQztBQUM5QixjQUFjLHNCQUFzQixDQUFDO0FBQ3JDLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYyxxQkFBcUIsQ0FBQztBQUNwQyxjQUFjLGlCQUFpQixDQUFDO0FBQ2hDLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyxxQkFBcUIsQ0FBQztBQUNwQyxjQUFjLHlCQUF5QixDQUFDO0FBQ3hDLGNBQWMsbUJBQW1CLENBQUM7QUFDbEMsY0FBYyxvQkFBb0IsQ0FBQztBQUNuQyxjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsc0JBQXNCLENBQUM7QUFDckMsY0FBYyw4QkFBOEIsQ0FBQztBQUM3QyxjQUFjLHdCQUF3QixDQUFDO0FBQ3ZDLGNBQWMsdUJBQXVCLENBQUM7QUFDdEMsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLDJCQUEyQixDQUFDO0FBQzFDLGNBQWMsNkJBQTZCLENBQUM7QUFDNUMsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLHdCQUF3QixDQUFDO0FBQ3ZDLGNBQWMseUJBQXlCLENBQUM7QUFDeEMsY0FBYyxzQkFBc0IsQ0FBQztBQUNyQyxjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsdUJBQXVCLENBQUM7QUFDdEMsY0FBYywwQkFBMEIsQ0FBQztBQUN6QyxjQUFjLDhCQUE4QixDQUFDO0FBQzdDLGNBQWMsMkJBQTJCLENBQUMifQ==
|
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
|
|