@guardian/atoms-rendering
Advanced tools
Comparing version 23.0.2 to 23.1.0
# @guardian/atoms-rendering | ||
## 23.1.0 | ||
### Minor Changes | ||
- 2fb4e42: Upgrade Source and ESlint | ||
- 803d814: Move 'stick' and 'close' component tracking into YoutubeAtomSticky | ||
## 23.0.2 | ||
@@ -4,0 +11,0 @@ |
@@ -11,2 +11,3 @@ "use strict"; | ||
const source_react_components_1 = require("@guardian/source-react-components"); | ||
const ophan_1 = require("./lib/ophan"); | ||
const buttonStyles = react_2.css ` | ||
@@ -113,3 +114,3 @@ position: absolute; | ||
onStopVideo(); | ||
// emit a 'close' event | ||
// log a 'close' event | ||
libs_1.log('dotcom', { | ||
@@ -120,3 +121,10 @@ from: `YoutubeAtom handleCloseClick`, | ||
}); | ||
eventEmitters.forEach((eventEmitter) => eventEmitter('close')); | ||
// submit a 'close' event to Ophan | ||
ophan_1.submitComponentEvent({ | ||
component: { | ||
componentType: 'STICKY_VIDEO', | ||
id: videoId, | ||
}, | ||
action: 'CLOSE', | ||
}); | ||
}; | ||
@@ -158,3 +166,9 @@ /** | ||
}); | ||
eventEmitters.forEach((eventEmitter) => eventEmitter('stick')); | ||
ophan_1.submitComponentEvent({ | ||
component: { | ||
componentType: 'STICKY_VIDEO', | ||
id: videoId, | ||
}, | ||
action: 'STICK', | ||
}); | ||
} | ||
@@ -161,0 +175,0 @@ }, [isSticky, stickEventSent, videoId, eventEmitters]); |
@@ -8,2 +8,3 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@emotion/react/jsx-runtime"; | ||
import { SvgCross } from '@guardian/source-react-components'; | ||
import { submitComponentEvent } from './lib/ophan'; | ||
const buttonStyles = css ` | ||
@@ -110,3 +111,3 @@ position: absolute; | ||
onStopVideo(); | ||
// emit a 'close' event | ||
// log a 'close' event | ||
log('dotcom', { | ||
@@ -117,3 +118,10 @@ from: `YoutubeAtom handleCloseClick`, | ||
}); | ||
eventEmitters.forEach((eventEmitter) => eventEmitter('close')); | ||
// submit a 'close' event to Ophan | ||
submitComponentEvent({ | ||
component: { | ||
componentType: 'STICKY_VIDEO', | ||
id: videoId, | ||
}, | ||
action: 'CLOSE', | ||
}); | ||
}; | ||
@@ -155,3 +163,9 @@ /** | ||
}); | ||
eventEmitters.forEach((eventEmitter) => eventEmitter('stick')); | ||
submitComponentEvent({ | ||
component: { | ||
componentType: 'STICKY_VIDEO', | ||
id: videoId, | ||
}, | ||
action: 'STICK', | ||
}); | ||
} | ||
@@ -158,0 +172,0 @@ }, [isSticky, stickEventSent, videoId, eventEmitters]); |
@@ -126,3 +126,3 @@ import { ArticleTheme } from '@guardian/libs'; | ||
}; | ||
export declare type VideoEventKey = 'play' | '25' | '50' | '75' | 'end' | 'skip' | 'cued' | 'resume' | 'pause' | 'stick' | 'close'; | ||
export declare type VideoEventKey = 'play' | '25' | '50' | '75' | 'end' | 'skip' | 'cued' | 'resume' | 'pause'; | ||
export {}; |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "23.0.2", | ||
"version": "23.1.0", | ||
"source": "src/index.ts", | ||
@@ -38,14 +38,15 @@ "main": "dist/commonjs/index.js", | ||
"@changesets/cli": "^2.21.1", | ||
"@emotion/eslint-plugin": "^11.0.0", | ||
"@emotion/eslint-plugin": "^11.7.0", | ||
"@emotion/react": "^11.1.5", | ||
"@guardian/commercial-core": "^0.26.0", | ||
"@guardian/consent-management-platform": "^8", | ||
"@guardian/eslint-plugin-source-react-components": "^4.0.0-rc.1", | ||
"@guardian/libs": "^3.5.1", | ||
"@guardian/source-foundations": "^4.0.0-rc.0", | ||
"@guardian/source-react-components": "^4.0.0-rc.1", | ||
"@guardian/eslint-plugin-source-react-components": "^4.1.0", | ||
"@guardian/eslint-plugin-source-foundations": "^4.0.2", | ||
"@guardian/libs": "^3.8.1", | ||
"@guardian/source-foundations": "^4.0.2", | ||
"@guardian/source-react-components": "^4.0.1", | ||
"@storybook/addon-docs": "^6.1.11", | ||
"@storybook/addons": "^6.4.20", | ||
"@storybook/react": "^6.1.11", | ||
"@testing-library/jest-dom": "^5.11.6", | ||
"@testing-library/jest-dom": "^5.16.3", | ||
"@testing-library/react": "^11.2.2", | ||
@@ -57,10 +58,10 @@ "@types/jest": "^26.0.15", | ||
"@types/youtube": "^0.0.46", | ||
"@typescript-eslint/eslint-plugin": "^4.0.0", | ||
"@typescript-eslint/parser": "^3.10.1", | ||
"babel-loader": "^8.2.2", | ||
"@typescript-eslint/eslint-plugin": "^5.10.0", | ||
"@typescript-eslint/parser": "^5.10.0", | ||
"babel-loader": "^8.2.4", | ||
"chromatic": "^5.4.0", | ||
"eslint": "^7.13.0", | ||
"eslint": "^8.7.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-config-prettier": "^6.15.0", | ||
"eslint-plugin-prettier": "^3.4.1", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-react": "^7.29.4", | ||
@@ -79,3 +80,3 @@ "husky": "^4.3.0", | ||
"typescript": "^4.1.3", | ||
"web-vitals": "^2.1.2" | ||
"web-vitals": "^2.1.4" | ||
}, | ||
@@ -97,2 +98,3 @@ "eslintConfig": { | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@guardian/eslint-plugin-source-foundations/recommended", | ||
"plugin:@guardian/eslint-plugin-source-react-components/recommended" | ||
@@ -105,4 +107,3 @@ ], | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars-experimental": "error" | ||
"@typescript-eslint/no-unused-vars": "error" | ||
} | ||
@@ -118,8 +119,8 @@ }, | ||
"@guardian/consent-management-platform": "^8", | ||
"@guardian/source-foundations": "^4.0.0-rc.0", | ||
"@guardian/source-react-components": "^4.0.0-rc.1", | ||
"@guardian/source-foundations": "^4.0.2", | ||
"@guardian/source-react-components": "^4.0.1", | ||
"react": "^17.0.1", | ||
"react-dom": "^17.0.1", | ||
"typescript": "^4.1.3", | ||
"web-vitals": "^2.1.2" | ||
"web-vitals": "^2.1.4" | ||
}, | ||
@@ -126,0 +127,0 @@ "jest": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
244821
4977
43