@zitadel/components 1.0.0-alpha.20 → 1.0.0-alpha.22
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/dist/atoms/index.d.mts +1 -1
- package/dist/atoms/index.mjs +1 -1
- package/dist/{atoms-DSxjEHca.mjs → atoms-Boaxh79f.mjs} +2 -2
- package/dist/atoms-Boaxh79f.mjs.map +1 -0
- package/dist/{index-CaScNIBy.d.mts → index-BaS893QZ.d.mts} +60 -18
- package/dist/index-BaS893QZ.d.mts.map +1 -0
- package/dist/{index-BPgWdWx7.d.mts → index-DMPCvLh_.d.mts} +1421 -126
- package/dist/index-DMPCvLh_.d.mts.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/manifests.mjs +1 -1
- package/dist/orchestrator/index.d.mts +1 -1
- package/dist/orchestrator/index.mjs +1 -1
- package/dist/{orchestrator-ixQm2RIC.mjs → orchestrator-BPX0Uc77.mjs} +171 -68
- package/dist/orchestrator-BPX0Uc77.mjs.map +1 -0
- package/dist/standalone.mjs +171 -68
- package/package.json +3 -3
- package/dist/atoms-DSxjEHca.mjs.map +0 -1
- package/dist/index-BPgWdWx7.d.mts.map +0 -1
- package/dist/index-CaScNIBy.d.mts.map +0 -1
- package/dist/orchestrator-ixQm2RIC.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as focusVisibleStyles, E as emit, S as __decorate, T as t, d as hookName, w as baseHostStyles } from "./atoms-
|
|
1
|
+
import { C as focusVisibleStyles, E as emit, S as __decorate, T as t, d as hookName, w as baseHostStyles } from "./atoms-Boaxh79f.mjs";
|
|
2
2
|
import { i as tokensCss, t as THEME_SELECTORS } from "./tokens-T4N9VJz3.mjs";
|
|
3
3
|
import { manifestRegistry } from "./manifests.mjs";
|
|
4
4
|
import { t as default_default } from "./default-Dnjq9iBt.mjs";
|
|
@@ -816,7 +816,7 @@ const en = {
|
|
|
816
816
|
"password.action.register.lead": "Don't have an account? ",
|
|
817
817
|
"password.action.register.link": "Sign up",
|
|
818
818
|
"register.title": "Create your account",
|
|
819
|
-
"register.description": "",
|
|
819
|
+
"register.description": "Enter your details to get started",
|
|
820
820
|
"register.field.email": "Email",
|
|
821
821
|
"register.field.email.placeholder": "you@example.com",
|
|
822
822
|
"register.field.password": "Password",
|
|
@@ -933,7 +933,7 @@ const de = {
|
|
|
933
933
|
"password.action.register.lead": "Noch kein Konto? ",
|
|
934
934
|
"password.action.register.link": "Registrieren",
|
|
935
935
|
"register.title": "Konto erstellen",
|
|
936
|
-
"register.description": "",
|
|
936
|
+
"register.description": "Gib deine Daten ein, um loszulegen",
|
|
937
937
|
"register.field.email": "E-Mail",
|
|
938
938
|
"register.field.email.placeholder": "du@beispiel.de",
|
|
939
939
|
"register.field.password": "Passwort",
|
|
@@ -1049,7 +1049,7 @@ const it = {
|
|
|
1049
1049
|
"password.action.register.lead": "Non hai un account? ",
|
|
1050
1050
|
"password.action.register.link": "Registrati",
|
|
1051
1051
|
"register.title": "Crea il tuo account",
|
|
1052
|
-
"register.description": "",
|
|
1052
|
+
"register.description": "Inserisci i tuoi dati per iniziare",
|
|
1053
1053
|
"register.field.email": "E-mail",
|
|
1054
1054
|
"register.field.email.placeholder": "tu@esempio.com",
|
|
1055
1055
|
"register.field.password": "Password",
|
|
@@ -1203,6 +1203,7 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
1203
1203
|
getBeginUserPasskeyRegistrationUrl: () => getBeginUserPasskeyRegistrationUrl,
|
|
1204
1204
|
getBrandingById: () => getBrandingById,
|
|
1205
1205
|
getClaimStatus: () => getClaimStatus,
|
|
1206
|
+
getClaimWindow: () => getClaimWindow,
|
|
1206
1207
|
getCompleteClaimUrl: () => getCompleteClaimUrl,
|
|
1207
1208
|
getCreateAuthAttemptUrl: () => getCreateAuthAttemptUrl,
|
|
1208
1209
|
getCreateBrandingUrl: () => getCreateBrandingUrl,
|
|
@@ -1229,6 +1230,7 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
1229
1230
|
getGetAuthAttemptUrl: () => getGetAuthAttemptUrl,
|
|
1230
1231
|
getGetBrandingByIdUrl: () => getGetBrandingByIdUrl,
|
|
1231
1232
|
getGetClaimStatusUrl: () => getGetClaimStatusUrl,
|
|
1233
|
+
getGetClaimWindowUrl: () => getGetClaimWindowUrl,
|
|
1232
1234
|
getGetEnvironmentByNameUrl: () => getGetEnvironmentByNameUrl,
|
|
1233
1235
|
getGetEventUrl: () => getGetEventUrl,
|
|
1234
1236
|
getGetFlowDefinitionUrl: () => getGetFlowDefinitionUrl,
|
|
@@ -1262,6 +1264,7 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
1262
1264
|
getMyUser: () => getMyUser,
|
|
1263
1265
|
getPatchProjectUrl: () => getPatchProjectUrl,
|
|
1264
1266
|
getProject: () => getProject,
|
|
1267
|
+
getQueryGrantsUrl: () => getQueryGrantsUrl,
|
|
1265
1268
|
getQueryProjectsUrl: () => getQueryProjectsUrl,
|
|
1266
1269
|
getQuerySessionsUrl: () => getQuerySessionsUrl,
|
|
1267
1270
|
getQueryTeamsUrl: () => getQueryTeamsUrl,
|
|
@@ -1290,6 +1293,7 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
1290
1293
|
listUserPasskeys: () => listUserPasskeys,
|
|
1291
1294
|
listUserTeams: () => listUserTeams,
|
|
1292
1295
|
patchProject: () => patchProject,
|
|
1296
|
+
queryGrants: () => queryGrants,
|
|
1293
1297
|
queryProjects: () => queryProjects,
|
|
1294
1298
|
querySessions: () => querySessions,
|
|
1295
1299
|
queryTeams: () => queryTeams,
|
|
@@ -1839,7 +1843,11 @@ const getGetClaimStatusUrl = (projectId, params) => {
|
|
|
1839
1843
|
* Polled by the CLI while a browser completes the claim. Authorized by the
|
|
1840
1844
|
project secret that initiated the challenge. Returns `pending`, or
|
|
1841
1845
|
`completed` with the owning team, the claim timestamp, and the dashboard
|
|
1842
|
-
URL once the
|
|
1846
|
+
URL once the project is claimed. The claim grant, not the polled
|
|
1847
|
+
challenge, is the source of truth: a project claimed through another
|
|
1848
|
+
concurrent challenge also reports `completed`, and a completed claim
|
|
1849
|
+
keeps reporting `completed` past this challenge's expiry and past the
|
|
1850
|
+
project's claim window.
|
|
1843
1851
|
|
|
1844
1852
|
* @summary Get claim status
|
|
1845
1853
|
*/
|
|
@@ -1871,6 +1879,30 @@ const completeClaim = async (projectId, completeClaimBody, options) => {
|
|
|
1871
1879
|
body: JSON.stringify(completeClaimBody)
|
|
1872
1880
|
});
|
|
1873
1881
|
};
|
|
1882
|
+
const getGetClaimWindowUrl = (projectId, params) => {
|
|
1883
|
+
const normalizedParams = new URLSearchParams();
|
|
1884
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1885
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1886
|
+
});
|
|
1887
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1888
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/projects/${projectId}/claim/window?${stringifiedParams}` : `${getProxyPath()}/projects/${projectId}/claim/window`;
|
|
1889
|
+
};
|
|
1890
|
+
/**
|
|
1891
|
+
* Read by the claim page in the browser to show how long is left to claim the
|
|
1892
|
+
project. Unauthenticated by design: the claim page runs this before the
|
|
1893
|
+
developer has signed in, and holding the `challenge_id` from the claim URL
|
|
1894
|
+
is the authorization — the same capability `claim/complete` accepts. It
|
|
1895
|
+
reveals only the window, never the project itself, and unlike
|
|
1896
|
+
`claim/complete` it spends nothing, so a reload is free.
|
|
1897
|
+
|
|
1898
|
+
* @summary Get the claim window for a project
|
|
1899
|
+
*/
|
|
1900
|
+
const getClaimWindow = async (projectId, params, options) => {
|
|
1901
|
+
return customFetch(getGetClaimWindowUrl(projectId, params), {
|
|
1902
|
+
...options,
|
|
1903
|
+
method: "GET"
|
|
1904
|
+
});
|
|
1905
|
+
};
|
|
1874
1906
|
const getCreateSessionUrl = () => {
|
|
1875
1907
|
return `${getProxyPath()}/sessions`;
|
|
1876
1908
|
};
|
|
@@ -2132,12 +2164,17 @@ const getCreateFlowDefinitionUrl = () => {
|
|
|
2132
2164
|
return `${getProxyPath()}/flow_definitions`;
|
|
2133
2165
|
};
|
|
2134
2166
|
/**
|
|
2135
|
-
*
|
|
2167
|
+
* Publishes a new flow definition revision.
|
|
2136
2168
|
Flow definitions are templates that define the sequence of steps (capabilities)
|
|
2137
2169
|
for a particular user journey (e.g., registration, login, password reset).
|
|
2138
2170
|
|
|
2139
2171
|
Flow definitions are created based on the flow definition schema, which includes the flow's purpose, audience, and the steps involved.
|
|
2140
2172
|
|
|
2173
|
+
Every call allocates a new opaque id. Revisions of one flow share its
|
|
2174
|
+
`name`; posting a definition under an existing `name` publishes a new
|
|
2175
|
+
revision of that flow, it is not a conflict. List with `name` to see a
|
|
2176
|
+
flow's revisions, newest by creation time first.
|
|
2177
|
+
|
|
2141
2178
|
* @summary Create a new flow definition
|
|
2142
2179
|
*/
|
|
2143
2180
|
const createFlowDefinition = async (createFlowDefinitionBody, options) => {
|
|
@@ -2160,8 +2197,9 @@ const getListFlowDefinitionsUrl = (params) => {
|
|
|
2160
2197
|
return stringifiedParams.length > 0 ? `${getProxyPath()}/flow_definitions?${stringifiedParams}` : `${getProxyPath()}/flow_definitions`;
|
|
2161
2198
|
};
|
|
2162
2199
|
/**
|
|
2163
|
-
* Retrieves a list of all flow definitions.
|
|
2200
|
+
* Retrieves a list of all flow definitions, newest by creation time first.
|
|
2164
2201
|
This endpoint can be used to view existing flow definitions and their configurations.
|
|
2202
|
+
Filter by `name` to list the revisions of one flow.
|
|
2165
2203
|
|
|
2166
2204
|
* @summary List flow definitions
|
|
2167
2205
|
*/
|
|
@@ -2546,6 +2584,39 @@ const createGrant = async (createGrantBody, params, options) => {
|
|
|
2546
2584
|
body: JSON.stringify(createGrantBody)
|
|
2547
2585
|
});
|
|
2548
2586
|
};
|
|
2587
|
+
const getQueryGrantsUrl = (params) => {
|
|
2588
|
+
const normalizedParams = new URLSearchParams();
|
|
2589
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2590
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
2591
|
+
});
|
|
2592
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2593
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/grants/query?${stringifiedParams}` : `${getProxyPath()}/grants/query`;
|
|
2594
|
+
};
|
|
2595
|
+
/**
|
|
2596
|
+
* Returns the collaboration grants of a project, paginated with a cursor.
|
|
2597
|
+
Only unrevoked grants this API manages are listed (user or team bound to
|
|
2598
|
+
viewer, editor, or admin), including expired grants so a client can
|
|
2599
|
+
DELETE before re-granting. Project-secret setup (`sk_proj`) and
|
|
2600
|
+
owning-team (`relation=team`) rows are not returned. Grants are not in
|
|
2601
|
+
`resource_scope_index`; project scope is required on the query (same as
|
|
2602
|
+
get). Requires `project.read`. `expand: ["principal"]` additionally
|
|
2603
|
+
requires `user.read` and `team.read` (documented on the expand enum;
|
|
2604
|
+
those scopes cannot be ANDed onto this security block because they are
|
|
2605
|
+
body-conditional).
|
|
2606
|
+
|
|
2607
|
+
* @summary Query grants
|
|
2608
|
+
*/
|
|
2609
|
+
const queryGrants = async (queryGrantsBody, params, options) => {
|
|
2610
|
+
return customFetch(getQueryGrantsUrl(params), {
|
|
2611
|
+
...options,
|
|
2612
|
+
method: "POST",
|
|
2613
|
+
headers: {
|
|
2614
|
+
"Content-Type": "application/json",
|
|
2615
|
+
...options?.headers
|
|
2616
|
+
},
|
|
2617
|
+
body: JSON.stringify(queryGrantsBody)
|
|
2618
|
+
});
|
|
2619
|
+
};
|
|
2549
2620
|
const getGetGrantUrl = (id, params) => {
|
|
2550
2621
|
const normalizedParams = new URLSearchParams();
|
|
2551
2622
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -3433,7 +3504,7 @@ const TEMPLATE_NAMES = {
|
|
|
3433
3504
|
};
|
|
3434
3505
|
//#endregion
|
|
3435
3506
|
//#region src/orchestrator/templates/layout-chrome.css?inline
|
|
3436
|
-
var layout_chrome_default = ":host {\n color: var(--zl-foreground);\n font-family: var(--zl-font-family-sans);\n background: none;\n display: block;\n}\n\n:host([variant=\"page\"]) {\n background: var(--zl-background);\n min-height: 100%;\n}\n\nimg[data-zl-asset-broken] {\n display: none;\n}\n\n.zl-mount {\n min-height: var(--zl-page-min-height, auto);\n background: inherit;\n color: inherit;\n flex-direction: column;\n display: flex;\n container-type: inline-size;\n}\n\n:host([variant=\"page\"]) .zl-mount {\n min-height: var(--zl-page-min-height, 100vh);\n}\n\n.zl-mount > zl-page-shell, .zl-mount > [data-zl-template-root] {\n flex: auto;\n}\n\n.zl-attribution {\n background: none;\n justify-content: center;\n align-items: center;\n display: flex;\n}\n\n.zl-attribution[hidden] {\n display: none;\n}\n\n.zl-trustmark {\n gap: var(--zl-spacing-2-5);\n flex-wrap: wrap;\n}\n\n.zl-trustmark__mark {\n align-items: center;\n gap: var(--zl-spacing-2);\n font-family: var(--zl-font-family-sans);\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n color: var(--zl-foreground);\n text-decoration: none;\n display: inline-flex;\n}\n\n.zl-trustmark__mark:hover {\n text-underline-offset: 4px;\n text-decoration: underline;\n}\n\n.zl-trustmark__mark:focus-visible {\n outline: var(--zl-focus-width) solid var(--zl-ring);\n outline-offset: var(--zl-focus-offset);\n border-radius: var(--zl-radius-sm);\n}\n\n.zl-trustmark__logotype {\n flex-shrink: 0;\n width: 65px;\n height: 16px;\n line-height: 0;\n display: block;\n}\n\n.zl-trustmark__logotype-svg {\n width: 100%;\n height: 100%;\n display: block;\n}\n\n.zl-card-logo {\n width: auto;\n max-width: min(12rem, 60%);\n max-height: var(--zl-card-logo-max-height, 2.5rem);\n object-fit: contain;\n}\n\n.zl-card-title {\n font-family: var(--zl-font-family-heading);\n font-size: var(--zl-text-xl-size);\n font-weight: var(--zl-font-weight-medium);\n color: var(--zl-card-foreground);\n text-align: left;\n margin: 0;\n line-height: 1;\n}\n\n.zl-card-subtitle {\n font-family: var(--zl-font-family-sans);\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n font-weight: var(--zl-font-weight-normal);\n color: var(--zl-muted-foreground);\n margin: 0;\n}\n\n.zl-field-group {\n gap: var(--zl-spacing-7);\n flex-direction: column;\n display: flex;\n}\n\n.zl-field-group:not(:has(*)) {\n display: none;\n}\n\n.zl-card-actions {\n gap: var(--zl-spacing-3);\n flex-direction: column;\n display: flex;\n}\n\n[data-suppress-header] .zl-card-title, [data-suppress-header] .zl-card-subtitle {\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n position: absolute;\n overflow: hidden;\n}\n\n.zl-card-nav {\n font-family: var(--zl-font-family-sans);\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n font-weight: var(--zl-font-weight-normal);\n color: var(--zl-muted-foreground);\n text-align: center;\n margin: 0;\n}\n\n.zl-card-nav__link {\n font: inherit;\n line-height: inherit;\n color: var(--zl-link);\n text-underline-offset: 4px;\n cursor: pointer;\n background: none;\n border: none;\n margin: 0;\n padding: 0;\n text-decoration: underline;\n display: inline;\n}\n\n.zl-card-nav__link:hover {\n color: var(--zl-foreground);\n}\n\n.zl-card-nav__link:focus-visible {\n outline: var(--zl-focus-width) solid var(--zl-ring);\n outline-offset: var(--zl-focus-offset);\n}\n\n.zl-card-forgot {\n text-align: right;\n margin: 0;\n}\n\n.zl-card-forgot__link {\n font-family: var(--zl-font-family-sans);\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n font-weight: var(--zl-font-weight-normal);\n color: var(--zl-link);\n text-underline-offset: 4px;\n cursor: pointer;\n background: none;\n border: none;\n margin: 0;\n padding: 0;\n text-decoration: none;\n display: inline;\n}\n\n.zl-card-forgot__link:hover {\n text-decoration: underline;\n}\n\n.zl-card-forgot__link:focus-visible {\n outline: var(--zl-focus-width) solid var(--zl-ring);\n outline-offset: var(--zl-focus-offset);\n}\n\n.zl-split {\n grid-template-columns: var(--zl-split-columns, minmax(0, 1fr) minmax(0, 1fr));\n align-items: var(--zl-split-align, center);\n gap: var(--zl-spacing-8);\n width: 100%;\n min-height: 100%;\n display: grid;\n}\n\n.zl-split__brand {\n justify-content: center;\n align-items: center;\n gap: var(--zl-spacing-6);\n padding: var(--zl-spacing-8) var(--zl-spacing-4);\n flex-direction: column;\n display: flex;\n}\n\n.zl-split__logo {\n max-width: min(16rem, 60%);\n max-height: var(--zl-split-logo-max-height, 16rem);\n}\n\n.zl-split__logo:has( + .zl-split__hero) {\n max-height: var(--zl-split-logo-max-height, 8rem);\n}\n\n.zl-split__logo:has( + .zl-split__hero) + .zl-split__hero {\n max-height: min(var(--zl-split-hero-max-height, 22.5rem),\n max(6rem,\n calc(100vh - 104px - var(--zl-spacing-8) - var(--zl-spacing-8) -\n 2.5rem - var(--zl-spacing-6) - var(--zl-spacing-6) -\n var(--zl-split-logo-max-height, 8rem))));\n}\n\n.zl-split__hero {\n width: 100%;\n max-height: var(--zl-split-hero-max-height, min(22.5rem, 60vh));\n border-radius: var(--zl-radius-lg);\n object-fit: cover;\n}\n\n.zl-split__placeholder {\n aspect-ratio: 4 / 5;\n border-radius: var(--zl-radius-lg);\n background: radial-gradient(120% 120% at 18% 12%,\n var(--zl-gradient-lavender-start) 0%,\n transparent 60%),\n radial-gradient(130% 130% at 85% 92%,\n var(--zl-gradient-rose-start) 0%,\n transparent 60%),\n var(--zl-card);\n width: min(18rem, 85%);\n}\n\n.zl-split__form {\n justify-content: center;\n align-items: center;\n gap: var(--zl-spacing-6);\n flex-direction: column;\n padding: 16px;\n display: flex;\n}\n\n.zl-split__compact {\n max-width: min(12rem, 60%);\n display: none;\n}\n\nimg.zl-split__compact {\n max-height: 2.5rem;\n}\n\nimg.zl-split__compact--hero {\n border-radius: var(--zl-radius-lg);\n object-fit: cover;\n width: 100%;\n max-width: 100%;\n max-height: 6rem;\n}\n\n.zl-split--right .zl-split__brand {\n order: 2;\n}\n\n.zl-split--right .zl-split__form {\n order: 1;\n}\n\nzl-page-shell:has(.zl-split) [slot=\"footer\"].zl-attribution {\n grid-template-columns: var(--zl-split-columns, minmax(0, 1fr) minmax(0, 1fr));\n gap: var(--zl-spacing-8);\n width: 100%;\n display: grid;\n}\n\nzl-page-shell:has(.zl-split) [slot=\"footer\"].zl-attribution > * {\n grid-column: 2;\n justify-self: center;\n}\n\nzl-page-shell:has(.zl-split--right) [slot=\"footer\"].zl-attribution > * {\n grid-column: 1;\n}\n\n@container (width <= 48rem) {\n .zl-split {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .zl-split__brand {\n display: var(--zl-split-brand-mobile, none);\n }\n\n .zl-split__compact {\n display: block;\n }\n\n zl-page-shell:has(.zl-split) [slot=\"footer\"].zl-attribution {\n grid-template-columns: minmax(0, 1fr);\n }\n\n zl-page-shell:has(.zl-split) .zl-attribution > *, zl-page-shell:has(.zl-split--right) [slot=\"footer\"].zl-attribution > * {\n grid-column: 1;\n }\n}\n\n.zl-hero {\n text-align: left;\n width: 100%;\n max-width: 34rem;\n color: var(--zl-foreground);\n font-family: var(--zl-font-family-sans);\n flex-direction: column;\n display: flex;\n}\n\n.zl-hero__nav {\n margin-bottom: var(--zl-spacing-8);\n justify-content: space-between;\n align-items: center;\n display: flex;\n}\n\n.zl-hero__brand {\n align-items: center;\n gap: var(--zl-spacing-2);\n letter-spacing: -.01em;\n font-size: 1.125rem;\n font-weight: 700;\n display: inline-flex;\n}\n\n.zl-hero__brand-logo {\n max-height: 1.75rem;\n}\n\n.zl-hero__brand-mark {\n border-radius: var(--zl-radius-md);\n background: linear-gradient(135deg,\n var(--zl-gradient-lavender-start),\n var(--zl-gradient-rose-start));\n width: 1.75rem;\n height: 1.75rem;\n display: inline-flex;\n}\n\n.zl-hero__compact-brand {\n overflow-wrap: anywhere;\n letter-spacing: -.01em;\n max-width: 100%;\n color: var(--zl-foreground);\n margin: 0;\n font-size: 1.125rem;\n font-weight: 700;\n}\n\n.zl-hero__nav-links {\n gap: var(--zl-spacing-6);\n color: var(--zl-muted-foreground);\n font-size: .9375rem;\n display: flex;\n}\n\n.zl-hero__nav-links a {\n color: inherit;\n text-decoration: none;\n}\n\n.zl-hero__nav-links a:hover {\n text-decoration: underline;\n}\n\n.zl-hero__eyebrow {\n margin: 0 0 var(--zl-spacing-4);\n letter-spacing: .08em;\n text-transform: uppercase;\n color: var(--zl-muted-foreground);\n font-size: .8125rem;\n font-weight: 600;\n}\n\n.zl-hero__headline {\n margin: 0 0 var(--zl-spacing-4);\n font-family: var(--zl-font-family-heading);\n letter-spacing: -.02em;\n font-size: 2.75rem;\n font-weight: 700;\n line-height: 1.1;\n}\n\n.zl-hero__sub {\n margin: 0 0 var(--zl-spacing-8);\n max-width: 30rem;\n color: var(--zl-muted-foreground);\n font-size: 1.0625rem;\n line-height: 1.6;\n}\n\n.zl-hero__bullets {\n gap: var(--zl-spacing-2);\n margin: 0 0 var(--zl-spacing-8);\n flex-direction: column;\n padding: 0;\n list-style: none;\n display: flex;\n}\n\n.zl-hero__bullets li {\n align-items: center;\n gap: var(--zl-spacing-2);\n font-size: 1rem;\n display: flex;\n}\n\n.zl-hero__bullets li:before {\n content: \"✓\";\n color: var(--zl-success);\n font-weight: 700;\n}\n\n.zl-hero__footnote {\n padding-top: var(--zl-spacing-6);\n border-top: 1px solid var(--zl-border);\n color: var(--zl-muted-foreground);\n margin: 0;\n font-size: .8125rem;\n}\n\n.zl-hero__footnote strong {\n color: var(--zl-muted-foreground);\n font-weight: 600;\n}\n\n.zl-minimal {\n gap: var(--zl-spacing-6);\n flex-direction: column;\n width: min(24rem, 100%);\n margin-inline: auto;\n display: flex;\n}\n\n:host([variant=\"page\"]) .zl-minimal {\n padding: 52px 16px;\n}\n";
|
|
3507
|
+
var layout_chrome_default = ":host {\n color: var(--zl-foreground);\n font-family: var(--zl-font-family-sans);\n background: none;\n display: block;\n}\n\n:host([variant=\"page\"]) {\n background: var(--zl-background);\n min-height: 100%;\n}\n\nimg[data-zl-asset-broken] {\n display: none;\n}\n\n.zl-mount {\n min-height: var(--zl-page-min-height, auto);\n background: inherit;\n color: inherit;\n flex-direction: column;\n display: flex;\n container-type: inline-size;\n}\n\n:host([variant=\"page\"]) .zl-mount {\n min-height: var(--zl-page-min-height, 100vh);\n}\n\n.zl-mount > zl-page-shell, .zl-mount > [data-zl-template-root] {\n flex: auto;\n}\n\n.zl-attribution {\n background: none;\n justify-content: center;\n align-items: center;\n display: flex;\n}\n\n.zl-attribution[hidden] {\n display: none;\n}\n\n.zl-trustmark {\n gap: var(--zl-spacing-2-5);\n flex-wrap: wrap;\n}\n\n.zl-trustmark__mark {\n align-items: center;\n gap: var(--zl-spacing-2);\n font-family: var(--zl-font-family-sans);\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n color: var(--zl-foreground);\n text-decoration: none;\n display: inline-flex;\n}\n\n.zl-trustmark__mark:hover {\n text-underline-offset: 4px;\n text-decoration: underline;\n}\n\n.zl-trustmark__mark:focus-visible {\n outline: var(--zl-focus-width) solid var(--zl-ring);\n outline-offset: var(--zl-focus-offset);\n border-radius: var(--zl-radius-sm);\n}\n\n.zl-trustmark__logotype {\n flex-shrink: 0;\n width: 65px;\n height: 16px;\n line-height: 0;\n display: block;\n}\n\n.zl-trustmark__logotype-svg {\n width: 100%;\n height: 100%;\n display: block;\n}\n\n.zl-card-logo {\n width: auto;\n max-width: min(12rem, 60%);\n max-height: var(--zl-card-logo-max-height, 2.5rem);\n object-fit: contain;\n}\n\n.zl-card-title {\n font-family: var(--zl-font-family-heading);\n font-size: var(--zl-text-xl-size);\n font-weight: var(--zl-font-weight-medium);\n color: var(--zl-card-foreground);\n text-align: left;\n margin: 0;\n line-height: 1;\n}\n\n.zl-card-subtitle {\n font-family: var(--zl-font-family-sans);\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n font-weight: var(--zl-font-weight-normal);\n color: var(--zl-muted-foreground);\n margin: 0;\n}\n\n.zl-field-group {\n gap: var(--zl-spacing-7);\n flex-direction: column;\n display: flex;\n}\n\n.zl-field-group:not(:has(*)) {\n display: none;\n}\n\n.zl-card-actions {\n gap: var(--zl-spacing-3);\n flex-direction: column;\n display: flex;\n}\n\n[data-suppress-header] .zl-card-title, [data-suppress-header] .zl-card-subtitle {\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n position: absolute;\n overflow: hidden;\n}\n\n.zl-card-nav {\n font-family: var(--zl-font-family-sans);\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n font-weight: var(--zl-font-weight-normal);\n color: var(--zl-muted-foreground);\n text-align: center;\n margin: 0;\n}\n\n.zl-card-nav__link {\n font: inherit;\n line-height: inherit;\n color: var(--zl-link);\n text-underline-offset: 4px;\n cursor: pointer;\n background: none;\n border: none;\n margin: 0;\n padding: 0;\n text-decoration: underline;\n display: inline;\n}\n\n.zl-card-nav__link:hover {\n color: var(--zl-foreground);\n}\n\n.zl-card-nav__link:focus-visible {\n outline: var(--zl-focus-width) solid var(--zl-ring);\n outline-offset: var(--zl-focus-offset);\n}\n\n.zl-card-forgot {\n text-align: right;\n margin: 0;\n}\n\n.zl-card-forgot__link {\n font-family: var(--zl-font-family-sans);\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n font-weight: var(--zl-font-weight-normal);\n color: var(--zl-link);\n text-underline-offset: 4px;\n cursor: pointer;\n background: none;\n border: none;\n margin: 0;\n padding: 0;\n text-decoration: none;\n display: inline;\n}\n\n.zl-card-forgot__link:hover {\n text-decoration: underline;\n}\n\n.zl-card-forgot__link:focus-visible {\n outline: var(--zl-focus-width) solid var(--zl-ring);\n outline-offset: var(--zl-focus-offset);\n}\n\n.zl-split {\n grid-template-columns: var(--zl-split-columns, minmax(0, 1fr) minmax(0, 1fr));\n align-items: var(--zl-split-align, center);\n gap: var(--zl-spacing-8);\n width: 100%;\n min-height: 100%;\n display: grid;\n}\n\n.zl-split__brand {\n justify-content: center;\n align-items: center;\n gap: var(--zl-spacing-6);\n padding: var(--zl-spacing-8) var(--zl-spacing-4);\n flex-direction: column;\n display: flex;\n}\n\n.zl-split__logo {\n max-width: min(16rem, 60%);\n max-height: var(--zl-split-logo-max-height, 16rem);\n}\n\n.zl-split__logo:has( + .zl-split__hero) {\n max-height: var(--zl-split-logo-max-height, 8rem);\n}\n\n.zl-split__logo:has( + .zl-split__hero) + .zl-split__hero {\n max-height: min(var(--zl-split-hero-max-height, 22.5rem),\n max(6rem,\n calc(100vh - 104px - var(--zl-spacing-8) - var(--zl-spacing-8) -\n 2.5rem - var(--zl-spacing-6) - var(--zl-spacing-6) -\n var(--zl-split-logo-max-height, 8rem))));\n}\n\n.zl-split__hero {\n width: 100%;\n max-height: var(--zl-split-hero-max-height, min(22.5rem, 60vh));\n border-radius: var(--zl-radius-lg);\n object-fit: cover;\n}\n\n.zl-split__placeholder {\n aspect-ratio: 4 / 5;\n border-radius: var(--zl-radius-lg);\n background: radial-gradient(120% 120% at 18% 12%,\n var(--zl-gradient-lavender-start) 0%,\n transparent 60%),\n radial-gradient(130% 130% at 85% 92%,\n var(--zl-gradient-rose-start) 0%,\n transparent 60%),\n var(--zl-card);\n width: min(18rem, 85%);\n}\n\n.zl-split__form {\n justify-content: center;\n align-items: center;\n gap: var(--zl-spacing-6);\n flex-direction: column;\n padding: 16px;\n display: flex;\n}\n\n.zl-split__compact {\n max-width: min(12rem, 60%);\n display: none;\n}\n\nimg.zl-split__compact {\n max-height: 2.5rem;\n}\n\nimg.zl-split__compact--hero {\n border-radius: var(--zl-radius-lg);\n object-fit: cover;\n width: 100%;\n max-width: 100%;\n max-height: 6rem;\n}\n\n.zl-split--right .zl-split__brand {\n order: 2;\n}\n\n.zl-split--right .zl-split__form {\n order: 1;\n}\n\nzl-page-shell:has(.zl-split) [slot=\"footer\"].zl-attribution {\n grid-template-columns: var(--zl-split-columns, minmax(0, 1fr) minmax(0, 1fr));\n gap: var(--zl-spacing-8);\n width: 100%;\n display: grid;\n}\n\nzl-page-shell:has(.zl-split) [slot=\"footer\"].zl-attribution > * {\n grid-column: 2;\n justify-self: center;\n}\n\nzl-page-shell:has(.zl-split--right) [slot=\"footer\"].zl-attribution > * {\n grid-column: 1;\n}\n\nzl-page-shell:has(.zl-split) [slot=\"footer\"].zl-attribution ::slotted(*) {\n grid-column: 2;\n justify-self: center;\n}\n\nzl-page-shell:has(.zl-split--right) [slot=\"footer\"].zl-attribution ::slotted(*) {\n grid-column: 1;\n}\n\n@container (width <= 48rem) {\n .zl-split {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .zl-split__brand {\n display: var(--zl-split-brand-mobile, none);\n }\n\n .zl-split__compact {\n display: block;\n }\n\n zl-page-shell:has(.zl-split) [slot=\"footer\"].zl-attribution {\n grid-template-columns: minmax(0, 1fr);\n }\n\n zl-page-shell:has(.zl-split) .zl-attribution > *, zl-page-shell:has(.zl-split--right) [slot=\"footer\"].zl-attribution > * {\n grid-column: 1;\n }\n}\n\n.zl-hero {\n text-align: left;\n width: 100%;\n max-width: 34rem;\n color: var(--zl-foreground);\n font-family: var(--zl-font-family-sans);\n flex-direction: column;\n display: flex;\n}\n\n.zl-hero__nav {\n margin-bottom: var(--zl-spacing-8);\n justify-content: space-between;\n align-items: center;\n display: flex;\n}\n\n.zl-hero__brand {\n align-items: center;\n gap: var(--zl-spacing-2);\n letter-spacing: -.01em;\n font-size: 1.125rem;\n font-weight: 700;\n display: inline-flex;\n}\n\n.zl-hero__brand-logo {\n max-height: 1.75rem;\n}\n\n.zl-hero__brand-mark {\n border-radius: var(--zl-radius-md);\n background: linear-gradient(135deg,\n var(--zl-gradient-lavender-start),\n var(--zl-gradient-rose-start));\n width: 1.75rem;\n height: 1.75rem;\n display: inline-flex;\n}\n\n.zl-hero__compact-brand {\n overflow-wrap: anywhere;\n letter-spacing: -.01em;\n max-width: 100%;\n color: var(--zl-foreground);\n margin: 0;\n font-size: 1.125rem;\n font-weight: 700;\n}\n\n.zl-hero__nav-links {\n gap: var(--zl-spacing-6);\n color: var(--zl-muted-foreground);\n font-size: .9375rem;\n display: flex;\n}\n\n.zl-hero__nav-links a {\n color: inherit;\n text-decoration: none;\n}\n\n.zl-hero__nav-links a:hover {\n text-decoration: underline;\n}\n\n.zl-hero__eyebrow {\n margin: 0 0 var(--zl-spacing-4);\n letter-spacing: .08em;\n text-transform: uppercase;\n color: var(--zl-muted-foreground);\n font-size: .8125rem;\n font-weight: 600;\n}\n\n.zl-hero__headline {\n margin: 0 0 var(--zl-spacing-4);\n font-family: var(--zl-font-family-heading);\n letter-spacing: -.02em;\n font-size: 2.75rem;\n font-weight: 700;\n line-height: 1.1;\n}\n\n.zl-hero__sub {\n margin: 0 0 var(--zl-spacing-8);\n max-width: 30rem;\n color: var(--zl-muted-foreground);\n font-size: 1.0625rem;\n line-height: 1.6;\n}\n\n.zl-hero__bullets {\n gap: var(--zl-spacing-2);\n margin: 0 0 var(--zl-spacing-8);\n flex-direction: column;\n padding: 0;\n list-style: none;\n display: flex;\n}\n\n.zl-hero__bullets li {\n align-items: center;\n gap: var(--zl-spacing-2);\n font-size: 1rem;\n display: flex;\n}\n\n.zl-hero__bullets li:before {\n content: \"✓\";\n color: var(--zl-success);\n font-weight: 700;\n}\n\n.zl-hero__footnote {\n padding-top: var(--zl-spacing-6);\n border-top: 1px solid var(--zl-border);\n color: var(--zl-muted-foreground);\n margin: 0;\n font-size: .8125rem;\n}\n\n.zl-hero__footnote strong {\n color: var(--zl-muted-foreground);\n font-weight: 600;\n}\n\n.zl-minimal {\n gap: var(--zl-spacing-6);\n flex-direction: column;\n width: min(24rem, 100%);\n margin-inline: auto;\n display: flex;\n}\n\n:host([variant=\"page\"]) .zl-minimal {\n padding: 52px 16px;\n}\n";
|
|
3437
3508
|
//#endregion
|
|
3438
3509
|
//#region src/orchestrator/zitadel-login.ts
|
|
3439
3510
|
/** Narrow a rendered named element to the `formValue` field-atom contract. */
|
|
@@ -3542,6 +3613,13 @@ let ZitadelLogin = class ZitadelLogin extends ZitadelSurface {
|
|
|
3542
3613
|
set loading(value) {
|
|
3543
3614
|
this.#_loading_accessor_storage = value;
|
|
3544
3615
|
}
|
|
3616
|
+
#_completing_accessor_storage = false;
|
|
3617
|
+
get completing() {
|
|
3618
|
+
return this.#_completing_accessor_storage;
|
|
3619
|
+
}
|
|
3620
|
+
set completing(value) {
|
|
3621
|
+
this.#_completing_accessor_storage = value;
|
|
3622
|
+
}
|
|
3545
3623
|
#_startupError_accessor_storage = null;
|
|
3546
3624
|
get startupError() {
|
|
3547
3625
|
return this.#_startupError_accessor_storage;
|
|
@@ -3686,7 +3764,7 @@ let ZitadelLogin = class ZitadelLogin extends ZitadelSurface {
|
|
|
3686
3764
|
</zl-card>
|
|
3687
3765
|
</zl-page-shell>
|
|
3688
3766
|
</form>`;
|
|
3689
|
-
if (!this.response || !this.engine) return html`<slot name="loader"></slot>`;
|
|
3767
|
+
if (!this.response || !this.engine || this.completing) return html`<slot name="loader"></slot>`;
|
|
3690
3768
|
const rendered = this.injectAttribution(this.renderStep(this.response.step, this.engine));
|
|
3691
3769
|
return html`<form
|
|
3692
3770
|
class="zl-mount"
|
|
@@ -3730,7 +3808,7 @@ let ZitadelLogin = class ZitadelLogin extends ZitadelSurface {
|
|
|
3730
3808
|
const custom = attribution?.custom_link;
|
|
3731
3809
|
if (!show && !custom) return "";
|
|
3732
3810
|
const mark = custom ? `<a class="zl-trustmark__mark" part="attribution-mark" href="${escapeHtml(String(custom.href))}">${escapeHtml(String(custom.label))}</a>` : `<a class="zl-trustmark__mark" part="attribution-mark" href="https://zitadel.com" aria-label="Secured with Zitadel">${zitadelTrustmarkInnerHtml()}</a>`;
|
|
3733
|
-
return `<div${placement === "footer" ? ` slot="footer"` : ""} part="attribution" class="zl-attribution zl-trustmark">${mark}
|
|
3811
|
+
return `<div${placement === "footer" ? ` slot="footer"` : ""} part="attribution" class="zl-attribution zl-trustmark">${mark}<slot name="attribution-trailing"></slot></div>`;
|
|
3734
3812
|
}
|
|
3735
3813
|
/** Declarative config read from this element's attributes. */
|
|
3736
3814
|
get projectAttrs() {
|
|
@@ -3778,6 +3856,7 @@ let ZitadelLogin = class ZitadelLogin extends ZitadelSurface {
|
|
|
3778
3856
|
}
|
|
3779
3857
|
applyResponse(wire) {
|
|
3780
3858
|
this.stepErrorDismissed = false;
|
|
3859
|
+
this.completing = navigatesOnComplete(wire, this.postSignInUrl);
|
|
3781
3860
|
this.response = wire;
|
|
3782
3861
|
const { branding, issues } = validateBranding(wire.branding, { renderingOrigin: this.ownerDocument.location.origin });
|
|
3783
3862
|
this.branding = branding;
|
|
@@ -4249,6 +4328,7 @@ __decorate([property({ attribute: false })], ZitadelLogin.prototype, "locales",
|
|
|
4249
4328
|
__decorate([state()], ZitadelLogin.prototype, "response", null);
|
|
4250
4329
|
__decorate([state()], ZitadelLogin.prototype, "branding", null);
|
|
4251
4330
|
__decorate([state()], ZitadelLogin.prototype, "loading", null);
|
|
4331
|
+
__decorate([state()], ZitadelLogin.prototype, "completing", null);
|
|
4252
4332
|
__decorate([state()], ZitadelLogin.prototype, "startupError", null);
|
|
4253
4333
|
__decorate([state()], ZitadelLogin.prototype, "formValues", null);
|
|
4254
4334
|
ZitadelLogin = __decorate([customElement("zitadel-login")], ZitadelLogin);
|
|
@@ -4262,6 +4342,19 @@ ZitadelLogin = __decorate([customElement("zitadel-login")], ZitadelLogin);
|
|
|
4262
4342
|
function isAllowedSelectValue(field, value) {
|
|
4263
4343
|
return field.validation?.enum?.includes(value) ?? false;
|
|
4264
4344
|
}
|
|
4345
|
+
/**
|
|
4346
|
+
* Whether a terminal step ends in a navigation rather than a screen: a
|
|
4347
|
+
* `redirect` with a URI, or a `show` whose handoff the widget exchanges before
|
|
4348
|
+
* sending the browser to `post-sign-in-url`. A `show` without a
|
|
4349
|
+
* `post-sign-in-url` is the host handling the handoff itself, and that screen
|
|
4350
|
+
* is the flow's own last word — it still renders.
|
|
4351
|
+
*/
|
|
4352
|
+
function navigatesOnComplete(wire, postSignInUrl) {
|
|
4353
|
+
const behavior = wire.step.complete;
|
|
4354
|
+
if (behavior === "redirect") return Boolean(wire.redirect_uri);
|
|
4355
|
+
if (behavior === "show") return Boolean(wire.handoff_token && postSignInUrl);
|
|
4356
|
+
return false;
|
|
4357
|
+
}
|
|
4265
4358
|
function collectInitialValues(step) {
|
|
4266
4359
|
const values = {};
|
|
4267
4360
|
if (!step.fields) return values;
|
|
@@ -4450,26 +4543,26 @@ let ZitadelLogout = class ZitadelLogout extends LitElement {
|
|
|
4450
4543
|
set theme(value) {
|
|
4451
4544
|
this.#_theme_accessor_storage = value;
|
|
4452
4545
|
}
|
|
4453
|
-
#
|
|
4454
|
-
get
|
|
4455
|
-
return this.#
|
|
4546
|
+
#_userDisplay_accessor_storage = "";
|
|
4547
|
+
get userDisplay() {
|
|
4548
|
+
return this.#_userDisplay_accessor_storage;
|
|
4456
4549
|
}
|
|
4457
|
-
set
|
|
4458
|
-
this.#
|
|
4550
|
+
set userDisplay(value) {
|
|
4551
|
+
this.#_userDisplay_accessor_storage = value;
|
|
4459
4552
|
}
|
|
4460
|
-
#
|
|
4461
|
-
get
|
|
4462
|
-
return this.#
|
|
4553
|
+
#_userIdentifier_accessor_storage = "";
|
|
4554
|
+
get userIdentifier() {
|
|
4555
|
+
return this.#_userIdentifier_accessor_storage;
|
|
4463
4556
|
}
|
|
4464
|
-
set
|
|
4465
|
-
this.#
|
|
4557
|
+
set userIdentifier(value) {
|
|
4558
|
+
this.#_userIdentifier_accessor_storage = value;
|
|
4466
4559
|
}
|
|
4467
|
-
#
|
|
4468
|
-
get
|
|
4469
|
-
return this.#
|
|
4560
|
+
#_userId_accessor_storage = "";
|
|
4561
|
+
get userId() {
|
|
4562
|
+
return this.#_userId_accessor_storage;
|
|
4470
4563
|
}
|
|
4471
|
-
set
|
|
4472
|
-
this.#
|
|
4564
|
+
set userId(value) {
|
|
4565
|
+
this.#_userId_accessor_storage = value;
|
|
4473
4566
|
}
|
|
4474
4567
|
#_open_accessor_storage = false;
|
|
4475
4568
|
get open() {
|
|
@@ -4557,20 +4650,21 @@ let ZitadelLogout = class ZitadelLogout extends LitElement {
|
|
|
4557
4650
|
async loadIdentity(api) {
|
|
4558
4651
|
try {
|
|
4559
4652
|
const session = await getSession$1(api);
|
|
4560
|
-
this.
|
|
4561
|
-
this.
|
|
4562
|
-
this.
|
|
4653
|
+
this.userDisplay = session.user?.display ?? "";
|
|
4654
|
+
this.userIdentifier = session.user?.identifier ?? "";
|
|
4655
|
+
this.userId = session.user_id ?? "";
|
|
4563
4656
|
} catch {} finally {
|
|
4564
4657
|
this.projectTemplate();
|
|
4565
4658
|
}
|
|
4566
4659
|
}
|
|
4567
4660
|
get initial() {
|
|
4568
|
-
const source = this.
|
|
4661
|
+
const source = this.userDisplay || this.userIdentifier || this.userId;
|
|
4569
4662
|
return source ? source.charAt(0).toUpperCase() : "?";
|
|
4570
4663
|
}
|
|
4571
4664
|
/**
|
|
4572
4665
|
* Clones the consumer-supplied `<template>` into the light DOM, fills the
|
|
4573
|
-
* `{{
|
|
4666
|
+
* `{{display}}`, `{{identifier}}`, and `{{initial}}` tokens (plus the
|
|
4667
|
+
* legacy `{{name}}`/`{{email}}` aliases) via a TreeWalker, and
|
|
4574
4668
|
* wires every element with `data-action="logout"` to trigger sign-out.
|
|
4575
4669
|
* Light-DOM mounting is deliberate so the consumer's existing CSS applies.
|
|
4576
4670
|
*
|
|
@@ -4581,7 +4675,7 @@ let ZitadelLogout = class ZitadelLogout extends LitElement {
|
|
|
4581
4675
|
projectTemplate() {
|
|
4582
4676
|
if (!this.templateMode || !this.pendingTemplate) return;
|
|
4583
4677
|
const clone = this.pendingTemplate.content.cloneNode(true);
|
|
4584
|
-
fillTemplateTokens(clone, this.
|
|
4678
|
+
fillTemplateTokens(clone, this.userDisplay, this.userIdentifier, this.initial);
|
|
4585
4679
|
const container = document.createElement("span");
|
|
4586
4680
|
container.appendChild(clone);
|
|
4587
4681
|
this.projectedContainer?.remove();
|
|
@@ -4630,8 +4724,8 @@ let ZitadelLogout = class ZitadelLogout extends LitElement {
|
|
|
4630
4724
|
this.open = false;
|
|
4631
4725
|
this.loading = false;
|
|
4632
4726
|
emit(this, "zitadel-signout", {
|
|
4633
|
-
|
|
4634
|
-
|
|
4727
|
+
display: this.userDisplay,
|
|
4728
|
+
identifier: this.userIdentifier
|
|
4635
4729
|
});
|
|
4636
4730
|
if (this.postSignOutUrl && typeof window !== "undefined") window.location.href = this.postSignOutUrl;
|
|
4637
4731
|
}
|
|
@@ -4659,9 +4753,9 @@ let ZitadelLogout = class ZitadelLogout extends LitElement {
|
|
|
4659
4753
|
<div class="preview-avatar" aria-hidden="true">${this.initial}</div>
|
|
4660
4754
|
<div class="preview-info">
|
|
4661
4755
|
<div class="preview-name">
|
|
4662
|
-
${this.
|
|
4756
|
+
${this.userDisplay || this.userIdentifier || this.userId}
|
|
4663
4757
|
</div>
|
|
4664
|
-
${this.
|
|
4758
|
+
${this.userDisplay && this.userIdentifier ? html`<div class="preview-email">${this.userIdentifier}</div>` : nothing}
|
|
4665
4759
|
</div>
|
|
4666
4760
|
</div>
|
|
4667
4761
|
|
|
@@ -4714,23 +4808,32 @@ __decorate([property({
|
|
|
4714
4808
|
attribute: "post-sign-out-url"
|
|
4715
4809
|
})], ZitadelLogout.prototype, "postSignOutUrl", null);
|
|
4716
4810
|
__decorate([property({ type: String })], ZitadelLogout.prototype, "theme", null);
|
|
4717
|
-
__decorate([state()], ZitadelLogout.prototype, "
|
|
4718
|
-
__decorate([state()], ZitadelLogout.prototype, "
|
|
4719
|
-
__decorate([state()], ZitadelLogout.prototype, "
|
|
4811
|
+
__decorate([state()], ZitadelLogout.prototype, "userDisplay", null);
|
|
4812
|
+
__decorate([state()], ZitadelLogout.prototype, "userIdentifier", null);
|
|
4813
|
+
__decorate([state()], ZitadelLogout.prototype, "userId", null);
|
|
4720
4814
|
__decorate([state()], ZitadelLogout.prototype, "open", null);
|
|
4721
4815
|
__decorate([state()], ZitadelLogout.prototype, "loading", null);
|
|
4722
4816
|
__decorate([state()], ZitadelLogout.prototype, "errorMessage", null);
|
|
4723
4817
|
ZitadelLogout = __decorate([customElement("zitadel-logout")], ZitadelLogout);
|
|
4724
4818
|
/**
|
|
4725
|
-
* Substitutes `{{
|
|
4726
|
-
* a fragment's text nodes
|
|
4727
|
-
*
|
|
4819
|
+
* Substitutes `{{display}}`, `{{identifier}}`, and `{{initial}}` placeholders
|
|
4820
|
+
* inside a fragment's text nodes; `{{name}}` and `{{email}}` fill as legacy
|
|
4821
|
+
* aliases of display and identifier so pre-ref templates keep rendering.
|
|
4822
|
+
* Walking text nodes (rather than running a regex over `outerHTML`) keeps
|
|
4823
|
+
* attributes and structural markup untouched.
|
|
4728
4824
|
*/
|
|
4729
|
-
function fillTemplateTokens(fragment,
|
|
4825
|
+
function fillTemplateTokens(fragment, display, identifier, initial) {
|
|
4826
|
+
const values = {
|
|
4827
|
+
display,
|
|
4828
|
+
identifier,
|
|
4829
|
+
name: display,
|
|
4830
|
+
email: identifier,
|
|
4831
|
+
initial
|
|
4832
|
+
};
|
|
4730
4833
|
const walker = document.createTreeWalker(fragment, NodeFilter.SHOW_TEXT);
|
|
4731
4834
|
let node = walker.nextNode();
|
|
4732
4835
|
while (node) {
|
|
4733
|
-
if (node.textContent) node.textContent = node.textContent.replace(/\{\{name\}\}/g,
|
|
4836
|
+
if (node.textContent) node.textContent = node.textContent.replace(/\{\{(display|identifier|name|email|initial)\}\}/g, (_, token) => values[token] ?? "");
|
|
4734
4837
|
node = walker.nextNode();
|
|
4735
4838
|
}
|
|
4736
4839
|
}
|
|
@@ -4830,26 +4933,26 @@ let ZitadelSession = class ZitadelSession extends ZitadelSurface {
|
|
|
4830
4933
|
set logoutLabel(value) {
|
|
4831
4934
|
this.#_logoutLabel_accessor_storage = value;
|
|
4832
4935
|
}
|
|
4833
|
-
#
|
|
4834
|
-
get
|
|
4835
|
-
return this.#
|
|
4936
|
+
#_userDisplay_accessor_storage = "";
|
|
4937
|
+
get userDisplay() {
|
|
4938
|
+
return this.#_userDisplay_accessor_storage;
|
|
4836
4939
|
}
|
|
4837
|
-
set
|
|
4838
|
-
this.#
|
|
4940
|
+
set userDisplay(value) {
|
|
4941
|
+
this.#_userDisplay_accessor_storage = value;
|
|
4839
4942
|
}
|
|
4840
|
-
#
|
|
4841
|
-
get
|
|
4842
|
-
return this.#
|
|
4943
|
+
#_userIdentifier_accessor_storage = "";
|
|
4944
|
+
get userIdentifier() {
|
|
4945
|
+
return this.#_userIdentifier_accessor_storage;
|
|
4843
4946
|
}
|
|
4844
|
-
set
|
|
4845
|
-
this.#
|
|
4947
|
+
set userIdentifier(value) {
|
|
4948
|
+
this.#_userIdentifier_accessor_storage = value;
|
|
4846
4949
|
}
|
|
4847
|
-
#
|
|
4848
|
-
get
|
|
4849
|
-
return this.#
|
|
4950
|
+
#_userId_accessor_storage = "";
|
|
4951
|
+
get userId() {
|
|
4952
|
+
return this.#_userId_accessor_storage;
|
|
4850
4953
|
}
|
|
4851
|
-
set
|
|
4852
|
-
this.#
|
|
4954
|
+
set userId(value) {
|
|
4955
|
+
this.#_userId_accessor_storage = value;
|
|
4853
4956
|
}
|
|
4854
4957
|
#_loading_accessor_storage = false;
|
|
4855
4958
|
get loading() {
|
|
@@ -4872,7 +4975,7 @@ let ZitadelSession = class ZitadelSession extends ZitadelSurface {
|
|
|
4872
4975
|
}
|
|
4873
4976
|
/** Single identity line: human-readable name, then email, then user_id. */
|
|
4874
4977
|
get identityLabel() {
|
|
4875
|
-
return this.
|
|
4978
|
+
return this.userDisplay || this.userIdentifier || this.userId;
|
|
4876
4979
|
}
|
|
4877
4980
|
willUpdate() {
|
|
4878
4981
|
this.applySurfaceTheme(void 0);
|
|
@@ -4907,9 +5010,9 @@ let ZitadelSession = class ZitadelSession extends ZitadelSurface {
|
|
|
4907
5010
|
async fetchIdentity(api) {
|
|
4908
5011
|
try {
|
|
4909
5012
|
const session = await getSession$1(api);
|
|
4910
|
-
this.
|
|
4911
|
-
this.
|
|
4912
|
-
this.
|
|
5013
|
+
this.userDisplay = session.user?.display ?? "";
|
|
5014
|
+
this.userIdentifier = session.user?.identifier ?? "";
|
|
5015
|
+
this.userId = session.user_id ?? "";
|
|
4913
5016
|
} catch {}
|
|
4914
5017
|
}
|
|
4915
5018
|
/**
|
|
@@ -4931,8 +5034,8 @@ let ZitadelSession = class ZitadelSession extends ZitadelSurface {
|
|
|
4931
5034
|
}
|
|
4932
5035
|
this.loading = false;
|
|
4933
5036
|
emit(this, "zitadel-signout", {
|
|
4934
|
-
|
|
4935
|
-
|
|
5037
|
+
display: this.userDisplay,
|
|
5038
|
+
identifier: this.userIdentifier
|
|
4936
5039
|
});
|
|
4937
5040
|
if (this.postSignOutUrl && typeof window !== "undefined") window.location.assign(this.postSignOutUrl);
|
|
4938
5041
|
}
|
|
@@ -4986,13 +5089,13 @@ __decorate([property({
|
|
|
4986
5089
|
type: String,
|
|
4987
5090
|
attribute: "logout-label"
|
|
4988
5091
|
})], ZitadelSession.prototype, "logoutLabel", null);
|
|
4989
|
-
__decorate([state()], ZitadelSession.prototype, "
|
|
4990
|
-
__decorate([state()], ZitadelSession.prototype, "
|
|
4991
|
-
__decorate([state()], ZitadelSession.prototype, "
|
|
5092
|
+
__decorate([state()], ZitadelSession.prototype, "userDisplay", null);
|
|
5093
|
+
__decorate([state()], ZitadelSession.prototype, "userIdentifier", null);
|
|
5094
|
+
__decorate([state()], ZitadelSession.prototype, "userId", null);
|
|
4992
5095
|
__decorate([state()], ZitadelSession.prototype, "loading", null);
|
|
4993
5096
|
__decorate([state()], ZitadelSession.prototype, "errorMessage", null);
|
|
4994
5097
|
ZitadelSession = __decorate([customElement("zitadel-session")], ZitadelSession);
|
|
4995
5098
|
//#endregion
|
|
4996
5099
|
export { submitStep as C, startFlow as S, zitadelTrustmarkInnerHtml as T, MANDATORY_GATES_MARKER as _, TEMPLATE_NAMES as a, validateBranding as b, applyBrandingTokens as c, createSanitiser as d, builtinLocales as f, en as g, de as h, layout_chrome_default as i, buildBrandingStylesheet as l, it as m, ZitadelLogout as n, ThemeController as o, businessLocales as p, ZitadelLogin as r, applyFontUrl as s, ZitadelSession as t, resolveTheme as u, mandatoryGatesMarkerComment as v, ZITADEL_ATTRIBUTION_LOGOTYPE_SVG as w, getCurrentStep as x, patchMandatoryGates as y };
|
|
4997
5100
|
|
|
4998
|
-
//# sourceMappingURL=orchestrator-
|
|
5101
|
+
//# sourceMappingURL=orchestrator-BPX0Uc77.mjs.map
|