@atlaskit/analytics-next 9.3.0 → 9.3.1

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 (49) hide show
  1. package/CHANGELOG.md +325 -133
  2. package/afm-jira/tsconfig.json +25 -0
  3. package/dist/types/components/AnalyticsContext/LegacyAnalyticsContext.d.ts +1 -1
  4. package/dist/types/components/AnalyticsContext/ModernAnalyticsContext.d.ts +1 -1
  5. package/dist/types/components/AnalyticsContext/index.d.ts +1 -1
  6. package/dist/types/components/AnalyticsContext/types.d.ts +1 -1
  7. package/dist/types/components/AnalyticsErrorBoundary.d.ts +2 -2
  8. package/dist/types/components/AnalyticsListener/LegacyAnalyticsListener.d.ts +2 -2
  9. package/dist/types/components/AnalyticsListener/ModernAnalyticsListener.d.ts +1 -1
  10. package/dist/types/components/AnalyticsListener/index.d.ts +1 -1
  11. package/dist/types/components/AnalyticsListener/types.d.ts +2 -2
  12. package/dist/types/events/UIAnalyticsEvent.d.ts +1 -1
  13. package/dist/types/hocs/withAnalyticsEvents.d.ts +1 -1
  14. package/dist/types/hooks/useAnalyticsContext.d.ts +1 -1
  15. package/dist/types/hooks/useAnalyticsEvents.d.ts +1 -1
  16. package/dist/types/hooks/usePatchedProps.d.ts +1 -1
  17. package/dist/types/hooks/usePlatformLeafEventHandler.d.ts +1 -1
  18. package/dist/types/hooks/usePlatformLeafSyntheticEventHandler.d.ts +1 -1
  19. package/dist/types/hooks/useTrackedRef.d.ts +1 -1
  20. package/dist/types/index.d.ts +4 -4
  21. package/dist/types/types.d.ts +2 -2
  22. package/dist/types/utils/createAndFireEvent.d.ts +2 -2
  23. package/dist/types-ts4.5/components/AnalyticsContext/LegacyAnalyticsContext.d.ts +1 -1
  24. package/dist/types-ts4.5/components/AnalyticsContext/ModernAnalyticsContext.d.ts +1 -1
  25. package/dist/types-ts4.5/components/AnalyticsContext/index.d.ts +1 -1
  26. package/dist/types-ts4.5/components/AnalyticsContext/types.d.ts +1 -1
  27. package/dist/types-ts4.5/components/AnalyticsErrorBoundary.d.ts +2 -2
  28. package/dist/types-ts4.5/components/AnalyticsListener/LegacyAnalyticsListener.d.ts +2 -2
  29. package/dist/types-ts4.5/components/AnalyticsListener/ModernAnalyticsListener.d.ts +1 -1
  30. package/dist/types-ts4.5/components/AnalyticsListener/index.d.ts +1 -1
  31. package/dist/types-ts4.5/components/AnalyticsListener/types.d.ts +2 -2
  32. package/dist/types-ts4.5/events/UIAnalyticsEvent.d.ts +1 -1
  33. package/dist/types-ts4.5/hocs/withAnalyticsEvents.d.ts +1 -1
  34. package/dist/types-ts4.5/hooks/useAnalyticsContext.d.ts +1 -1
  35. package/dist/types-ts4.5/hooks/useAnalyticsEvents.d.ts +1 -1
  36. package/dist/types-ts4.5/hooks/usePatchedProps.d.ts +1 -1
  37. package/dist/types-ts4.5/hooks/usePlatformLeafEventHandler.d.ts +1 -1
  38. package/dist/types-ts4.5/hooks/usePlatformLeafSyntheticEventHandler.d.ts +1 -1
  39. package/dist/types-ts4.5/hooks/useTrackedRef.d.ts +1 -1
  40. package/dist/types-ts4.5/index.d.ts +4 -4
  41. package/dist/types-ts4.5/types.d.ts +2 -2
  42. package/dist/types-ts4.5/utils/createAndFireEvent.d.ts +2 -2
  43. package/docs/0-intro.tsx +17 -17
  44. package/docs/20-usage-with-presentational-components.tsx +38 -39
  45. package/docs/40-listeners.tsx +5 -5
  46. package/docs/50-error-boundary.tsx +5 -5
  47. package/docs/70-advanced-usage.tsx +21 -21
  48. package/package.json +98 -100
  49. package/report.api.md +115 -125
