@atlaskit/analytics-next 9.1.1 → 9.1.2

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.
Files changed (33) hide show
  1. package/AnalyticsContext/package.json +2 -2
  2. package/AnalyticsErrorBoundary/package.json +2 -2
  3. package/AnalyticsEvent/package.json +2 -2
  4. package/AnalyticsListener/package.json +2 -2
  5. package/CHANGELOG.md +6 -0
  6. package/UIAnalyticsEvent/package.json +2 -2
  7. package/createAndFireEvents/package.json +2 -2
  8. package/dist/cjs/version.json +1 -1
  9. package/dist/es2019/version.json +1 -1
  10. package/dist/esm/version.json +1 -1
  11. package/dist/types/components/AnalyticsContext/types.d.ts +1 -1
  12. package/dist/types/components/AnalyticsErrorBoundary.d.ts +2 -2
  13. package/dist/types/components/AnalyticsListener/LegacyAnalyticsListener.d.ts +1 -1
  14. package/dist/types/components/AnalyticsListener/types.d.ts +1 -1
  15. package/dist/types/events/AnalyticsEvent.d.ts +4 -4
  16. package/dist/types/events/UIAnalyticsEvent.d.ts +5 -5
  17. package/dist/types/hooks/useAnalyticsEvents.d.ts +1 -1
  18. package/dist/types/hooks/useCallbackWithAnalytics.d.ts +1 -1
  19. package/dist/types/hooks/usePatchedProps.d.ts +1 -1
  20. package/dist/types/hooks/usePlatformLeafEventHandler.d.ts +2 -2
  21. package/dist/types/hooks/usePlatformLeafSyntheticEventHandler.d.ts +2 -2
  22. package/dist/types/types.d.ts +4 -4
  23. package/dist/types/utils/createAndFireEvent.d.ts +1 -1
  24. package/package.json +10 -2
  25. package/report.api.md +2 -2
  26. package/tmp/api-report-tmp.d.ts +2 -2
  27. package/types/package.json +2 -2
  28. package/useAnalyticsEvents/package.json +2 -2
  29. package/useCallbackWithAnalytics/package.json +2 -2
  30. package/usePatchedProps/package.json +2 -2
  31. package/usePlatformLeafEventHandler/package.json +2 -2
  32. package/withAnalyticsContext/package.json +2 -2
  33. package/withAnalyticsEvents/package.json +2 -2
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/components/AnalyticsContext/index.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/components/AnalyticsContext/index.d.ts"
11
+ "../dist/types-ts4.5/components/AnalyticsContext/index.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/components/AnalyticsErrorBoundary.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/components/AnalyticsErrorBoundary.d.ts"
11
+ "../dist/types-ts4.5/components/AnalyticsErrorBoundary.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/events/AnalyticsEvent.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/events/AnalyticsEvent.d.ts"
11
+ "../dist/types-ts4.5/events/AnalyticsEvent.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/components/AnalyticsListener/index.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/components/AnalyticsListener/index.d.ts"
11
+ "../dist/types-ts4.5/components/AnalyticsListener/index.d.ts"
12
12
  ]
13
13
  }
14
14
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/analytics-next
2
2
 
3
+ ## 9.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
8
+
3
9
  ## 9.1.1
4
10
 
