@atlaskit/analytics-next
Advanced tools
Comparing version 5.1.0 to 5.1.1
@@ -5,3 +5,3 @@ [ | ||
"package": "@atlaskit/analytics-next", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"dependent": true, | ||
@@ -11,4 +11,4 @@ "id": "src.main", | ||
"stats": { | ||
"size": 7424, | ||
"gzipSize": 2357 | ||
"size": 7468, | ||
"gzipSize": 2361 | ||
} | ||
@@ -19,3 +19,3 @@ }, | ||
"package": "@atlaskit/analytics-next", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"dependent": true, | ||
@@ -32,3 +32,3 @@ "id": "node_modules.main", | ||
"package": "@atlaskit/analytics-next", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"dependent": true, | ||
@@ -38,6 +38,6 @@ "id": "combined.main", | ||
"stats": { | ||
"size": 10624, | ||
"gzipSize": 3077 | ||
"size": 10668, | ||
"gzipSize": 3080 | ||
} | ||
} | ||
] |
# @atlaskit/analytics-next | ||
## 5.1.1 | ||
### Patch Changes | ||
- [patch][6ea9bb7873](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6ea9bb7873): | ||
analytics-next now exports an ambient module declaration which resolves an issue with types being required via relative imports | ||
## 5.1.0 | ||
@@ -4,0 +12,0 @@ |
290
index.d.ts
@@ -1,187 +0,191 @@ | ||
// For version "3.0.0" | ||
import * as React from 'react'; | ||
import { SumPropsInjector } from '@atlaskit/type-helpers'; | ||
declare module '@atlaskit/analytics-next' { | ||
import * as React from 'react'; | ||
import { SumPropsInjector } from '@atlaskit/type-helpers'; | ||
/* | ||
UIAnalyticsEvent.js | ||
*/ | ||
export class UIAnalyticsEvent implements UIAnalyticsEventInterface { | ||
constructor(payload: UIAnalyticsEventProps); | ||
/* | ||
UIAnalyticsEvent.js | ||
*/ | ||
export class UIAnalyticsEvent implements UIAnalyticsEventInterface { | ||
constructor(payload: UIAnalyticsEventProps); | ||
context: Array<ObjectType>; | ||
handlers?: Array<UIAnalyticsEventHandlerSignature>; | ||
hasFired: boolean; | ||
payload: AnalyticsEventPayload; | ||
context: Array<ObjectType>; | ||
handlers?: Array<UIAnalyticsEventHandlerSignature>; | ||
hasFired: boolean; | ||
payload: AnalyticsEventPayload; | ||
clone: () => UIAnalyticsEventInterface | null; | ||
clone: () => UIAnalyticsEventInterface | null; | ||
fire(channel?: ChannelIdentifier): void; | ||
fire(channel?: ChannelIdentifier): void; | ||
update(updater: AnalyticsEventUpdater): UIAnalyticsEventInterface; | ||
} | ||
update(updater: AnalyticsEventUpdater): UIAnalyticsEventInterface; | ||
} | ||
// See remark on classes above | ||
// See remark on classes above | ||
/* | ||
types.js | ||
*/ | ||
/* | ||
types.js | ||
*/ | ||
// Utils | ||
// Utils | ||
// That replaces {} in flow types | ||
export type ObjectType = { [key: string]: any }; | ||
// That replaces {} in flow types | ||
export type ObjectType = { [key: string]: any }; | ||
// Basic events | ||
export type AnalyticsEventPayload = { | ||
[key: string]: any; | ||
}; | ||
// Basic events | ||
export type AnalyticsEventPayload = { | ||
[key: string]: any; | ||
}; | ||
export type AnalyticsEventUpdater = | ||
| ObjectType | ||
| ((payload: AnalyticsEventPayload) => AnalyticsEventPayload); | ||
export type AnalyticsEventUpdater = | ||
| ObjectType | ||
| ((payload: AnalyticsEventPayload) => AnalyticsEventPayload); | ||
export type AnalyticsEventProps = { | ||
payload: AnalyticsEventPayload; | ||
}; | ||
export type AnalyticsEventProps = { | ||
payload: AnalyticsEventPayload; | ||
}; | ||
export interface AnalyticsEventInterface { | ||
payload: AnalyticsEventPayload; | ||
export interface AnalyticsEventInterface { | ||
payload: AnalyticsEventPayload; | ||
clone: () => AnalyticsEventInterface; | ||
clone: () => AnalyticsEventInterface; | ||
update(updater: AnalyticsEventUpdater): AnalyticsEventInterface; | ||
} | ||
update(updater: AnalyticsEventUpdater): AnalyticsEventInterface; | ||
} | ||
export type ChannelIdentifier = string; | ||
export type ChannelIdentifier = string; | ||
// It's called UIAnalyticsEventHandler in flow | ||
export interface UIAnalyticsEventHandlerSignature { | ||
(event: UIAnalyticsEventInterface, channel?: ChannelIdentifier): void; | ||
} | ||
// It's called UIAnalyticsEventHandler in flow | ||
export interface UIAnalyticsEventHandlerSignature { | ||
(event: UIAnalyticsEventInterface, channel?: ChannelIdentifier): void; | ||
} | ||
export type UIAnalyticsEventProps = AnalyticsEventProps & { | ||
context?: Array<ObjectType>; | ||
handlers?: Array<UIAnalyticsEventHandlerSignature>; | ||
}; | ||
export type UIAnalyticsEventProps = AnalyticsEventProps & { | ||
context?: Array<ObjectType>; | ||
handlers?: Array<UIAnalyticsEventHandlerSignature>; | ||
}; | ||
// Called UIAnalyticsEvent in flow | ||
export interface UIAnalyticsEventInterface { | ||
context: Array<ObjectType>; | ||
handlers?: Array<UIAnalyticsEventHandlerSignature>; | ||
hasFired: boolean; | ||
payload: AnalyticsEventPayload; | ||
// Called UIAnalyticsEvent in flow | ||
export interface UIAnalyticsEventInterface { | ||
context: Array<ObjectType>; | ||
handlers?: Array<UIAnalyticsEventHandlerSignature>; | ||
hasFired: boolean; | ||
payload: AnalyticsEventPayload; | ||
clone: () => UIAnalyticsEventInterface | null; | ||
clone: () => UIAnalyticsEventInterface | null; | ||
fire(channel?: ChannelIdentifier): void; | ||
fire(channel?: ChannelIdentifier): void; | ||
update(updater: AnalyticsEventUpdater): UIAnalyticsEventInterface; | ||
} | ||
update(updater: AnalyticsEventUpdater): UIAnalyticsEventInterface; | ||
} | ||
/* | ||
AnalyticsEvent.js | ||
*/ | ||
declare class AnalyticsEvent implements AnalyticsEventInterface { | ||
payload: AnalyticsEventPayload; | ||
/* | ||
AnalyticsEvent.js | ||
*/ | ||
declare class AnalyticsEvent implements AnalyticsEventInterface { | ||
payload: AnalyticsEventPayload; | ||
clone: () => AnalyticsEventInterface; | ||
clone: () => AnalyticsEventInterface; | ||
update(updater: AnalyticsEventUpdater): AnalyticsEventInterface; | ||
} | ||
update(updater: AnalyticsEventUpdater): AnalyticsEventInterface; | ||
} | ||
/* | ||
AnalyticsListener.js | ||
*/ | ||
export interface AnalyticsListenerProps { | ||
children?: React.ReactNode; | ||
channel?: string; | ||
onEvent: (event: UIAnalyticsEventInterface, channel?: string) => void; | ||
} | ||
/* | ||
AnalyticsListener.js | ||
*/ | ||
export interface AnalyticsListenerProps { | ||
children?: React.ReactNode; | ||
channel?: string; | ||
onEvent: (event: UIAnalyticsEventInterface, channel?: string) => void; | ||
} | ||
export class AnalyticsListener extends React.Component< | ||
AnalyticsListenerProps | ||
> {} | ||
export class AnalyticsListener extends React.Component< | ||
AnalyticsListenerProps | ||
> {} | ||
/* | ||
AnalyticsContext.js | ||
*/ | ||
export interface AnalyticsContextProps { | ||
children: React.ReactNode; | ||
data: ObjectType; | ||
} | ||
/* | ||
AnalyticsContext.js | ||
*/ | ||
export interface AnalyticsContextProps { | ||
children: React.ReactNode; | ||
data: ObjectType; | ||
} | ||
export class AnalyticsContext extends React.Component<AnalyticsContextProps> {} | ||
export class AnalyticsContext extends React.Component< | ||
AnalyticsContextProps | ||
> {} | ||
type AnalyticsHOC<Props, AppliedProps> = ( | ||
Component: React.ComponentType<Props>, | ||
) => React.ComponentType<Props & AppliedProps>; | ||
type AnalyticsHOC<Props, AppliedProps> = ( | ||
Component: React.ComponentType<Props>, | ||
) => React.ComponentType<Props & AppliedProps>; | ||
/* | ||
withAnalyticsContext.js | ||
*/ | ||
export type WithAnalyticsContextProps = { | ||
analyticsContext?: ObjectType; | ||
}; | ||
/* | ||
withAnalyticsContext.js | ||
*/ | ||
export type WithAnalyticsContextProps = { | ||
analyticsContext?: ObjectType; | ||
}; | ||
export type WithAnalyticsContextFunction< | ||
OwnProps extends object | ||
> = AnalyticsHOC<OwnProps, WithAnalyticsContextProps>; | ||
export type WithAnalyticsContextFunction<OwnProps> = AnalyticsHOC< | ||
OwnProps, | ||
WithAnalyticsContextProps | ||
>; | ||
export function withAnalyticsContext<OwnProps>( | ||
defaultData?: any, | ||
): WithAnalyticsContextFunction<OwnProps>; | ||
export function withAnalyticsContext<OwnProps>( | ||
defaultData?: any, | ||
): WithAnalyticsContextFunction<OwnProps>; | ||
/* | ||
withAnalyticsEvents.js | ||
*/ | ||
export type CreateUIAnalyticsEventSignature = ( | ||
payload: AnalyticsEventPayload, | ||
) => UIAnalyticsEventInterface; | ||
/* | ||
withAnalyticsEvents.js | ||
*/ | ||
export type CreateUIAnalyticsEventSignature = ( | ||
payload: AnalyticsEventPayload, | ||
) => UIAnalyticsEventInterface; | ||
interface AnalyticsEventCreator<OwnProps> { | ||
( | ||
create: CreateUIAnalyticsEventSignature, | ||
props: OwnProps, | ||
): UIAnalyticsEventInterface; | ||
} | ||
interface AnalyticsEventCreator<OwnProps> { | ||
( | ||
create: CreateUIAnalyticsEventSignature, | ||
props: OwnProps, | ||
): UIAnalyticsEventInterface; | ||
} | ||
export interface EventMap<OwnProps> { | ||
[k: string]: AnalyticsEventPayload | AnalyticsEventCreator<OwnProps>; | ||
} | ||
export interface EventMap<OwnProps> { | ||
[k: string]: AnalyticsEventPayload | AnalyticsEventCreator<OwnProps>; | ||
} | ||
export interface WithAnalyticsEventProps { | ||
createAnalyticsEvent?: CreateUIAnalyticsEventSignature; | ||
} | ||
export interface WithAnalyticsEventProps { | ||
createAnalyticsEvent?: CreateUIAnalyticsEventSignature; | ||
} | ||
export type WithAnalyticsEventFunction<OwnProps extends object> = AnalyticsHOC< | ||
OwnProps, | ||
WithAnalyticsEventProps | ||
>; | ||
export type WithAnalyticsEventFunction<OwnProps> = AnalyticsHOC< | ||
OwnProps, | ||
WithAnalyticsEventProps | ||
>; | ||
export function withAnalyticsEvents<OwnProps>( | ||
createEventMap?: EventMap<OwnProps>, | ||
): WithAnalyticsEventFunction<OwnProps>; | ||
export function withAnalyticsEvents<OwnProps>( | ||
createEventMap?: EventMap<OwnProps>, | ||
): WithAnalyticsEventFunction<OwnProps>; | ||
// Just in case your props are of Sum type, and not a Record. | ||
export function withAnalyticsForSumTypeProps<OwnProps>( | ||
createEventMap?: EventMap<OwnProps>, | ||
): SumPropsInjector<WithAnalyticsEventProps>; | ||
// Just in case your props are of Sum type, and not a Record. | ||
export function withAnalyticsForSumTypeProps<OwnProps>( | ||
createEventMap?: EventMap<OwnProps>, | ||
): SumPropsInjector<WithAnalyticsEventProps>; | ||
/* | ||
createAndFireEvent.js | ||
*/ | ||
/* | ||
createAndFireEvent.js | ||
*/ | ||
export type CreateAndFireEventFunction = ( | ||
payload: AnalyticsEventPayload, | ||
) => ( | ||
createAnalyticsEvent: CreateUIAnalyticsEventSignature, | ||
) => UIAnalyticsEventInterface; | ||
export type CreateAndFireEventFunction = ( | ||
payload: AnalyticsEventPayload, | ||
) => ( | ||
createAnalyticsEvent: CreateUIAnalyticsEventSignature, | ||
) => UIAnalyticsEventInterface; | ||
export function createAndFireEvent( | ||
channel?: string, | ||
): CreateAndFireEventFunction; | ||
export function createAndFireEvent( | ||
channel?: string, | ||
): CreateAndFireEventFunction; | ||
/* | ||
cleanProps.js | ||
*/ | ||
export function cleanProps(props: ObjectType): ObjectType; | ||
/* | ||
cleanProps.js | ||
*/ | ||
export function cleanProps(props: ObjectType): ObjectType; | ||
} |
{ | ||
"name": "@atlaskit/analytics-next", | ||
"version": "5.1.0", | ||
"version": "5.1.1", | ||
"description": "The 🆕 Atlaskit component analytics framework", | ||
"license": "Apache-2.0", | ||
"module": "index.js", | ||
"module": "dist/esm/index.js", | ||
"main": "dist/cjs/index.js", | ||
"atlaskit:src": "src/index.js", | ||
"types": "index.d.ts", | ||
"types": "dist/cjs/index.d.ts", | ||
"sideEffects": false, | ||
@@ -10,0 +11,0 @@ "author": "Atlassian Pty Ltd", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
183405
66
2664
1