@@ -0,0 +1,25 @@
1
+ {
2
+ "extends": "../../../../tsconfig.entry-points.jira.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "target": "es5",
6
+ "outDir": "../../../../../tsDist/@atlaskit__analytics-next/app",
7
+ "composite": true,
8
+ "rootDir": "../"
9
+ },
10
+ "include": [
11
+ "../src/**/*.ts",
12
+ "../src/**/*.tsx"
13
+ ],
14
+ "exclude": [
15
+ "../src/**/__tests__/*",
16
+ "../src/**/*.test.*",
17
+ "../src/**/test.*",
18
+ "../src/performance/examples.tsx"
19
+ ],
20
+ "references": [
21
+ {
22
+ "path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
23
+ }
24
+ ]
25
+ }
@@ -1,6 +1,6 @@
1
1
  import React, { Component } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
3
+ import { type AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
4
4
  interface Props {
5
5
  /** Children! */
6
6
  children: React.ReactNode;
@@ -1,3 +1,3 @@
1
- import { AnalyticsContextFunction } from './types';
1
+ import { type AnalyticsContextFunction } from './types';
2
2
  declare const AnalyticsContext: AnalyticsContextFunction;
3
3
  export default AnalyticsContext;
@@ -1,3 +1,3 @@
1
- import { AnalyticsContextFunction } from './types';
1
+ import { type AnalyticsContextFunction } from './types';
2
2
  declare const ExportedAnalyticsContext: AnalyticsContextFunction;
3
3
  export default ExportedAnalyticsContext;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
2
+ import { type AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
3
3
  export type AnalyticsContextFunction = (props: {
4
4
  /** Children! */
5
5
  children: React.ReactNode;
@@ -1,4 +1,4 @@
1
- import React, { Component, ReactNode } from 'react';
1
+ import React, { Component, type ReactNode } from 'react';
2
2
  type AnalyticsErrorBoundaryErrorInfo = {
3
3
  componentStack: string;
4
4
  };
@@ -18,7 +18,7 @@ type AnalyticsErrorBoundaryState = {
18
18
  */
19
19
  export default class AnalyticsErrorBoundary extends Component<AnalyticsErrorBoundaryProps, AnalyticsErrorBoundaryState> {
20
20
  constructor(props: AnalyticsErrorBoundaryProps);
21
- componentDidCatch(error: Error, info?: AnalyticsErrorBoundaryErrorInfo): void;
21
+ componentDidCatch(error: Error, info: AnalyticsErrorBoundaryErrorInfo): void;
22
22
  render(): JSX.Element | null;
23
23
  }
24
24
  export {};
@@ -1,7 +1,7 @@
1
1
  import React, { Component } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
4
- import UIAnalyticsEvent from '../../events/UIAnalyticsEvent';
3
+ import { type AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
4
+ import type { default as UIAnalyticsEvent } from '../../events/UIAnalyticsEvent';
5
5
  type Props = {
6
6
  /** Children! */
7
7
  children?: React.ReactNode;
@@ -1,3 +1,3 @@
1
- import { AnalyticsListenerFunction } from './types';
1
+ import { type AnalyticsListenerFunction } from './types';
2
2
  declare const AnalyticsListener: AnalyticsListenerFunction;
3
3
  export default AnalyticsListener;
@@ -1,3 +1,3 @@
1
- import { AnalyticsListenerFunction } from './types';
1
+ import { type AnalyticsListenerFunction } from './types';
2
2
  declare const ExportedAnalyticsListener: AnalyticsListenerFunction;
3
3
  export default ExportedAnalyticsListener;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
3
- import UIAnalyticsEvent from '../../events/UIAnalyticsEvent';
2
+ import { type AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
3
+ import type UIAnalyticsEvent from '../../events/UIAnalyticsEvent';
4
4
  export type AnalyticsListenerFunction = (props: {
5
5
  /** Children! */
6
6
  children?: React.ReactNode;
@@ -1,4 +1,4 @@
1
- import AnalyticsEvent, { AnalyticsEventPayload, AnalyticsEventProps } from './AnalyticsEvent';
1
+ import AnalyticsEvent, { type AnalyticsEventPayload, type AnalyticsEventProps } from './AnalyticsEvent';
2
2
  type ChannelIdentifier = string;
3
3
  type Context = Record<string, any>[];
4
4
  export type UIAnalyticsEventHandler = (event: UIAnalyticsEvent, channel?: ChannelIdentifier) => void;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CreateEventMap, CreateUIAnalyticsEvent } from '../types';
2
+ import { type CreateEventMap, type CreateUIAnalyticsEvent } from '../types';
3
3
  export interface WithAnalyticsEventsProps {
4
4
  /**
5
5
  * You should not be accessing this prop under any circumstances.
@@ -1,2 +1,2 @@
1
- import { AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
1
+ import { type AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
2
2
  export declare const useAnalyticsContext: () => AnalyticsReactContextInterface;
@@ -1,4 +1,4 @@
1
- import { CreateUIAnalyticsEvent } from '../types';
1
+ import { type CreateUIAnalyticsEvent } from '../types';
2
2
  export type UseAnalyticsEventsHook = {
3
3
  createAnalyticsEvent: CreateUIAnalyticsEvent;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { CreateEventMap } from '../types';
1
+ import { type CreateEventMap } from '../types';
2
2
  export type PatchedPropsHook = {
3
3
  patchedEventProps: CreateEventMap;
4
4
  };
@@ -1,4 +1,4 @@
1
- import UIAnalyticsEvent from '../events/UIAnalyticsEvent';
1
+ import type UIAnalyticsEvent from '../events/UIAnalyticsEvent';
2
2
  export type UsePlatformLeafEventHandlerHookArgs<T> = {
3
3
  fn: (value: T, analyticsEvent: UIAnalyticsEvent) => void;
4
4
  action: string;
@@ -1,4 +1,4 @@
1
- import UIAnalyticsEvent from '../events/UIAnalyticsEvent';
1
+ import type UIAnalyticsEvent from '../events/UIAnalyticsEvent';
2
2
  export type UsePlatformLeafSyntheticEventHandlerHookArgs = {
3
3
  fn: (analyticsEvent: UIAnalyticsEvent) => void;
4
4
  action: string;
@@ -1,2 +1,2 @@
1
- import { MutableRefObject } from 'react';
1
+ import { type MutableRefObject } from 'react';
2
2
  export declare const useTrackedRef: <T>(value: T) => MutableRefObject<T>;
@@ -1,8 +1,8 @@
1
1
  export type { CreateUIAnalyticsEvent } from './types';
2
- export { default as AnalyticsEvent, isAnalyticsEvent, } from './events/AnalyticsEvent';
3
- export type { AnalyticsEventPayload, AnalyticsEventProps, } from './events/AnalyticsEvent';
4
- export { default as UIAnalyticsEvent, isUIAnalyticsEvent, } from './events/UIAnalyticsEvent';
5
- export type { UIAnalyticsEventProps, UIAnalyticsEventHandler, } from './events/UIAnalyticsEvent';
2
+ export { default as AnalyticsEvent, isAnalyticsEvent } from './events/AnalyticsEvent';
3
+ export type { AnalyticsEventPayload, AnalyticsEventProps } from './events/AnalyticsEvent';
4
+ export { default as UIAnalyticsEvent, isUIAnalyticsEvent } from './events/UIAnalyticsEvent';
5
+ export type { UIAnalyticsEventProps, UIAnalyticsEventHandler } from './events/UIAnalyticsEvent';
6
6
  export { default as AnalyticsListener } from './components/AnalyticsListener/index';
7
7
  export { default as AnalyticsContext } from './components/AnalyticsContext/index';
8
8
  export { default as withAnalyticsContext } from './hocs/withAnalyticsContext';
@@ -1,5 +1,5 @@
1
- import { AnalyticsEventPayload } from './events/AnalyticsEvent';
2
- import UIAnalyticsEvent from './events/UIAnalyticsEvent';
1
+ import { type AnalyticsEventPayload } from './events/AnalyticsEvent';
2
+ import type UIAnalyticsEvent from './events/UIAnalyticsEvent';
3
3
  export type CreateUIAnalyticsEvent = (payload: AnalyticsEventPayload) => UIAnalyticsEvent;
4
4
  export type AnalyticsEventCreator = (create: CreateUIAnalyticsEvent, props: Record<string, any>) => UIAnalyticsEvent | undefined;
5
5
  export type CreateEventMapValue = AnalyticsEventPayload | AnalyticsEventCreator;
@@ -1,4 +1,4 @@
1
- import { AnalyticsEventPayload } from '../events/AnalyticsEvent';
2
- import { CreateUIAnalyticsEvent } from '../types';
1
+ import { type AnalyticsEventPayload } from '../events/AnalyticsEvent';
2
+ import { type CreateUIAnalyticsEvent } from '../types';
3
3
  declare const _default: (channel?: string) => (payload: AnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => import("..").UIAnalyticsEvent;
4
4
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import React, { Component } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
3
+ import { type AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
4
4
  interface Props {
5
5
  /** Children! */
6
6
  children: React.ReactNode;
@@ -1,3 +1,3 @@
1
- import { AnalyticsContextFunction } from './types';
1
+ import { type AnalyticsContextFunction } from './types';
2
2
  declare const AnalyticsContext: AnalyticsContextFunction;
3
3
  export default AnalyticsContext;
@@ -1,3 +1,3 @@
1
- import { AnalyticsContextFunction } from './types';
1
+ import { type AnalyticsContextFunction } from './types';
2
2
  declare const ExportedAnalyticsContext: AnalyticsContextFunction;
3
3
  export default ExportedAnalyticsContext;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
2
+ import { type AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
3
3
  export type AnalyticsContextFunction = (props: {
4
4
  /** Children! */
5
5
  children: React.ReactNode;
@@ -1,4 +1,4 @@
1
- import React, { Component, ReactNode } from 'react';
1
+ import React, { Component, type ReactNode } from 'react';
2
2
  type AnalyticsErrorBoundaryErrorInfo = {
3
3
  componentStack: string;
4
4
  };
@@ -18,7 +18,7 @@ type AnalyticsErrorBoundaryState = {
18
18
  */
19
19
  export default class AnalyticsErrorBoundary extends Component<AnalyticsErrorBoundaryProps, AnalyticsErrorBoundaryState> {
20
20
  constructor(props: AnalyticsErrorBoundaryProps);
21
- componentDidCatch(error: Error, info?: AnalyticsErrorBoundaryErrorInfo): void;
21
+ componentDidCatch(error: Error, info: AnalyticsErrorBoundaryErrorInfo): void;
22
22
  render(): JSX.Element | null;
23
23
  }
24
24
  export {};
@@ -1,7 +1,7 @@
1
1
  import React, { Component } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
4
- import UIAnalyticsEvent from '../../events/UIAnalyticsEvent';
3
+ import { type AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
4
+ import type { default as UIAnalyticsEvent } from '../../events/UIAnalyticsEvent';
5
5
  type Props = {
6
6
  /** Children! */
7
7
  children?: React.ReactNode;
@@ -1,3 +1,3 @@
1
- import { AnalyticsListenerFunction } from './types';
1
+ import { type AnalyticsListenerFunction } from './types';
2
2
  declare const AnalyticsListener: AnalyticsListenerFunction;
3
3
  export default AnalyticsListener;
@@ -1,3 +1,3 @@
1
- import { AnalyticsListenerFunction } from './types';
1
+ import { type AnalyticsListenerFunction } from './types';
2
2
  declare const ExportedAnalyticsListener: AnalyticsListenerFunction;
3
3
  export default ExportedAnalyticsListener;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
3
- import UIAnalyticsEvent from '../../events/UIAnalyticsEvent';
2
+ import { type AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
3
+ import type UIAnalyticsEvent from '../../events/UIAnalyticsEvent';
4
4
  export type AnalyticsListenerFunction = (props: {
5
5
  /** Children! */
6
6
  children?: React.ReactNode;
@@ -1,4 +1,4 @@
1
- import AnalyticsEvent, { AnalyticsEventPayload, AnalyticsEventProps } from './AnalyticsEvent';
1
+ import AnalyticsEvent, { type AnalyticsEventPayload, type AnalyticsEventProps } from './AnalyticsEvent';
2
2
  type ChannelIdentifier = string;
3
3
  type Context = Record<string, any>[];
4
4
  export type UIAnalyticsEventHandler = (event: UIAnalyticsEvent, channel?: ChannelIdentifier) => void;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CreateEventMap, CreateUIAnalyticsEvent } from '../types';
2
+ import { type CreateEventMap, type CreateUIAnalyticsEvent } from '../types';
3
3
  export interface WithAnalyticsEventsProps {
4
4
  /**
5
5
  * You should not be accessing this prop under any circumstances.
@@ -1,2 +1,2 @@
1
- import { AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
1
+ import { type AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
2
2
  export declare const useAnalyticsContext: () => AnalyticsReactContextInterface;
@@ -1,4 +1,4 @@
1
- import { CreateUIAnalyticsEvent } from '../types';
1
+ import { type CreateUIAnalyticsEvent } from '../types';
2
2
  export type UseAnalyticsEventsHook = {
3
3
  createAnalyticsEvent: CreateUIAnalyticsEvent;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { CreateEventMap } from '../types';
1
+ import { type CreateEventMap } from '../types';
2
2
  export type PatchedPropsHook = {
3
3
  patchedEventProps: CreateEventMap;
4
4
  };
@@ -1,4 +1,4 @@
1
- import UIAnalyticsEvent from '../events/UIAnalyticsEvent';
1
+ import type UIAnalyticsEvent from '../events/UIAnalyticsEvent';
2
2
  export type UsePlatformLeafEventHandlerHookArgs<T> = {
3
3
  fn: (value: T, analyticsEvent: UIAnalyticsEvent) => void;
4
4
  action: string;
@@ -1,4 +1,4 @@
1
- import UIAnalyticsEvent from '../events/UIAnalyticsEvent';
1
+ import type UIAnalyticsEvent from '../events/UIAnalyticsEvent';
2
2
  export type UsePlatformLeafSyntheticEventHandlerHookArgs = {
3
3
  fn: (analyticsEvent: UIAnalyticsEvent) => void;
4
4
  action: string;
@@ -1,2 +1,2 @@
1
- import { MutableRefObject } from 'react';
1
+ import { type MutableRefObject } from 'react';
2
2
  export declare const useTrackedRef: <T>(value: T) => MutableRefObject<T>;
@@ -1,8 +1,8 @@
1
1
  export type { CreateUIAnalyticsEvent } from './types';
2
- export { default as AnalyticsEvent, isAnalyticsEvent, } from './events/AnalyticsEvent';
3
- export type { AnalyticsEventPayload, AnalyticsEventProps, } from './events/AnalyticsEvent';
4
- export { default as UIAnalyticsEvent, isUIAnalyticsEvent, } from './events/UIAnalyticsEvent';
5
- export type { UIAnalyticsEventProps, UIAnalyticsEventHandler, } from './events/UIAnalyticsEvent';
2
+ export { default as AnalyticsEvent, isAnalyticsEvent } from './events/AnalyticsEvent';
3
+ export type { AnalyticsEventPayload, AnalyticsEventProps } from './events/AnalyticsEvent';
4
+ export { default as UIAnalyticsEvent, isUIAnalyticsEvent } from './events/UIAnalyticsEvent';
5
+ export type { UIAnalyticsEventProps, UIAnalyticsEventHandler } from './events/UIAnalyticsEvent';
6
6
  export { default as AnalyticsListener } from './components/AnalyticsListener/index';
7
7
  export { default as AnalyticsContext } from './components/AnalyticsContext/index';
8
8
  export { default as withAnalyticsContext } from './hocs/withAnalyticsContext';
@@ -1,5 +1,5 @@
1
- import { AnalyticsEventPayload } from './events/AnalyticsEvent';
2
- import UIAnalyticsEvent from './events/UIAnalyticsEvent';
1
+ import { type AnalyticsEventPayload } from './events/AnalyticsEvent';
2
+ import type UIAnalyticsEvent from './events/UIAnalyticsEvent';
3
3
  export type CreateUIAnalyticsEvent = (payload: AnalyticsEventPayload) => UIAnalyticsEvent;
4
4
  export type AnalyticsEventCreator = (create: CreateUIAnalyticsEvent, props: Record<string, any>) => UIAnalyticsEvent | undefined;
5
5
  export type CreateEventMapValue = AnalyticsEventPayload | AnalyticsEventCreator;
@@ -1,4 +1,4 @@
1
- import { AnalyticsEventPayload } from '../events/AnalyticsEvent';
2
- import { CreateUIAnalyticsEvent } from '../types';
1
+ import { type AnalyticsEventPayload } from '../events/AnalyticsEvent';
2
+ import { type CreateUIAnalyticsEvent } from '../types';
3
3
  declare const _default: (channel?: string) => (payload: AnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => import("..").UIAnalyticsEvent;
4
4
  export default _default;
package/docs/0-intro.tsx CHANGED
@@ -6,23 +6,23 @@ import SectionMessage from '@atlaskit/section-message';
6
6
  export default md`
7
7
 
8
8
  ${(
9
- <SectionMessage
10
- appearance="warning"
11
- title="Maintaince Mode: @atlaskit/analytics is in maintenance mode."
12
- >
13
- This package is officially in maintenance mode, which means only bugfixes or
14
- VULN fixes are currently being accepted and no known breaking changes will
15
- be approved in the PR process. <br />
16
- Please refer to this
17
- <a
18
- href="https://hello.atlassian.net/wiki/spaces/APD/pages/2470435075/DACI+analytics-next+in+a+maintenance+mode"
19
- target="_blank"
20
- >
21
- {' '}
22
- DACI{' '}
23
- </a>{' '}
24
- for more details.
25
- </SectionMessage>
9
+ <SectionMessage
10
+ appearance="warning"
11
+ title="Maintaince Mode: @atlaskit/analytics is in maintenance mode."
12
+ >
13
+ This package is officially in maintenance mode, which means only bugfixes or VULN fixes are
14
+ currently being accepted and no known breaking changes will be approved in the PR process.{' '}
15
+ <br />
16
+ Please refer to this
17
+ <a
18
+ href="https://hello.atlassian.net/wiki/spaces/APD/pages/2470435075/DACI+analytics-next+in+a+maintenance+mode"
19
+ target="_blank"
20
+ >
21
+ {' '}
22
+ DACI{' '}
23
+ </a>{' '}
24
+ for more details.
25
+ </SectionMessage>
26
26
  )}
27
27
 
28
28
  This package aims to help assist consumers track the way their React components are being used.
@@ -28,45 +28,44 @@ our suggested approach.
28
28
  ### Recommended Usage
29
29
 
30
30
  ${(
31
- <table>
32
- <tr>
33
- <th>Component Type</th>
34
- <th>Recommendation</th>
35
- </tr>
36
- <tr>
37
- <td>Class components</td>
38
- <td>
39
- You have only the <a href="#with-analytics-events">HOC option</a>{' '}
40
- available.
41
- </td>
42
- </tr>
43
- <tr>
44
- <td>Atlaskit function components</td>
45
- <td>
46
- Use{' '}
47
- <a href="#use-platform-leaf-event-handler">
48
- <code>usePlatformLeafEventHandler</code>
49
- </a>
50
- .
51
- </td>
52
- </tr>
53
- <tr>
54
- <td>Other function components</td>
55
- <td>
56
- Use{' '}
57
- <a href="#use-callback-with-analytics">
58
- <code>useCallbackWithAnalytics</code>
59
- </a>{' '}
60
- if you want something basic.
61
- <br />
62
- Use{' '}
63
- <a href="#use-analytics-events">
64
- <code>useAnalyticsEvents</code>
65
- </a>{' '}
66
- if you want more control.
67
- </td>
68
- </tr>
69
- </table>
31
+ <table>
32
+ <tr>
33
+ <th>Component Type</th>
34
+ <th>Recommendation</th>
35
+ </tr>
36
+ <tr>
37
+ <td>Class components</td>
38
+ <td>
39
+ You have only the <a href="#with-analytics-events">HOC option</a> available.
40
+ </td>
41
+ </tr>
42
+ <tr>
43
+ <td>Atlaskit function components</td>
44
+ <td>
45
+ Use{' '}
46
+ <a href="#use-platform-leaf-event-handler">
47
+ <code>usePlatformLeafEventHandler</code>
48
+ </a>
49
+ .
50
+ </td>
51
+ </tr>
52
+ <tr>
53
+ <td>Other function components</td>
54
+ <td>
55
+ Use{' '}
56
+ <a href="#use-callback-with-analytics">
57
+ <code>useCallbackWithAnalytics</code>
58
+ </a>{' '}
59
+ if you want something basic.
60
+ <br />
61
+ Use{' '}
62
+ <a href="#use-analytics-events">
63
+ <code>useAnalyticsEvents</code>
64
+ </a>{' '}
65
+ if you want more control.
66
+ </td>
67
+ </tr>
68
+ </table>
70
69
  )}
71
70
 
72
71
  ### Examples
@@ -8,9 +8,9 @@ export default md`
8
8
  An \`AnalyticsListener\` wraps your app and listens to any events which are fired within it.
9
9
 
10
10
  ${(
11
- <Props
12
- heading="AnalyticsListener Props"
13
- props={require('!!extract-react-types-loader!../src/components/AnalyticsListener/LegacyAnalyticsListener')}
14
- />
15
- )}
11
+ <Props
12
+ heading="AnalyticsListener Props"
13
+ props={require('!!extract-react-types-loader!../src/components/AnalyticsListener/LegacyAnalyticsListener')}
14
+ />
15
+ )}
16
16
  `;
@@ -46,9 +46,9 @@ class ButtonWithAnalyticsErrorBoundary extends React.Component {
46
46
  `}
47
47
 
48
48
  ${(
49
- <Props
50
- heading="AnalyticsErrorBoundary Props"
51
- props={require('!!extract-react-types-loader!../src/components/AnalyticsErrorBoundary')}
52
- />
53
- )}
49
+ <Props
50
+ heading="AnalyticsErrorBoundary Props"
51
+ props={require('!!extract-react-types-loader!../src/components/AnalyticsErrorBoundary')}
52
+ />
53
+ )}
54
54
  `;
@@ -52,13 +52,13 @@ const SaveButton = ({ onClick }) => (
52
52
  Below is a fleshed out example demonstrating how to add extra information to the event's payload.
53
53
 
54
54
  ${(
55
- <Example
56
- packageName="@atlaskit/analytics-next"
57
- Component={require('../examples/40-updating-an-event').default}
58
- title="Updating an event's payload"
59
- source={require('!!raw-loader!../examples/40-updating-an-event')}
60
- />
61
- )}
55
+ <Example
56
+ packageName="@atlaskit/analytics-next"
57
+ Component={require('../examples/40-updating-an-event').default}
58
+ title="Updating an event's payload"
59
+ source={require('!!raw-loader!../examples/40-updating-an-event')}
60
+ />
61
+ )}
62
62
 
63
63
  <a name="using-a-channel"></a>
64
64
  ## Using a channel
@@ -162,13 +162,13 @@ const ButtonWithAnalytics = withAnalyticsEvents({
162
162
  `}
163
163
 
164
164
  ${(
165
- <Example
166
- packageName="@atlaskit/analytics-next"
167
- Component={require('../examples/30-passing-events-to-a-callback').default}
168
- title="Passing events through callbacks"
169
- source={require('!!raw-loader!../examples/30-passing-events-to-a-callback')}
170
- />
171
- )}
165
+ <Example
166
+ packageName="@atlaskit/analytics-next"
167
+ Component={require('../examples/30-passing-events-to-a-callback').default}
168
+ title="Passing events through callbacks"
169
+ source={require('!!raw-loader!../examples/30-passing-events-to-a-callback')}
170
+ />
171
+ )}
172
172
 
173
173
  <a name="cloning-an-event"></a>
174
174
  ## Cloning an event
@@ -220,13 +220,13 @@ const FormWithAnalytics = withAnalyticsEvents({
220
220
  and return a clone of the event.
221
221
 
222
222
  ${(
223
- <Example
224
- packageName="@atlaskit/analytics-next"
225
- Component={require('../examples/50-cloning-an-event').default}
226
- title="Cloning an event"
227
- source={require('!!raw-loader!../examples/50-cloning-an-event')}
228
- />
229
- )}
223
+ <Example
224
+ packageName="@atlaskit/analytics-next"
225
+ Component={require('../examples/50-cloning-an-event').default}
226
+ title="Cloning an event"
227
+ source={require('!!raw-loader!../examples/50-cloning-an-event')}
228
+ />
229
+ )}
230
230
 
231
231
  <a name="tracking-events-outside-the-ui"></a>
232
232
  ## Tracking events outside the UI