5
11
  ### Patch Changes
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/events/UIAnalyticsEvent.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/events/UIAnalyticsEvent.d.ts"
11
+ "../dist/types-ts4.5/events/UIAnalyticsEvent.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/utils/createAndFireEvent.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/utils/createAndFireEvent.d.ts"
11
+ "../dist/types-ts4.5/utils/createAndFireEvent.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/analytics-next",
3
- "version": "9.1.1",
3
+ "version": "9.1.2",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/analytics-next",
3
- "version": "9.1.1",
3
+ "version": "9.1.2",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/analytics-next",
3
- "version": "9.1.1",
3
+ "version": "9.1.2",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
3
- export declare type AnalyticsContextFunction = (props: {
3
+ export type AnalyticsContextFunction = (props: {
4
4
  /** Children! */
5
5
  children: React.ReactNode;
6
6
  /** Arbitrary data. Any events created below this component in the tree will
@@ -1,5 +1,5 @@
1
1
  import React, { Component, ReactNode } from 'react';
2
- declare type AnalyticsErrorBoundaryErrorInfo = {
2
+ type AnalyticsErrorBoundaryErrorInfo = {
3
3
  componentStack: string;
4
4
  };
5
5
  export interface AnalyticsErrorBoundaryProps {
@@ -10,7 +10,7 @@ export interface AnalyticsErrorBoundaryProps {
10
10
  ErrorComponent?: React.ComponentType;
11
11
  onError?: (error: Error, info?: AnalyticsErrorBoundaryErrorInfo) => void;
12
12
  }
13
- declare type AnalyticsErrorBoundaryState = {
13
+ type AnalyticsErrorBoundaryState = {
14
14
  hasError: boolean;
15
15
  };
16
16
  /**
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
4
4
  import UIAnalyticsEvent from '../../events/UIAnalyticsEvent';
5
- declare type Props = {
5
+ type Props = {
6
6
  /** Children! */
7
7
  children?: React.ReactNode;
8
8
  /** The channel to listen for events on. */
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
3
3
  import UIAnalyticsEvent from '../../events/UIAnalyticsEvent';
4
- export declare type AnalyticsListenerFunction = (props: {
4
+ export type AnalyticsListenerFunction = (props: {
5
5
  /** Children! */
6
6
  children?: React.ReactNode;
7
7
  /** The channel to listen for events on. */
@@ -1,7 +1,7 @@
1
- export declare type AnalyticsEventPayload = Record<string, any>;
2
- declare type AnalyticsEventCallback = (payload: AnalyticsEventPayload) => AnalyticsEventPayload;
3
- declare type AnalyticsEventUpdater = AnalyticsEventPayload | AnalyticsEventCallback;
4
- export declare type AnalyticsEventProps = {
1
+ export type AnalyticsEventPayload = Record<string, any>;
2
+ type AnalyticsEventCallback = (payload: AnalyticsEventPayload) => AnalyticsEventPayload;
3
+ type AnalyticsEventUpdater = AnalyticsEventPayload | AnalyticsEventCallback;
4
+ export type AnalyticsEventProps = {
5
5
  payload: AnalyticsEventPayload;
6
6
  };
7
7
  export declare const isAnalyticsEvent: (obj: any) => boolean;
@@ -1,8 +1,8 @@
1
1
  import AnalyticsEvent, { AnalyticsEventPayload, AnalyticsEventProps } from './AnalyticsEvent';
2
- declare type ChannelIdentifier = string;
3
- declare type Context = Record<string, any>[];
4
- export declare type UIAnalyticsEventHandler = (event: UIAnalyticsEvent, channel?: ChannelIdentifier) => void;
5
- export declare type UIAnalyticsEventProps = AnalyticsEventProps & {
2
+ type ChannelIdentifier = string;
3
+ type Context = Record<string, any>[];
4
+ export type UIAnalyticsEventHandler = (event: UIAnalyticsEvent, channel?: ChannelIdentifier) => void;
5
+ export type UIAnalyticsEventProps = AnalyticsEventProps & {
6
6
  context?: Context;
7
7
  handlers?: UIAnalyticsEventHandler[];
8
8
  };
@@ -14,7 +14,7 @@ export default class UIAnalyticsEvent extends AnalyticsEvent {
14
14
  _isUIAnalyticsEvent: boolean;
15
15
  constructor(props: UIAnalyticsEventProps);
16
16
  clone: () => UIAnalyticsEvent | null;
17
- fire: (channel?: string | undefined) => void;
17
+ fire: (channel?: string) => void;
18
18
  update(updater: Record<string, any> | ((payload: AnalyticsEventPayload) => AnalyticsEventPayload)): this;
19
19
  }
20
20
  export {};
@@ -1,5 +1,5 @@
1
1
  import { CreateUIAnalyticsEvent } from '../types';
2
- export declare type UseAnalyticsEventsHook = {
2
+ export type UseAnalyticsEventsHook = {
3
3
  createAnalyticsEvent: CreateUIAnalyticsEvent;
4
4
  };
5
5
  export declare function useAnalyticsEvents(): UseAnalyticsEventsHook;
@@ -1,2 +1,2 @@
1
- export declare type UseCallbackWithAnalyticsHook = (method: (...args: any[]) => void, payload: Record<string, any> | ((...args: any[]) => void), channel?: string) => (...args: any[]) => void;
1
+ export type UseCallbackWithAnalyticsHook = (method: (...args: any[]) => void, payload: Record<string, any> | ((...args: any[]) => void), channel?: string) => (...args: any[]) => void;
2
2
  export declare const useCallbackWithAnalytics: UseCallbackWithAnalyticsHook;
@@ -1,5 +1,5 @@
1
1
  import { CreateEventMap } from '../types';
2
- export declare type PatchedPropsHook = {
2
+ export type PatchedPropsHook = {
3
3
  patchedEventProps: CreateEventMap;
4
4
  };
5
5
  export declare function usePatchedProps<Props extends Record<string, any>>(createEventMap: CreateEventMap | undefined, wrappedComponentProps: Props): PatchedPropsHook;
@@ -1,5 +1,5 @@
1
1
  import UIAnalyticsEvent from '../events/UIAnalyticsEvent';
2
- export declare type UsePlatformLeafEventHandlerHookArgs<T> = {
2
+ export type UsePlatformLeafEventHandlerHookArgs<T> = {
3
3
  fn: (value: T, analyticsEvent: UIAnalyticsEvent) => void;
4
4
  action: string;
5
5
  componentName: string;
@@ -8,5 +8,5 @@ export declare type UsePlatformLeafEventHandlerHookArgs<T> = {
8
8
  packageVersion: string;
9
9
  analyticsData?: Record<string, any>;
10
10
  };
11
- export declare type UsePlatformLeafEventHandlerHook<T> = (value: T) => void;
11
+ export type UsePlatformLeafEventHandlerHook<T> = (value: T) => void;
12
12
  export declare function usePlatformLeafEventHandler<T>({ fn, action, componentName, actionSubject, packageName, packageVersion, analyticsData, }: UsePlatformLeafEventHandlerHookArgs<T>): (value: T) => void;
@@ -1,5 +1,5 @@
1
1
  import UIAnalyticsEvent from '../events/UIAnalyticsEvent';
2
- export declare type UsePlatformLeafSyntheticEventHandlerHookArgs = {
2
+ export type UsePlatformLeafSyntheticEventHandlerHookArgs = {
3
3
  fn: (analyticsEvent: UIAnalyticsEvent) => void;
4
4
  action: string;
5
5
  componentName: string;
@@ -7,5 +7,5 @@ export declare type UsePlatformLeafSyntheticEventHandlerHookArgs = {
7
7
  packageVersion: string;
8
8
  analyticsData?: Record<string, any>;
9
9
  };
10
- export declare type UsePlatformLeafSyntheticEventHandlerHook = () => void;
10
+ export type UsePlatformLeafSyntheticEventHandlerHook = () => void;
11
11
  export declare function usePlatformLeafSyntheticEventHandler({ fn, action, componentName, packageName, packageVersion, analyticsData, }: UsePlatformLeafSyntheticEventHandlerHookArgs): () => void;
@@ -1,6 +1,6 @@
1
1
  import { AnalyticsEventPayload } from './events/AnalyticsEvent';
2
2
  import UIAnalyticsEvent from './events/UIAnalyticsEvent';
3
- export declare type CreateUIAnalyticsEvent = (payload: AnalyticsEventPayload) => UIAnalyticsEvent;
4
- export declare type AnalyticsEventCreator = (create: CreateUIAnalyticsEvent, props: Record<string, any>) => UIAnalyticsEvent | undefined;
5
- export declare type CreateEventMapValue = AnalyticsEventPayload | AnalyticsEventCreator;
6
- export declare type CreateEventMap = Record<string, CreateEventMapValue>;
3
+ export type CreateUIAnalyticsEvent = (payload: AnalyticsEventPayload) => UIAnalyticsEvent;
4
+ export type AnalyticsEventCreator = (create: CreateUIAnalyticsEvent, props: Record<string, any>) => UIAnalyticsEvent | undefined;
5
+ export type CreateEventMapValue = AnalyticsEventPayload | AnalyticsEventCreator;
6
+ export type CreateEventMap = Record<string, CreateEventMapValue>;
@@ -1,4 +1,4 @@
1
1
  import { AnalyticsEventPayload } from '../events/AnalyticsEvent';
2
2
  import { CreateUIAnalyticsEvent } from '../types';
3
- declare const _default: (channel?: string | undefined) => (payload: AnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => import("..").UIAnalyticsEvent;
3
+ declare const _default: (channel?: string) => (payload: AnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => import("..").UIAnalyticsEvent;
4
4
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/analytics-next",
3
- "version": "9.1.1",
3
+ "version": "9.1.2",
4
4
  "description": "React components, HOCs and hooks to assist with tracking user activity with React components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,6 +12,14 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
+ "typesVersions": {
16
+ ">=4.5 <4.9": {
17
+ "*": [
18
+ "dist/types-ts4.5/*",
19
+ "dist/types-ts4.5/index.d.ts"
20
+ ]
21
+ }
22
+ },
15
23
  "sideEffects": false,
16
24
  "atlaskit:src": "src/index.ts",
17
25
  "atlassian": {
@@ -62,7 +70,7 @@
62
70
  "react-dom": "^16.8.0",
63
71
  "redux": "^3.7.2",
64
72
  "storybook-addon-performance": "^0.16.0",
65
- "typescript": "4.5.5"
73
+ "typescript": "~4.9.5"
66
74
  },
67
75
  "techstack": {
68
76
  "@atlassian/frontend": {
package/report.api.md CHANGED
@@ -135,7 +135,7 @@ type Context = Record<string, any>[];
135
135
 
136
136
  // @public (undocumented)
137
137
  export const createAndFireEvent: (
138
- channel?: string | undefined,
138
+ channel?: string,
139
139
  ) => (
140
140
  payload: AnalyticsEventPayload,
141
141
  ) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => UIAnalyticsEvent;
@@ -165,7 +165,7 @@ export class UIAnalyticsEvent extends AnalyticsEvent {
165
165
  // (undocumented)
166
166
  context: Context;
167
167
  // (undocumented)
168
- fire: (channel?: string | undefined) => void;
168
+ fire: (channel?: string) => void;
169
169
  // (undocumented)
170
170
  handlers: UIAnalyticsEventHandler[];
171
171
  // (undocumented)
@@ -109,7 +109,7 @@ export function cleanProps(props: Record<string, any>): {
109
109
  type Context = Record<string, any>[];
110
110
 
111
111
  // @public (undocumented)
112
- export const createAndFireEvent: (channel?: string | undefined) => (payload: AnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => UIAnalyticsEvent;
112
+ export const createAndFireEvent: (channel?: string) => (payload: AnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => UIAnalyticsEvent;
113
113
 
114
114
  // @public (undocumented)
115
115
  type CreateEventMap = Record<string, CreateEventMapValue>;
@@ -134,7 +134,7 @@ export class UIAnalyticsEvent extends AnalyticsEvent {
134
134
  // (undocumented)
135
135
  context: Context;
136
136
  // (undocumented)
137
- fire: (channel?: string | undefined) => void;
137
+ fire: (channel?: string) => void;
138
138
  // (undocumented)
139
139
  handlers: UIAnalyticsEventHandler[];
140
140
  // (undocumented)
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/types.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/types.d.ts"
11
+ "../dist/types-ts4.5/types.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/hooks/useAnalyticsEvents.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/hooks/useAnalyticsEvents.d.ts"
11
+ "../dist/types-ts4.5/hooks/useAnalyticsEvents.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/hooks/useCallbackWithAnalytics.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/hooks/useCallbackWithAnalytics.d.ts"
11
+ "../dist/types-ts4.5/hooks/useCallbackWithAnalytics.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/hooks/usePatchedProps.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/hooks/usePatchedProps.d.ts"
11
+ "../dist/types-ts4.5/hooks/usePatchedProps.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/hooks/usePlatformLeafEventHandler.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/hooks/usePlatformLeafEventHandler.d.ts"
11
+ "../dist/types-ts4.5/hooks/usePlatformLeafEventHandler.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/hocs/withAnalyticsContext.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/hocs/withAnalyticsContext.d.ts"
11
+ "../dist/types-ts4.5/hocs/withAnalyticsContext.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/hocs/withAnalyticsEvents.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/hocs/withAnalyticsEvents.d.ts"
11
+ "../dist/types-ts4.5/hocs/withAnalyticsEvents.d.ts"
12
12
  ]
13
13
  }
14
14
  }