@atlaskit/teams-public 0.72.2 → 0.74.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/next/ui/team-containers/add-container-card/index.js +2 -3
  3. package/dist/cjs/next/ui/team-containers/team-link-card/index.js +1 -2
  4. package/dist/es2019/next/ui/team-containers/add-container-card/index.js +2 -3
  5. package/dist/es2019/next/ui/team-containers/team-link-card/index.js +1 -2
  6. package/dist/esm/next/ui/team-containers/add-container-card/index.js +2 -3
  7. package/dist/esm/next/ui/team-containers/team-link-card/index.js +1 -2
  8. package/dist/types/common/utils/get-is-experiment-enabled.d.ts +9 -9
  9. package/dist/types/controllers/hooks/use-create-containers/index.d.ts +2 -2
  10. package/dist/types/controllers/hooks/use-team-containers/index.d.ts +6 -6
  11. package/dist/types/controllers/hooks/use-team-containers/multi-team.d.ts +6 -6
  12. package/dist/types/controllers/product-permission/main.d.ts +2 -1
  13. package/dist/types-ts4.5/common/utils/get-is-experiment-enabled.d.ts +9 -9
  14. package/dist/types-ts4.5/controllers/hooks/use-create-containers/index.d.ts +2 -2
  15. package/dist/types-ts4.5/controllers/hooks/use-team-containers/index.d.ts +6 -6
  16. package/dist/types-ts4.5/controllers/hooks/use-team-containers/multi-team.d.ts +6 -6
  17. package/dist/types-ts4.5/controllers/product-permission/main.d.ts +2 -1
  18. package/package.json +2 -5
  19. package/dist/cjs/common/utils/error/index.js +0 -120
  20. package/dist/cjs/common/utils/http.js +0 -119
  21. package/dist/cjs/common/utils/status-code-handlers-provider.js +0 -30
  22. package/dist/cjs/common/utils/team-id-to-ari.js +0 -10
  23. package/dist/cjs/common/utils/user-ari.js +0 -16
  24. package/dist/cjs/ui/team-containers/utils.js +0 -81
  25. package/dist/es2019/common/utils/error/index.js +0 -87
  26. package/dist/es2019/common/utils/http.js +0 -82
  27. package/dist/es2019/common/utils/status-code-handlers-provider.js +0 -25
  28. package/dist/es2019/common/utils/team-id-to-ari.js +0 -2
  29. package/dist/es2019/common/utils/user-ari.js +0 -8
  30. package/dist/es2019/ui/team-containers/utils.js +0 -71
  31. package/dist/esm/common/utils/error/index.js +0 -117
  32. package/dist/esm/common/utils/http.js +0 -109
  33. package/dist/esm/common/utils/status-code-handlers-provider.js +0 -23
  34. package/dist/esm/common/utils/team-id-to-ari.js +0 -4
  35. package/dist/esm/common/utils/user-ari.js +0 -10
  36. package/dist/esm/ui/team-containers/utils.js +0 -74
  37. package/dist/types/common/utils/error/index.d.ts +0 -59
  38. package/dist/types/common/utils/http.d.ts +0 -31
  39. package/dist/types/common/utils/status-code-handlers-provider.d.ts +0 -17
  40. package/dist/types/common/utils/team-id-to-ari.d.ts +0 -2
  41. package/dist/types/common/utils/user-ari.d.ts +0 -3
  42. package/dist/types/ui/team-containers/utils.d.ts +0 -25
  43. package/dist/types-ts4.5/common/utils/error/index.d.ts +0 -59
  44. package/dist/types-ts4.5/common/utils/http.d.ts +0 -31
  45. package/dist/types-ts4.5/common/utils/status-code-handlers-provider.d.ts +0 -17
  46. package/dist/types-ts4.5/common/utils/team-id-to-ari.d.ts +0 -2
  47. package/dist/types-ts4.5/common/utils/user-ari.d.ts +0 -3
  48. package/dist/types-ts4.5/ui/team-containers/utils.d.ts +0 -25
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/teams-public
2
2
 
3
+ ## 0.74.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`1368864a76f91`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1368864a76f91) -
8
+ Remove dead code from teams-public package
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 0.73.0
15
+
16
+ ### Minor Changes
17
+
18
+ - [`336c2e0b7bbff`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/336c2e0b7bbff) -
19
+ Remove enable-fix-team-container-height feature gate and enable height fix permanently
20
+
3
21
  ## 0.72.2
4
22
 
5
23
  ### Patch Changes
@@ -10,7 +10,6 @@ require("./index.compiled.css");
10
10
  var _runtime = require("@compiled/react/runtime");
11
11
  var _react = _interopRequireDefault(require("react"));
12
12
  var _css = require("@atlaskit/css");
13
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
13
  var _compiled = require("@atlaskit/primitives/compiled");
15
14
  var _getContainerProperties = require("../../../../common/utils/get-container-properties");
16
15
  var _teamContainerSkeleton = require("../../../common/ui/team-container-skeleton");
