@atlaskit/people-teams-ui-public 3.1.7 → 3.3.0

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,23 @@
1
1
  # @atlaskit/people-teams-ui-public
2
2
 
3
+ ## 3.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`970533780b37d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/970533780b37d) -
8
+ Migrate analytics context to use TeamsAppAnalyticsContext
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 3.2.0
15
+
16
+ ### Minor Changes
17
+
18
+ - [`62797df0ee023`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/62797df0ee023) -
19
+ Deprecated analytics implementation in favour of @atlaskit/teams-app-internal-analytics
20
+
3
21
  ## 3.1.7
4
22
 
5
23
  ### Patch Changes
@@ -4,13 +4,33 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.PeopleTeamsAnalyticsSubcontextProvider = PeopleTeamsAnalyticsSubcontextProvider;
7
+ exports.PeopleTeamsAnalyticsSubcontextProvider = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
+ var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
10
+ var _teamsAppInternalAnalytics = require("@atlaskit/teams-app-internal-analytics");
9
11
  var _index = require("../index");
10
- function PeopleTeamsAnalyticsSubcontextProvider(_ref) {
12
+ /**
13
+ * @private
14
+ * @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
15
+ */
16
+ function _PeopleTeamsAnalyticsSubcontextProvider(_ref) {
11
17
  var children = _ref.children,
12
18
  topLevelAttributes = _ref.topLevelAttributes;
13
19
  return /*#__PURE__*/_react.default.createElement(_index.PeopleTeamsAnalyticsProvider, {
14
20
  analyticsContextData: topLevelAttributes
15
21
  }, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children));
16
- }
22
+ }
23
+
24
+ /**
25
+ *
26
+ * When this feature get is cleaned up, every instance of `PeopleTeamsAnalyticsSubcontextProvider`
27
+ * should be replaced with `TeamsAppAnalyticsContext` from `@atlaskit/teams-app-internal-analytics`
28
+ */
29
+ function _TeamsAppAnalyticsContext(_ref2) {
30
+ var children = _ref2.children,
31
+ topLevelAttributes = _ref2.topLevelAttributes;
32
+ return /*#__PURE__*/_react.default.createElement(_teamsAppInternalAnalytics.TeamsAppAnalyticsContext, {
33
+ data: topLevelAttributes
34
+ }, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children));
35
+ }
36
+ var PeopleTeamsAnalyticsSubcontextProvider = exports.PeopleTeamsAnalyticsSubcontextProvider = (0, _platformFeatureFlagsReact.componentWithFG)('ptc-enable-people-teams-ui-analytics-refactor', _TeamsAppAnalyticsContext, _PeopleTeamsAnalyticsSubcontextProvider);
@@ -36,9 +36,17 @@ var AnalyticsSubcontextStore = (0, _reactSweetState.createStore)({
36
36
  initialState: initialState,
37
37
  actions: actions
38
38
  });
39
+
40
+ /**
41
+ * @private
42
+ * @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
43
+ */
39
44
  var usePeopleTeamsAnalyticsSubcontext = exports.usePeopleTeamsAnalyticsSubcontext = (0, _reactSweetState.createHook)(AnalyticsSubcontextStore);
40
45
 
41
46
  /**
47
+ * @private
48
+ * @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
49
+ *
42
50
  * Inject an attribute into all events using `usePeopleTeamAnalyticsEvents`
43
51
  * It sets the attribute when the hook is called and clears it when the component is unmounted
44
52
  */
@@ -15,8 +15,13 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
15
15
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
16
16
  var defaultAnalyticsContextData = {
17
17
  packageName: "@atlaskit/people-teams-ui-public",
18
- packageVersion: "3.1.6"
18
+ packageVersion: "3.2.0"
19
19
  };
