@access-ci/ui 0.18.0 → 0.18.1
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 +11 -5
- package/dist/access-ci-ui.bundle.js +29 -29
- package/dist/access-ci-ui.js +1 -1
- package/dist/access-ci-ui.umd.cjs +51 -51
- package/dist/{access-qa-bot-joJZ-oTE.js → access-qa-bot-DJCKge8P.js} +1449 -1451
- package/dist/{icon-CapWmpVp.js → icon-DL_M57ZD.js} +1 -1
- package/dist/{index-T34fr9d9.js → index-tplNIxNe.js} +2 -2
- package/dist/{resource-group-detail-rhphmKhB.js → resource-group-detail-B-LQBknK.js} +2 -2
- package/dist/{resource-home-ChHDwtIu.js → resource-home-CPt13U3c.js} +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -129,14 +129,20 @@ The library includes functions for rendering common ACCESS user interface compon
|
|
|
129
129
|
|
|
130
130
|
footer({ target: document.getElementById("footer") });
|
|
131
131
|
|
|
132
|
+
// Detect login state via ACCESS SSO cookie
|
|
133
|
+
const isLoggedIn = document.cookie.split("; ").includes("SESSaccesscisso=1")
|
|
134
|
+
|
|
135
|
+
// User info is typically provided by your CMS, something like this:
|
|
136
|
+
const { email, name, accessId } = window.cmsSettings?.currentUser || {};
|
|
137
|
+
|
|
132
138
|
qaBot({
|
|
133
139
|
target: document.getElementById("qa-bot"),
|
|
134
140
|
apiKey: "my-api-key",
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
141
|
+
isLoggedIn: isLoggedIn,
|
|
142
|
+
userEmail: email,
|
|
143
|
+
userName: name,
|
|
144
|
+
accessId: accessId,
|
|
145
|
+
loginUrl: "/login",
|
|
140
146
|
onAnalyticsEvent: (event) => {
|
|
141
147
|
window.dataLayer = window.dataLayer || [];
|
|
142
148
|
window.dataLayer.push(event);
|