@connectid-tools/idp-selector-react 6.10.0-alpha.4 → 6.10.0-alpha.5
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/CidButton.js +2 -2
- package/CidButtonHowItWorks.js +0 -2
- package/LearnMore.js +0 -2
- package/Popup.js +0 -2
- package/README.md +3 -0
- package/analytics.d.ts +1 -1
- package/analytics.js +1 -1
- package/package.json +3 -3
package/CidButton.js
CHANGED
|
@@ -22,7 +22,7 @@ import { Overlay } from './Overlay';
|
|
|
22
22
|
import { Popup } from './Popup';
|
|
23
23
|
import { Process } from './Process';
|
|
24
24
|
import { ThemeContext } from './ThemeContext';
|
|
25
|
-
import {
|
|
25
|
+
import { initialiseAnalytics } from './analytics';
|
|
26
26
|
import './global.css';
|
|
27
27
|
import { getCurrentUrlOrigin } from './navigator';
|
|
28
28
|
import { isIntroTextTypeValid, isRequiredClaimsValid } from './validator';
|
|
@@ -30,6 +30,7 @@ import detectIncognito from './incognito';
|
|
|
30
30
|
import { getBrowserName, getDeviceType, isAndroid, isIos } from './userAgent';
|
|
31
31
|
import { hasCertification } from './certification';
|
|
32
32
|
import { getCompatibility } from './compatibility';
|
|
33
|
+
initialiseAnalytics();
|
|
33
34
|
export const CidButton = ({ onProceed, claims, requiredClaims, rpLogoUrl, requiredCertifications, label = 'Verify', size = 'regular', type, introTextType, fullProcessCollapsible = false, participantsUri = 'https://data.directory.connectid.com.au/participants', certificationStatus = 'Active', rpDataSharingDescription = 'Your details will be shared with the current website.', enableManualVerification = false, showAllParticipants = false, theme = 'dark', logoLockupStyle = 'light', showInfoContent = false, onError = () => { }, showCompatibilityWarnings = false, supportIncognito = false, forceMobile = false, // only for testing purposes
|
|
34
35
|
forceIos = false, // only for testing purposes
|
|
35
36
|
forceAndroid = false, // only for testing purposes
|
|
@@ -42,7 +43,6 @@ forceBrowser = undefined, // only for testing purposes
|
|
|
42
43
|
throw new Error(response.statusText);
|
|
43
44
|
return response.json();
|
|
44
45
|
}));
|
|
45
|
-
useAnalytics();
|
|
46
46
|
const [showPopup, setShowPopup] = useState(false);
|
|
47
47
|
const [isIncognito, setIsIncognito] = useState();
|
|
48
48
|
const analyticsData = {
|
package/CidButtonHowItWorks.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useAnalytics } from './analytics';
|
|
3
2
|
import { getCurrentUrlOrigin } from './navigator';
|
|
4
3
|
import './CidButtonHowItWorks.css';
|
|
5
4
|
import { ThemeContext } from './ThemeContext';
|
|
6
5
|
import { useContext } from 'react';
|
|
7
6
|
export const CidButtonHowItWorks = () => {
|
|
8
|
-
useAnalytics();
|
|
9
7
|
const theme = useContext(ThemeContext);
|
|
10
8
|
const handleClick = () => {
|
|
11
9
|
if (!analytics)
|
package/LearnMore.js
CHANGED
|
@@ -2,10 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useContext } from 'react';
|
|
3
3
|
import './LearnMore.css';
|
|
4
4
|
import { ThemeContext } from './ThemeContext';
|
|
5
|
-
import { useAnalytics } from './analytics';
|
|
6
5
|
import { getCurrentUrlOrigin } from './navigator';
|
|
7
6
|
export const LearnMore = () => {
|
|
8
|
-
useAnalytics();
|
|
9
7
|
const theme = useContext(ThemeContext);
|
|
10
8
|
const handleClick = () => {
|
|
11
9
|
if (!analytics)
|
package/Popup.js
CHANGED
|
@@ -11,7 +11,6 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
11
11
|
import { useEffect, useRef, useState } from 'react';
|
|
12
12
|
import ReactDOM from 'react-dom';
|
|
13
13
|
import { useMediaQuery } from 'react-responsive';
|
|
14
|
-
import { useAnalytics } from './analytics';
|
|
15
14
|
import { filterAuthorisationServers, getManualAuthorisationServer } from './certification';
|
|
16
15
|
import './global.css';
|
|
17
16
|
import { InfoBox } from './InfoBox';
|
|
@@ -25,7 +24,6 @@ export const Popup = ({ onProceed, onCancel, onError, claims, requiredClaims, sh
|
|
|
25
24
|
const [isIncognito, setIsIncognito] = useState();
|
|
26
25
|
const [showClaims, setShowClaims] = useState(false); // mobile only
|
|
27
26
|
const popupRef = useRef(null);
|
|
28
|
-
useAnalytics();
|
|
29
27
|
const isMobile = useMediaQuery({ query: '(max-width: 482px)' });
|
|
30
28
|
const infoboxLinkRef = useRef(null);
|
|
31
29
|
const closeButtonRef = useRef(null);
|
package/README.md
CHANGED
|
@@ -259,6 +259,9 @@ The SVG image below the ConnectID button has either option dark or light mode. B
|
|
|
259
259
|
|
|
260
260
|
## 🚀 Release Notes
|
|
261
261
|
|
|
262
|
+
### 6.10.0-alpha.5 (Jun 25, 2025)
|
|
263
|
+
- Fix analytics double loading.
|
|
264
|
+
|
|
262
265
|
### 6.10.0-alpha.4 (Jun 20, 2025)
|
|
263
266
|
- Add test support for Samsung and Chrome browsers.
|
|
264
267
|
|
package/analytics.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const initialiseAnalytics: () => void;
|
package/analytics.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const PROD_WRITE_KEY = 'LrD9CEGUEy1O3s73nGbaGcyTqELujozJ';
|
|
2
2
|
const DEV_WRITE_KEY = 'PWlESErGso9uTimwmGB7SsnxCpKF8pRl';
|
|
3
3
|
const WRITE_KEY = 'production' === 'production' ? PROD_WRITE_KEY : DEV_WRITE_KEY;
|
|
4
|
-
export const
|
|
4
|
+
export const initialiseAnalytics = () => {
|
|
5
5
|
// copied from https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/quickstart/
|
|
6
6
|
// @ts-ignore
|
|
7
7
|
// Create a queue, but don't obliterate an existing one!
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@connectid-tools/idp-selector-react",
|
|
3
|
-
"version": "6.10.0-alpha.
|
|
3
|
+
"version": "6.10.0-alpha.5",
|
|
4
4
|
"description": "React component for IDP Selector.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"homepage": "https://github.com/connectid-tools/idp-selector-react",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/preset-typescript": "^7.27.1",
|
|
29
|
-
"@types/node": "^22.15.
|
|
29
|
+
"@types/node": "^22.15.33",
|
|
30
30
|
"@types/react": "^18.3.23",
|
|
31
31
|
"@types/react-dom": "^18.3.7",
|
|
32
32
|
"cypress": "^14.5.0",
|
|
33
33
|
"jest-environment-jsdom": "^29.7.0",
|
|
34
|
-
"prettier": "^3.
|
|
34
|
+
"prettier": "^3.6.0",
|
|
35
35
|
"react": "^18.3.1",
|
|
36
36
|
"react-dom": "^18.3.1",
|
|
37
37
|
"replace-in-file": "^8.3.0",
|