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