@@ -26,7 +25,7 @@ var AddContainerCardWrapper = function AddContainerCardWrapper(_ref) {
26
25
  onClick = _ref.onClick,
27
26
  isDisabled = _ref.isDisabled;
28
27
  return /*#__PURE__*/_react.default.createElement(_compiled.Pressable, {
29
- xcss: (0, _css.cx)(styles.container, (0, _platformFeatureFlags.fg)('enable-fix-team-container-height') ? styles.smallCardContainer : null),
28
+ xcss: (0, _css.cx)(styles.container, styles.smallCardContainer),
30
29
  isDisabled: isDisabled,
31
30
  onClick: onClick
32
31
  }, children);
@@ -54,7 +53,7 @@ var AddContainerCard = exports.AddContainerCard = function AddContainerCard(_ref
54
53
  isDisabled: isDisabled
55
54
  }, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
56
55
  space: "space.100",
57
- xcss: (0, _css.cx)(styles.card, (0, _platformFeatureFlags.fg)('enable-fix-team-container-height') ? styles.cardHeight : null)
56
+ xcss: (0, _css.cx)(styles.card, styles.cardHeight)
58
57
  }, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
59
58
  xcss: styles.iconWrapper
60
59
  }, icon), /*#__PURE__*/_react.default.createElement(_compiled.Text, {
@@ -13,7 +13,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
13
13
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
14
14
  var _react = _interopRequireWildcard(require("react"));
15
15
  var _css = require("@atlaskit/css");
16
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
16
  var _compiled = require("@atlaskit/primitives/compiled");
18
17
  var _teamsAppInternalAnalytics = require("@atlaskit/teams-app-internal-analytics");
19
18
  var _containerIcon = require("../../../../common/ui/container-icon");
@@ -120,7 +119,7 @@ var TeamLinkCard = exports.TeamLinkCard = function TeamLinkCard(_ref) {
120
119
  testId: "team-link-card-inner"
121
120
  }, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
122
121
  space: "space.100",
123
- xcss: (0, _css.cx)(styles.card, (0, _platformFeatureFlags.fg)('enable-fix-team-container-height') ? styles.cardHeight : null)
122
+ xcss: (0, _css.cx)(styles.card, styles.cardHeight)
124
123
  }, /*#__PURE__*/_react.default.createElement(_containerIcon.ContainerIcon, {
125
124
  containerType: containerType,
126
125
  title: title,
@@ -3,7 +3,6 @@ import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
5
5
  import { cx } from '@atlaskit/css';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  import { Box, Inline, Pressable, Text } from '@atlaskit/primitives/compiled';
8
7
  import { getContainerProperties } from '../../../../common/utils/get-container-properties';
9
8
  import { TeamContainerSkeleton } from '../../../common/ui/team-container-skeleton';
@@ -20,7 +19,7 @@ const AddContainerCardWrapper = ({
20
19
  isDisabled
21
20
  }) => {
22
21
  return /*#__PURE__*/React.createElement(Pressable, {
23
- xcss: cx(styles.container, fg('enable-fix-team-container-height') ? styles.smallCardContainer : null),
22
+ xcss: cx(styles.container, styles.smallCardContainer),
24
23
  isDisabled: isDisabled,
25
24
  onClick: onClick
26
25
  }, children);
@@ -48,7 +47,7 @@ export const AddContainerCard = ({
48
47
  isDisabled: isDisabled
49
48
  }, /*#__PURE__*/React.createElement(Inline, {
50
49
  space: "space.100",
51
- xcss: cx(styles.card, fg('enable-fix-team-container-height') ? styles.cardHeight : null)
50
+ xcss: cx(styles.card, styles.cardHeight)
52
51
  }, /*#__PURE__*/React.createElement(Box, {
53
52
  xcss: styles.iconWrapper
54
53
  }, icon), /*#__PURE__*/React.createElement(Text, {
@@ -3,7 +3,6 @@ import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useState } from 'react';
5
5
  import { cx } from '@atlaskit/css';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  import { Anchor, Box, Flex, Inline, Stack, Text } from '@atlaskit/primitives/compiled';
8
7
  import { useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
9
8
  import { ContainerIcon } from '../../../../common/ui/container-icon';
@@ -99,7 +98,7 @@ export const TeamLinkCard = ({
99
98
  testId: "team-link-card-inner"
100
99
  }, /*#__PURE__*/React.createElement(Inline, {
101
100
  space: "space.100",
102
- xcss: cx(styles.card, fg('enable-fix-team-container-height') ? styles.cardHeight : null)
101
+ xcss: cx(styles.card, styles.cardHeight)
103
102
  }, /*#__PURE__*/React.createElement(ContainerIcon, {
104
103
  containerType: containerType,
105
104
  title: title,
@@ -3,7 +3,6 @@ import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
5
5
  import { cx } from '@atlaskit/css';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  import { Box, Inline, Pressable, Text } from '@atlaskit/primitives/compiled';
8
7
  import { getContainerProperties } from '../../../../common/utils/get-container-properties';
9
8
  import { TeamContainerSkeleton } from '../../../common/ui/team-container-skeleton';
@@ -19,7 +18,7 @@ var AddContainerCardWrapper = function AddContainerCardWrapper(_ref) {
19
18
  onClick = _ref.onClick,
20
19
  isDisabled = _ref.isDisabled;
21
20
  return /*#__PURE__*/React.createElement(Pressable, {
22
- xcss: cx(styles.container, fg('enable-fix-team-container-height') ? styles.smallCardContainer : null),
21
+ xcss: cx(styles.container, styles.smallCardContainer),
23
22
  isDisabled: isDisabled,
24
23
  onClick: onClick
25
24
  }, children);
@@ -47,7 +46,7 @@ export var AddContainerCard = function AddContainerCard(_ref2) {
47
46
  isDisabled: isDisabled
48
47
  }, /*#__PURE__*/React.createElement(Inline, {
49
48
  space: "space.100",
50
- xcss: cx(styles.card, fg('enable-fix-team-container-height') ? styles.cardHeight : null)
49
+ xcss: cx(styles.card, styles.cardHeight)
51
50
  }, /*#__PURE__*/React.createElement(Box, {
52
51
  xcss: styles.iconWrapper
53
52
  }, icon), /*#__PURE__*/React.createElement(Text, {
@@ -7,7 +7,6 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
7
7
  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) { _defineProperty(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; }
8
8
  import React, { useState } from 'react';
9
9
  import { cx } from '@atlaskit/css';
10
- import { fg } from '@atlaskit/platform-feature-flags';
11
10
  import { Anchor, Box, Flex, Inline, Stack, Text } from '@atlaskit/primitives/compiled';
12
11
  import { useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
13
12
  import { ContainerIcon } from '../../../../common/ui/container-icon';
@@ -111,7 +110,7 @@ export var TeamLinkCard = function TeamLinkCard(_ref) {
111
110
  testId: "team-link-card-inner"
112
111
  }, /*#__PURE__*/React.createElement(Inline, {
113
112
  space: "space.100",
114
- xcss: cx(styles.card, fg('enable-fix-team-container-height') ? styles.cardHeight : null)
113
+ xcss: cx(styles.card, styles.cardHeight)
115
114
  }, /*#__PURE__*/React.createElement(ContainerIcon, {
116
115
  containerType: containerType,
117
116
  title: title,
@@ -8,16 +8,16 @@ export declare const VAR2 = "variation_2";
8
8
  export declare const VAR3 = "variation_3";
9
9
  export declare const VAR4 = "variation_4";
10
10
  export declare const cohorts: {
11
- readonly NOT_ENROLLED: "not-enrolled";
12
- readonly CONTROL: "control";
13
- readonly EXPERIMENT: "experiment";
14
- readonly VARIATION: "variation";
15
- readonly VAR1: "variation_1";
16
- readonly VAR2: "variation_2";
17
- readonly VAR3: "variation_3";
18
- readonly VAR4: "variation_4";
11
+ readonly NOT_ENROLLED: 'not-enrolled';
12
+ readonly CONTROL: 'control';
13
+ readonly EXPERIMENT: 'experiment';
14
+ readonly VARIATION: 'variation';
15
+ readonly VAR1: 'variation_1';
16
+ readonly VAR2: 'variation_2';
17
+ readonly VAR3: 'variation_3';
18
+ readonly VAR4: 'variation_4';
19
19
  };
20
- export declare const DEFAULT_VALID_EXPERIMENT_COHORTS: ("not-enrolled" | "control" | "experiment" | "variation" | "variation_1" | "variation_2" | "variation_3" | "variation_4")[];
20
+ export declare const DEFAULT_VALID_EXPERIMENT_COHORTS: ('not-enrolled' | 'control' | 'experiment' | 'variation' | 'variation_1' | 'variation_2' | 'variation_3' | 'variation_4')[];
21
21
  export type CohortKeys = keyof typeof cohorts;
22
22
  export type Cohort = (typeof cohorts)[CohortKeys];
23
23
  export declare const getIsExperimentEnabled: (experimentName: string, variantKey?: Cohort, validExperimentCohorts?: Cohort[], fireExperimentExposure?: boolean) => boolean;
@@ -1,4 +1,4 @@
1
- import { type StoreActionApi } from 'react-sweet-state';
1
+ import { type BoundActions, type HookFunction, type StoreActionApi } from 'react-sweet-state';
2
2
  type Product = 'Jira' | 'Confluence' | 'Loom' | 'WebLink';
3
3
  type ContainerState = {
4
4
  isLoading: boolean;
@@ -17,7 +17,7 @@ type StoreAction = StoreActionApi<State>;
17
17
  *
18
18
  * @returns {object} State and actions for managing container creation.
19
19
  */
20
- declare const useCreateContainers: import("react-sweet-state").HookFunction<State, import("react-sweet-state").BoundActions<State, {
20
+ declare const useCreateContainers: HookFunction<State, BoundActions<State, {
21
21
  updateContainerLoading: (product: Product, isLoading: boolean) => ({ setState, getState }: StoreAction) => void;
22
22
  updateContainerCreated: (product: Product, isCreated: boolean) => ({ setState, getState }: StoreAction) => void;
23
23
  }>, void>;
@@ -1,4 +1,4 @@
1
- import { type Action } from 'react-sweet-state';
1
+ import { type Action, type BoundActions, type HookFunction } from 'react-sweet-state';
2
2
  import { useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
3
3
  import type { TeamContainers, TeamWithMemberships, UnlinkContainerMutationError } from '@atlaskit/teams-client/types';
4
4
  import { type TeamContainer } from '../../../common/types';
@@ -19,11 +19,11 @@ type State = {
19
19
  teamId: string | null;
20
20
  connectedTeams: ConnectedTeams;
21
21
  };
22
- export declare const useTeamContainersHook: import("react-sweet-state").HookFunction<State, import("react-sweet-state").BoundActions<State, {
23
- fetchTeamContainers: (teamId: string, fireAnalytics: ReturnType<typeof useAnalyticsEvents>["fireEvent"]) => Action<State>;
24
- refetchTeamContainers: (fireAnalytics: ReturnType<typeof useAnalyticsEvents>["fireEvent"]) => Action<State>;
25
- fetchNumberOfConnectedTeams: (containerId: string, fireAnalytics: ReturnType<typeof useAnalyticsEvents>["fireEvent"]) => Action<State>;
26
- fetchConnectedTeams: (containerId: string, fireAnalytics: ReturnType<typeof useAnalyticsEvents>["fireEvent"]) => Action<State>;
22
+ export declare const useTeamContainersHook: HookFunction<State, BoundActions<State, {
23
+ fetchTeamContainers: (teamId: string, fireAnalytics: ReturnType<typeof useAnalyticsEvents>['fireEvent']) => Action<State>;
24
+ refetchTeamContainers: (fireAnalytics: ReturnType<typeof useAnalyticsEvents>['fireEvent']) => Action<State>;
25
+ fetchNumberOfConnectedTeams: (containerId: string, fireAnalytics: ReturnType<typeof useAnalyticsEvents>['fireEvent']) => Action<State>;
26
+ fetchConnectedTeams: (containerId: string, fireAnalytics: ReturnType<typeof useAnalyticsEvents>['fireEvent']) => Action<State>;
27
27
  unlinkTeamContainers: (teamId: string, containerId: string) => Action<State>;
28
28
  addTeamContainer: (teamContainer: TeamContainer) => Action<State>;
29
29
  }>, void>;
@@ -1,4 +1,4 @@
1
- import { type Action } from 'react-sweet-state';
1
+ import { type Action, type BoundActions, type HookFunction } from 'react-sweet-state';
2
2
  import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/teams-app-internal-analytics';
3
3
  import type { TeamContainers, TeamWithMemberships, UnlinkContainerMutationError } from '@atlaskit/teams-client/types';
4
4
  import { type TeamContainer } from '../../../common/types';
@@ -30,11 +30,11 @@ type FireAnalyticsProps = {
30
30
  numberOfTeams?: number;
31
31
  error?: Error;
32
32
  };
33
- export declare const useTeamContainersHook: import("react-sweet-state").HookFunction<State, import("react-sweet-state").BoundActions<State, {
34
- fetchTeamContainers: (teamId: string, fireAnalytics: (action: string, actionSubject: string, error?: Error) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>["fireEvent"]) => Action<State>;
35
- refetchTeamContainers: (teamId: string, fireAnalytics: (action: string, actionSubject: string, error?: Error) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>["fireEvent"]) => Action<State>;
36
- fetchNumberOfConnectedTeams: (teamId: string, containerId: string, fireAnalytics: (props: FireAnalyticsProps) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>["fireEvent"]) => Action<State>;
37
- fetchConnectedTeams: (teamId: string, containerId: string, fireAnalytics: (props: FireAnalyticsProps) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>["fireEvent"]) => Action<State>;
33
+ export declare const useTeamContainersHook: HookFunction<State, BoundActions<State, {
34
+ fetchTeamContainers: (teamId: string, fireAnalytics: (action: string, actionSubject: string, error?: Error) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>['fireEvent']) => Action<State>;
35
+ refetchTeamContainers: (teamId: string, fireAnalytics: (action: string, actionSubject: string, error?: Error) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>['fireEvent']) => Action<State>;
36
+ fetchNumberOfConnectedTeams: (teamId: string, containerId: string, fireAnalytics: (props: FireAnalyticsProps) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>['fireEvent']) => Action<State>;
37
+ fetchConnectedTeams: (teamId: string, containerId: string, fireAnalytics: (props: FireAnalyticsProps) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>['fireEvent']) => Action<State>;
38
38
  unlinkTeamContainers: (teamId: string, containerId: string) => Action<State>;
39
39
  addTeamContainer: (teamId: string, teamContainer: TeamContainer) => Action<State>;
40
40
  }>, void>;
@@ -1,5 +1,6 @@
1
+ import { type BoundActions, type HookFunction } from 'react-sweet-state';
1
2
  import type { ProductPermissionsActions, ProductPermissionsStore } from './types';
2
3
  /**
3
4
  * @deprecated Use useProductPermissionsStore from "@atlaskit/teams-app-internal-product-permissions" instead
4
5
  */
5
- export declare const useProductPermissionsStore: import("react-sweet-state").HookFunction<ProductPermissionsStore, import("react-sweet-state").BoundActions<ProductPermissionsStore, ProductPermissionsActions>, void>;
6
+ export declare const useProductPermissionsStore: HookFunction<ProductPermissionsStore, BoundActions<ProductPermissionsStore, ProductPermissionsActions>, void>;
@@ -8,16 +8,16 @@ export declare const VAR2 = "variation_2";
8
8
  export declare const VAR3 = "variation_3";
9
9
  export declare const VAR4 = "variation_4";
10
10
  export declare const cohorts: {
11
- readonly NOT_ENROLLED: "not-enrolled";
12
- readonly CONTROL: "control";
13
- readonly EXPERIMENT: "experiment";
14
- readonly VARIATION: "variation";
15
- readonly VAR1: "variation_1";
16
- readonly VAR2: "variation_2";
17
- readonly VAR3: "variation_3";
18
- readonly VAR4: "variation_4";
11
+ readonly NOT_ENROLLED: 'not-enrolled';
12
+ readonly CONTROL: 'control';
13
+ readonly EXPERIMENT: 'experiment';
14
+ readonly VARIATION: 'variation';
15
+ readonly VAR1: 'variation_1';
16
+ readonly VAR2: 'variation_2';
17
+ readonly VAR3: 'variation_3';
18
+ readonly VAR4: 'variation_4';
19
19
  };
20
- export declare const DEFAULT_VALID_EXPERIMENT_COHORTS: ("not-enrolled" | "control" | "experiment" | "variation" | "variation_1" | "variation_2" | "variation_3" | "variation_4")[];
20
+ export declare const DEFAULT_VALID_EXPERIMENT_COHORTS: ('not-enrolled' | 'control' | 'experiment' | 'variation' | 'variation_1' | 'variation_2' | 'variation_3' | 'variation_4')[];
21
21
  export type CohortKeys = keyof typeof cohorts;
22
22
  export type Cohort = (typeof cohorts)[CohortKeys];
23
23
  export declare const getIsExperimentEnabled: (experimentName: string, variantKey?: Cohort, validExperimentCohorts?: Cohort[], fireExperimentExposure?: boolean) => boolean;
@@ -1,4 +1,4 @@
1
- import { type StoreActionApi } from 'react-sweet-state';
1
+ import { type BoundActions, type HookFunction, type StoreActionApi } from 'react-sweet-state';
2
2
  type Product = 'Jira' | 'Confluence' | 'Loom' | 'WebLink';
3
3
  type ContainerState = {
4
4
  isLoading: boolean;
@@ -17,7 +17,7 @@ type StoreAction = StoreActionApi<State>;
17
17
  *
18
18
  * @returns {object} State and actions for managing container creation.
19
19
  */
20
- declare const useCreateContainers: import("react-sweet-state").HookFunction<State, import("react-sweet-state").BoundActions<State, {
20
+ declare const useCreateContainers: HookFunction<State, BoundActions<State, {
21
21
  updateContainerLoading: (product: Product, isLoading: boolean) => ({ setState, getState }: StoreAction) => void;
22
22
  updateContainerCreated: (product: Product, isCreated: boolean) => ({ setState, getState }: StoreAction) => void;
23
23
  }>, void>;
@@ -1,4 +1,4 @@
1
- import { type Action } from 'react-sweet-state';
1
+ import { type Action, type BoundActions, type HookFunction } from 'react-sweet-state';
2
2
  import { useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
3
3
  import type { TeamContainers, TeamWithMemberships, UnlinkContainerMutationError } from '@atlaskit/teams-client/types';
4
4
  import { type TeamContainer } from '../../../common/types';
@@ -19,11 +19,11 @@ type State = {
19
19
  teamId: string | null;
20
20
  connectedTeams: ConnectedTeams;
21
21
  };
22
- export declare const useTeamContainersHook: import("react-sweet-state").HookFunction<State, import("react-sweet-state").BoundActions<State, {
23
- fetchTeamContainers: (teamId: string, fireAnalytics: ReturnType<typeof useAnalyticsEvents>["fireEvent"]) => Action<State>;
24
- refetchTeamContainers: (fireAnalytics: ReturnType<typeof useAnalyticsEvents>["fireEvent"]) => Action<State>;
25
- fetchNumberOfConnectedTeams: (containerId: string, fireAnalytics: ReturnType<typeof useAnalyticsEvents>["fireEvent"]) => Action<State>;
26
- fetchConnectedTeams: (containerId: string, fireAnalytics: ReturnType<typeof useAnalyticsEvents>["fireEvent"]) => Action<State>;
22
+ export declare const useTeamContainersHook: HookFunction<State, BoundActions<State, {
23
+ fetchTeamContainers: (teamId: string, fireAnalytics: ReturnType<typeof useAnalyticsEvents>['fireEvent']) => Action<State>;
24
+ refetchTeamContainers: (fireAnalytics: ReturnType<typeof useAnalyticsEvents>['fireEvent']) => Action<State>;
25
+ fetchNumberOfConnectedTeams: (containerId: string, fireAnalytics: ReturnType<typeof useAnalyticsEvents>['fireEvent']) => Action<State>;
26
+ fetchConnectedTeams: (containerId: string, fireAnalytics: ReturnType<typeof useAnalyticsEvents>['fireEvent']) => Action<State>;
27
27
  unlinkTeamContainers: (teamId: string, containerId: string) => Action<State>;
28
28
  addTeamContainer: (teamContainer: TeamContainer) => Action<State>;
29
29
  }>, void>;
@@ -1,4 +1,4 @@
1
- import { type Action } from 'react-sweet-state';
1
+ import { type Action, type BoundActions, type HookFunction } from 'react-sweet-state';
2
2
  import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/teams-app-internal-analytics';
3
3
  import type { TeamContainers, TeamWithMemberships, UnlinkContainerMutationError } from '@atlaskit/teams-client/types';
4
4
  import { type TeamContainer } from '../../../common/types';
@@ -30,11 +30,11 @@ type FireAnalyticsProps = {
30
30
  numberOfTeams?: number;
31
31
  error?: Error;
32
32
  };
33
- export declare const useTeamContainersHook: import("react-sweet-state").HookFunction<State, import("react-sweet-state").BoundActions<State, {
34
- fetchTeamContainers: (teamId: string, fireAnalytics: (action: string, actionSubject: string, error?: Error) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>["fireEvent"]) => Action<State>;
35
- refetchTeamContainers: (teamId: string, fireAnalytics: (action: string, actionSubject: string, error?: Error) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>["fireEvent"]) => Action<State>;
36
- fetchNumberOfConnectedTeams: (teamId: string, containerId: string, fireAnalytics: (props: FireAnalyticsProps) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>["fireEvent"]) => Action<State>;
37
- fetchConnectedTeams: (teamId: string, containerId: string, fireAnalytics: (props: FireAnalyticsProps) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>["fireEvent"]) => Action<State>;
33
+ export declare const useTeamContainersHook: HookFunction<State, BoundActions<State, {
34
+ fetchTeamContainers: (teamId: string, fireAnalytics: (action: string, actionSubject: string, error?: Error) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>['fireEvent']) => Action<State>;
35
+ refetchTeamContainers: (teamId: string, fireAnalytics: (action: string, actionSubject: string, error?: Error) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>['fireEvent']) => Action<State>;
36
+ fetchNumberOfConnectedTeams: (teamId: string, containerId: string, fireAnalytics: (props: FireAnalyticsProps) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>['fireEvent']) => Action<State>;
37
+ fetchConnectedTeams: (teamId: string, containerId: string, fireAnalytics: (props: FireAnalyticsProps) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>['fireEvent']) => Action<State>;
38
38
  unlinkTeamContainers: (teamId: string, containerId: string) => Action<State>;
39
39
  addTeamContainer: (teamId: string, teamContainer: TeamContainer) => Action<State>;
40
40
  }>, void>;
@@ -1,5 +1,6 @@
1
+ import { type BoundActions, type HookFunction } from 'react-sweet-state';
1
2
  import type { ProductPermissionsActions, ProductPermissionsStore } from './types';
2
3
  /**
3
4
  * @deprecated Use useProductPermissionsStore from "@atlaskit/teams-app-internal-product-permissions" instead
4
5
  */
5
- export declare const useProductPermissionsStore: import("react-sweet-state").HookFunction<ProductPermissionsStore, import("react-sweet-state").BoundActions<ProductPermissionsStore, ProductPermissionsActions>, void>;
6
+ export declare const useProductPermissionsStore: HookFunction<ProductPermissionsStore, BoundActions<ProductPermissionsStore, ProductPermissionsActions>, void>;
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  "@atlaskit/skeleton": "^2.1.0",
43
43
  "@atlaskit/teams-app-internal-analytics": "^1.27.0",
44
44
  "@atlaskit/teams-app-internal-product-permissions": "^1.3.0",
45
- "@atlaskit/teams-client": "^4.30.0",
45
+ "@atlaskit/teams-client": "^4.31.0",
46
46
  "@atlaskit/tokens": "^11.4.0",
47
47
  "@atlaskit/tooltip": "^21.1.0",
48
48
  "@babel/runtime": "^7.0.0",
@@ -106,7 +106,7 @@
106
106
  }
107
107
  },
108
108
  "name": "@atlaskit/teams-public",
109
- "version": "0.72.2",
109
+ "version": "0.74.0",
110
110
  "description": "Public components related to teams",
111
111
  "author": "Atlassian Pty Ltd",
112
112
  "license": "Apache-2.0",
@@ -130,9 +130,6 @@
130
130
  "enable_multi_team_containers_state": {
131
131
  "type": "boolean"
132
132
  },
133
- "enable-fix-team-container-height": {
134
- "type": "boolean"
135
- },
136
133
  "ptc-missed-analytics-migration-events": {
137
134
  "type": "boolean"
138
135
  },
@@ -1,120 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.StatusCode = exports.SLOIgnoreError = exports.HttpError = exports.GraphQLError = exports.DefaultError = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
12
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
13
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
14
- var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
15
- var _GraphQLError;
16
- function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
17
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
18
- var StatusCode = exports.StatusCode = /*#__PURE__*/function (StatusCode) {
19
- StatusCode[StatusCode["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
20
- StatusCode[StatusCode["FORBIDDEN"] = 403] = "FORBIDDEN";
21
- StatusCode[StatusCode["TIMEOUT"] = 408] = "TIMEOUT";
22
- StatusCode[StatusCode["GONE"] = 410] = "GONE";
23
- StatusCode[StatusCode["PAYLOAD_TOO_LARGE"] = 413] = "PAYLOAD_TOO_LARGE";
24
- return StatusCode;
25
- }({});
26
- var CommonError = /*#__PURE__*/function (_Error) {
27
- function CommonError(message) {
28
- var _this;
29
- (0, _classCallCheck2.default)(this, CommonError);
30
- _this = _callSuper(this, CommonError, [message]);
31
- _this.name = _this.constructor.name;
32
- _this.message = message || 'UnknownError';
33
- _this.stack = new Error(message).stack || '';
34
- return _this;
35
- }
36
- (0, _inherits2.default)(CommonError, _Error);
37
- return (0, _createClass2.default)(CommonError);
38
- }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
39
- var DefaultError = exports.DefaultError = /*#__PURE__*/function (_CommonError) {
40
- function DefaultError(_ref) {
41
- var _this2;
42
- var message = _ref.message;
43
- (0, _classCallCheck2.default)(this, DefaultError);
44
- _this2 = _callSuper(this, DefaultError, [message || 'UnknownError']);
45
- Object.setPrototypeOf(_this2, DefaultError.prototype);
46
- return _this2;
47
- }
48
- (0, _inherits2.default)(DefaultError, _CommonError);
49
- return (0, _createClass2.default)(DefaultError);
50
- }(CommonError);
51
- /**
52
- * These errors will not fail UFO experiences
53
- */
54
- var SLOIgnoreError = exports.SLOIgnoreError = /*#__PURE__*/function (_CommonError2) {
55
- function SLOIgnoreError(_ref2) {
56
- var _this3;
57
- var message = _ref2.message;
58
- (0, _classCallCheck2.default)(this, SLOIgnoreError);
59
- _this3 = _callSuper(this, SLOIgnoreError, ["SentryIgnore: ".concat(message || 'UnknownError')]);
60
- Object.setPrototypeOf(_this3, SLOIgnoreError.prototype);
61
- return _this3;
62
- }
63
- (0, _inherits2.default)(SLOIgnoreError, _CommonError2);
64
- return (0, _createClass2.default)(SLOIgnoreError);
65
- }(CommonError);
66
- // Http Errors
67
- var HttpError = exports.HttpError = /*#__PURE__*/function (_CommonError3) {
68
- function HttpError(_ref3) {
69
- var _this4;
70
- var message = _ref3.message,
71
- status = _ref3.status,
72
- traceId = _ref3.traceId,
73
- path = _ref3.path;
74
- (0, _classCallCheck2.default)(this, HttpError);
75
- _this4 = _callSuper(this, HttpError, [message]);
76
- Object.setPrototypeOf(_this4, HttpError.prototype);
77
- _this4.status = status;
78
- _this4.traceId = traceId;
79
- _this4.path = path;
80
- return _this4;
81
- }
82
- (0, _inherits2.default)(HttpError, _CommonError3);
83
- return (0, _createClass2.default)(HttpError);
84
- }(CommonError); // Graphql Errors
85
- var GraphQLError = exports.GraphQLError = /*#__PURE__*/function (_CommonError4) {
86
- // tslint:disable-line no-any
87
-
88
- function GraphQLError(_ref4) {
89
- var _this5;
90
- var message = _ref4.message,
91
- _ref4$category = _ref4.category,
92
- category = _ref4$category === void 0 ? 'default' : _ref4$category,
93
- fields = _ref4.fields;
94
- (0, _classCallCheck2.default)(this, GraphQLError);
95
- _this5 = _callSuper(this, GraphQLError, [message]);
96
- Object.setPrototypeOf(_this5, GraphQLError.prototype);
97
- _this5.category = category;
98
- if (fields) {
99
- _this5.fields = fields;
100
- }
101
- return _this5;
102
- }
103
- (0, _inherits2.default)(GraphQLError, _CommonError4);
104
- return (0, _createClass2.default)(GraphQLError);
105
- }(CommonError);
106
- _GraphQLError = GraphQLError;
107
- (0, _defineProperty2.default)(GraphQLError, "from", function (rawErrors) {
108
- var firstError = rawErrors[0];
109
- var errorData = {
110
- category: firstError.category,
111
- message: firstError.message
112
- };
113
- if (firstError.fields) {
114
- errorData.fields = firstError.fields.reduce(function (obj, item) {
115
- obj[item.field] = item.message;
116
- return obj;
117
- }, {});
118
- }
119
- return new _GraphQLError(errorData);
120
- });
@@ -1,119 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.fetchWithExponentialBackoff = exports.EXPONENTIAL_BACKOFF_RETRY_POLICY = void 0;
8
- exports.is5xx = is5xx;
9
- exports.isFetchResponse = isFetchResponse;
10
- exports.withExponentialBackoff = withExponentialBackoff;
11
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
12
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
13
- var EXPONENTIAL_BACKOFF_RETRY_POLICY = exports.EXPONENTIAL_BACKOFF_RETRY_POLICY = {
14
- INITIAL_DELAY: 200,
15
- MAX_RETRIES: 5,
16
- JITTER: true
17
- };
18
-
19
- /**
20
- * Checks whether a status code is a 5xx HTTP code.
21
- * @param {number} status HTTP status code
22
- */
23
- function is5xx(status) {
24
- return 500 <= status && status <= 599;
25
- }
26
- function isFetchResponse(data) {
27
- if (!data || !data.hasOwnProperty('response')) {
28
- return false;
29
- }
30
- return data.response instanceof Response;
31
- }
32
-
33
- // tslint:disable-next-line no-any
34
-
35
- // tslint:disable-next-line no-any
36
- var defaultRetryIfCallback = function defaultRetryIfCallback(a) {
37
- return !a;
38
- };
39
- var defaultOptions = {
40
- initial: 200,
41
- jitter: false,
42
- max: 5,
43
- retryIf: defaultRetryIfCallback
44
- };
45
- /**
46
- * Transparently wrap a function so that it is retried until it succeeds or reaches a max retry limit.
47
- * The returned function has the same signature as the wrapped function.
48
- *
49
- * Modified from https://jsfiddle.net/pajtai/pLka0ow9/
50
- */
51
- function withExponentialBackoff(toTry) {
52
- var hofOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultOptions;
53
- var initial = hofOptions.initial,
54
- jitter = hofOptions.jitter,
55
- max = hofOptions.max,
56
- retryIf = hofOptions.retryIf;
57
-
58
- // Initialize max retry decrementing counter (range of max...0)
59
- var attemptsRemaining = max;
60
-
61
- // Initialize delay. This will exponentially increase each retry (delay = intial * 2^n)
62
- var delay = initial;
63
-
64
- /**
65
- * This function calls itself recursively until `retryIf` evaluates false or the retry limit is reached.
66
- * The functioned-to-be-retried is called on each recursion.
67
- */
68
- return /*#__PURE__*/function () {
69
- var _tryWithExponentialBackoff = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
70
- var result,
71
- _args = arguments;
72
- return _regenerator.default.wrap(function _callee$(_context) {
73
- while (1) switch (_context.prev = _context.next) {
74
- case 0:
75
- _context.next = 2;
76
- return toTry.apply(void 0, _args);
77
- case 2:
78
- result = _context.sent;
79
- --attemptsRemaining;
80
-
81
- // If tried function was unsuccessful and there are still retries remaining, retry!
82
- if (!(retryIf && retryIf(result) && attemptsRemaining > 0)) {
83
- _context.next = 9;
84
- break;
85
- }
86
- _context.next = 7;
87
- return new Promise(function (resolve) {
88
- return setTimeout(resolve, jitter ? Math.random() * delay : delay);
89
- });
90
- case 7:
91
- // Exponentially increase delay
92
- delay *= 2;
93
-
94
- // Initiate retry
95
- return _context.abrupt("return", tryWithExponentialBackoff.apply(void 0, _args));
96
- case 9:
97
- return _context.abrupt("return", result);
98
- case 10:
99
- case "end":
100
- return _context.stop();
101
- }
102
- }, _callee);
103
- }));
104
- function tryWithExponentialBackoff() {
105
- return _tryWithExponentialBackoff.apply(this, arguments);
106
- }
107
- return tryWithExponentialBackoff;
108
- }();
109
- }
110
- var fetchWithExponentialBackoff = exports.fetchWithExponentialBackoff = withExponentialBackoff(function (url, init) {
111
- return fetch(url, init);
112
- }, {
113
- initial: EXPONENTIAL_BACKOFF_RETRY_POLICY.INITIAL_DELAY,
114
- jitter: EXPONENTIAL_BACKOFF_RETRY_POLICY.JITTER,
115
- max: EXPONENTIAL_BACKOFF_RETRY_POLICY.MAX_RETRIES,
116
- retryIf: function retryIf(response) {
117
- return is5xx(response.status);
118
- }
119
- });