Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@atlaskit/analytics

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaskit/analytics - npm Package Compare versions

Comparing version 6.1.1 to 7.0.0

13

CHANGELOG.md
# @atlaskit/analytics
## 7.0.0
### Major Changes
- [major][c0102a3ea2](https://bitbucket.org/atlassian/atlassian-frontend/commits/c0102a3ea2):
BREAKING CHANGE: As part of AFP-1404, we are dropping flow support. It means that those packages are not typed. Consumer will need to manually add their types to the component.Background ticket: https://product-fabric.atlassian.net/browse/AFP-1397Plan: https://product-fabric.atlassian.net/wiki/spaces/AFP/pages/1052870901/Drop+Flow+Support+Plan
### Patch Changes
- @atlaskit/section-message@4.1.4
- @atlaskit/docs@8.3.1
## 6.1.1

@@ -4,0 +17,0 @@

4

dist/cjs/AnalyticsDecorator.js

@@ -37,2 +37,5 @@ "use strict";

/* eslint-disable react/sort-comp */
/* The Decorator component extends analytics event data for any events fired by
its descendents, then passes the event up the hierarchy */
var ContextTypes = {

@@ -67,2 +70,3 @@ onAnalyticsEvent: _propTypes.default.func,

// Decorate the event data if this decorator matches the event name
// eslint-disable-next-line react/prop-types
var _this$props = _this.props,

@@ -69,0 +73,0 @@ data = _this$props.data,

@@ -33,2 +33,7 @@ "use strict";

/* eslint-disable react/sort-comp */
/*
Listens to public and private events and delegates to an analytics
stack in a different React root.
*/
var ContextTypes = {

@@ -61,2 +66,3 @@ onAnalyticsEvent: _propTypes.default.func

(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onAnalyticsEvent", function (name, data, isPrivate) {
// eslint-disable-next-line react/prop-types
var delegateAnalyticsEvent = _this.props.delegateAnalyticsEvent; // send a clean data object so it can't be mutated between listeners

@@ -63,0 +69,0 @@

11

dist/cjs/AnalyticsListener.js

@@ -35,2 +35,7 @@ "use strict";

/* eslint-disable react/sort-comp */
/*
The Listener component is responsible for calling its `onEvent` handler when a
child component fires an analytics event, and passing the event up the hierarchy
*/
var ContextTypes = {

@@ -64,2 +69,3 @@ onAnalyticsEvent: _propTypes.default.func

// Call this component's onEvent method if it's a match
// eslint-disable-next-line react/prop-types
var _this$props = _this.props,

@@ -72,5 +78,4 @@ onEvent = _this$props.onEvent,

// send a clean data object so it can't be mutated between listeners
var _eventData = (0, _objectSpread2.default)({}, data);
onEvent(name, _eventData);
var eventData = (0, _objectSpread2.default)({}, data);
onEvent(name, eventData);
} // Pass the event up the hierarchy

@@ -77,0 +82,0 @@

{
"name": "@atlaskit/analytics",
"version": "6.1.1",
"version": "7.0.0",
"sideEffects": false
}

@@ -36,2 +36,3 @@ "use strict";

/* eslint-disable react/prop-types */
if (process.env.NODE_ENV !== 'production' && !process.env.CI) {

@@ -38,0 +39,0 @@ // eslint-disable-next-line no-console

@@ -48,2 +48,3 @@ import _typeof from "@babel/runtime/helpers/typeof";

// Decorate the event data if this decorator matches the event name
// eslint-disable-next-line react/prop-types
var _this$props = _this.props,

@@ -50,0 +51,0 @@ data = _this$props.data,

@@ -46,2 +46,3 @@ import _objectSpread from "@babel/runtime/helpers/objectSpread";

_defineProperty(_assertThisInitialized(_this), "onAnalyticsEvent", function (name, data, isPrivate) {
// eslint-disable-next-line react/prop-types
var delegateAnalyticsEvent = _this.props.delegateAnalyticsEvent; // send a clean data object so it can't be mutated between listeners

@@ -48,0 +49,0 @@

@@ -48,2 +48,3 @@ import _objectSpread from "@babel/runtime/helpers/objectSpread";

// Call this component's onEvent method if it's a match
// eslint-disable-next-line react/prop-types
var _this$props = _this.props,

@@ -56,5 +57,5 @@ onEvent = _this$props.onEvent,

// send a clean data object so it can't be mutated between listeners
var _eventData = _objectSpread({}, data);
var eventData = _objectSpread({}, data);
onEvent(name, _eventData);
onEvent(name, eventData);
} // Pass the event up the hierarchy

@@ -61,0 +62,0 @@

{
"name": "@atlaskit/analytics",
"version": "6.1.1",
"version": "7.0.0",
"sideEffects": false
}

@@ -11,2 +11,4 @@ import _extends from "@babel/runtime/helpers/extends";

import _defineProperty from "@babel/runtime/helpers/defineProperty";
/* eslint-disable react/prop-types */
import React, { Component } from 'react';

@@ -13,0 +15,0 @@ import PropTypes from 'prop-types';

@@ -1,4 +0,3 @@

// @flow
import React from 'react';
import { md, Example, Props, code } from '@atlaskit/docs';
import { md, Example, code, Props } from '@atlaskit/docs';
import SectionMessage from '@atlaskit/section-message';

@@ -82,3 +81,142 @@

heading="AnalyticsDecorator Props"
props={require('!!extract-react-types-loader!../src/AnalyticsDecorator')}
props={{
kind: 'program',
component: {
kind: 'generic',
value: {
kind: 'object',
members: [
{
kind: 'property',
key: { kind: 'id', name: 'children' },
value: {
kind: 'generic',
value: {
kind: 'import',
importKind: 'type',
name: 'Element',
moduleSpecifier: 'react',
referenceIdName: 'Element',
},
typeParams: { kind: 'typeParams', params: [{ kind: 'any' }] },
},
optional: true,
leadingComments: [
{
type: 'commentBlock',
value: 'A single element, either Component or DOM node',
raw: '* A single element, either Component or DOM node ',
},
],
},
{
kind: 'property',
key: { kind: 'id', name: 'data' },
value: {
kind: 'generic',
value: { kind: 'id', name: 'Object' },
},
optional: true,
leadingComments: [
{
type: 'commentBlock',
value: 'Key/values used to extend event data.',
raw: '* Key/values used to extend event data. ',
},
],
},
{
kind: 'property',
key: { kind: 'id', name: 'getData' },
value: {
parameters: [
{ kind: 'param', value: { kind: 'string' }, type: null },
{
kind: 'param',
value: {
kind: 'generic',
value: { kind: 'id', name: 'Object' },
},
type: null,
},
],
returnType: {
kind: 'generic',
value: { kind: 'id', name: 'Object' },
},
kind: 'function',
},
optional: true,
leadingComments: [
{
type: 'commentBlock',
value:
' Function called to get the key/values used to extend event data.\nOccurs after event data has been extended with `data`.',
raw:
'* Function called to get the key/values used to extend event data.\n Occurs after event data has been extended with `data`. ',
},
],
},
{
kind: 'property',
key: { kind: 'id', name: 'match' },
value: {
kind: 'union',
types: [
{ kind: 'string' },
{
parameters: [
{
kind: 'param',
value: { kind: 'string' },
type: null,
},
],
returnType: { kind: 'boolean' },
kind: 'function',
},
{ kind: 'generic', value: { kind: 'id', name: 'RegExp' } },
],
},
optional: true,
leadingComments: [
{
type: 'commentBlock',
value:
"String, regex, or function filter to limit what events are extended\nbased on event name. String filters use exact matching unless they end\nwith a '.', in which case a partial match on the beginning of the event\nname will be used.",
raw:
"* String, regex, or function filter to limit what events are extended\n based on event name. String filters use exact matching unless they end\n with a '.', in which case a partial match on the beginning of the event\n name will be used.\n ",
},
],
default: { kind: 'string', value: '*' },
},
{
kind: 'property',
key: { kind: 'id', name: 'matchPrivate' },
value: { kind: 'boolean' },
optional: true,
leadingComments: [
{
type: 'commentBlock',
value: 'Sets wether to extended private or public events.',
raw: '* Sets wether to extended private or public events. ',
},
],
default: { kind: 'boolean', value: false },
},
],
leadingComments: [
{
type: 'commentBlock',
value:
'he Decorator component extends analytics event data for any events fired by\nits descendents, then passes the event up the hierarchy',
raw:
' The Decorator component extends analytics event data for any events fired by\nits descendents, then passes the event up the hierarchy ',
},
],
referenceIdName: 'Props',
},
name: { kind: 'id', name: 'AnalyticsDecorator', type: null },
},
}}
/>

@@ -90,5 +228,127 @@ )}

heading="AnalyticsListener Props"
props={require('!!extract-react-types-loader!../src/AnalyticsListener')}
props={{
kind: 'program',
component: {
kind: 'generic',
value: {
kind: 'object',
members: [
{
kind: 'property',
key: { kind: 'id', name: 'children' },
value: {
kind: 'generic',
value: {
kind: 'import',
importKind: 'type',
name: 'Element',
moduleSpecifier: 'react',
referenceIdName: 'Element',
},
typeParams: { kind: 'typeParams', params: [{ kind: 'any' }] },
},
optional: true,
leadingComments: [
{
type: 'commentBlock',
value: 'A single element, either Component or DOM node',
raw: '* A single element, either Component or DOM node ',
},
],
},
{
kind: 'property',
key: { kind: 'id', name: 'onEvent' },
value: {
parameters: [
{ kind: 'param', value: { kind: 'string' }, type: null },
{
kind: 'param',
value: {
kind: 'generic',
value: { kind: 'id', name: 'Object' },
},
type: null,
},
],
returnType: { kind: 'any' },
kind: 'function',
},
optional: false,
leadingComments: [
{
type: 'commentBlock',
value:
' Function called when an event has been triggered within this\nlistener.',
raw:
'* Function called when an event has been triggered within this\n listener. ',
},
],
},
{
kind: 'property',
key: { kind: 'id', name: 'match' },
value: {
kind: 'union',
types: [
{ kind: 'string' },
{
parameters: [
{
kind: 'param',
value: { kind: 'string' },
type: null,
},
],
returnType: { kind: 'boolean' },
kind: 'function',
},
{ kind: 'generic', value: { kind: 'id', name: 'RegExp' } },
],
},
optional: true,
leadingComments: [
{
type: 'commentBlock',
value:
"String, regex, or function filter to limit what events call\n`onEvent` based on event name. String filters use exact matching\nunless they end with a '.', in which case a partial match on the beginning\nof the event name will be used.",
raw:
"* String, regex, or function filter to limit what events call\n `onEvent` based on event name. String filters use exact matching\n unless they end with a '.', in which case a partial match on the beginning\n of the event name will be used. ",
},
],
default: { kind: 'string', value: '*' },
},
{
kind: 'property',
key: { kind: 'id', name: 'matchPrivate' },
value: { kind: 'boolean' },
optional: true,
leadingComments: [
{
type: 'commentBlock',
value:
'Sets wether to call `onEvent` for private or public events.',
raw:
'* Sets wether to call `onEvent` for private or public events. ',
},
],
default: { kind: 'boolean', value: false },
},
],
leadingComments: [
{
type: 'commentBlock',
value:
'The Listener component is responsible for calling its `onEvent` handler when a\nchild component fires an analytics event, and passing the event up the hierarchy',
raw:
'\nThe Listener component is responsible for calling its `onEvent` handler when a\nchild component fires an analytics event, and passing the event up the hierarchy\n',
},
],
referenceIdName: 'Props',
},
name: { kind: 'id', name: 'AnalyticsListener', type: null },
},
}}
/>
)}
`;
{
"name": "@atlaskit/analytics",
"version": "6.1.1",
"version": "7.0.0",
"description": "The Atlaskit Component Analytics Framework",
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"license": "Apache-2.0",

@@ -21,4 +24,6 @@ "module": "dist/esm/index.js",

"team": "core",
"internal": true
"internal": true,
"deprecated": "Please use the @atlaskit/analytics-next package instead."
},
"team": "Design System Team",
"repository": "https://bitbucket.org/atlassian/atlaskit-mk-2",

@@ -34,6 +39,6 @@ "dependencies": {

"@atlaskit/build-utils": "^2.2.5",
"@atlaskit/docs": "^8.1.8",
"@atlaskit/section-message": "^4.1.1",
"@atlaskit/docs": "^8.3.1",
"@atlaskit/section-message": "^4.1.4",
"@atlaskit/ssr": "^0.1.1",
"enzyme": "^3.7.0",
"enzyme": "^3.10.0",
"react-dom": "^16.8.0",

@@ -44,2 +49,2 @@ "react-redux": "^5.0.0",

}
}
}
# Analytics
__Note__: This package may be soon deprecated in favor of ```@atlaskit/analytics-next```.
**Note**: This package may be soon deprecated in favor of `@atlaskit/analytics-next`.

@@ -5,0 +5,0 @@ Fire analytics events from React Components and then decorate and listen for them.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc