@kya-os/consent 0.4.0 → 0.4.2
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/README.md +186 -22
- package/dist/bundle/index.d.ts +9 -0
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/index.js +13 -0
- package/dist/bundle/index.js.map +1 -1
- package/dist/bundle/inline.d.ts.map +1 -1
- package/dist/bundle/inline.js +4 -4
- package/dist/bundle/inline.js.map +1 -1
- package/dist/cjs/bundle/index.js +36 -1
- package/dist/cjs/bundle/index.js.map +1 -1
- package/dist/cjs/bundle/inline.js +4 -4
- package/dist/cjs/bundle/inline.js.map +1 -1
- package/dist/cjs/components/consent-action-bar.js +97 -25
- package/dist/cjs/components/consent-action-bar.js.map +1 -1
- package/dist/cjs/components/consent-agent-header.js +7 -105
- package/dist/cjs/components/consent-agent-header.js.map +1 -1
- package/dist/cjs/components/consent-button.js +6 -1
- package/dist/cjs/components/consent-button.js.map +1 -1
- package/dist/cjs/components/consent-capabilities-screen.js +456 -117
- package/dist/cjs/components/consent-capabilities-screen.js.map +1 -1
- package/dist/cjs/components/consent-capability-card.js +159 -32
- package/dist/cjs/components/consent-capability-card.js.map +1 -1
- package/dist/cjs/components/consent-checkbox.js +7 -0
- package/dist/cjs/components/consent-checkbox.js.map +1 -1
- package/dist/cjs/components/consent-connector-header.js +262 -45
- package/dist/cjs/components/consent-connector-header.js.map +1 -1
- package/dist/cjs/components/consent-duration.js +1 -1
- package/dist/cjs/components/consent-flow-timeline.js +177 -0
- package/dist/cjs/components/consent-flow-timeline.js.map +1 -0
- package/dist/cjs/components/consent-flow.js +540 -0
- package/dist/cjs/components/consent-flow.js.map +1 -0
- package/dist/cjs/components/consent-footer.js +22 -14
- package/dist/cjs/components/consent-footer.js.map +1 -1
- package/dist/cjs/components/consent-headline.js +353 -33
- package/dist/cjs/components/consent-headline.js.map +1 -1
- package/dist/cjs/components/consent-oauth-button.js +68 -138
- package/dist/cjs/components/consent-oauth-button.js.map +1 -1
- package/dist/cjs/components/consent-otp-input.js +5 -0
- package/dist/cjs/components/consent-otp-input.js.map +1 -1
- package/dist/cjs/components/consent-phone-handoff.js +3 -3
- package/dist/cjs/components/consent-request-expiry.js +1 -1
- package/dist/cjs/components/consent-revocation-notice.js +29 -18
- package/dist/cjs/components/consent-revocation-notice.js.map +1 -1
- package/dist/cjs/components/consent-revoke.js +9 -4
- package/dist/cjs/components/consent-revoke.js.map +1 -1
- package/dist/cjs/components/consent-secured-by.js +106 -0
- package/dist/cjs/components/consent-secured-by.js.map +1 -0
- package/dist/cjs/components/consent-shell.js +1 -1
- package/dist/cjs/components/consent-terms.js +7 -0
- package/dist/cjs/components/consent-terms.js.map +1 -1
- package/dist/cjs/components/consent-wallet-check.js +26 -2
- package/dist/cjs/components/consent-wallet-check.js.map +1 -1
- package/dist/cjs/components/consent-wallet-notice.js +1 -1
- package/dist/cjs/components/consent-wallet-orb.js +1 -1
- package/dist/cjs/components/consent-wallet-signature.js +1 -1
- package/dist/cjs/components/decision-icons.js +37 -0
- package/dist/cjs/components/decision-icons.js.map +1 -0
- package/dist/cjs/components/edit-region.js +309 -0
- package/dist/cjs/components/edit-region.js.map +1 -0
- package/dist/cjs/components/flow-blocks.js +762 -0
- package/dist/cjs/components/flow-blocks.js.map +1 -0
- package/dist/cjs/components/flow-motion.js +177 -0
- package/dist/cjs/components/flow-motion.js.map +1 -0
- package/dist/cjs/components/grant-details.js +143 -0
- package/dist/cjs/components/grant-details.js.map +1 -0
- package/dist/cjs/components/grant-field-styles.js +2 -2
- package/dist/cjs/components/index.js +13 -1
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/mcp-consent.js +93 -36
- package/dist/cjs/components/mcp-consent.js.map +1 -1
- package/dist/cjs/components/preview.js +67 -0
- package/dist/cjs/components/preview.js.map +1 -0
- package/dist/cjs/components/provider-icons.js +92 -0
- package/dist/cjs/components/provider-icons.js.map +1 -0
- package/dist/cjs/constants/capabilities.js +17 -2
- package/dist/cjs/constants/capabilities.js.map +1 -1
- package/dist/cjs/copy/tokens.js +67 -24
- package/dist/cjs/copy/tokens.js.map +1 -1
- package/dist/cjs/flow/copy.js +146 -0
- package/dist/cjs/flow/copy.js.map +1 -0
- package/dist/cjs/flow/index.js +31 -0
- package/dist/cjs/flow/index.js.map +1 -0
- package/dist/cjs/flow/model.js +107 -0
- package/dist/cjs/flow/model.js.map +1 -0
- package/dist/cjs/flow/presets.js +157 -0
- package/dist/cjs/flow/presets.js.map +1 -0
- package/dist/cjs/flow/schema.js +76 -0
- package/dist/cjs/flow/schema.js.map +1 -0
- package/dist/cjs/identity/agent-identity.js +3 -2
- package/dist/cjs/identity/agent-identity.js.map +1 -1
- package/dist/cjs/mcp-app/inline.js +2 -2
- package/dist/cjs/mcp-app/inline.js.map +1 -1
- package/dist/cjs/react/index.js +40 -2
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/cjs/styles/brand.js +385 -0
- package/dist/cjs/styles/brand.js.map +1 -0
- package/dist/cjs/styles/index.js +1 -0
- package/dist/cjs/styles/index.js.map +1 -1
- package/dist/cjs/styles/theme.js +102 -30
- package/dist/cjs/styles/theme.js.map +1 -1
- package/dist/cjs/types/capabilities.types.js +1 -2
- package/dist/cjs/types/capabilities.types.js.map +1 -1
- package/dist/cjs/types/decision.types.js +13 -0
- package/dist/cjs/types/decision.types.js.map +1 -0
- package/dist/cjs/types/edit.types.js +80 -0
- package/dist/cjs/types/edit.types.js.map +1 -0
- package/dist/cjs/types/index.js +2 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/components/consent-action-bar.d.ts +20 -1
- package/dist/components/consent-action-bar.d.ts.map +1 -1
- package/dist/components/consent-action-bar.js +97 -25
- package/dist/components/consent-action-bar.js.map +1 -1
- package/dist/components/consent-agent-header.d.ts +4 -17
- package/dist/components/consent-agent-header.d.ts.map +1 -1
- package/dist/components/consent-agent-header.js +7 -105
- package/dist/components/consent-agent-header.js.map +1 -1
- package/dist/components/consent-button.d.ts +2 -0
- package/dist/components/consent-button.d.ts.map +1 -1
- package/dist/components/consent-button.js +6 -1
- package/dist/components/consent-button.js.map +1 -1
- package/dist/components/consent-capabilities-screen.d.ts +101 -17
- package/dist/components/consent-capabilities-screen.d.ts.map +1 -1
- package/dist/components/consent-capabilities-screen.js +457 -118
- package/dist/components/consent-capabilities-screen.js.map +1 -1
- package/dist/components/consent-capability-card.d.ts +32 -3
- package/dist/components/consent-capability-card.d.ts.map +1 -1
- package/dist/components/consent-capability-card.js +159 -32
- package/dist/components/consent-capability-card.js.map +1 -1
- package/dist/components/consent-checkbox.d.ts +2 -0
- package/dist/components/consent-checkbox.d.ts.map +1 -1
- package/dist/components/consent-checkbox.js +7 -0
- package/dist/components/consent-checkbox.js.map +1 -1
- package/dist/components/consent-connector-header.d.ts +52 -7
- package/dist/components/consent-connector-header.d.ts.map +1 -1
- package/dist/components/consent-connector-header.js +262 -45
- package/dist/components/consent-connector-header.js.map +1 -1
- package/dist/components/consent-duration.js +1 -1
- package/dist/components/consent-flow-timeline.d.ts +49 -0
- package/dist/components/consent-flow-timeline.d.ts.map +1 -0
- package/dist/components/consent-flow-timeline.js +174 -0
- package/dist/components/consent-flow-timeline.js.map +1 -0
- package/dist/components/consent-flow.d.ts +101 -0
- package/dist/components/consent-flow.d.ts.map +1 -0
- package/dist/components/consent-flow.js +504 -0
- package/dist/components/consent-flow.js.map +1 -0
- package/dist/components/consent-footer.d.ts +6 -4
- package/dist/components/consent-footer.d.ts.map +1 -1
- package/dist/components/consent-footer.js +22 -14
- package/dist/components/consent-footer.js.map +1 -1
- package/dist/components/consent-headline.d.ts +62 -16
- package/dist/components/consent-headline.d.ts.map +1 -1
- package/dist/components/consent-headline.js +352 -34
- package/dist/components/consent-headline.js.map +1 -1
- package/dist/components/consent-oauth-button.d.ts +9 -6
- package/dist/components/consent-oauth-button.d.ts.map +1 -1
- package/dist/components/consent-oauth-button.js +71 -141
- package/dist/components/consent-oauth-button.js.map +1 -1
- package/dist/components/consent-otp-input.d.ts.map +1 -1
- package/dist/components/consent-otp-input.js +5 -0
- package/dist/components/consent-otp-input.js.map +1 -1
- package/dist/components/consent-passkey.d.ts +6 -0
- package/dist/components/consent-passkey.d.ts.map +1 -1
- package/dist/components/consent-passkey.js +67 -9
- package/dist/components/consent-passkey.js.map +1 -1
- package/dist/components/consent-phone-handoff.js +3 -3
- package/dist/components/consent-request-expiry.js +1 -1
- package/dist/components/consent-revocation-notice.d.ts.map +1 -1
- package/dist/components/consent-revocation-notice.js +29 -18
- package/dist/components/consent-revocation-notice.js.map +1 -1
- package/dist/components/consent-revoke.d.ts +2 -0
- package/dist/components/consent-revoke.d.ts.map +1 -1
- package/dist/components/consent-revoke.js +9 -4
- package/dist/components/consent-revoke.js.map +1 -1
- package/dist/components/consent-secured-by.d.ts +25 -0
- package/dist/components/consent-secured-by.d.ts.map +1 -0
- package/dist/components/consent-secured-by.js +103 -0
- package/dist/components/consent-secured-by.js.map +1 -0
- package/dist/components/consent-shell.js +1 -1
- package/dist/components/consent-terms.d.ts +2 -0
- package/dist/components/consent-terms.d.ts.map +1 -1
- package/dist/components/consent-terms.js +7 -0
- package/dist/components/consent-terms.js.map +1 -1
- package/dist/components/consent-wallet-check.d.ts +8 -0
- package/dist/components/consent-wallet-check.d.ts.map +1 -1
- package/dist/components/consent-wallet-check.js +27 -3
- package/dist/components/consent-wallet-check.js.map +1 -1
- package/dist/components/consent-wallet-notice.js +1 -1
- package/dist/components/consent-wallet-orb.js +1 -1
- package/dist/components/consent-wallet-signature.js +1 -1
- package/dist/components/decision-icons.d.ts +26 -0
- package/dist/components/decision-icons.d.ts.map +1 -0
- package/dist/components/decision-icons.js +34 -0
- package/dist/components/decision-icons.js.map +1 -0
- package/dist/components/edit-region.d.ts +50 -0
- package/dist/components/edit-region.d.ts.map +1 -0
- package/dist/components/edit-region.js +305 -0
- package/dist/components/edit-region.js.map +1 -0
- package/dist/components/flow-blocks.d.ts +45 -0
- package/dist/components/flow-blocks.d.ts.map +1 -0
- package/dist/components/flow-blocks.js +755 -0
- package/dist/components/flow-blocks.js.map +1 -0
- package/dist/components/flow-motion.d.ts +41 -0
- package/dist/components/flow-motion.d.ts.map +1 -0
- package/dist/components/flow-motion.js +164 -0
- package/dist/components/flow-motion.js.map +1 -0
- package/dist/components/grant-details.d.ts +28 -0
- package/dist/components/grant-details.d.ts.map +1 -0
- package/dist/components/grant-details.js +138 -0
- package/dist/components/grant-details.js.map +1 -0
- package/dist/components/grant-field-styles.js +2 -2
- package/dist/components/index.d.ts +5 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +5 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/mcp-consent.d.ts +19 -0
- package/dist/components/mcp-consent.d.ts.map +1 -1
- package/dist/components/mcp-consent.js +93 -36
- package/dist/components/mcp-consent.js.map +1 -1
- package/dist/components/preview.d.ts +38 -0
- package/dist/components/preview.d.ts.map +1 -0
- package/dist/components/preview.js +61 -0
- package/dist/components/preview.js.map +1 -0
- package/dist/components/provider-icons.d.ts +16 -0
- package/dist/components/provider-icons.d.ts.map +1 -0
- package/dist/components/provider-icons.js +88 -0
- package/dist/components/provider-icons.js.map +1 -0
- package/dist/consent.js +4875 -1178
- package/dist/consent.min.js +2367 -814
- package/dist/constants/capabilities.d.ts +16 -3
- package/dist/constants/capabilities.d.ts.map +1 -1
- package/dist/constants/capabilities.js +17 -2
- package/dist/constants/capabilities.js.map +1 -1
- package/dist/copy/tokens.d.ts +67 -24
- package/dist/copy/tokens.d.ts.map +1 -1
- package/dist/copy/tokens.js +67 -24
- package/dist/copy/tokens.js.map +1 -1
- package/dist/flow/copy.d.ts +31 -0
- package/dist/flow/copy.d.ts.map +1 -0
- package/dist/flow/copy.js +137 -0
- package/dist/flow/copy.js.map +1 -0
- package/dist/flow/index.d.ts +15 -0
- package/dist/flow/index.d.ts.map +1 -0
- package/dist/flow/index.js +15 -0
- package/dist/flow/index.js.map +1 -0
- package/dist/flow/model.d.ts +209 -0
- package/dist/flow/model.d.ts.map +1 -0
- package/dist/flow/model.js +103 -0
- package/dist/flow/model.js.map +1 -0
- package/dist/flow/presets.d.ts +29 -0
- package/dist/flow/presets.d.ts.map +1 -0
- package/dist/flow/presets.js +153 -0
- package/dist/flow/presets.js.map +1 -0
- package/dist/flow/schema.d.ts +127 -0
- package/dist/flow/schema.d.ts.map +1 -0
- package/dist/flow/schema.js +72 -0
- package/dist/flow/schema.js.map +1 -0
- package/dist/identity/agent-identity.d.ts +3 -2
- package/dist/identity/agent-identity.d.ts.map +1 -1
- package/dist/identity/agent-identity.js +3 -2
- package/dist/identity/agent-identity.js.map +1 -1
- package/dist/mcp-app/inline.d.ts.map +1 -1
- package/dist/mcp-app/inline.js +2 -2
- package/dist/mcp-app/inline.js.map +1 -1
- package/dist/react/index.d.ts +27 -1
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +39 -1
- package/dist/react/index.js.map +1 -1
- package/dist/styles/brand.d.ts +184 -0
- package/dist/styles/brand.d.ts.map +1 -0
- package/dist/styles/brand.js +372 -0
- package/dist/styles/brand.js.map +1 -0
- package/dist/styles/index.d.ts +1 -0
- package/dist/styles/index.d.ts.map +1 -1
- package/dist/styles/index.js +1 -0
- package/dist/styles/index.js.map +1 -1
- package/dist/styles/theme.d.ts +76 -13
- package/dist/styles/theme.d.ts.map +1 -1
- package/dist/styles/theme.js +98 -29
- package/dist/styles/theme.js.map +1 -1
- package/dist/types/capabilities.types.d.ts +12 -14
- package/dist/types/capabilities.types.d.ts.map +1 -1
- package/dist/types/capabilities.types.js +1 -2
- package/dist/types/capabilities.types.js.map +1 -1
- package/dist/types/decision.types.d.ts +57 -0
- package/dist/types/decision.types.d.ts.map +1 -0
- package/dist/types/decision.types.js +12 -0
- package/dist/types/decision.types.js.map +1 -0
- package/dist/types/edit.types.d.ts +73 -0
- package/dist/types/edit.types.d.ts.map +1 -0
- package/dist/types/edit.types.js +76 -0
- package/dist/types/edit.types.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +10 -5
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Consent Capabilities Screen
|
|
3
3
|
*
|
|
4
|
-
* The
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* The consent decision page, as Checkpoint draws it: the connector above a
|
|
5
|
+
* card holding the eyebrow, the serif headline that names the agent (its name
|
|
6
|
+
* opens what is known about it), a warning when the agent registered itself,
|
|
7
|
+
* who is signing in (`approver`), the permission rows, the "Permission
|
|
8
|
+
* details" box (`grantDetails`, else the revocation notice) and Allow and
|
|
9
|
+
* Deny; under the card, "Secured by" and the Vouched lockup, and the host's
|
|
10
|
+
* legal links. Used when the resolved consent config includes `capabilities`.
|
|
9
11
|
*
|
|
10
12
|
* This component is purely presentational. It accepts the resolved data
|
|
11
13
|
* (capabilities, agent metadata, copy values) and emits `capabilities-allow` /
|
|
@@ -15,10 +17,26 @@
|
|
|
15
17
|
*
|
|
16
18
|
* Each row's parts are forwarded with a `capability-` prefix
|
|
17
19
|
* (`capability-row`, `capability-label` and so on, see
|
|
18
|
-
* CAPABILITY_ROW_EXPORT_PARTS)
|
|
19
|
-
* `
|
|
20
|
-
* `
|
|
21
|
-
* the `
|
|
20
|
+
* CAPABILITY_ROW_EXPORT_PARTS). The other parts are `connector`, `card`,
|
|
21
|
+
* `eyebrow`, `headline`, `agent-name`, `subhead`, `agent-details`,
|
|
22
|
+
* `unverified`, `approver`, `permissions`, `section-header` (the eyebrow over
|
|
23
|
+
* the rows, "What {Agent} can do for you"), `section-hint` ("Tap to toggle"),
|
|
24
|
+
* `grant-details`, `actions`,
|
|
25
|
+
* `submit`, `cancel` and `below`. A host puts content in a row by giving it
|
|
26
|
+
* `slot="capability-<capability id>"`, words the headline itself through the
|
|
27
|
+
* `headline` slot, replaces the lockup through `footer`, adds its legal
|
|
28
|
+
* links through `legal`, and puts a `consent-wallet-check`
|
|
29
|
+
* (`placement="connector"`) in the shield's place through `connector-mark`.
|
|
30
|
+
*
|
|
31
|
+
* Text wraps with `text-wrap: pretty`, inherited by every part, so no line
|
|
32
|
+
* ends on one word where the browser supports it.
|
|
33
|
+
*
|
|
34
|
+
* With `preview` the screen draws as it would live and acts on nothing: it
|
|
35
|
+
* sends no `capabilities-allow` or `capabilities-deny`, and no link inside it
|
|
36
|
+
* goes anywhere; rows still tick. With `editable` as well, the subhead, the
|
|
37
|
+
* organization's name (in "Connects to"), each row's label and description
|
|
38
|
+
* and both button labels are regions a person types into (see
|
|
39
|
+
* `CONSENT_EDIT_KEYS`), and the rows stop toggling.
|
|
22
40
|
*
|
|
23
41
|
* @module components/consent-capabilities-screen
|
|
24
42
|
*/
|
|
@@ -31,17 +49,22 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
31
49
|
import { LitElement, html, css, nothing } from "lit";
|
|
32
50
|
import { customElement, property, state } from "lit/decorators.js";
|
|
33
51
|
import { CONSENT_COPY_TOKENS, formatToken } from "../copy/tokens.js";
|
|
34
|
-
import { getConsentTheme,
|
|
52
|
+
import { getConsentTheme, themeScopeStyle } from "../styles/theme.js";
|
|
35
53
|
import { agentVerification, } from "../types/capabilities.types.js";
|
|
36
54
|
import { agentMetadataFromIdentity, } from "../identity/agent-identity.js";
|
|
37
55
|
import { compileSingleCapability } from "../cedar/compile.js";
|
|
38
56
|
import { capabilityIdsFor, capabilitySeedKey, } from "../resolution/credential-capabilities.js";
|
|
39
57
|
import { CONSENT_CAPABILITIES_FEATURES } from "../constants/capabilities.js";
|
|
40
|
-
import "
|
|
41
|
-
import "
|
|
58
|
+
import { CONSENT_EDIT_KEYS, } from "../types/edit.types.js";
|
|
59
|
+
import { sanitizeLinkUrl } from "../resolution/resolve-branding.js";
|
|
60
|
+
import { editRegion, editRegionStyles } from "./edit-region.js";
|
|
61
|
+
import { decisionIcon } from "./decision-icons.js";
|
|
62
|
+
import { isEditing, guardPreviewNavigation, warnIfEditableWithoutPreview, } from "./preview.js";
|
|
63
|
+
import { initialOf } from "./consent-headline.js";
|
|
42
64
|
import { CAPABILITY_ROW_PARTS } from "./consent-capability-card.js";
|
|
65
|
+
import { grantDetailRows, grantDetailsSection, grantDetailStyles, } from "./grant-details.js";
|
|
43
66
|
import "./consent-action-bar.js";
|
|
44
|
-
import "./consent-
|
|
67
|
+
import "./consent-secured-by.js";
|
|
45
68
|
import "./consent-revocation-notice.js";
|
|
46
69
|
import "./consent-connector-header.js";
|
|
47
70
|
import { GRANT_FIELD_EVENTS } from "./consent-grant-terms.js";
|
|
@@ -80,8 +103,15 @@ let ConsentCapabilitiesScreen = class ConsentCapabilitiesScreen extends LitEleme
|
|
|
80
103
|
this.loading = false;
|
|
81
104
|
/** Blocks approval while allowing the human to decline. */
|
|
82
105
|
this.disabled = false;
|
|
106
|
+
/** The subhead. Empty draws none. */
|
|
83
107
|
this.description = "";
|
|
84
108
|
this.submitLabel = "";
|
|
109
|
+
/** Draw each row's icon tile. */
|
|
110
|
+
this.showIcons = false;
|
|
111
|
+
/** Leave out every row's HIGHER RISK chip (each row's riskLevel is unchanged). */
|
|
112
|
+
this.hideRisk = false;
|
|
113
|
+
/** Leave out every row's scope badges (what is granted is unchanged). */
|
|
114
|
+
this.hideScopes = false;
|
|
85
115
|
this.cancelLabel = "";
|
|
86
116
|
/**
|
|
87
117
|
* Seed every capability as selected. The credential path grants a fixed,
|
|
@@ -113,9 +143,29 @@ let ConsentCapabilitiesScreen = class ConsentCapabilitiesScreen extends LitEleme
|
|
|
113
143
|
* reach this screen the same way it reaches the other consent screens.
|
|
114
144
|
*/
|
|
115
145
|
this.serverLogoUrl = "";
|
|
146
|
+
/**
|
|
147
|
+
* The connector's bridge: `bridge` (default), dashed lines and a shield in
|
|
148
|
+
* the page's tint, or `dots`. Forwarded to the connector header.
|
|
149
|
+
*/
|
|
150
|
+
this.connectorVariant = "bridge";
|
|
151
|
+
/**
|
|
152
|
+
* Who carries the connection, such as the host's product name: read out as
|
|
153
|
+
* "{agent} is connecting to {org} via {via}" and shown on the connector's
|
|
154
|
+
* shield. Empty: the connector names only the agent and the org.
|
|
155
|
+
*/
|
|
156
|
+
this.via = "";
|
|
116
157
|
/** Fixed grants require every disclosed capability to remain selected. */
|
|
117
158
|
this.requireAll = false;
|
|
159
|
+
/**
|
|
160
|
+
* Draws as it would live and acts on nothing: no decision event, no link
|
|
161
|
+
* followed. Every part inside gets it.
|
|
162
|
+
*/
|
|
163
|
+
this.preview = false;
|
|
164
|
+
/** With `preview`: the screen's words can be edited in place. */
|
|
165
|
+
this.editable = false;
|
|
118
166
|
this.selected = new Set();
|
|
167
|
+
/** Whether the host filled the `legal` slot. */
|
|
168
|
+
this.hasLegal = false;
|
|
119
169
|
/**
|
|
120
170
|
* Last capability set this component seeded `selected` from, per
|
|
121
171
|
* `capabilitySeedKey`. Re-seeding is keyed on this value rather than on
|
|
@@ -144,7 +194,7 @@ let ConsentCapabilitiesScreen = class ConsentCapabilitiesScreen extends LitEleme
|
|
|
144
194
|
this.selected = next;
|
|
145
195
|
};
|
|
146
196
|
this.onAllow = () => {
|
|
147
|
-
if (this.loading || this.approvalDisabled)
|
|
197
|
+
if (this.preview || this.loading || this.approvalDisabled)
|
|
148
198
|
return;
|
|
149
199
|
const selectedCapabilities = this.capabilities.filter((c) => this.selected.has(c.id));
|
|
150
200
|
if (selectedCapabilities.length === 0)
|
|
@@ -166,15 +216,21 @@ let ConsentCapabilitiesScreen = class ConsentCapabilitiesScreen extends LitEleme
|
|
|
166
216
|
}));
|
|
167
217
|
};
|
|
168
218
|
this.onDeny = () => {
|
|
169
|
-
if (this.loading)
|
|
219
|
+
if (this.preview || this.loading)
|
|
170
220
|
return;
|
|
171
221
|
this.dispatchEvent(new CustomEvent("capabilities-deny", { bubbles: true, composed: true }));
|
|
172
222
|
};
|
|
223
|
+
this.readLegalSlot = (event) => {
|
|
224
|
+
this.hasLegal =
|
|
225
|
+
event.target.assignedNodes({ flatten: true })
|
|
226
|
+
.length > 0;
|
|
227
|
+
};
|
|
173
228
|
// Grant terms in the `details` slot can turn Allow off and on.
|
|
174
229
|
const refresh = () => this.requestUpdate();
|
|
175
230
|
this.addEventListener("consent-grant-terms-change", refresh);
|
|
176
231
|
for (const type of GRANT_FIELD_EVENTS)
|
|
177
232
|
this.addEventListener(type, refresh);
|
|
233
|
+
guardPreviewNavigation(this);
|
|
178
234
|
}
|
|
179
235
|
connectedCallback() {
|
|
180
236
|
super.connectedCallback();
|
|
@@ -184,6 +240,7 @@ let ConsentCapabilitiesScreen = class ConsentCapabilitiesScreen extends LitEleme
|
|
|
184
240
|
if (changed.has("capabilities") || changed.has("allSelected")) {
|
|
185
241
|
this.seedDefaults();
|
|
186
242
|
}
|
|
243
|
+
warnIfEditableWithoutPreview(this);
|
|
187
244
|
}
|
|
188
245
|
/**
|
|
189
246
|
* Seed `selected` from the capability defaults, but only when the
|
|
@@ -200,8 +257,12 @@ let ConsentCapabilitiesScreen = class ConsentCapabilitiesScreen extends LitEleme
|
|
|
200
257
|
this.seedKey = key;
|
|
201
258
|
this.selected = new Set(capabilityIdsFor(this.capabilities, this.allSelected));
|
|
202
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
* The theme, as values the page can override: a `--cs-*` property set on
|
|
262
|
+
* this element or on any ancestor wins over the theme's own.
|
|
263
|
+
*/
|
|
203
264
|
hostStyle() {
|
|
204
|
-
return
|
|
265
|
+
return themeScopeStyle(getConsentTheme(this.theme), ".card, consent-connector-header, .below");
|
|
205
266
|
}
|
|
206
267
|
/** Grant terms in the `details` slot. None when rendered without a DOM. */
|
|
207
268
|
get slottedTerms() {
|
|
@@ -244,116 +305,222 @@ let ConsentCapabilitiesScreen = class ConsentCapabilitiesScreen extends LitEleme
|
|
|
244
305
|
}
|
|
245
306
|
}
|
|
246
307
|
render() {
|
|
247
|
-
const tokens = CONSENT_COPY_TOKENS;
|
|
248
308
|
const agent = this.resolveAgent();
|
|
309
|
+
// Only an editable preview passes editable on, so no part warns on its own.
|
|
310
|
+
const editing = isEditing(this);
|
|
249
311
|
const agentName = agent?.name || "this agent";
|
|
250
|
-
const sectionHeader = formatToken(tokens.section.capabilitiesHeader, {
|
|
251
|
-
Agent: agentName.toUpperCase(),
|
|
252
|
-
});
|
|
253
312
|
return html `
|
|
254
313
|
<style>
|
|
255
314
|
${this.hostStyle()}
|
|
256
315
|
</style>
|
|
257
|
-
<
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
?
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
316
|
+
<div class="screen">
|
|
317
|
+
<consent-connector-header
|
|
318
|
+
part="connector"
|
|
319
|
+
clientName="${agent?.name || ""}"
|
|
320
|
+
clientDid="${agent?.did || ""}"
|
|
321
|
+
client-logo-url="${agent?.logoUrl || ""}"
|
|
322
|
+
serverName="${this.orgName || ""}"
|
|
323
|
+
server-logo-url="${this.serverLogoUrl}"
|
|
324
|
+
server-domain="${this.serverDomain}"
|
|
325
|
+
logo-dev-token="${this.logoDevToken}"
|
|
326
|
+
variant=${this.connectorVariant}
|
|
327
|
+
via=${this.via}
|
|
328
|
+
><slot name="connector-mark" slot="mark"></slot
|
|
329
|
+
></consent-connector-header>
|
|
330
|
+
<div class="card" part="card">
|
|
331
|
+
<consent-headline
|
|
332
|
+
exportparts="eyebrow, headline, agent-name, subhead, agent-details"
|
|
333
|
+
agent-name="${agent?.name ?? ""}"
|
|
334
|
+
.agent=${agent}
|
|
335
|
+
verb="${this.headlineVerb}"
|
|
336
|
+
description="${this.description}"
|
|
337
|
+
?preview=${this.preview}
|
|
338
|
+
?editable=${editing}
|
|
339
|
+
.editSource=${this.editSource}
|
|
340
|
+
><slot name="headline" slot="headline"></slot
|
|
341
|
+
></consent-headline>
|
|
342
|
+
<slot name="recovery"></slot>
|
|
343
|
+
${this.renderUnverified(agent)}
|
|
344
|
+
<slot name="identity"></slot>
|
|
345
|
+
${this.renderApprover()}
|
|
346
|
+
<slot name="agent-key"></slot>
|
|
347
|
+
<div part="permissions">
|
|
348
|
+
${this.renderSectionHeader(agentName, editing)}
|
|
349
|
+
<div class="rows" @capability-toggle=${this.onCapabilityToggle}>
|
|
350
|
+
${this.capabilities.map((capability) => html `
|
|
351
|
+
<consent-capability-card
|
|
352
|
+
capabilityId="${capability.id}"
|
|
353
|
+
label="${capability.label}"
|
|
354
|
+
description="${capability.description}"
|
|
355
|
+
icon="${capability.icon}"
|
|
356
|
+
riskLevel="${capability.riskLevel}"
|
|
357
|
+
?checked=${this.selected.has(capability.id)}
|
|
358
|
+
?disabled=${this.loading || this.disabled}
|
|
359
|
+
?show-icon=${this.showIcons}
|
|
360
|
+
?hide-risk=${this.hideRisk}
|
|
361
|
+
?hide-scopes=${this.hideScopes}
|
|
362
|
+
.scopes=${capability.scopes}
|
|
363
|
+
compiled-cedar="${this.compileCapabilityCedar(capability)}"
|
|
364
|
+
?preview=${this.preview}
|
|
365
|
+
?editable=${editing}
|
|
366
|
+
.editSource=${this.editSource}
|
|
367
|
+
exportparts=${CAPABILITY_ROW_EXPORT_PARTS}
|
|
368
|
+
><slot
|
|
369
|
+
name=${capabilitySlotName(capability.id)}
|
|
370
|
+
slot="extra"
|
|
371
|
+
></slot
|
|
372
|
+
></consent-capability-card>
|
|
373
|
+
`)}
|
|
374
|
+
</div>
|
|
295
375
|
</div>
|
|
296
|
-
<
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
></consent-capability-card>
|
|
314
|
-
`)}
|
|
315
|
-
</div>
|
|
316
|
-
</div>
|
|
317
|
-
<slot name="auth"></slot>
|
|
318
|
-
<slot name="details"></slot>
|
|
319
|
-
<slot name="notice"
|
|
320
|
-
><consent-revocation-notice
|
|
321
|
-
revocationPath="${this.revocationPath}"
|
|
322
|
-
orgName="${this.orgName || "this site"}"
|
|
323
|
-
inactivityDays=${this.inactivityDays}
|
|
324
|
-
?fixed-expiry=${this.fixedExpiry}
|
|
325
|
-
fixed-expiry-days=${this.fixedExpiryDays ?? nothing}
|
|
326
|
-
></consent-revocation-notice
|
|
327
|
-
></slot>
|
|
328
|
-
<consent-action-bar
|
|
329
|
-
part="actions"
|
|
330
|
-
agentName="${agentName}"
|
|
331
|
-
theme="${this.theme}"
|
|
332
|
-
?loading=${this.loading}
|
|
333
|
-
?disabled=${this.approvalDisabled}
|
|
334
|
-
submit-label=${this.submitLabel}
|
|
335
|
-
cancel-label=${this.cancelLabel}
|
|
336
|
-
exportparts="submit, cancel"
|
|
337
|
-
@consent-allow=${this.onAllow}
|
|
338
|
-
@consent-deny=${this.onDeny}
|
|
339
|
-
></consent-action-bar>
|
|
340
|
-
<slot name="footer"
|
|
341
|
-
><consent-footer
|
|
376
|
+
<slot name="auth"></slot>
|
|
377
|
+
<slot name="details"></slot>
|
|
378
|
+
${this.renderGrantDetails(editing)}
|
|
379
|
+
<slot name="notice"
|
|
380
|
+
>${this.grantDetails
|
|
381
|
+
? nothing
|
|
382
|
+
: html `<consent-revocation-notice
|
|
383
|
+
revocationPath="${this.revocationPath}"
|
|
384
|
+
orgName="${this.orgName || "this site"}"
|
|
385
|
+
inactivityDays=${this.inactivityDays}
|
|
386
|
+
?fixed-expiry=${this.fixedExpiry}
|
|
387
|
+
fixed-expiry-days=${this.fixedExpiryDays ?? nothing}
|
|
388
|
+
></consent-revocation-notice>`}</slot
|
|
389
|
+
>
|
|
390
|
+
<consent-action-bar
|
|
391
|
+
part="actions"
|
|
392
|
+
agentName="${agentName}"
|
|
342
393
|
theme="${this.theme}"
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
394
|
+
?loading=${this.loading}
|
|
395
|
+
?disabled=${this.approvalDisabled}
|
|
396
|
+
submit-label=${this.submitLabel}
|
|
397
|
+
cancel-label=${this.cancelLabel}
|
|
398
|
+
?preview=${this.preview}
|
|
399
|
+
?editable=${editing}
|
|
400
|
+
.editSource=${this.editSource}
|
|
401
|
+
exportparts="submit, cancel"
|
|
402
|
+
@consent-allow=${this.onAllow}
|
|
403
|
+
@consent-deny=${this.onDeny}
|
|
404
|
+
></consent-action-bar>
|
|
405
|
+
</div>
|
|
406
|
+
<div class="below" part="below">
|
|
407
|
+
<slot name="footer"><consent-secured-by></consent-secured-by></slot>
|
|
408
|
+
${this.renderLegal()}
|
|
409
|
+
</div>
|
|
346
410
|
</div>
|
|
347
411
|
`;
|
|
348
412
|
}
|
|
413
|
+
/**
|
|
414
|
+
* "What {Agent} can do for you" over the rows, with "Tap to toggle" while a
|
|
415
|
+
* person can tick them (not in edit mode, while loading or disabled). With no
|
|
416
|
+
* rows, nothing.
|
|
417
|
+
*/
|
|
418
|
+
renderSectionHeader(agentName, editing) {
|
|
419
|
+
if (this.capabilities.length === 0)
|
|
420
|
+
return nothing;
|
|
421
|
+
const tokens = CONSENT_COPY_TOKENS.section;
|
|
422
|
+
const toggles = !editing && !this.loading && !this.disabled;
|
|
423
|
+
return html `<div class="section-header" part="section-header">
|
|
424
|
+
<span
|
|
425
|
+
>${formatToken(tokens.capabilitiesHeader, { Agent: agentName })}</span
|
|
426
|
+
>
|
|
427
|
+
${toggles
|
|
428
|
+
? html `<span class="hint" part="section-hint"
|
|
429
|
+
>${tokens.tapToToggle}</span
|
|
430
|
+
>`
|
|
431
|
+
: nothing}
|
|
432
|
+
</div>`;
|
|
433
|
+
}
|
|
434
|
+
/** The warning for an agent that registered itself: its name is not checked. */
|
|
435
|
+
renderUnverified(agent) {
|
|
436
|
+
if (!agent || agentVerification(agent) !== "unverified")
|
|
437
|
+
return nothing;
|
|
438
|
+
const copy = CONSENT_COPY_TOKENS;
|
|
439
|
+
return html `<div class="unverified" part="unverified">
|
|
440
|
+
<p class="unverified-heading">${copy.unverifiedAgent.heading}</p>
|
|
441
|
+
<p class="unverified-body">
|
|
442
|
+
${copy.agentDetails.unverifiedExplanation}
|
|
443
|
+
${copy.unverifiedAgent.advice}
|
|
444
|
+
</p>
|
|
445
|
+
</div>`;
|
|
446
|
+
}
|
|
447
|
+
/** Who is signing in, and the checks they passed; nothing when there is neither. */
|
|
448
|
+
renderApprover() {
|
|
449
|
+
const identifier = this.approver?.identifier?.trim() ?? "";
|
|
450
|
+
const checks = (this.approver?.checks ?? []).filter((check) => check.label.trim());
|
|
451
|
+
if (!identifier && checks.length === 0)
|
|
452
|
+
return nothing;
|
|
453
|
+
return html `<div class="approver tinted" part="approver">
|
|
454
|
+
${identifier
|
|
455
|
+
? html `<div class="signed-in">
|
|
456
|
+
<span class="avatar" aria-hidden="true"
|
|
457
|
+
>${initialOf(identifier)}</span
|
|
458
|
+
>
|
|
459
|
+
<span class="who">
|
|
460
|
+
<span class="small"
|
|
461
|
+
>${CONSENT_COPY_TOKENS.approver.signedIn}</span
|
|
462
|
+
>
|
|
463
|
+
<span class="identifier">${identifier}</span>
|
|
464
|
+
</span>
|
|
465
|
+
</div>`
|
|
466
|
+
: nothing}
|
|
467
|
+
${checks.map((check, index) => html `<div class="check${identifier || index > 0 ? " ruled" : ""}">
|
|
468
|
+
<span class="check-icon">${decisionIcon("check")}</span>
|
|
469
|
+
<span class="who">
|
|
470
|
+
<span class="strong">${check.label}</span>
|
|
471
|
+
${check.summary ? html `<span>${check.summary}</span>` : nothing}
|
|
472
|
+
${check.source
|
|
473
|
+
? html `<span class="small">${check.source}</span>`
|
|
474
|
+
: nothing}
|
|
475
|
+
</span>
|
|
476
|
+
</div>`)}
|
|
477
|
+
</div>`;
|
|
478
|
+
}
|
|
479
|
+
/** The "Permission details" box, when the host gives `grantDetails`. */
|
|
480
|
+
renderGrantDetails(editing) {
|
|
481
|
+
const details = this.grantDetails;
|
|
482
|
+
if (!details)
|
|
483
|
+
return nothing;
|
|
484
|
+
const org = this.orgName.trim();
|
|
485
|
+
const orgValue = editing
|
|
486
|
+
? editRegion(CONSENT_EDIT_KEYS.orgName, CONSENT_COPY_TOKENS.editRegions.orgName, org, this.editSource)
|
|
487
|
+
: org;
|
|
488
|
+
return grantDetailsSection(grantDetailRows(details, org || editing ? orgValue : ""));
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* The host's legal links, or a "How does this work?" link when the host
|
|
492
|
+
* gives its address; nothing when there is neither.
|
|
493
|
+
*/
|
|
494
|
+
renderLegal() {
|
|
495
|
+
const howItWorks = sanitizeLinkUrl(this.howItWorksUrl);
|
|
496
|
+
return html `<div class="legal" ?hidden=${!this.hasLegal && !howItWorks}>
|
|
497
|
+
<slot name="legal" @slotchange=${this.readLegalSlot}
|
|
498
|
+
>${howItWorks
|
|
499
|
+
? html `<a href=${howItWorks} target="_blank" rel="noopener noreferrer"
|
|
500
|
+
>${CONSENT_COPY_TOKENS.attribution.howThisWorks}</a
|
|
501
|
+
>`
|
|
502
|
+
: nothing}</slot
|
|
503
|
+
>
|
|
504
|
+
</div>`;
|
|
505
|
+
}
|
|
349
506
|
};
|
|
350
507
|
ConsentCapabilitiesScreen.features = CONSENT_CAPABILITIES_FEATURES;
|
|
351
508
|
ConsentCapabilitiesScreen.styles = css `
|
|
509
|
+
${editRegionStyles}
|
|
510
|
+
${grantDetailStyles}
|
|
511
|
+
|
|
512
|
+
/* The box is on an inner element: a page's reset (such as
|
|
513
|
+
Tailwind's "* { padding: 0; margin: 0; border: 0 }") reaches the host,
|
|
514
|
+
never inside. */
|
|
352
515
|
:host {
|
|
353
516
|
display: block;
|
|
354
|
-
box-sizing: border-box;
|
|
355
517
|
width: 100%;
|
|
356
|
-
|
|
518
|
+
text-wrap: pretty;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.screen {
|
|
522
|
+
box-sizing: border-box;
|
|
523
|
+
max-width: var(--cs-screen-max-width, 576px);
|
|
357
524
|
margin: 0 auto;
|
|
358
525
|
}
|
|
359
526
|
|
|
@@ -361,33 +528,36 @@ ConsentCapabilitiesScreen.styles = css `
|
|
|
361
528
|
min-width: 0;
|
|
362
529
|
background: var(--cs-surface-card);
|
|
363
530
|
border: 1px solid var(--cs-surface-border);
|
|
364
|
-
border-radius:
|
|
531
|
+
border-radius: var(--cs-card-radius, 12px);
|
|
365
532
|
box-shadow: var(--cs-card-shadow);
|
|
366
|
-
padding: var(--cs-card-padding, 28px 28px
|
|
533
|
+
padding: var(--cs-card-padding, 28px 28px 24px);
|
|
367
534
|
display: flex;
|
|
368
535
|
flex-direction: column;
|
|
369
536
|
gap: var(--cs-card-gap, 22px);
|
|
370
537
|
color: var(--cs-text-primary);
|
|
371
538
|
}
|
|
372
539
|
|
|
540
|
+
/* The eyebrow over the rows: the headline's eyebrow, with a hint at its right. */
|
|
373
541
|
.section-header {
|
|
374
542
|
display: flex;
|
|
375
543
|
align-items: center;
|
|
376
544
|
justify-content: space-between;
|
|
545
|
+
flex-wrap: wrap;
|
|
546
|
+
gap: 4px 12px;
|
|
377
547
|
font-size: 11px;
|
|
378
|
-
letter-spacing: 0.
|
|
548
|
+
letter-spacing: 0.16em;
|
|
379
549
|
font-weight: 600;
|
|
380
|
-
|
|
550
|
+
/* One line height for both, so the hint can go without the rows moving. */
|
|
551
|
+
line-height: 18px;
|
|
552
|
+
color: var(--cs-text-tertiary, #5d6c82);
|
|
381
553
|
text-transform: uppercase;
|
|
382
|
-
gap: 12px;
|
|
383
|
-
flex-wrap: wrap;
|
|
384
554
|
}
|
|
385
555
|
|
|
386
556
|
.section-header .hint {
|
|
387
557
|
letter-spacing: 0;
|
|
388
558
|
font-weight: 400;
|
|
389
|
-
text-transform: none;
|
|
390
559
|
font-size: 12px;
|
|
560
|
+
text-transform: none;
|
|
391
561
|
}
|
|
392
562
|
|
|
393
563
|
.rows {
|
|
@@ -395,9 +565,145 @@ ConsentCapabilitiesScreen.styles = css `
|
|
|
395
565
|
flex-direction: column;
|
|
396
566
|
}
|
|
397
567
|
|
|
398
|
-
|
|
568
|
+
svg {
|
|
569
|
+
flex-shrink: 0;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.unverified {
|
|
573
|
+
display: flex;
|
|
574
|
+
flex-direction: column;
|
|
575
|
+
gap: 2px;
|
|
576
|
+
margin-top: 12px;
|
|
577
|
+
font-size: 14px;
|
|
578
|
+
line-height: 1.45;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.unverified p {
|
|
582
|
+
margin: 0;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.unverified-heading {
|
|
586
|
+
font-weight: 500;
|
|
587
|
+
color: var(--cs-warning-text, var(--cs-text-primary));
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.unverified-body {
|
|
591
|
+
color: var(--cs-text-secondary);
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
.tinted {
|
|
595
|
+
border-radius: 12px;
|
|
596
|
+
border: 1px solid var(--cs-tint-line);
|
|
597
|
+
background: var(--cs-tint);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.approver {
|
|
601
|
+
margin-top: 16px;
|
|
602
|
+
padding: 12px 16px;
|
|
603
|
+
font-size: 14px;
|
|
604
|
+
line-height: 1.45;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
.signed-in,
|
|
608
|
+
.check {
|
|
609
|
+
display: flex;
|
|
610
|
+
align-items: center;
|
|
611
|
+
gap: 12px;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.check {
|
|
615
|
+
align-items: flex-start;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
.ruled {
|
|
619
|
+
margin-top: 12px;
|
|
620
|
+
padding-top: 12px;
|
|
621
|
+
border-top: 1px solid var(--cs-tint-line);
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
.avatar,
|
|
625
|
+
.check-icon {
|
|
626
|
+
display: grid;
|
|
627
|
+
place-items: center;
|
|
628
|
+
width: 40px;
|
|
629
|
+
height: 40px;
|
|
630
|
+
flex-shrink: 0;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.avatar {
|
|
634
|
+
border-radius: 50%;
|
|
635
|
+
background: var(--cs-surface-accent);
|
|
636
|
+
color: var(--cs-surface-accent-text);
|
|
637
|
+
font-weight: 600;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
.check-icon {
|
|
641
|
+
color: var(--cs-mark);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
.check-icon svg {
|
|
645
|
+
width: 20px;
|
|
646
|
+
height: 20px;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
.who {
|
|
650
|
+
display: flex;
|
|
651
|
+
flex-direction: column;
|
|
652
|
+
gap: 2px;
|
|
653
|
+
min-width: 0;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
.identifier {
|
|
657
|
+
font-weight: 500;
|
|
658
|
+
overflow: hidden;
|
|
659
|
+
text-overflow: ellipsis;
|
|
660
|
+
white-space: nowrap;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
.small {
|
|
664
|
+
font-size: 12px;
|
|
665
|
+
color: var(--cs-text-tertiary);
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
.strong {
|
|
669
|
+
font-weight: 500;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
.below {
|
|
673
|
+
display: flex;
|
|
674
|
+
flex-direction: column;
|
|
675
|
+
align-items: center;
|
|
676
|
+
margin-top: 16px;
|
|
677
|
+
color: var(--cs-text-tertiary);
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
.legal {
|
|
681
|
+
display: flex;
|
|
682
|
+
justify-content: center;
|
|
683
|
+
gap: 20px;
|
|
684
|
+
padding-top: 48px;
|
|
685
|
+
font-size: 12px;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
.legal a {
|
|
689
|
+
color: inherit;
|
|
690
|
+
text-decoration: underline;
|
|
691
|
+
text-underline-offset: 2px;
|
|
692
|
+
border-radius: 2px;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
.legal a:hover {
|
|
696
|
+
color: var(--cs-text-primary);
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
.legal a:focus-visible {
|
|
700
|
+
outline: 2px solid var(--cs-focus-ring);
|
|
701
|
+
outline-offset: 2px;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
@media (max-width: 640px) {
|
|
399
705
|
.card {
|
|
400
|
-
padding: var(--cs-card-padding-mobile, 20px
|
|
706
|
+
padding: var(--cs-card-padding-mobile, 20px 20px 24px);
|
|
401
707
|
}
|
|
402
708
|
}
|
|
403
709
|
`;
|
|
@@ -449,6 +755,21 @@ __decorate([
|
|
|
449
755
|
__decorate([
|
|
450
756
|
property({ type: String, attribute: "submit-label" })
|
|
451
757
|
], ConsentCapabilitiesScreen.prototype, "submitLabel", void 0);
|
|
758
|
+
__decorate([
|
|
759
|
+
property({ attribute: false })
|
|
760
|
+
], ConsentCapabilitiesScreen.prototype, "approver", void 0);
|
|
761
|
+
__decorate([
|
|
762
|
+
property({ attribute: false })
|
|
763
|
+
], ConsentCapabilitiesScreen.prototype, "grantDetails", void 0);
|
|
764
|
+
__decorate([
|
|
765
|
+
property({ type: Boolean, attribute: "show-icons" })
|
|
766
|
+
], ConsentCapabilitiesScreen.prototype, "showIcons", void 0);
|
|
767
|
+
__decorate([
|
|
768
|
+
property({ type: Boolean, attribute: "hide-risk" })
|
|
769
|
+
], ConsentCapabilitiesScreen.prototype, "hideRisk", void 0);
|
|
770
|
+
__decorate([
|
|
771
|
+
property({ type: Boolean, attribute: "hide-scopes" })
|
|
772
|
+
], ConsentCapabilitiesScreen.prototype, "hideScopes", void 0);
|
|
452
773
|
__decorate([
|
|
453
774
|
property({ type: String, attribute: "cancel-label" })
|
|
454
775
|
], ConsentCapabilitiesScreen.prototype, "cancelLabel", void 0);
|
|
@@ -467,12 +788,30 @@ __decorate([
|
|
|
467
788
|
__decorate([
|
|
468
789
|
property({ type: String, attribute: "server-logo-url" })
|
|
469
790
|
], ConsentCapabilitiesScreen.prototype, "serverLogoUrl", void 0);
|
|
791
|
+
__decorate([
|
|
792
|
+
property({ type: String, attribute: "connector-variant" })
|
|
793
|
+
], ConsentCapabilitiesScreen.prototype, "connectorVariant", void 0);
|
|
794
|
+
__decorate([
|
|
795
|
+
property({ type: String })
|
|
796
|
+
], ConsentCapabilitiesScreen.prototype, "via", void 0);
|
|
470
797
|
__decorate([
|
|
471
798
|
property({ type: Boolean, attribute: "require-all" })
|
|
472
799
|
], ConsentCapabilitiesScreen.prototype, "requireAll", void 0);
|
|
800
|
+
__decorate([
|
|
801
|
+
property({ type: Boolean, reflect: true })
|
|
802
|
+
], ConsentCapabilitiesScreen.prototype, "preview", void 0);
|
|
803
|
+
__decorate([
|
|
804
|
+
property({ type: Boolean, reflect: true })
|
|
805
|
+
], ConsentCapabilitiesScreen.prototype, "editable", void 0);
|
|
806
|
+
__decorate([
|
|
807
|
+
property({ attribute: false })
|
|
808
|
+
], ConsentCapabilitiesScreen.prototype, "editSource", void 0);
|
|
473
809
|
__decorate([
|
|
474
810
|
state()
|
|
475
811
|
], ConsentCapabilitiesScreen.prototype, "selected", void 0);
|
|
812
|
+
__decorate([
|
|
813
|
+
state()
|
|
814
|
+
], ConsentCapabilitiesScreen.prototype, "hasLegal", void 0);
|
|
476
815
|
ConsentCapabilitiesScreen = __decorate([
|
|
477
816
|
customElement("consent-capabilities-screen")
|
|
478
817
|
], ConsentCapabilitiesScreen);
|