20
+
21
+ /**
22
+ * @private
23
+ * @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
24
+ */
20
25
  function PeopleTeamsAnalyticsProvider(_ref) {
21
26
  var analyticsContextData = _ref.analyticsContextData,
22
27
  children = _ref.children;
@@ -1,10 +1,31 @@
1
1
  import React from 'react';
2
+ import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
3
+ import { TeamsAppAnalyticsContext } from '@atlaskit/teams-app-internal-analytics';
2
4
  import { PeopleTeamsAnalyticsProvider } from '../index';
3
- export function PeopleTeamsAnalyticsSubcontextProvider({
5
+ /**
6
+ * @private
7
+ * @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
8
+ */
9
+ function _PeopleTeamsAnalyticsSubcontextProvider({
4
10
  children,
5
11
  topLevelAttributes
6
12
  }) {
7
13
  return /*#__PURE__*/React.createElement(PeopleTeamsAnalyticsProvider, {
8
14
  analyticsContextData: topLevelAttributes
9
15
  }, /*#__PURE__*/React.createElement(React.Fragment, null, children));
10
- }
16
+ }
17
+
18
+ /**
19
+ *
20
+ * When this feature get is cleaned up, every instance of `PeopleTeamsAnalyticsSubcontextProvider`
21
+ * should be replaced with `TeamsAppAnalyticsContext` from `@atlaskit/teams-app-internal-analytics`
22
+ */
23
+ function _TeamsAppAnalyticsContext({
24
+ children,
25
+ topLevelAttributes
26
+ }) {
27
+ return /*#__PURE__*/React.createElement(TeamsAppAnalyticsContext, {
28
+ data: topLevelAttributes
29
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, children));
30
+ }
31
+ export const PeopleTeamsAnalyticsSubcontextProvider = componentWithFG('ptc-enable-people-teams-ui-analytics-refactor', _TeamsAppAnalyticsContext, _PeopleTeamsAnalyticsSubcontextProvider);
@@ -28,9 +28,17 @@ const AnalyticsSubcontextStore = createStore({
28
28
  initialState,
29
29
  actions
30
30
  });
31
+
32
+ /**
33
+ * @private
34
+ * @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
35
+ */
31
36
  export const usePeopleTeamsAnalyticsSubcontext = createHook(AnalyticsSubcontextStore);
32
37
 
33
38
  /**
39
+ * @private
40
+ * @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
41
+ *
34
42
  * Inject an attribute into all events using `usePeopleTeamAnalyticsEvents`
35
43
  * It sets the attribute when the hook is called and clears it when the component is unmounted
36
44
  */
@@ -2,8 +2,13 @@ import React, { useMemo } from 'react';
2
2
  import { PeopleTeamsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
3
3
  const defaultAnalyticsContextData = {
4
4
  packageName: "@atlaskit/people-teams-ui-public",
5
- packageVersion: "3.1.6"
5
+ packageVersion: "3.2.0"
6
6
  };
7
+
8
+ /**
9
+ * @private
10
+ * @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
11
+ */
7
12
  export function PeopleTeamsAnalyticsProvider({
8
13
  analyticsContextData,
9
14
  children
@@ -1,9 +1,29 @@
1
1
  import React from 'react';
2
+ import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
3
+ import { TeamsAppAnalyticsContext } from '@atlaskit/teams-app-internal-analytics';
2
4
  import { PeopleTeamsAnalyticsProvider } from '../index';
3
- export function PeopleTeamsAnalyticsSubcontextProvider(_ref) {
5
+ /**
6
+ * @private
7
+ * @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
8
+ */
9
+ function _PeopleTeamsAnalyticsSubcontextProvider(_ref) {
4
10
  var children = _ref.children,
5
11
  topLevelAttributes = _ref.topLevelAttributes;
6
12
  return /*#__PURE__*/React.createElement(PeopleTeamsAnalyticsProvider, {
7
13
  analyticsContextData: topLevelAttributes
8
14
  }, /*#__PURE__*/React.createElement(React.Fragment, null, children));
9
- }
15
+ }
16
+
17
+ /**
18
+ *
19
+ * When this feature get is cleaned up, every instance of `PeopleTeamsAnalyticsSubcontextProvider`
20
+ * should be replaced with `TeamsAppAnalyticsContext` from `@atlaskit/teams-app-internal-analytics`
21
+ */
22
+ function _TeamsAppAnalyticsContext(_ref2) {
23
+ var children = _ref2.children,
24
+ topLevelAttributes = _ref2.topLevelAttributes;
25
+ return /*#__PURE__*/React.createElement(TeamsAppAnalyticsContext, {
26
+ data: topLevelAttributes
27
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, children));
28
+ }
29
+ export var PeopleTeamsAnalyticsSubcontextProvider = componentWithFG('ptc-enable-people-teams-ui-analytics-refactor', _TeamsAppAnalyticsContext, _PeopleTeamsAnalyticsSubcontextProvider);
@@ -29,9 +29,17 @@ var AnalyticsSubcontextStore = createStore({
29
29
  initialState: initialState,
30
30
  actions: actions
31
31
  });
32
+
33
+ /**
34
+ * @private
35
+ * @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
36
+ */
32
37
  export var usePeopleTeamsAnalyticsSubcontext = createHook(AnalyticsSubcontextStore);
33
38
 
34
39
  /**
40
+ * @private
41
+ * @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
42
+ *
35
43
  * Inject an attribute into all events using `usePeopleTeamAnalyticsEvents`
36
44
  * It sets the attribute when the hook is called and clears it when the component is unmounted
37
45
  */
@@ -6,8 +6,13 @@ import React, { useMemo } from 'react';
6
6
  import { PeopleTeamsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
7
7
  var defaultAnalyticsContextData = {
8
8
  packageName: "@atlaskit/people-teams-ui-public",
9
- packageVersion: "3.1.6"
9
+ packageVersion: "3.2.0"
10
10
  };
11
+
12
+ /**
13
+ * @private
14
+ * @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
15
+ */
11
16
  export function PeopleTeamsAnalyticsProvider(_ref) {
12
17
  var analyticsContextData = _ref.analyticsContextData,
13
18
  children = _ref.children;
@@ -5,7 +5,9 @@ type PeopleTeamsAnalyticsSubcontextState = {
5
5
  attributes?: Record<string, any>;
6
6
  };
7
7
  };
8
- export declare function PeopleTeamsAnalyticsSubcontextProvider({ children, topLevelAttributes, }: PeopleTeamsAnalyticsSubcontextState & {
8
+ export declare const PeopleTeamsAnalyticsSubcontextProvider: React.FC<PeopleTeamsAnalyticsSubcontextState & {
9
9
  children: React.ReactNode;
10
- }): React.JSX.Element;
10
+ } & {
11
+ children: React.ReactNode;
12
+ }>;
11
13
  export {};
@@ -7,10 +7,17 @@ type InjectedEventAttributeKey = keyof InjectedEventAttributes;
7
7
  type PeopleTeamsAnalyticsSubcontextState = {
8
8
  eventAttributes?: InjectedEventAttributes;
9
9
  };
10
+ /**
11
+ * @private
12
+ * @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
13
+ */
10
14
  export declare const usePeopleTeamsAnalyticsSubcontext: import("react-sweet-state").HookFunction<PeopleTeamsAnalyticsSubcontextState, import("react-sweet-state").BoundActions<PeopleTeamsAnalyticsSubcontextState, {
11
15
  readonly setEventAttributes: (eventAttributes?: Partial<InjectedEventAttributes>) => ({ setState, getState }: StoreActionApi<PeopleTeamsAnalyticsSubcontextState>) => void;
12
16
  }>, void>;
13
17
  /**
18
+ * @private
19
+ * @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
20
+ *
14
21
  * Inject an attribute into all events using `usePeopleTeamAnalyticsEvents`
15
22
  * It sets the attribute when the hook is called and clears it when the component is unmounted
16
23
  */
@@ -1,4 +1,8 @@
1
1
  import React, { type ReactNode } from 'react';
2
+ /**
3
+ * @private
4
+ * @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
5
+ */
2
6
  export declare function PeopleTeamsAnalyticsProvider({ analyticsContextData, children, }: {
3
7
  analyticsContextData?: object;
4
8
  children: ReactNode;
@@ -5,7 +5,9 @@ type PeopleTeamsAnalyticsSubcontextState = {
5
5
  attributes?: Record<string, any>;
6
6
  };
7
7
  };
8
- export declare function PeopleTeamsAnalyticsSubcontextProvider({ children, topLevelAttributes, }: PeopleTeamsAnalyticsSubcontextState & {
8
+ export declare const PeopleTeamsAnalyticsSubcontextProvider: React.FC<PeopleTeamsAnalyticsSubcontextState & {
9
9
  children: React.ReactNode;
10
- }): React.JSX.Element;
10
+ } & {
11
+ children: React.ReactNode;
12
+ }>;
11
13
  export {};
@@ -7,10 +7,17 @@ type InjectedEventAttributeKey = keyof InjectedEventAttributes;
7
7
  type PeopleTeamsAnalyticsSubcontextState = {
8
8
  eventAttributes?: InjectedEventAttributes;
9
9
  };
10
+ /**
11
+ * @private
12
+ * @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
13
+ */
10
14
  export declare const usePeopleTeamsAnalyticsSubcontext: import("react-sweet-state").HookFunction<PeopleTeamsAnalyticsSubcontextState, import("react-sweet-state").BoundActions<PeopleTeamsAnalyticsSubcontextState, {
11
15
  readonly setEventAttributes: (eventAttributes?: Partial<InjectedEventAttributes>) => ({ setState, getState }: StoreActionApi<PeopleTeamsAnalyticsSubcontextState>) => void;
12
16
  }>, void>;
13
17
  /**
18
+ * @private
19
+ * @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
20
+ *
14
21
  * Inject an attribute into all events using `usePeopleTeamAnalyticsEvents`
15
22
  * It sets the attribute when the hook is called and clears it when the component is unmounted
16
23
  */
@@ -1,4 +1,8 @@
1
1
  import React, { type ReactNode } from 'react';
2
+ /**
3
+ * @private
4
+ * @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
5
+ */
2
6
  export declare function PeopleTeamsAnalyticsProvider({ analyticsContextData, children, }: {
3
7
  analyticsContextData?: object;
4
8
  children: ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/people-teams-ui-public",
3
- "version": "3.1.7",
3
+ "version": "3.3.0",
4
4
  "description": "UI components for public packages",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,19 +31,17 @@
31
31
  "*.compiled.css"
32
32
  ],
33
33
  "atlaskit:src": "src/index.ts",
34
- "af:exports": {
35
- "./verified-team-icon": "./src/ui/verified-team-icon/index.ts",
36
- "./analytics": "./src/common/utils/analytics/index.ts"
37
- },
38
34
  "scripts": {
39
35
  "test:coverage": "(cd ../../.. && yarn test 'packages/people-and-teams/people-teams-ui-public/src' --coverage --coverageProvider=v8 --collectCoverageFrom='[\"packages/people-and-teams/people-teams-ui-public/src/**\", \"!packages/people-and-teams/people-teams-ui-public/src/**/**/types.ts\", \"!packages/people-and-teams/people-teams-ui-public/src/ui/**/styled.tsx\"]')"
40
36
  },
41
37
  "dependencies": {
42
38
  "@atlaskit/analytics-namespaced-context": "^7.0.0",
43
- "@atlaskit/icon": "^28.0.0",
39
+ "@atlaskit/icon": "^28.2.0",
44
40
  "@atlaskit/legacy-custom-icons": "^0.22.0",
45
- "@atlaskit/primitives": "^14.11.0",
46
- "@atlaskit/tokens": "^6.0.0",
41
+ "@atlaskit/platform-feature-flags-react": "^0.3.0",
42
+ "@atlaskit/primitives": "^14.15.0",
43
+ "@atlaskit/teams-app-internal-analytics": "^1.5.0",
44
+ "@atlaskit/tokens": "^6.3.0",
47
45
  "@atlaskit/tooltip": "^20.4.0",
48
46
  "@babel/runtime": "^7.0.0",
49
47
  "@compiled/react": "^0.18.3",
@@ -57,7 +55,6 @@
57
55
  "@af/integration-testing": "workspace:^",
58
56
  "@af/visual-regression": "workspace:^",
59
57
  "@atlaskit/ssr": "workspace:^",
60
- "@atlaskit/visual-regression": "workspace:^",
61
58
  "@testing-library/react": "^13.4.0",
62
59
  "@testing-library/react-hooks": "^8.0.1",
63
60
  "@testing-library/user-event": "^14.4.3",