@atlaskit/analytics-next 11.1.1 → 11.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/analytics-next
2
2
 
3
+ ## 11.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`604dd578f00d9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/604dd578f00d9) -
8
+ Types the withAnalyticsEvents WrappedComponent as allowing a forwardRefExoticComponent
9
+
3
10
  ## 11.1.1
4
11
 
5
12
  ### Patch Changes
@@ -3,9 +3,9 @@
3
3
  "compilerOptions": {
4
4
  "declaration": true,
5
5
  "target": "es5",
6
- "composite": true,
7
6
  "outDir": "../../../../../confluence/tsDist/@atlaskit__analytics-next",
8
- "rootDir": "../"
7
+ "rootDir": "../",
8
+ "composite": true
9
9
  },
10
10
  "include": [
11
11
  "../src/**/*.ts",
@@ -29,4 +29,4 @@
29
29
  "path": "../../../platform/feature-flags/afm-cc/tsconfig.json"
30
30
  }
31
31
  ]
32
- }
32
+ }
@@ -15,6 +15,8 @@ var withAnalyticsEvents = function withAnalyticsEvents() {
15
15
  var createEventMap = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
16
16
  return function (WrappedComponent) {
17
17
  var WithAnalyticsEvents = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
18
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
19
+ // @ts-ignore: to unblock React 18.2.0 -> 18.3.1 version bump in Jira
18
20
  var _usePatchedProps = (0, _usePatchedProps2.usePatchedProps)(createEventMap, props),
19
21
  patchedEventProps = _usePatchedProps.patchedEventProps;
20
22
  var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
@@ -4,6 +4,8 @@ import { useAnalyticsEvents } from '../hooks/useAnalyticsEvents';
4
4
  import { usePatchedProps } from '../hooks/usePatchedProps';
5
5
  const withAnalyticsEvents = (createEventMap = {}) => WrappedComponent => {
6
6
  const WithAnalyticsEvents = /*#__PURE__*/forwardRef((props, ref) => {
7
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
8
+ // @ts-ignore: to unblock React 18.2.0 -> 18.3.1 version bump in Jira
7
9
  const {
8
10
  patchedEventProps
9
11
  } = usePatchedProps(createEventMap, props);
@@ -6,6 +6,8 @@ var withAnalyticsEvents = function withAnalyticsEvents() {
6
6
  var createEventMap = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7
7
  return function (WrappedComponent) {
8
8
  var WithAnalyticsEvents = /*#__PURE__*/forwardRef(function (props, ref) {
9
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
10
+ // @ts-ignore: to unblock React 18.2.0 -> 18.3.1 version bump in Jira
9
11
  var _usePatchedProps = usePatchedProps(createEventMap, props),
10
12
  patchedEventProps = _usePatchedProps.patchedEventProps;
11
13
  var _useAnalyticsEvents = useAnalyticsEvents(),
@@ -8,5 +8,5 @@ export interface WithAnalyticsEventsProps {
8
8
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
9
9
  ref?: React.Ref<any>;
10
10
  }
11
- declare const withAnalyticsEvents: (createEventMap?: CreateEventMap) => <Props, Component>(WrappedComponent: React.ComponentType<WithAnalyticsEventsProps & Props> & Component) => React.ForwardRefExoticComponent<React.PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Omit<Props, keyof WithAnalyticsEventsProps>>> & React.RefAttributes<any>>;
11
+ declare const withAnalyticsEvents: (createEventMap?: CreateEventMap) => <Props, Component>(WrappedComponent: (React.ComponentType<WithAnalyticsEventsProps & Props> | React.ForwardRefExoticComponent<Omit<WithAnalyticsEventsProps, "ref"> & Props>) & Component) => React.ForwardRefExoticComponent<React.PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Omit<Props, keyof WithAnalyticsEventsProps>>> & React.RefAttributes<any>>;
12
12
  export default withAnalyticsEvents;
@@ -8,5 +8,5 @@ export interface WithAnalyticsEventsProps {
8
8
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
9
9
  ref?: React.Ref<any>;
10
10
  }
11
- declare const withAnalyticsEvents: (createEventMap?: CreateEventMap) => <Props, Component>(WrappedComponent: React.ComponentType<WithAnalyticsEventsProps & Props> & Component) => React.ForwardRefExoticComponent<React.PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Omit<Props, keyof WithAnalyticsEventsProps>>> & React.RefAttributes<any>>;
11
+ declare const withAnalyticsEvents: (createEventMap?: CreateEventMap) => <Props, Component>(WrappedComponent: (React.ComponentType<WithAnalyticsEventsProps & Props> | React.ForwardRefExoticComponent<Omit<WithAnalyticsEventsProps, "ref"> & Props>) & Component) => React.ForwardRefExoticComponent<React.PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Omit<Props, keyof WithAnalyticsEventsProps>>> & React.RefAttributes<any>>;
12
12
  export default withAnalyticsEvents;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/analytics-next",
3
- "version": "11.1.1",
3
+ "version": "11.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/"
@@ -29,25 +29,6 @@
29
29
  }
30
30
  },
31
31
  "./types": "./src/types.ts",
32
- "af:exports": {
33
- "./types": "./src/types.ts",
34
- "./AnalyticsContext": "./src/components/AnalyticsContext/index.tsx",
35
- "./AnalyticsDecorator": "./src/components/AnalyticsDecorator/index.ts",
36
- "./AnalyticsDelegate": "./src/components/AnalyticsDelegate/index.ts",
37
- "./withAnalytics": "./src/utils/withAnalytics.tsx",
38
- "./AnalyticsListener": "./src/components/AnalyticsListener/index.tsx",
39
- "./AnalyticsErrorBoundary": "./src/components/AnalyticsErrorBoundary.tsx",
40
- "./withAnalyticsEvents": "./src/hocs/withAnalyticsEvents.tsx",
41
- "./withAnalyticsContext": "./src/hocs/withAnalyticsContext.tsx",
42
- "./usePlatformLeafEventHandler": "./src/hooks/usePlatformLeafEventHandler.ts",
43
- "./useAnalyticsEvents": "./src/hooks/useAnalyticsEvents.ts",
44
- "./useCallbackWithAnalytics": "./src/hooks/useCallbackWithAnalytics.ts",
45
- "./usePatchedProps": "./src/hooks/usePatchedProps.ts",
46
- "./AnalyticsEvent": "./src/events/AnalyticsEvent.ts",
47
- "./UIAnalyticsEvent": "./src/events/UIAnalyticsEvent.ts",
48
- "./createAndFireEvents": "./src/utils/createAndFireEvent.ts",
49
- ".": "./src/index.ts"
50
- },
51
32
  "dependencies": {
52
33
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
53
34
  "@atlaskit/platform-feature-flags": "^1.1.0",