@atlaskit/teams-public 0.72.1 → 0.73.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 +15 -0
- package/dist/cjs/common/hooks/useSpaceInviteScheduler.js +40 -0
- package/dist/cjs/common/utils/spaceInviteScheduler.js +18 -1
- package/dist/cjs/next/ui/team-containers/add-container-card/index.js +2 -3
- package/dist/cjs/next/ui/team-containers/team-link-card/index.js +1 -2
- package/dist/cjs/ui/team-containers/main.js +2 -3
- package/dist/es2019/common/hooks/useSpaceInviteScheduler.js +35 -0
- package/dist/es2019/common/utils/spaceInviteScheduler.js +18 -1
- package/dist/es2019/next/ui/team-containers/add-container-card/index.js +2 -3
- package/dist/es2019/next/ui/team-containers/team-link-card/index.js +1 -2
- package/dist/es2019/ui/team-containers/main.js +2 -3
- package/dist/esm/common/hooks/useSpaceInviteScheduler.js +35 -0
- package/dist/esm/common/utils/spaceInviteScheduler.js +18 -1
- package/dist/esm/next/ui/team-containers/add-container-card/index.js +2 -3
- package/dist/esm/next/ui/team-containers/team-link-card/index.js +1 -2
- package/dist/esm/ui/team-containers/main.js +2 -3
- package/dist/types/common/hooks/useSpaceInviteScheduler.d.ts +10 -0
- package/dist/types/common/utils/get-is-experiment-enabled.d.ts +9 -9
- package/dist/types/common/utils/spaceInviteScheduler.d.ts +10 -0
- package/dist/types/controllers/hooks/use-create-containers/index.d.ts +2 -2
- package/dist/types/controllers/hooks/use-team-containers/index.d.ts +6 -6
- package/dist/types/controllers/hooks/use-team-containers/multi-team.d.ts +6 -6
- package/dist/types/controllers/product-permission/main.d.ts +2 -1
- package/dist/types-ts4.5/common/hooks/useSpaceInviteScheduler.d.ts +10 -0
- package/dist/types-ts4.5/common/utils/get-is-experiment-enabled.d.ts +9 -9
- package/dist/types-ts4.5/common/utils/spaceInviteScheduler.d.ts +10 -0
- package/dist/types-ts4.5/controllers/hooks/use-create-containers/index.d.ts +2 -2
- package/dist/types-ts4.5/controllers/hooks/use-team-containers/index.d.ts +6 -6
- package/dist/types-ts4.5/controllers/hooks/use-team-containers/multi-team.d.ts +6 -6
- package/dist/types-ts4.5/controllers/product-permission/main.d.ts +2 -1
- package/package.json +12 -16
- package/space-invite-scheduler/package.json +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/teams-public
|
|
2
2
|
|
|
3
|
+
## 0.73.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`336c2e0b7bbff`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/336c2e0b7bbff) -
|
|
8
|
+
Remove enable-fix-team-container-height feature gate and enable height fix permanently
|
|
9
|
+
|
|
10
|
+
## 0.72.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`fd9cfb7fca5c6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fd9cfb7fca5c6) -
|
|
15
|
+
Internal changes to remove unnecessary token fallbacks and imports from `@atlaskit/theme`
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 0.72.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useSpaceInviteScheduler = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
|
+
var _spaceInviteScheduler = require("../utils/spaceInviteScheduler");
|
|
10
|
+
/**
|
|
11
|
+
* Registers `visibilitychange` and `beforeunload` listeners that flush all
|
|
12
|
+
* pending scheduled invites when the page is being torn down. On unmount the
|
|
13
|
+
* listeners are removed and any remaining pending invites are flushed.
|
|
14
|
+
*
|
|
15
|
+
* Call this once in a long-lived component (e.g. the Team Links sidebar) so
|
|
16
|
+
* that listeners survive popup open/close cycles. Consumers that need to
|
|
17
|
+
* schedule or cancel invites should import `spaceInviteScheduler` directly.
|
|
18
|
+
*/
|
|
19
|
+
var useSpaceInviteScheduler = exports.useSpaceInviteScheduler = function useSpaceInviteScheduler() {
|
|
20
|
+
(0, _react.useEffect)(function () {
|
|
21
|
+
if (!(0, _platformFeatureFlags.fg)('space-team_linking_invites_fg')) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
var onVisibilityChange = function onVisibilityChange() {
|
|
25
|
+
if (document.visibilityState === 'hidden') {
|
|
26
|
+
_spaceInviteScheduler.spaceInviteScheduler.flushAll();
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var onBeforeUnload = function onBeforeUnload() {
|
|
30
|
+
_spaceInviteScheduler.spaceInviteScheduler.flushAll();
|
|
31
|
+
};
|
|
32
|
+
document.addEventListener('visibilitychange', onVisibilityChange);
|
|
33
|
+
window.addEventListener('beforeunload', onBeforeUnload);
|
|
34
|
+
return function () {
|
|
35
|
+
document.removeEventListener('visibilitychange', onVisibilityChange);
|
|
36
|
+
window.removeEventListener('beforeunload', onBeforeUnload);
|
|
37
|
+
_spaceInviteScheduler.spaceInviteScheduler.flushAll();
|
|
38
|
+
};
|
|
39
|
+
}, []);
|
|
40
|
+
};
|
|
@@ -14,7 +14,7 @@ exports.spaceInviteScheduler = void 0;
|
|
|
14
14
|
* the global scope — a simple in-memory workaround is sufficient here.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
var DEBOUNCE_MS =
|
|
17
|
+
var DEBOUNCE_MS = 15000;
|
|
18
18
|
var pending = new Map();
|
|
19
19
|
|
|
20
20
|
// Callers pass IDs in different formats — the teams package passes full ARIs
|
|
@@ -36,6 +36,7 @@ var spaceInviteScheduler = exports.spaceInviteScheduler = {
|
|
|
36
36
|
clearTimeout(existing.timeoutId);
|
|
37
37
|
}
|
|
38
38
|
pending.set(key, {
|
|
39
|
+
callback: callback,
|
|
39
40
|
timeoutId: setTimeout(function () {
|
|
40
41
|
pending.delete(key);
|
|
41
42
|
callback();
|
|
@@ -49,5 +50,21 @@ var spaceInviteScheduler = exports.spaceInviteScheduler = {
|
|
|
49
50
|
clearTimeout(existing.timeoutId);
|
|
50
51
|
pending.delete(key);
|
|
51
52
|
}
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* Immediately fires all pending callbacks and clears the queue.
|
|
56
|
+
* Called automatically on page unload (visibilitychange / beforeunload)
|
|
57
|
+
* so that debounced invites are not lost when the user navigates away.
|
|
58
|
+
*
|
|
59
|
+
* Important: callbacks invoked during page teardown must use
|
|
60
|
+
* `fetch({ keepalive: true })` or `navigator.sendBeacon` — a regular
|
|
61
|
+
* `fetch` without `keepalive` may be cancelled by the browser.
|
|
62
|
+
*/
|
|
63
|
+
flushAll: function flushAll() {
|
|
64
|
+
pending.forEach(function (entry) {
|
|
65
|
+
clearTimeout(entry.timeoutId);
|
|
66
|
+
entry.callback();
|
|
67
|
+
});
|
|
68
|
+
pending.clear();
|
|
52
69
|
}
|
|
53
70
|
};
|
|
@@ -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,
|
|
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,
|
|
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,
|
|
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,
|
|
@@ -18,7 +18,6 @@ var _primitives = require("@atlaskit/primitives");
|
|
|
18
18
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
19
19
|
var _teamsAppInternalAnalytics = require("@atlaskit/teams-app-internal-analytics");
|
|
20
20
|
var _teamsAppInternalProductPermissions = require("@atlaskit/teams-app-internal-product-permissions");
|
|
21
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
22
21
|
var _teamContainersSkeleton = require("../../common/ui/team-containers-skeleton");
|
|
23
22
|
var _spaceInviteScheduler = require("../../common/utils/spaceInviteScheduler");
|
|
24
23
|
var _controllers = require("../../controllers");
|
|
@@ -34,8 +33,8 @@ var _teamLinkCard = require("./team-link-card");
|
|
|
34
33
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
35
34
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
36
35
|
|
|
37
|
-
var ICON_BACKGROUND = exports.ICON_BACKGROUND = "var(--ds-icon-inverse,
|
|
38
|
-
var ICON_COLOR = exports.ICON_COLOR = "var(--ds-icon-subtle,
|
|
36
|
+
var ICON_BACKGROUND = exports.ICON_BACKGROUND = "var(--ds-icon-inverse, #FFFFFF)";
|
|
37
|
+
var ICON_COLOR = exports.ICON_COLOR = "var(--ds-icon-subtle, #505258)";
|
|
39
38
|
var MAX_NUMBER_OF_CONTAINERS_TO_SHOW = exports.MAX_NUMBER_OF_CONTAINERS_TO_SHOW = 4;
|
|
40
39
|
var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
41
40
|
var teamId = _ref.teamId,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { spaceInviteScheduler } from '../utils/spaceInviteScheduler';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Registers `visibilitychange` and `beforeunload` listeners that flush all
|
|
7
|
+
* pending scheduled invites when the page is being torn down. On unmount the
|
|
8
|
+
* listeners are removed and any remaining pending invites are flushed.
|
|
9
|
+
*
|
|
10
|
+
* Call this once in a long-lived component (e.g. the Team Links sidebar) so
|
|
11
|
+
* that listeners survive popup open/close cycles. Consumers that need to
|
|
12
|
+
* schedule or cancel invites should import `spaceInviteScheduler` directly.
|
|
13
|
+
*/
|
|
14
|
+
export const useSpaceInviteScheduler = () => {
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (!fg('space-team_linking_invites_fg')) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const onVisibilityChange = () => {
|
|
20
|
+
if (document.visibilityState === 'hidden') {
|
|
21
|
+
spaceInviteScheduler.flushAll();
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const onBeforeUnload = () => {
|
|
25
|
+
spaceInviteScheduler.flushAll();
|
|
26
|
+
};
|
|
27
|
+
document.addEventListener('visibilitychange', onVisibilityChange);
|
|
28
|
+
window.addEventListener('beforeunload', onBeforeUnload);
|
|
29
|
+
return () => {
|
|
30
|
+
document.removeEventListener('visibilitychange', onVisibilityChange);
|
|
31
|
+
window.removeEventListener('beforeunload', onBeforeUnload);
|
|
32
|
+
spaceInviteScheduler.flushAll();
|
|
33
|
+
};
|
|
34
|
+
}, []);
|
|
35
|
+
};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* the global scope — a simple in-memory workaround is sufficient here.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
const DEBOUNCE_MS =
|
|
11
|
+
const DEBOUNCE_MS = 15_000;
|
|
12
12
|
const pending = new Map();
|
|
13
13
|
|
|
14
14
|
// Callers pass IDs in different formats — the teams package passes full ARIs
|
|
@@ -28,6 +28,7 @@ export const spaceInviteScheduler = {
|
|
|
28
28
|
clearTimeout(existing.timeoutId);
|
|
29
29
|
}
|
|
30
30
|
pending.set(key, {
|
|
31
|
+
callback,
|
|
31
32
|
timeoutId: setTimeout(() => {
|
|
32
33
|
pending.delete(key);
|
|
33
34
|
callback();
|
|
@@ -41,5 +42,21 @@ export const spaceInviteScheduler = {
|
|
|
41
42
|
clearTimeout(existing.timeoutId);
|
|
42
43
|
pending.delete(key);
|
|
43
44
|
}
|
|
45
|
+
},
|
|
46
|
+
/**
|
|
47
|
+
* Immediately fires all pending callbacks and clears the queue.
|
|
48
|
+
* Called automatically on page unload (visibilitychange / beforeunload)
|
|
49
|
+
* so that debounced invites are not lost when the user navigates away.
|
|
50
|
+
*
|
|
51
|
+
* Important: callbacks invoked during page teardown must use
|
|
52
|
+
* `fetch({ keepalive: true })` or `navigator.sendBeacon` — a regular
|
|
53
|
+
* `fetch` without `keepalive` may be cancelled by the browser.
|
|
54
|
+
*/
|
|
55
|
+
flushAll: () => {
|
|
56
|
+
pending.forEach(entry => {
|
|
57
|
+
clearTimeout(entry.timeoutId);
|
|
58
|
+
entry.callback();
|
|
59
|
+
});
|
|
60
|
+
pending.clear();
|
|
44
61
|
}
|
|
45
62
|
};
|
|
@@ -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,
|
|
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,
|
|
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,
|
|
101
|
+
xcss: cx(styles.card, styles.cardHeight)
|
|
103
102
|
}, /*#__PURE__*/React.createElement(ContainerIcon, {
|
|
104
103
|
containerType: containerType,
|
|
105
104
|
title: title,
|
|
@@ -8,7 +8,6 @@ import { Grid } from '@atlaskit/primitives';
|
|
|
8
8
|
import { Inline, Stack } from '@atlaskit/primitives/compiled';
|
|
9
9
|
import { useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
|
|
10
10
|
import { hasProductPermission, useProductPermissions } from '@atlaskit/teams-app-internal-product-permissions';
|
|
11
|
-
import { N0, N90 } from '@atlaskit/theme/colors';
|
|
12
11
|
import { TeamContainersSkeleton } from '../../common/ui/team-containers-skeleton';
|
|
13
12
|
import { spaceInviteScheduler } from '../../common/utils/spaceInviteScheduler';
|
|
14
13
|
import { hasProductPermission as hasProductPermissionOld } from '../../controllers';
|
|
@@ -21,8 +20,8 @@ import { getAddContainerCards } from './add-container-card';
|
|
|
21
20
|
import { DisconnectDialogLazy } from './disconnect-dialog/async';
|
|
22
21
|
import { NoProductAccessState } from './no-product-access-empty-state';
|
|
23
22
|
import { TeamLinkCard } from './team-link-card';
|
|
24
|
-
export const ICON_BACKGROUND =
|
|
25
|
-
export const ICON_COLOR =
|
|
23
|
+
export const ICON_BACKGROUND = "var(--ds-icon-inverse, #FFFFFF)";
|
|
24
|
+
export const ICON_COLOR = "var(--ds-icon-subtle, #505258)";
|
|
26
25
|
export const MAX_NUMBER_OF_CONTAINERS_TO_SHOW = 4;
|
|
27
26
|
export const TeamContainers = ({
|
|
28
27
|
teamId,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { spaceInviteScheduler } from '../utils/spaceInviteScheduler';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Registers `visibilitychange` and `beforeunload` listeners that flush all
|
|
7
|
+
* pending scheduled invites when the page is being torn down. On unmount the
|
|
8
|
+
* listeners are removed and any remaining pending invites are flushed.
|
|
9
|
+
*
|
|
10
|
+
* Call this once in a long-lived component (e.g. the Team Links sidebar) so
|
|
11
|
+
* that listeners survive popup open/close cycles. Consumers that need to
|
|
12
|
+
* schedule or cancel invites should import `spaceInviteScheduler` directly.
|
|
13
|
+
*/
|
|
14
|
+
export var useSpaceInviteScheduler = function useSpaceInviteScheduler() {
|
|
15
|
+
useEffect(function () {
|
|
16
|
+
if (!fg('space-team_linking_invites_fg')) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
var onVisibilityChange = function onVisibilityChange() {
|
|
20
|
+
if (document.visibilityState === 'hidden') {
|
|
21
|
+
spaceInviteScheduler.flushAll();
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
var onBeforeUnload = function onBeforeUnload() {
|
|
25
|
+
spaceInviteScheduler.flushAll();
|
|
26
|
+
};
|
|
27
|
+
document.addEventListener('visibilitychange', onVisibilityChange);
|
|
28
|
+
window.addEventListener('beforeunload', onBeforeUnload);
|
|
29
|
+
return function () {
|
|
30
|
+
document.removeEventListener('visibilitychange', onVisibilityChange);
|
|
31
|
+
window.removeEventListener('beforeunload', onBeforeUnload);
|
|
32
|
+
spaceInviteScheduler.flushAll();
|
|
33
|
+
};
|
|
34
|
+
}, []);
|
|
35
|
+
};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* the global scope — a simple in-memory workaround is sufficient here.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
var DEBOUNCE_MS =
|
|
11
|
+
var DEBOUNCE_MS = 15000;
|
|
12
12
|
var pending = new Map();
|
|
13
13
|
|
|
14
14
|
// Callers pass IDs in different formats — the teams package passes full ARIs
|
|
@@ -30,6 +30,7 @@ export var spaceInviteScheduler = {
|
|
|
30
30
|
clearTimeout(existing.timeoutId);
|
|
31
31
|
}
|
|
32
32
|
pending.set(key, {
|
|
33
|
+
callback: callback,
|
|
33
34
|
timeoutId: setTimeout(function () {
|
|
34
35
|
pending.delete(key);
|
|
35
36
|
callback();
|
|
@@ -43,5 +44,21 @@ export var spaceInviteScheduler = {
|
|
|
43
44
|
clearTimeout(existing.timeoutId);
|
|
44
45
|
pending.delete(key);
|
|
45
46
|
}
|
|
47
|
+
},
|
|
48
|
+
/**
|
|
49
|
+
* Immediately fires all pending callbacks and clears the queue.
|
|
50
|
+
* Called automatically on page unload (visibilitychange / beforeunload)
|
|
51
|
+
* so that debounced invites are not lost when the user navigates away.
|
|
52
|
+
*
|
|
53
|
+
* Important: callbacks invoked during page teardown must use
|
|
54
|
+
* `fetch({ keepalive: true })` or `navigator.sendBeacon` — a regular
|
|
55
|
+
* `fetch` without `keepalive` may be cancelled by the browser.
|
|
56
|
+
*/
|
|
57
|
+
flushAll: function flushAll() {
|
|
58
|
+
pending.forEach(function (entry) {
|
|
59
|
+
clearTimeout(entry.timeoutId);
|
|
60
|
+
entry.callback();
|
|
61
|
+
});
|
|
62
|
+
pending.clear();
|
|
46
63
|
}
|
|
47
64
|
};
|
|
@@ -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,
|
|
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,
|
|
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,
|
|
113
|
+
xcss: cx(styles.card, styles.cardHeight)
|
|
115
114
|
}, /*#__PURE__*/React.createElement(ContainerIcon, {
|
|
116
115
|
containerType: containerType,
|
|
117
116
|
title: title,
|
|
@@ -11,7 +11,6 @@ import { Grid } from '@atlaskit/primitives';
|
|
|
11
11
|
import { Inline, Stack } from '@atlaskit/primitives/compiled';
|
|
12
12
|
import { useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
|
|
13
13
|
import { hasProductPermission, useProductPermissions } from '@atlaskit/teams-app-internal-product-permissions';
|
|
14
|
-
import { N0, N90 } from '@atlaskit/theme/colors';
|
|
15
14
|
import { TeamContainersSkeleton } from '../../common/ui/team-containers-skeleton';
|
|
16
15
|
import { spaceInviteScheduler } from '../../common/utils/spaceInviteScheduler';
|
|
17
16
|
import { hasProductPermission as hasProductPermissionOld } from '../../controllers';
|
|
@@ -24,8 +23,8 @@ import { getAddContainerCards } from './add-container-card';
|
|
|
24
23
|
import { DisconnectDialogLazy } from './disconnect-dialog/async';
|
|
25
24
|
import { NoProductAccessState } from './no-product-access-empty-state';
|
|
26
25
|
import { TeamLinkCard } from './team-link-card';
|
|
27
|
-
export var ICON_BACKGROUND = "var(--ds-icon-inverse,
|
|
28
|
-
export var ICON_COLOR = "var(--ds-icon-subtle,
|
|
26
|
+
export var ICON_BACKGROUND = "var(--ds-icon-inverse, #FFFFFF)";
|
|
27
|
+
export var ICON_COLOR = "var(--ds-icon-subtle, #505258)";
|
|
29
28
|
export var MAX_NUMBER_OF_CONTAINERS_TO_SHOW = 4;
|
|
30
29
|
export var TeamContainers = function TeamContainers(_ref) {
|
|
31
30
|
var teamId = _ref.teamId,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registers `visibilitychange` and `beforeunload` listeners that flush all
|
|
3
|
+
* pending scheduled invites when the page is being torn down. On unmount the
|
|
4
|
+
* listeners are removed and any remaining pending invites are flushed.
|
|
5
|
+
*
|
|
6
|
+
* Call this once in a long-lived component (e.g. the Team Links sidebar) so
|
|
7
|
+
* that listeners survive popup open/close cycles. Consumers that need to
|
|
8
|
+
* schedule or cancel invites should import `spaceInviteScheduler` directly.
|
|
9
|
+
*/
|
|
10
|
+
export declare const useSpaceInviteScheduler: () => 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:
|
|
12
|
-
readonly CONTROL:
|
|
13
|
-
readonly EXPERIMENT:
|
|
14
|
-
readonly VARIATION:
|
|
15
|
-
readonly VAR1:
|
|
16
|
-
readonly VAR2:
|
|
17
|
-
readonly VAR3:
|
|
18
|
-
readonly VAR4:
|
|
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: (
|
|
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;
|
|
@@ -10,4 +10,14 @@
|
|
|
10
10
|
export declare const spaceInviteScheduler: {
|
|
11
11
|
scheduleInvite: (teamId: string, containerId: string, callback: () => void) => void;
|
|
12
12
|
cancelInvite: (teamId: string, containerId: string) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Immediately fires all pending callbacks and clears the queue.
|
|
15
|
+
* Called automatically on page unload (visibilitychange / beforeunload)
|
|
16
|
+
* so that debounced invites are not lost when the user navigates away.
|
|
17
|
+
*
|
|
18
|
+
* Important: callbacks invoked during page teardown must use
|
|
19
|
+
* `fetch({ keepalive: true })` or `navigator.sendBeacon` — a regular
|
|
20
|
+
* `fetch` without `keepalive` may be cancelled by the browser.
|
|
21
|
+
*/
|
|
22
|
+
flushAll: () => void;
|
|
13
23
|
};
|
|
@@ -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:
|
|
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:
|
|
23
|
-
fetchTeamContainers: (teamId: string, fireAnalytics: ReturnType<typeof useAnalyticsEvents>[
|
|
24
|
-
refetchTeamContainers: (fireAnalytics: ReturnType<typeof useAnalyticsEvents>[
|
|
25
|
-
fetchNumberOfConnectedTeams: (containerId: string, fireAnalytics: ReturnType<typeof useAnalyticsEvents>[
|
|
26
|
-
fetchConnectedTeams: (containerId: string, fireAnalytics: ReturnType<typeof useAnalyticsEvents>[
|
|
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:
|
|
34
|
-
fetchTeamContainers: (teamId: string, fireAnalytics: (action: string, actionSubject: string, error?: Error) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>[
|
|
35
|
-
refetchTeamContainers: (teamId: string, fireAnalytics: (action: string, actionSubject: string, error?: Error) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>[
|
|
36
|
-
fetchNumberOfConnectedTeams: (teamId: string, containerId: string, fireAnalytics: (props: FireAnalyticsProps) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>[
|
|
37
|
-
fetchConnectedTeams: (teamId: string, containerId: string, fireAnalytics: (props: FireAnalyticsProps) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>[
|
|
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:
|
|
6
|
+
export declare const useProductPermissionsStore: HookFunction<ProductPermissionsStore, BoundActions<ProductPermissionsStore, ProductPermissionsActions>, void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registers `visibilitychange` and `beforeunload` listeners that flush all
|
|
3
|
+
* pending scheduled invites when the page is being torn down. On unmount the
|
|
4
|
+
* listeners are removed and any remaining pending invites are flushed.
|
|
5
|
+
*
|
|
6
|
+
* Call this once in a long-lived component (e.g. the Team Links sidebar) so
|
|
7
|
+
* that listeners survive popup open/close cycles. Consumers that need to
|
|
8
|
+
* schedule or cancel invites should import `spaceInviteScheduler` directly.
|
|
9
|
+
*/
|
|
10
|
+
export declare const useSpaceInviteScheduler: () => 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:
|
|
12
|
-
readonly CONTROL:
|
|
13
|
-
readonly EXPERIMENT:
|
|
14
|
-
readonly VARIATION:
|
|
15
|
-
readonly VAR1:
|
|
16
|
-
readonly VAR2:
|
|
17
|
-
readonly VAR3:
|
|
18
|
-
readonly VAR4:
|
|
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: (
|
|
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;
|
|
@@ -10,4 +10,14 @@
|
|
|
10
10
|
export declare const spaceInviteScheduler: {
|
|
11
11
|
scheduleInvite: (teamId: string, containerId: string, callback: () => void) => void;
|
|
12
12
|
cancelInvite: (teamId: string, containerId: string) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Immediately fires all pending callbacks and clears the queue.
|
|
15
|
+
* Called automatically on page unload (visibilitychange / beforeunload)
|
|
16
|
+
* so that debounced invites are not lost when the user navigates away.
|
|
17
|
+
*
|
|
18
|
+
* Important: callbacks invoked during page teardown must use
|
|
19
|
+
* `fetch({ keepalive: true })` or `navigator.sendBeacon` — a regular
|
|
20
|
+
* `fetch` without `keepalive` may be cancelled by the browser.
|
|
21
|
+
*/
|
|
22
|
+
flushAll: () => void;
|
|
13
23
|
};
|
|
@@ -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:
|
|
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:
|
|
23
|
-
fetchTeamContainers: (teamId: string, fireAnalytics: ReturnType<typeof useAnalyticsEvents>[
|
|
24
|
-
refetchTeamContainers: (fireAnalytics: ReturnType<typeof useAnalyticsEvents>[
|
|
25
|
-
fetchNumberOfConnectedTeams: (containerId: string, fireAnalytics: ReturnType<typeof useAnalyticsEvents>[
|
|
26
|
-
fetchConnectedTeams: (containerId: string, fireAnalytics: ReturnType<typeof useAnalyticsEvents>[
|
|
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:
|
|
34
|
-
fetchTeamContainers: (teamId: string, fireAnalytics: (action: string, actionSubject: string, error?: Error) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>[
|
|
35
|
-
refetchTeamContainers: (teamId: string, fireAnalytics: (action: string, actionSubject: string, error?: Error) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>[
|
|
36
|
-
fetchNumberOfConnectedTeams: (teamId: string, containerId: string, fireAnalytics: (props: FireAnalyticsProps) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>[
|
|
37
|
-
fetchConnectedTeams: (teamId: string, containerId: string, fireAnalytics: (props: FireAnalyticsProps) => void, fireAnalyticsNext: ReturnType<typeof useAnalyticsEventsNext>[
|
|
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:
|
|
6
|
+
export declare const useProductPermissionsStore: HookFunction<ProductPermissionsStore, BoundActions<ProductPermissionsStore, ProductPermissionsActions>, void>;
|
package/package.json
CHANGED
|
@@ -25,27 +25,26 @@
|
|
|
25
25
|
"atlaskit:src": "src/index.ts",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@atlaskit/afm-i18n-platform-people-and-teams-teams-public": "2.39.0",
|
|
28
|
-
"@atlaskit/analytics-next": "^11.
|
|
29
|
-
"@atlaskit/avatar": "^25.
|
|
28
|
+
"@atlaskit/analytics-next": "^11.2.0",
|
|
29
|
+
"@atlaskit/avatar": "^25.11.0",
|
|
30
30
|
"@atlaskit/button": "^23.10.0",
|
|
31
31
|
"@atlaskit/css": "^0.19.0",
|
|
32
|
-
"@atlaskit/dropdown-menu": "^16.
|
|
32
|
+
"@atlaskit/dropdown-menu": "^16.8.0",
|
|
33
33
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
34
34
|
"@atlaskit/heading": "^5.3.0",
|
|
35
|
-
"@atlaskit/icon": "^
|
|
35
|
+
"@atlaskit/icon": "^34.0.0",
|
|
36
36
|
"@atlaskit/image": "^3.0.0",
|
|
37
37
|
"@atlaskit/link": "^3.3.0",
|
|
38
|
-
"@atlaskit/modal-dialog": "^14.
|
|
38
|
+
"@atlaskit/modal-dialog": "^14.14.0",
|
|
39
39
|
"@atlaskit/people-teams-ui-public": "^3.7.0",
|
|
40
40
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
41
|
-
"@atlaskit/primitives": "^18.
|
|
41
|
+
"@atlaskit/primitives": "^18.1.0",
|
|
42
42
|
"@atlaskit/skeleton": "^2.1.0",
|
|
43
43
|
"@atlaskit/teams-app-internal-analytics": "^1.27.0",
|
|
44
|
-
"@atlaskit/teams-app-internal-product-permissions": "^1.
|
|
44
|
+
"@atlaskit/teams-app-internal-product-permissions": "^1.3.0",
|
|
45
45
|
"@atlaskit/teams-client": "^4.30.0",
|
|
46
|
-
"@atlaskit/
|
|
47
|
-
"@atlaskit/
|
|
48
|
-
"@atlaskit/tooltip": "^21.0.0",
|
|
46
|
+
"@atlaskit/tokens": "^11.4.0",
|
|
47
|
+
"@atlaskit/tooltip": "^21.1.0",
|
|
49
48
|
"@babel/runtime": "^7.0.0",
|
|
50
49
|
"@compiled/react": "^0.20.0",
|
|
51
50
|
"@types/string-hash": "^1.1.3",
|
|
@@ -64,10 +63,10 @@
|
|
|
64
63
|
"@af/integration-testing": "workspace:^",
|
|
65
64
|
"@af/visual-regression": "workspace:^",
|
|
66
65
|
"@atlaskit/ssr": "workspace:^",
|
|
67
|
-
"@atlassian/a11y-jest-testing": "^0.
|
|
66
|
+
"@atlassian/a11y-jest-testing": "^0.11.0",
|
|
68
67
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
69
68
|
"@atlassian/ptc-test-utils": "^0.12.0",
|
|
70
|
-
"@atlassian/testing-library": "^0.
|
|
69
|
+
"@atlassian/testing-library": "^0.5.0",
|
|
71
70
|
"@testing-library/react": "^16.3.0",
|
|
72
71
|
"@testing-library/user-event": "^14.4.3",
|
|
73
72
|
"react-dom": "^18.2.0"
|
|
@@ -107,7 +106,7 @@
|
|
|
107
106
|
}
|
|
108
107
|
},
|
|
109
108
|
"name": "@atlaskit/teams-public",
|
|
110
|
-
"version": "0.
|
|
109
|
+
"version": "0.73.0",
|
|
111
110
|
"description": "Public components related to teams",
|
|
112
111
|
"author": "Atlassian Pty Ltd",
|
|
113
112
|
"license": "Apache-2.0",
|
|
@@ -131,9 +130,6 @@
|
|
|
131
130
|
"enable_multi_team_containers_state": {
|
|
132
131
|
"type": "boolean"
|
|
133
132
|
},
|
|
134
|
-
"enable-fix-team-container-height": {
|
|
135
|
-
"type": "boolean"
|
|
136
|
-
},
|
|
137
133
|
"ptc-missed-analytics-migration-events": {
|
|
138
134
|
"type": "boolean"
|
|
139
135
|
},
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/teams-public/space-invite-scheduler",
|
|
3
|
+
"main": "../dist/cjs/common/hooks/useSpaceInviteScheduler.js",
|
|
4
|
+
"module": "../dist/esm/common/hooks/useSpaceInviteScheduler.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/common/hooks/useSpaceInviteScheduler.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/common/hooks/useSpaceInviteScheduler.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/common/hooks/useSpaceInviteScheduler.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|