@atlaskit/mention 22.1.8 → 22.1.10
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 +12 -0
- package/afm-cc/tsconfig.json +55 -0
- package/dist/cjs/components/Mention/PrimitiveMention.js +12 -52
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/es2019/components/Mention/PrimitiveMention.js +13 -53
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/esm/components/Mention/PrimitiveMention.js +13 -53
- package/dist/esm/util/analytics.js +1 -1
- package/package.json +4 -4
- package/tmp/api-report-tmp.d.ts +0 -818
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/mention
|
|
2
2
|
|
|
3
|
+
## 22.1.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#57137](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/57137) [`9b9900944973`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9b9900944973) - Remove legacy theming logic from @atlaskit/date, @atlaskit/mention, @atlaskit/task-decision and @atlaskit/user-picker.
|
|
8
|
+
|
|
9
|
+
## 22.1.9
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 22.1.8
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../../tsconfig.entry-points.confluence.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"target": "es5",
|
|
6
|
+
"composite": true,
|
|
7
|
+
"outDir": "../dist",
|
|
8
|
+
"rootDir": "../",
|
|
9
|
+
"baseUrl": "../"
|
|
10
|
+
},
|
|
11
|
+
"include": [
|
|
12
|
+
"../src/**/*.ts",
|
|
13
|
+
"../src/**/*.tsx"
|
|
14
|
+
],
|
|
15
|
+
"exclude": [
|
|
16
|
+
"../src/**/__tests__/*",
|
|
17
|
+
"../src/**/*.test.*",
|
|
18
|
+
"../src/**/test.*"
|
|
19
|
+
],
|
|
20
|
+
"references": [
|
|
21
|
+
{
|
|
22
|
+
"path": "../../../analytics/analytics-gas-types/afm-cc/tsconfig.json"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"path": "../../../analytics/analytics-next/afm-cc/tsconfig.json"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"path": "../../../design-system/avatar/afm-cc/tsconfig.json"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"path": "../../../design-system/focus-ring/afm-cc/tsconfig.json"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"path": "../../../design-system/icon/afm-cc/tsconfig.json"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"path": "../../../design-system/lozenge/afm-cc/tsconfig.json"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"path": "../../../design-system/theme/afm-cc/tsconfig.json"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"path": "../../../design-system/tokens/afm-cc/tsconfig.json"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"path": "../../../design-system/tooltip/afm-cc/tsconfig.json"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"path": "../../../data/ufo-external/afm-cc/tsconfig.json"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"path": "../../util-service-support/afm-cc/tsconfig.json"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
@@ -10,7 +10,6 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
12
|
var _react = require("@emotion/react");
|
|
13
|
-
var _components = require("@atlaskit/theme/components");
|
|
14
13
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
14
|
var _types = require("../../types");
|
|
16
15
|
var _react2 = require("react");
|
|
@@ -18,82 +17,43 @@ var _excluded = ["mentionType"];
|
|
|
18
17
|
var _mentionStyle, _templateObject;
|
|
19
18
|
/** @jsx jsx */
|
|
20
19
|
var mentionStyle = (_mentionStyle = {}, (0, _defineProperty2.default)(_mentionStyle, _types.MentionType.SELF, {
|
|
21
|
-
background: (
|
|
22
|
-
light: "var(--ds-background-brand-bold, ".concat(_colors.B400, ")"),
|
|
23
|
-
dark: "var(--ds-background-brand-bold, ".concat(_colors.B200, ")")
|
|
24
|
-
}),
|
|
20
|
+
background: "var(--ds-background-brand-bold, ".concat(_colors.B400, ")"),
|
|
25
21
|
borderColor: 'transparent',
|
|
26
|
-
text: (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}),
|
|
30
|
-
hoveredBackground: (0, _components.themed)({
|
|
31
|
-
light: "var(--ds-background-brand-bold-hovered, ".concat(_colors.B400, ")"),
|
|
32
|
-
dark: "var(--ds-background-brand-bold-hovered, ".concat(_colors.B200, ")")
|
|
33
|
-
}),
|
|
34
|
-
pressedBackground: (0, _components.themed)({
|
|
35
|
-
light: "var(--ds-background-brand-bold-pressed, ".concat(_colors.B400, ")"),
|
|
36
|
-
dark: "var(--ds-background-brand-bold-pressed, ".concat(_colors.B200, ")")
|
|
37
|
-
})
|
|
22
|
+
text: "var(--ds-text-inverse, ".concat(_colors.N20, ")"),
|
|
23
|
+
hoveredBackground: "var(--ds-background-brand-bold-hovered, ".concat(_colors.B400, ")"),
|
|
24
|
+
pressedBackground: "var(--ds-background-brand-bold-pressed, ".concat(_colors.B400, ")")
|
|
38
25
|
}), (0, _defineProperty2.default)(_mentionStyle, _types.MentionType.RESTRICTED, {
|
|
39
26
|
background: 'transparent',
|
|
40
|
-
borderColor: (
|
|
41
|
-
|
|
42
|
-
dark: "var(--ds-border-bold, ".concat(_colors.DN80, ")")
|
|
43
|
-
}),
|
|
44
|
-
text: (0, _components.themed)({
|
|
45
|
-
light: "var(--ds-text, ".concat(_colors.N500, ")"),
|
|
46
|
-
dark: "var(--ds-text, ".concat(_colors.DN100, ")")
|
|
47
|
-
}),
|
|
27
|
+
borderColor: "var(--ds-border-bold, ".concat(_colors.N500, ")"),
|
|
28
|
+
text: "var(--ds-text, ".concat(_colors.N500, ")"),
|
|
48
29
|
hoveredBackground: 'transparent',
|
|
49
30
|
pressedBackground: 'transparent'
|
|
50
31
|
}), (0, _defineProperty2.default)(_mentionStyle, _types.MentionType.DEFAULT, {
|
|
51
|
-
background: (
|
|
52
|
-
light: "var(--ds-background-neutral, ".concat(_colors.N30A, ")"),
|
|
53
|
-
dark: "var(--ds-background-neutral, ".concat(_colors.DN80, ")")
|
|
54
|
-
}),
|
|
32
|
+
background: "var(--ds-background-neutral, ".concat(_colors.N30A, ")"),
|
|
55
33
|
borderColor: 'transparent',
|
|
56
|
-
text: (
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}),
|
|
60
|
-
hoveredBackground: (0, _components.themed)({
|
|
61
|
-
light: "var(--ds-background-neutral-hovered, ".concat(_colors.N30A, ")"),
|
|
62
|
-
dark: "var(--ds-background-neutral-hovered, ".concat(_colors.DN80, ")")
|
|
63
|
-
}),
|
|
64
|
-
pressedBackground: (0, _components.themed)({
|
|
65
|
-
light: "var(--ds-background-neutral-pressed, ".concat(_colors.N30A, ")"),
|
|
66
|
-
dark: "var(--ds-background-neutral-pressed, ".concat(_colors.DN80, ")")
|
|
67
|
-
})
|
|
34
|
+
text: "var(--ds-text-subtle, ".concat(_colors.N500, ")"),
|
|
35
|
+
hoveredBackground: "var(--ds-background-neutral-hovered, ".concat(_colors.N30A, ")"),
|
|
36
|
+
pressedBackground: "var(--ds-background-neutral-pressed, ".concat(_colors.N30A, ")")
|
|
68
37
|
}), _mentionStyle);
|
|
69
38
|
var getStyle = function getStyle(_ref, property) {
|
|
70
|
-
var mentionType = _ref.mentionType
|
|
71
|
-
theme = _ref.theme;
|
|
39
|
+
var mentionType = _ref.mentionType;
|
|
72
40
|
var obj = mentionStyle[mentionType][property];
|
|
73
|
-
return typeof obj === 'string' ? obj : obj
|
|
74
|
-
theme: theme
|
|
75
|
-
});
|
|
41
|
+
return typeof obj === 'string' ? obj : obj;
|
|
76
42
|
};
|
|
77
43
|
var PrimitiveMention = /*#__PURE__*/(0, _react2.forwardRef)(function (_ref2, ref) {
|
|
78
44
|
var mentionType = _ref2.mentionType,
|
|
79
45
|
other = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
80
|
-
var theme = (0, _components.useGlobalTheme)();
|
|
81
46
|
return (0, _react.jsx)("span", (0, _extends2.default)({
|
|
82
47
|
ref: ref,
|
|
83
48
|
css: (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: inline;\n border: 1px solid ", ";\n background: ", ";\n color: ", ";\n border-radius: 20px;\n cursor: pointer;\n padding: 0 0.3em 2px 0.23em;\n line-height: 1.714;\n font-size: 1em;\n font-weight: normal;\n word-break: break-word;\n &:hover {\n background: ", ";\n }\n &:active {\n background: ", ";\n }\n "])), getStyle({
|
|
84
|
-
theme: theme,
|
|
85
49
|
mentionType: mentionType
|
|
86
50
|
}, 'borderColor'), getStyle({
|
|
87
|
-
theme: theme,
|
|
88
51
|
mentionType: mentionType
|
|
89
52
|
}, 'background'), getStyle({
|
|
90
|
-
theme: theme,
|
|
91
53
|
mentionType: mentionType
|
|
92
54
|
}, 'text'), getStyle({
|
|
93
|
-
theme: theme,
|
|
94
55
|
mentionType: mentionType
|
|
95
56
|
}, 'hoveredBackground'), getStyle({
|
|
96
|
-
theme: theme,
|
|
97
57
|
mentionType: mentionType
|
|
98
58
|
}, 'pressedBackground'))
|
|
99
59
|
}, other));
|
|
@@ -12,7 +12,7 @@ var _types = require("../types");
|
|
|
12
12
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
13
|
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; }
|
|
14
14
|
var packageName = "@atlaskit/mention";
|
|
15
|
-
var packageVersion = "22.1.
|
|
15
|
+
var packageVersion = "22.1.10";
|
|
16
16
|
var SLI_EVENT_TYPE = exports.SLI_EVENT_TYPE = 'sli';
|
|
17
17
|
var SMART_EVENT_TYPE = exports.SMART_EVENT_TYPE = 'smart';
|
|
18
18
|
var SliNames = exports.SliNames = /*#__PURE__*/function (SliNames) {
|
|
@@ -1,91 +1,53 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import { jsx, css } from '@emotion/react';
|
|
4
|
-
import {
|
|
5
|
-
import { B400, B200, N500, DN800, DN100, DN80, N30A, DN30, N20 } from '@atlaskit/theme/colors';
|
|
4
|
+
import { B400, N500, N30A, N20 } from '@atlaskit/theme/colors';
|
|
6
5
|
import { MentionType } from '../../types';
|
|
7
6
|
import { forwardRef } from 'react';
|
|
8
7
|
const mentionStyle = {
|
|
9
8
|
[MentionType.SELF]: {
|
|
10
|
-
background:
|
|
11
|
-
light: `var(--ds-background-brand-bold, ${B400})`,
|
|
12
|
-
dark: `var(--ds-background-brand-bold, ${B200})`
|
|
13
|
-
}),
|
|
9
|
+
background: `var(--ds-background-brand-bold, ${B400})`,
|
|
14
10
|
borderColor: 'transparent',
|
|
15
|
-
text:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}),
|
|
19
|
-
hoveredBackground: themed({
|
|
20
|
-
light: `var(--ds-background-brand-bold-hovered, ${B400})`,
|
|
21
|
-
dark: `var(--ds-background-brand-bold-hovered, ${B200})`
|
|
22
|
-
}),
|
|
23
|
-
pressedBackground: themed({
|
|
24
|
-
light: `var(--ds-background-brand-bold-pressed, ${B400})`,
|
|
25
|
-
dark: `var(--ds-background-brand-bold-pressed, ${B200})`
|
|
26
|
-
})
|
|
11
|
+
text: `var(--ds-text-inverse, ${N20})`,
|
|
12
|
+
hoveredBackground: `var(--ds-background-brand-bold-hovered, ${B400})`,
|
|
13
|
+
pressedBackground: `var(--ds-background-brand-bold-pressed, ${B400})`
|
|
27
14
|
},
|
|
28
15
|
[MentionType.RESTRICTED]: {
|
|
29
16
|
background: 'transparent',
|
|
30
|
-
borderColor:
|
|
31
|
-
|
|
32
|
-
dark: `var(--ds-border-bold, ${DN80})`
|
|
33
|
-
}),
|
|
34
|
-
text: themed({
|
|
35
|
-
light: `var(--ds-text, ${N500})`,
|
|
36
|
-
dark: `var(--ds-text, ${DN100})`
|
|
37
|
-
}),
|
|
17
|
+
borderColor: `var(--ds-border-bold, ${N500})`,
|
|
18
|
+
text: `var(--ds-text, ${N500})`,
|
|
38
19
|
hoveredBackground: 'transparent',
|
|
39
20
|
pressedBackground: 'transparent'
|
|
40
21
|
},
|
|
41
22
|
[MentionType.DEFAULT]: {
|
|
42
|
-
background:
|
|
43
|
-
light: `var(--ds-background-neutral, ${N30A})`,
|
|
44
|
-
dark: `var(--ds-background-neutral, ${DN80})`
|
|
45
|
-
}),
|
|
23
|
+
background: `var(--ds-background-neutral, ${N30A})`,
|
|
46
24
|
borderColor: 'transparent',
|
|
47
|
-
text:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}),
|
|
51
|
-
hoveredBackground: themed({
|
|
52
|
-
light: `var(--ds-background-neutral-hovered, ${N30A})`,
|
|
53
|
-
dark: `var(--ds-background-neutral-hovered, ${DN80})`
|
|
54
|
-
}),
|
|
55
|
-
pressedBackground: themed({
|
|
56
|
-
light: `var(--ds-background-neutral-pressed, ${N30A})`,
|
|
57
|
-
dark: `var(--ds-background-neutral-pressed, ${DN80})`
|
|
58
|
-
})
|
|
25
|
+
text: `var(--ds-text-subtle, ${N500})`,
|
|
26
|
+
hoveredBackground: `var(--ds-background-neutral-hovered, ${N30A})`,
|
|
27
|
+
pressedBackground: `var(--ds-background-neutral-pressed, ${N30A})`
|
|
59
28
|
}
|
|
60
29
|
};
|
|
61
30
|
const getStyle = ({
|
|
62
|
-
mentionType
|
|
63
|
-
theme
|
|
31
|
+
mentionType
|
|
64
32
|
}, property) => {
|
|
65
33
|
const obj = mentionStyle[mentionType][property];
|
|
66
|
-
return typeof obj === 'string' ? obj : obj
|
|
67
|
-
theme
|
|
68
|
-
});
|
|
34
|
+
return typeof obj === 'string' ? obj : obj;
|
|
69
35
|
};
|
|
70
36
|
const PrimitiveMention = /*#__PURE__*/forwardRef(({
|
|
71
37
|
mentionType,
|
|
72
38
|
...other
|
|
73
39
|
}, ref) => {
|
|
74
|
-
const theme = useGlobalTheme();
|
|
75
40
|
return jsx("span", _extends({
|
|
76
41
|
ref: ref,
|
|
77
42
|
css: css`
|
|
78
43
|
display: inline;
|
|
79
44
|
border: 1px solid ${getStyle({
|
|
80
|
-
theme,
|
|
81
45
|
mentionType
|
|
82
46
|
}, 'borderColor')};
|
|
83
47
|
background: ${getStyle({
|
|
84
|
-
theme,
|
|
85
48
|
mentionType
|
|
86
49
|
}, 'background')};
|
|
87
50
|
color: ${getStyle({
|
|
88
|
-
theme,
|
|
89
51
|
mentionType
|
|
90
52
|
}, 'text')};
|
|
91
53
|
border-radius: 20px;
|
|
@@ -97,13 +59,11 @@ const PrimitiveMention = /*#__PURE__*/forwardRef(({
|
|
|
97
59
|
word-break: break-word;
|
|
98
60
|
&:hover {
|
|
99
61
|
background: ${getStyle({
|
|
100
|
-
theme,
|
|
101
62
|
mentionType
|
|
102
63
|
}, 'hoveredBackground')};
|
|
103
64
|
}
|
|
104
65
|
&:active {
|
|
105
66
|
background: ${getStyle({
|
|
106
|
-
theme,
|
|
107
67
|
mentionType
|
|
108
68
|
}, 'pressedBackground')};
|
|
109
69
|
}
|
|
@@ -2,7 +2,7 @@ import { OPERATIONAL_EVENT_TYPE, UI_EVENT_TYPE } from '@atlaskit/analytics-gas-t
|
|
|
2
2
|
import { ELEMENTS_CHANNEL } from '../_constants';
|
|
3
3
|
import { isSpecialMentionText } from '../types';
|
|
4
4
|
const packageName = "@atlaskit/mention";
|
|
5
|
-
const packageVersion = "22.1.
|
|
5
|
+
const packageVersion = "22.1.10";
|
|
6
6
|
export const SLI_EVENT_TYPE = 'sli';
|
|
7
7
|
export const SMART_EVENT_TYPE = 'smart';
|
|
8
8
|
export let SliNames = /*#__PURE__*/function (SliNames) {
|
|
@@ -6,87 +6,47 @@ var _excluded = ["mentionType"];
|
|
|
6
6
|
var _mentionStyle, _templateObject;
|
|
7
7
|
/** @jsx jsx */
|
|
8
8
|
import { jsx, css } from '@emotion/react';
|
|
9
|
-
import {
|
|
10
|
-
import { B400, B200, N500, DN800, DN100, DN80, N30A, DN30, N20 } from '@atlaskit/theme/colors';
|
|
9
|
+
import { B400, N500, N30A, N20 } from '@atlaskit/theme/colors';
|
|
11
10
|
import { MentionType } from '../../types';
|
|
12
11
|
import { forwardRef } from 'react';
|
|
13
12
|
var mentionStyle = (_mentionStyle = {}, _defineProperty(_mentionStyle, MentionType.SELF, {
|
|
14
|
-
background:
|
|
15
|
-
light: "var(--ds-background-brand-bold, ".concat(B400, ")"),
|
|
16
|
-
dark: "var(--ds-background-brand-bold, ".concat(B200, ")")
|
|
17
|
-
}),
|
|
13
|
+
background: "var(--ds-background-brand-bold, ".concat(B400, ")"),
|
|
18
14
|
borderColor: 'transparent',
|
|
19
|
-
text:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}),
|
|
23
|
-
hoveredBackground: themed({
|
|
24
|
-
light: "var(--ds-background-brand-bold-hovered, ".concat(B400, ")"),
|
|
25
|
-
dark: "var(--ds-background-brand-bold-hovered, ".concat(B200, ")")
|
|
26
|
-
}),
|
|
27
|
-
pressedBackground: themed({
|
|
28
|
-
light: "var(--ds-background-brand-bold-pressed, ".concat(B400, ")"),
|
|
29
|
-
dark: "var(--ds-background-brand-bold-pressed, ".concat(B200, ")")
|
|
30
|
-
})
|
|
15
|
+
text: "var(--ds-text-inverse, ".concat(N20, ")"),
|
|
16
|
+
hoveredBackground: "var(--ds-background-brand-bold-hovered, ".concat(B400, ")"),
|
|
17
|
+
pressedBackground: "var(--ds-background-brand-bold-pressed, ".concat(B400, ")")
|
|
31
18
|
}), _defineProperty(_mentionStyle, MentionType.RESTRICTED, {
|
|
32
19
|
background: 'transparent',
|
|
33
|
-
borderColor:
|
|
34
|
-
|
|
35
|
-
dark: "var(--ds-border-bold, ".concat(DN80, ")")
|
|
36
|
-
}),
|
|
37
|
-
text: themed({
|
|
38
|
-
light: "var(--ds-text, ".concat(N500, ")"),
|
|
39
|
-
dark: "var(--ds-text, ".concat(DN100, ")")
|
|
40
|
-
}),
|
|
20
|
+
borderColor: "var(--ds-border-bold, ".concat(N500, ")"),
|
|
21
|
+
text: "var(--ds-text, ".concat(N500, ")"),
|
|
41
22
|
hoveredBackground: 'transparent',
|
|
42
23
|
pressedBackground: 'transparent'
|
|
43
24
|
}), _defineProperty(_mentionStyle, MentionType.DEFAULT, {
|
|
44
|
-
background:
|
|
45
|
-
light: "var(--ds-background-neutral, ".concat(N30A, ")"),
|
|
46
|
-
dark: "var(--ds-background-neutral, ".concat(DN80, ")")
|
|
47
|
-
}),
|
|
25
|
+
background: "var(--ds-background-neutral, ".concat(N30A, ")"),
|
|
48
26
|
borderColor: 'transparent',
|
|
49
|
-
text:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}),
|
|
53
|
-
hoveredBackground: themed({
|
|
54
|
-
light: "var(--ds-background-neutral-hovered, ".concat(N30A, ")"),
|
|
55
|
-
dark: "var(--ds-background-neutral-hovered, ".concat(DN80, ")")
|
|
56
|
-
}),
|
|
57
|
-
pressedBackground: themed({
|
|
58
|
-
light: "var(--ds-background-neutral-pressed, ".concat(N30A, ")"),
|
|
59
|
-
dark: "var(--ds-background-neutral-pressed, ".concat(DN80, ")")
|
|
60
|
-
})
|
|
27
|
+
text: "var(--ds-text-subtle, ".concat(N500, ")"),
|
|
28
|
+
hoveredBackground: "var(--ds-background-neutral-hovered, ".concat(N30A, ")"),
|
|
29
|
+
pressedBackground: "var(--ds-background-neutral-pressed, ".concat(N30A, ")")
|
|
61
30
|
}), _mentionStyle);
|
|
62
31
|
var getStyle = function getStyle(_ref, property) {
|
|
63
|
-
var mentionType = _ref.mentionType
|
|
64
|
-
theme = _ref.theme;
|
|
32
|
+
var mentionType = _ref.mentionType;
|
|
65
33
|
var obj = mentionStyle[mentionType][property];
|
|
66
|
-
return typeof obj === 'string' ? obj : obj
|
|
67
|
-
theme: theme
|
|
68
|
-
});
|
|
34
|
+
return typeof obj === 'string' ? obj : obj;
|
|
69
35
|
};
|
|
70
36
|
var PrimitiveMention = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
71
37
|
var mentionType = _ref2.mentionType,
|
|
72
38
|
other = _objectWithoutProperties(_ref2, _excluded);
|
|
73
|
-
var theme = useGlobalTheme();
|
|
74
39
|
return jsx("span", _extends({
|
|
75
40
|
ref: ref,
|
|
76
41
|
css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline;\n border: 1px solid ", ";\n background: ", ";\n color: ", ";\n border-radius: 20px;\n cursor: pointer;\n padding: 0 0.3em 2px 0.23em;\n line-height: 1.714;\n font-size: 1em;\n font-weight: normal;\n word-break: break-word;\n &:hover {\n background: ", ";\n }\n &:active {\n background: ", ";\n }\n "])), getStyle({
|
|
77
|
-
theme: theme,
|
|
78
42
|
mentionType: mentionType
|
|
79
43
|
}, 'borderColor'), getStyle({
|
|
80
|
-
theme: theme,
|
|
81
44
|
mentionType: mentionType
|
|
82
45
|
}, 'background'), getStyle({
|
|
83
|
-
theme: theme,
|
|
84
46
|
mentionType: mentionType
|
|
85
47
|
}, 'text'), getStyle({
|
|
86
|
-
theme: theme,
|
|
87
48
|
mentionType: mentionType
|
|
88
49
|
}, 'hoveredBackground'), getStyle({
|
|
89
|
-
theme: theme,
|
|
90
50
|
mentionType: mentionType
|
|
91
51
|
}, 'pressedBackground'))
|
|
92
52
|
}, other));
|
|
@@ -5,7 +5,7 @@ import { OPERATIONAL_EVENT_TYPE, UI_EVENT_TYPE } from '@atlaskit/analytics-gas-t
|
|
|
5
5
|
import { ELEMENTS_CHANNEL } from '../_constants';
|
|
6
6
|
import { isSpecialMentionText } from '../types';
|
|
7
7
|
var packageName = "@atlaskit/mention";
|
|
8
|
-
var packageVersion = "22.1.
|
|
8
|
+
var packageVersion = "22.1.10";
|
|
9
9
|
export var SLI_EVENT_TYPE = 'sli';
|
|
10
10
|
export var SMART_EVENT_TYPE = 'smart';
|
|
11
11
|
export var SliNames = /*#__PURE__*/function (SliNames) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/mention",
|
|
3
|
-
"version": "22.1.
|
|
3
|
+
"version": "22.1.10",
|
|
4
4
|
"description": "A React component used to display user profiles in a list for 'Mention' functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
42
42
|
"@atlaskit/avatar": "^21.4.0",
|
|
43
43
|
"@atlaskit/focus-ring": "^1.3.0",
|
|
44
|
-
"@atlaskit/icon": "^
|
|
45
|
-
"@atlaskit/lozenge": "^11.
|
|
44
|
+
"@atlaskit/icon": "^22.0.0",
|
|
45
|
+
"@atlaskit/lozenge": "^11.5.0",
|
|
46
46
|
"@atlaskit/theme": "^12.6.0",
|
|
47
|
-
"@atlaskit/tokens": "^1.
|
|
47
|
+
"@atlaskit/tokens": "^1.29.0",
|
|
48
48
|
"@atlaskit/tooltip": "^18.0.0",
|
|
49
49
|
"@atlaskit/ufo": "^0.2.0",
|
|
50
50
|
"@atlaskit/util-service-support": "^6.2.0",
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,818 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/mention"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
import { IntlShape } from 'react-intl-next';
|
|
8
|
-
import { default as React_2 } from 'react';
|
|
9
|
-
import { ServiceConfig } from '@atlaskit/util-service-support/types';
|
|
10
|
-
import { SyntheticEvent } from 'react';
|
|
11
|
-
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
12
|
-
import { WithAnalyticsEventsProps as WithAnalyticsEventsProps_2 } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
13
|
-
import { WithIntlProps } from 'react-intl-next';
|
|
14
|
-
|
|
15
|
-
// @public (undocumented)
|
|
16
|
-
export class AbstractMentionResource extends AbstractResource<MentionDescription[]> implements MentionProvider {
|
|
17
|
-
// (undocumented)
|
|
18
|
-
filter(query?: string): void;
|
|
19
|
-
// (undocumented)
|
|
20
|
-
isFiltering(_query: string): boolean;
|
|
21
|
-
// (undocumented)
|
|
22
|
-
protected _notifyAllResultsListeners(mentionsResult: MentionsResult): void;
|
|
23
|
-
// (undocumented)
|
|
24
|
-
protected _notifyAnalyticsListeners(event: string, actionSubject: string, action: string, attributes?: {
|
|
25
|
-
[key: string]: any;
|
|
26
|
-
}): void;
|
|
27
|
-
// (undocumented)
|
|
28
|
-
protected _notifyErrorListeners(error: Error, query?: string): void;
|
|
29
|
-
// (undocumented)
|
|
30
|
-
protected _notifyInfoListeners(info: string): void;
|
|
31
|
-
// (undocumented)
|
|
32
|
-
protected _notifyListeners(mentionsResult: MentionsResult, stats?: MentionStats): void;
|
|
33
|
-
// (undocumented)
|
|
34
|
-
recordMentionSelection(_mention: MentionDescription): void;
|
|
35
|
-
// (undocumented)
|
|
36
|
-
shouldHighlightMention(_mention: MentionDescription): boolean;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// @public (undocumented)
|
|
40
|
-
export class AbstractPresenceResource extends AbstractResource<PresenceMap> implements PresenceProvider {
|
|
41
|
-
// (undocumented)
|
|
42
|
-
protected notifyListeners(presences: PresenceMap): void;
|
|
43
|
-
// (undocumented)
|
|
44
|
-
refreshPresence(userIds: string[]): void;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// @public (undocumented)
|
|
48
|
-
class AbstractResource<Result> implements ResourceProvider<Result> {
|
|
49
|
-
constructor();
|
|
50
|
-
// (undocumented)
|
|
51
|
-
protected allResultsListeners: Map<string, ResultCallback<Result>>;
|
|
52
|
-
// (undocumented)
|
|
53
|
-
protected analyticsListeners: Map<string, AnalyticsCallback>;
|
|
54
|
-
// (undocumented)
|
|
55
|
-
protected changeListeners: Map<string, ResultCallback<Result>>;
|
|
56
|
-
// (undocumented)
|
|
57
|
-
protected errListeners: Map<string, ErrorCallback_2>;
|
|
58
|
-
// (undocumented)
|
|
59
|
-
protected infoListeners: Map<string, InfoCallback>;
|
|
60
|
-
// (undocumented)
|
|
61
|
-
subscribe(key: string, callback?: ResultCallback<Result>, errCallback?: ErrorCallback_2, infoCallback?: InfoCallback, allResultsCallback?: ResultCallback<Result>, analyticsListeners?: AnalyticsCallback): void;
|
|
62
|
-
// (undocumented)
|
|
63
|
-
unsubscribe(key: string): void;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// @public (undocumented)
|
|
67
|
-
interface AnalyticsCallback {
|
|
68
|
-
// (undocumented)
|
|
69
|
-
(event: string, actionSubject: string, action: string, attributes?: {
|
|
70
|
-
[key: string]: any;
|
|
71
|
-
}): void;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// @public
|
|
75
|
-
export class ContextMentionResource implements MentionProvider {
|
|
76
|
-
constructor(mentionProvider: MentionProvider, contextIdentifier: MentionContextIdentifier);
|
|
77
|
-
// (undocumented)
|
|
78
|
-
callDefault: <K extends "filter" | "isFiltering" | "recordMentionSelection" | "shouldHighlightMention" | "subscribe" | "unsubscribe">(f: K) => MentionProvider[K];
|
|
79
|
-
// (undocumented)
|
|
80
|
-
callWithContextIds: <K extends "filter" | "isFiltering" | "recordMentionSelection" | "shouldHighlightMention" | "subscribe" | "unsubscribe">(f: K, declaredArgs: number) => MentionProvider[K];
|
|
81
|
-
// (undocumented)
|
|
82
|
-
filter: (query?: string | undefined, contextIdentifier?: MentionContextIdentifier | undefined) => void;
|
|
83
|
-
// (undocumented)
|
|
84
|
-
getContextIdentifier(): MentionContextIdentifier | undefined;
|
|
85
|
-
// (undocumented)
|
|
86
|
-
isFiltering: (query: string) => boolean;
|
|
87
|
-
// (undocumented)
|
|
88
|
-
recordMentionSelection: (mention: MentionDescription, contextIdentifier?: MentionContextIdentifier | undefined) => void;
|
|
89
|
-
// (undocumented)
|
|
90
|
-
shouldHighlightMention: (mention: MentionDescription) => boolean;
|
|
91
|
-
// (undocumented)
|
|
92
|
-
subscribe: (key: string, callback?: ResultCallback<MentionDescription[]> | undefined, errCallback?: ErrorCallback_2 | undefined, infoCallback?: InfoCallback | undefined, allResultsCallback?: ResultCallback<MentionDescription[]> | undefined, analyticsCallback?: AnalyticsCallback | undefined) => void;
|
|
93
|
-
// (undocumented)
|
|
94
|
-
unsubscribe: (key: string) => void;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// @public (undocumented)
|
|
98
|
-
interface Data {
|
|
99
|
-
// (undocumented)
|
|
100
|
-
PresenceBulk: PresenceBulk[];
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// @public (undocumented)
|
|
104
|
-
export class DefaultMentionNameResolver implements MentionNameResolver {
|
|
105
|
-
constructor(client: MentionNameClient, analyticsProps?: WithAnalyticsEventsProps);
|
|
106
|
-
// (undocumented)
|
|
107
|
-
cacheName(id: string, name: string): void;
|
|
108
|
-
// (undocumented)
|
|
109
|
-
lookupName(id: string): MentionNameDetails | Promise<MentionNameDetails>;
|
|
110
|
-
// (undocumented)
|
|
111
|
-
static waitForBatch: number;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// @public (undocumented)
|
|
115
|
-
export const ELEMENTS_CHANNEL = "fabric-elements";
|
|
116
|
-
|
|
117
|
-
// @public (undocumented)
|
|
118
|
-
interface ErrorCallback_2 {
|
|
119
|
-
// (undocumented)
|
|
120
|
-
(error: Error, query?: string): void;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// @public (undocumented)
|
|
124
|
-
interface Highlight {
|
|
125
|
-
// (undocumented)
|
|
126
|
-
mentionName: HighlightDetail[];
|
|
127
|
-
// (undocumented)
|
|
128
|
-
name: HighlightDetail[];
|
|
129
|
-
// (undocumented)
|
|
130
|
-
nickname: HighlightDetail[];
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// @public (undocumented)
|
|
134
|
-
interface HighlightDetail {
|
|
135
|
-
// (undocumented)
|
|
136
|
-
end: number;
|
|
137
|
-
// (undocumented)
|
|
138
|
-
start: number;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// @public (undocumented)
|
|
142
|
-
interface InfoCallback {
|
|
143
|
-
// (undocumented)
|
|
144
|
-
(info: string): void;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// @public (undocumented)
|
|
148
|
-
export type InviteExperimentCohort = 'control' | 'not-enrolled' | 'variation';
|
|
149
|
-
|
|
150
|
-
// @public (undocumented)
|
|
151
|
-
export type InviteFlow = 'assign' | 'mention';
|
|
152
|
-
|
|
153
|
-
// @public (undocumented)
|
|
154
|
-
interface InviteFromMentionProvider {
|
|
155
|
-
// (undocumented)
|
|
156
|
-
inviteExperimentCohort?: InviteExperimentCohort;
|
|
157
|
-
// (undocumented)
|
|
158
|
-
onInviteItemClick?(flow: InviteFlow): void;
|
|
159
|
-
// (undocumented)
|
|
160
|
-
productName?: string;
|
|
161
|
-
// (undocumented)
|
|
162
|
-
shouldEnableInvite?: boolean;
|
|
163
|
-
// (undocumented)
|
|
164
|
-
userRole?: UserRole;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
// @public (undocumented)
|
|
168
|
-
export const isResolvingMentionProvider: (p: any) => p is ResolvingMentionProvider;
|
|
169
|
-
|
|
170
|
-
// @public (undocumented)
|
|
171
|
-
export function isSpecialMention(mention: MentionDescription): boolean;
|
|
172
|
-
|
|
173
|
-
// @public (undocumented)
|
|
174
|
-
type LozengeColor = 'default' | 'inprogress' | 'moved' | 'new' | 'removed' | 'success';
|
|
175
|
-
|
|
176
|
-
// @public (undocumented)
|
|
177
|
-
interface LozengeProps {
|
|
178
|
-
// (undocumented)
|
|
179
|
-
appearance?: LozengeColor;
|
|
180
|
-
// (undocumented)
|
|
181
|
-
text: React.ReactNode;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
// @public (undocumented)
|
|
185
|
-
export const Mention: React_2.ForwardRefExoticComponent<Omit<Props_5, keyof WithAnalyticsEventsProps_2> & React_2.RefAttributes<any>>;
|
|
186
|
-
|
|
187
|
-
// @public (undocumented)
|
|
188
|
-
export type Mention = MentionInternal;
|
|
189
|
-
|
|
190
|
-
// @public (undocumented)
|
|
191
|
-
export type MentionContextIdentifier = {
|
|
192
|
-
containerId?: string;
|
|
193
|
-
objectId?: string;
|
|
194
|
-
childObjectId?: string;
|
|
195
|
-
sessionId?: string;
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
// @public (undocumented)
|
|
199
|
-
interface MentionDescContext {
|
|
200
|
-
// (undocumented)
|
|
201
|
-
includesYou: boolean;
|
|
202
|
-
// (undocumented)
|
|
203
|
-
memberCount: number;
|
|
204
|
-
// (undocumented)
|
|
205
|
-
members: TeamMember[];
|
|
206
|
-
// (undocumented)
|
|
207
|
-
teamLink: string;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
// @public (undocumented)
|
|
211
|
-
export interface MentionDescription {
|
|
212
|
-
// (undocumented)
|
|
213
|
-
accessLevel?: string;
|
|
214
|
-
// (undocumented)
|
|
215
|
-
avatarUrl?: string;
|
|
216
|
-
// (undocumented)
|
|
217
|
-
context?: MentionDescContext;
|
|
218
|
-
// (undocumented)
|
|
219
|
-
highlight?: Highlight;
|
|
220
|
-
// (undocumented)
|
|
221
|
-
id: string;
|
|
222
|
-
// (undocumented)
|
|
223
|
-
inContext?: boolean;
|
|
224
|
-
// (undocumented)
|
|
225
|
-
lozenge?: LozengeProps | string;
|
|
226
|
-
// (undocumented)
|
|
227
|
-
mentionName?: string;
|
|
228
|
-
// (undocumented)
|
|
229
|
-
name?: string;
|
|
230
|
-
// (undocumented)
|
|
231
|
-
nickname?: string;
|
|
232
|
-
// (undocumented)
|
|
233
|
-
presence?: Presence;
|
|
234
|
-
// (undocumented)
|
|
235
|
-
source?: string;
|
|
236
|
-
// (undocumented)
|
|
237
|
-
userType?: string;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
// @public (undocumented)
|
|
241
|
-
type MentionEventHandler = (mentionId: string, text: string, event?: SyntheticEvent<HTMLSpanElement>) => void;
|
|
242
|
-
|
|
243
|
-
// @public (undocumented)
|
|
244
|
-
class MentionInternal extends React_2.PureComponent<Props_5, {}> {
|
|
245
|
-
constructor(props: Props_5);
|
|
246
|
-
// (undocumented)
|
|
247
|
-
componentDidMount(): void;
|
|
248
|
-
// (undocumented)
|
|
249
|
-
componentWillUnmount(): void;
|
|
250
|
-
// (undocumented)
|
|
251
|
-
render(): JSX.Element;
|
|
252
|
-
// (undocumented)
|
|
253
|
-
renderUnknownUserError(id: string): JSX.Element;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
// @public (undocumented)
|
|
257
|
-
export class MentionItem extends React_2.PureComponent<Props, {}> {
|
|
258
|
-
// (undocumented)
|
|
259
|
-
render(): JSX.Element;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
// @public (undocumented)
|
|
263
|
-
export class MentionList extends React_2.PureComponent<Props_2, State> {
|
|
264
|
-
constructor(props: Props_2);
|
|
265
|
-
// (undocumented)
|
|
266
|
-
chooseCurrentSelection: () => void;
|
|
267
|
-
// (undocumented)
|
|
268
|
-
componentDidUpdate(): void;
|
|
269
|
-
// (undocumented)
|
|
270
|
-
mentionsCount: () => number;
|
|
271
|
-
// (undocumented)
|
|
272
|
-
render(): JSX.Element;
|
|
273
|
-
// (undocumented)
|
|
274
|
-
selectId: (id: string, callback?: () => any) => void;
|
|
275
|
-
// (undocumented)
|
|
276
|
-
selectIndex: (index: number, callback?: () => any) => void;
|
|
277
|
-
// (undocumented)
|
|
278
|
-
selectNext: () => void;
|
|
279
|
-
// (undocumented)
|
|
280
|
-
selectPrevious: () => void;
|
|
281
|
-
// (undocumented)
|
|
282
|
-
UNSAFE_componentWillReceiveProps(nextProps: Props_2): void;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
// @public (undocumented)
|
|
286
|
-
export interface MentionNameClient {
|
|
287
|
-
// (undocumented)
|
|
288
|
-
getLookupLimit(): number;
|
|
289
|
-
// (undocumented)
|
|
290
|
-
lookupMentionNames(ids: string[]): Promise<MentionNameDetails[]>;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
// @public (undocumented)
|
|
294
|
-
export interface MentionNameDetails {
|
|
295
|
-
// (undocumented)
|
|
296
|
-
id: string;
|
|
297
|
-
// (undocumented)
|
|
298
|
-
name?: string;
|
|
299
|
-
// (undocumented)
|
|
300
|
-
status: MentionNameStatus;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
// @public (undocumented)
|
|
304
|
-
export interface MentionNameResolver {
|
|
305
|
-
// (undocumented)
|
|
306
|
-
cacheName(id: string, name: string): void;
|
|
307
|
-
// (undocumented)
|
|
308
|
-
lookupName(id: string): MentionNameDetails | Promise<MentionNameDetails>;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
// @public (undocumented)
|
|
312
|
-
export enum MentionNameStatus {
|
|
313
|
-
// (undocumented)
|
|
314
|
-
OK = 2,
|
|
315
|
-
// (undocumented)
|
|
316
|
-
SERVICE_ERROR = 1,
|
|
317
|
-
// (undocumented)
|
|
318
|
-
UNKNOWN = 0
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
// @public
|
|
322
|
-
class MentionPicker_2 extends React_2.PureComponent<Props_4 & WithAnalyticsEventsProps_2 & {
|
|
323
|
-
intl: IntlShape;
|
|
324
|
-
}, State_3> {
|
|
325
|
-
constructor(props: Props_4 & WithAnalyticsEventsProps_2 & {
|
|
326
|
-
intl: IntlShape;
|
|
327
|
-
});
|
|
328
|
-
// (undocumented)
|
|
329
|
-
chooseCurrentSelection: () => void;
|
|
330
|
-
// (undocumented)
|
|
331
|
-
componentDidMount(): void;
|
|
332
|
-
// (undocumented)
|
|
333
|
-
componentWillUnmount(): void;
|
|
334
|
-
// (undocumented)
|
|
335
|
-
static defaultProps: {
|
|
336
|
-
onSelection: () => void;
|
|
337
|
-
onOpen: () => void;
|
|
338
|
-
onClose: () => void;
|
|
339
|
-
};
|
|
340
|
-
// (undocumented)
|
|
341
|
-
mentionsCount: () => number;
|
|
342
|
-
// (undocumented)
|
|
343
|
-
render(): JSX.Element;
|
|
344
|
-
// (undocumented)
|
|
345
|
-
selectId: (id: string, callback?: () => any) => void;
|
|
346
|
-
// (undocumented)
|
|
347
|
-
selectIndex: (index: number, callback?: () => any) => void;
|
|
348
|
-
// (undocumented)
|
|
349
|
-
selectNext: () => void;
|
|
350
|
-
// (undocumented)
|
|
351
|
-
selectPrevious: () => void;
|
|
352
|
-
// (undocumented)
|
|
353
|
-
UNSAFE_componentWillReceiveProps(nextProps: Props_4 & WithAnalyticsEventsProps_2): void;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
// @public (undocumented)
|
|
357
|
-
const MentionPickerWithAnalytics: React_2.ForwardRefExoticComponent<Omit<Pick<WithIntlProps<React_2.PropsWithChildren<Props_4 & WithAnalyticsEventsProps_2 & {
|
|
358
|
-
intl: IntlShape;
|
|
359
|
-
}>>, "children" | "createAnalyticsEvent" | "forwardedRef" | keyof Props_4> & React_2.RefAttributes<any>, keyof WithAnalyticsEventsProps_2> & React_2.RefAttributes<any>>;
|
|
360
|
-
|
|
361
|
-
// @public (undocumented)
|
|
362
|
-
type MentionPickerWithAnalytics = MentionPicker_2;
|
|
363
|
-
export { MentionPickerWithAnalytics as MentionPicker }
|
|
364
|
-
export default MentionPickerWithAnalytics;
|
|
365
|
-
|
|
366
|
-
// @public (undocumented)
|
|
367
|
-
export interface MentionProvider extends ResourceProvider<MentionDescription[]>, InviteFromMentionProvider {
|
|
368
|
-
// (undocumented)
|
|
369
|
-
filter(query?: string, contextIdentifier?: MentionContextIdentifier): void;
|
|
370
|
-
// (undocumented)
|
|
371
|
-
isFiltering(query: string): boolean;
|
|
372
|
-
// (undocumented)
|
|
373
|
-
recordMentionSelection(mention: MentionDescription, contextIdentifier?: MentionContextIdentifier): void;
|
|
374
|
-
// (undocumented)
|
|
375
|
-
shouldHighlightMention(mention: MentionDescription): boolean;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
// @public
|
|
379
|
-
export class MentionResource extends AbstractMentionResource implements ResolvingMentionProvider {
|
|
380
|
-
constructor(config: MentionResourceConfig);
|
|
381
|
-
// (undocumented)
|
|
382
|
-
cacheMentionName(id: string, mentionName: string): void;
|
|
383
|
-
// (undocumented)
|
|
384
|
-
filter(query?: string, contextIdentifier?: MentionContextIdentifier): Promise<void>;
|
|
385
|
-
// (undocumented)
|
|
386
|
-
inviteExperimentCohort?: InviteExperimentCohort;
|
|
387
|
-
// (undocumented)
|
|
388
|
-
isFiltering(query: string): boolean;
|
|
389
|
-
// (undocumented)
|
|
390
|
-
notify(searchTime: number, mentionResult: MentionsResult, query?: string): void;
|
|
391
|
-
// (undocumented)
|
|
392
|
-
notifyError(error: Error, query?: string): void;
|
|
393
|
-
// (undocumented)
|
|
394
|
-
onInviteItemClick?: (flow: InviteFlow) => void;
|
|
395
|
-
// (undocumented)
|
|
396
|
-
productName?: string;
|
|
397
|
-
// (undocumented)
|
|
398
|
-
recordMentionSelection(mention: MentionDescription, contextIdentifier?: MentionContextIdentifier): Promise<void>;
|
|
399
|
-
// (undocumented)
|
|
400
|
-
recordSelection(mention: MentionDescription, contextIdentifier?: MentionContextIdentifier): Promise<void>;
|
|
401
|
-
protected remoteInitialState(contextIdentifier?: MentionContextIdentifier): Promise<MentionsResult>;
|
|
402
|
-
// (undocumented)
|
|
403
|
-
protected remoteSearch(query: string, contextIdentifier?: MentionContextIdentifier): Promise<MentionsResult>;
|
|
404
|
-
// (undocumented)
|
|
405
|
-
resolveMentionName(id: string): MentionNameDetails | Promise<MentionNameDetails>;
|
|
406
|
-
// (undocumented)
|
|
407
|
-
shouldEnableInvite: boolean;
|
|
408
|
-
// (undocumented)
|
|
409
|
-
shouldHighlightMention(mention: MentionDescription): boolean;
|
|
410
|
-
// (undocumented)
|
|
411
|
-
supportsMentionNameResolving(): boolean;
|
|
412
|
-
// (undocumented)
|
|
413
|
-
protected updateActiveSearches(query: string): void;
|
|
414
|
-
// (undocumented)
|
|
415
|
-
userRole: UserRole;
|
|
416
|
-
// (undocumented)
|
|
417
|
-
protected verifyMentionConfig(config: MentionResourceConfig): void;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
// @public (undocumented)
|
|
421
|
-
export interface MentionResourceConfig extends ServiceConfig {
|
|
422
|
-
// (undocumented)
|
|
423
|
-
containerId?: string;
|
|
424
|
-
// (undocumented)
|
|
425
|
-
debounceTime?: number;
|
|
426
|
-
// (undocumented)
|
|
427
|
-
inviteExperimentCohort?: InviteExperimentCohort;
|
|
428
|
-
// (undocumented)
|
|
429
|
-
mentionNameResolver?: MentionNameResolver;
|
|
430
|
-
// (undocumented)
|
|
431
|
-
onInviteItemClick?: (flow: InviteFlow) => void;
|
|
432
|
-
// (undocumented)
|
|
433
|
-
productId?: string;
|
|
434
|
-
// (undocumented)
|
|
435
|
-
productName?: string;
|
|
436
|
-
// (undocumented)
|
|
437
|
-
shouldEnableInvite?: boolean;
|
|
438
|
-
// (undocumented)
|
|
439
|
-
shouldHighlightMention?: (mention: MentionDescription) => boolean;
|
|
440
|
-
// (undocumented)
|
|
441
|
-
userRole?: UserRole;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
// @public (undocumented)
|
|
445
|
-
export interface MentionsResult {
|
|
446
|
-
// (undocumented)
|
|
447
|
-
mentions: MentionDescription[];
|
|
448
|
-
// (undocumented)
|
|
449
|
-
query: string;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
// @public (undocumented)
|
|
453
|
-
export type MentionStats = {
|
|
454
|
-
[key: string]: any;
|
|
455
|
-
};
|
|
456
|
-
|
|
457
|
-
// @public (undocumented)
|
|
458
|
-
interface OnClose {
|
|
459
|
-
// (undocumented)
|
|
460
|
-
(): void;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
// @public (undocumented)
|
|
464
|
-
interface OnMentionEvent {
|
|
465
|
-
// (undocumented)
|
|
466
|
-
(mention: MentionDescription, event?: SyntheticEvent<any>): void;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
// @public (undocumented)
|
|
470
|
-
interface OnOpen {
|
|
471
|
-
// (undocumented)
|
|
472
|
-
(): void;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
// @public (undocumented)
|
|
476
|
-
type OwnProps = {
|
|
477
|
-
id: string;
|
|
478
|
-
text: string;
|
|
479
|
-
isHighlighted?: boolean;
|
|
480
|
-
accessLevel?: string;
|
|
481
|
-
onClick?: MentionEventHandler;
|
|
482
|
-
onMouseEnter?: MentionEventHandler;
|
|
483
|
-
onMouseLeave?: MentionEventHandler;
|
|
484
|
-
onHover?: () => void;
|
|
485
|
-
};
|
|
486
|
-
|
|
487
|
-
// @public (undocumented)
|
|
488
|
-
type Position = 'above' | 'auto' | 'below';
|
|
489
|
-
|
|
490
|
-
// @public (undocumented)
|
|
491
|
-
interface Presence {
|
|
492
|
-
// (undocumented)
|
|
493
|
-
status?: string;
|
|
494
|
-
// (undocumented)
|
|
495
|
-
time?: string;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
// @public (undocumented)
|
|
499
|
-
interface PresenceBulk {
|
|
500
|
-
// (undocumented)
|
|
501
|
-
date: null | string;
|
|
502
|
-
// (undocumented)
|
|
503
|
-
message: null | string;
|
|
504
|
-
// (undocumented)
|
|
505
|
-
state: null | string;
|
|
506
|
-
// (undocumented)
|
|
507
|
-
stateMetadata?: string;
|
|
508
|
-
// (undocumented)
|
|
509
|
-
type: null | string;
|
|
510
|
-
// (undocumented)
|
|
511
|
-
userId: string;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
// @public (undocumented)
|
|
515
|
-
interface PresenceCache {
|
|
516
|
-
// (undocumented)
|
|
517
|
-
contains(userId: string): boolean;
|
|
518
|
-
// (undocumented)
|
|
519
|
-
get(userId: string): Presence;
|
|
520
|
-
// (undocumented)
|
|
521
|
-
getBulk(userIds: string[]): PresenceMap;
|
|
522
|
-
// (undocumented)
|
|
523
|
-
getMissingUserIds(userIds: string[]): string[];
|
|
524
|
-
// (undocumented)
|
|
525
|
-
update(presUpdate: PresenceMap): void;
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
// @public (undocumented)
|
|
529
|
-
interface PresenceMap {
|
|
530
|
-
// (undocumented)
|
|
531
|
-
[userId: string]: Presence;
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
// @public (undocumented)
|
|
535
|
-
interface PresenceParser {
|
|
536
|
-
// (undocumented)
|
|
537
|
-
mapState(state: string): string;
|
|
538
|
-
// (undocumented)
|
|
539
|
-
parse(response: PresenceResponse): PresenceMap;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
// @public (undocumented)
|
|
543
|
-
export interface PresenceProvider extends ResourceProvider<PresenceMap> {
|
|
544
|
-
// (undocumented)
|
|
545
|
-
refreshPresence(userIds: string[]): void;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
// @public (undocumented)
|
|
549
|
-
export class PresenceResource extends AbstractPresenceResource {
|
|
550
|
-
constructor(config: PresenceResourceConfig);
|
|
551
|
-
// (undocumented)
|
|
552
|
-
refreshPresence(userIds: string[]): void;
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
// @public (undocumented)
|
|
556
|
-
interface PresenceResourceConfig {
|
|
557
|
-
// (undocumented)
|
|
558
|
-
cache?: PresenceCache;
|
|
559
|
-
// (undocumented)
|
|
560
|
-
cacheExpiry?: number;
|
|
561
|
-
// (undocumented)
|
|
562
|
-
cloudId: string;
|
|
563
|
-
// (undocumented)
|
|
564
|
-
parser?: PresenceParser;
|
|
565
|
-
// (undocumented)
|
|
566
|
-
productId?: string;
|
|
567
|
-
// (undocumented)
|
|
568
|
-
url: string;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
// @public (undocumented)
|
|
572
|
-
interface PresenceResponse {
|
|
573
|
-
// (undocumented)
|
|
574
|
-
data: Data;
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
// @public (undocumented)
|
|
578
|
-
interface Props {
|
|
579
|
-
// (undocumented)
|
|
580
|
-
mention: MentionDescription;
|
|
581
|
-
// (undocumented)
|
|
582
|
-
onMouseEnter?: OnMentionEvent;
|
|
583
|
-
// (undocumented)
|
|
584
|
-
onMouseMove?: OnMentionEvent;
|
|
585
|
-
// (undocumented)
|
|
586
|
-
onSelection?: OnMentionEvent;
|
|
587
|
-
// (undocumented)
|
|
588
|
-
selected?: boolean;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
// @public (undocumented)
|
|
592
|
-
interface Props_2 {
|
|
593
|
-
// (undocumented)
|
|
594
|
-
initialHighlightElement?: React_2.ReactElement | null;
|
|
595
|
-
// (undocumented)
|
|
596
|
-
mentions: MentionDescription[];
|
|
597
|
-
// (undocumented)
|
|
598
|
-
onSelection?: OnMentionEvent;
|
|
599
|
-
// (undocumented)
|
|
600
|
-
resourceError?: Error;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
// @public (undocumented)
|
|
604
|
-
interface Props_3 {
|
|
605
|
-
// (undocumented)
|
|
606
|
-
onSelection?: OnMentionEvent;
|
|
607
|
-
// (undocumented)
|
|
608
|
-
presenceProvider?: PresenceProvider;
|
|
609
|
-
// (undocumented)
|
|
610
|
-
query?: string;
|
|
611
|
-
// (undocumented)
|
|
612
|
-
resourceError?: Error;
|
|
613
|
-
// (undocumented)
|
|
614
|
-
resourceProvider: MentionProvider;
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
// @public (undocumented)
|
|
618
|
-
interface Props_4 {
|
|
619
|
-
// (undocumented)
|
|
620
|
-
offsetX?: number;
|
|
621
|
-
// (undocumented)
|
|
622
|
-
offsetY?: number;
|
|
623
|
-
// (undocumented)
|
|
624
|
-
onClose?: OnClose;
|
|
625
|
-
// (undocumented)
|
|
626
|
-
onOpen?: OnOpen;
|
|
627
|
-
// (undocumented)
|
|
628
|
-
onSelection?: OnMentionEvent;
|
|
629
|
-
// (undocumented)
|
|
630
|
-
position?: Position;
|
|
631
|
-
// (undocumented)
|
|
632
|
-
presenceProvider?: PresenceProvider;
|
|
633
|
-
// (undocumented)
|
|
634
|
-
query?: string;
|
|
635
|
-
// (undocumented)
|
|
636
|
-
resourceProvider: MentionProvider;
|
|
637
|
-
// (undocumented)
|
|
638
|
-
target?: string;
|
|
639
|
-
// (undocumented)
|
|
640
|
-
zIndex?: number | string;
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
// @public (undocumented)
|
|
644
|
-
type Props_5 = OwnProps & WithAnalyticsEventsProps_2;
|
|
645
|
-
|
|
646
|
-
// @public (undocumented)
|
|
647
|
-
interface Props_6 {
|
|
648
|
-
// (undocumented)
|
|
649
|
-
accessLevel?: string;
|
|
650
|
-
// (undocumented)
|
|
651
|
-
id: string;
|
|
652
|
-
// (undocumented)
|
|
653
|
-
mentionProvider?: Promise<MentionProvider>;
|
|
654
|
-
// (undocumented)
|
|
655
|
-
onClick?: MentionEventHandler;
|
|
656
|
-
// (undocumented)
|
|
657
|
-
onMouseEnter?: MentionEventHandler;
|
|
658
|
-
// (undocumented)
|
|
659
|
-
onMouseLeave?: MentionEventHandler;
|
|
660
|
-
// (undocumented)
|
|
661
|
-
text: string;
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
// @public
|
|
665
|
-
export interface ResolvingMentionProvider extends MentionProvider {
|
|
666
|
-
// (undocumented)
|
|
667
|
-
cacheMentionName(id: string, mentionName: string): void;
|
|
668
|
-
// (undocumented)
|
|
669
|
-
resolveMentionName(id: string): MentionNameDetails | Promise<MentionNameDetails>;
|
|
670
|
-
// (undocumented)
|
|
671
|
-
supportsMentionNameResolving(): boolean;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
// @public (undocumented)
|
|
675
|
-
export class ResourcedMention extends React_2.PureComponent<Props_6, State_4> {
|
|
676
|
-
constructor(props: Props_6);
|
|
677
|
-
// (undocumented)
|
|
678
|
-
componentDidMount(): void;
|
|
679
|
-
// (undocumented)
|
|
680
|
-
componentWillUnmount(): void;
|
|
681
|
-
// (undocumented)
|
|
682
|
-
_isMounted: boolean;
|
|
683
|
-
// (undocumented)
|
|
684
|
-
render(): JSX.Element;
|
|
685
|
-
// (undocumented)
|
|
686
|
-
UNSAFE_componentWillReceiveProps(nextProps: Props_6): void;
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
// @public (undocumented)
|
|
690
|
-
export const ResourcedMentionList: React_2.ForwardRefExoticComponent<Omit<Props_3 & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps> & React_2.RefAttributes<any>>;
|
|
691
|
-
|
|
692
|
-
// @public (undocumented)
|
|
693
|
-
export type ResourcedMentionList = ResourcedMentionListWithoutAnalytics;
|
|
694
|
-
|
|
695
|
-
// @public (undocumented)
|
|
696
|
-
class ResourcedMentionListWithoutAnalytics extends React_2.PureComponent<Props_3 & WithAnalyticsEventsProps, State_2> {
|
|
697
|
-
constructor(props: Props_3 & WithAnalyticsEventsProps);
|
|
698
|
-
// (undocumented)
|
|
699
|
-
chooseCurrentSelection: () => void;
|
|
700
|
-
// (undocumented)
|
|
701
|
-
componentDidMount(): void;
|
|
702
|
-
// (undocumented)
|
|
703
|
-
componentWillUnmount(): void;
|
|
704
|
-
// (undocumented)
|
|
705
|
-
mentionsCount: () => number;
|
|
706
|
-
// (undocumented)
|
|
707
|
-
render(): JSX.Element;
|
|
708
|
-
// (undocumented)
|
|
709
|
-
selectId: (id: string, callback?: () => any) => void;
|
|
710
|
-
// (undocumented)
|
|
711
|
-
selectIndex: (index: number, callback?: () => any) => void;
|
|
712
|
-
// (undocumented)
|
|
713
|
-
selectNext: () => void;
|
|
714
|
-
// (undocumented)
|
|
715
|
-
selectPrevious: () => void;
|
|
716
|
-
// (undocumented)
|
|
717
|
-
UNSAFE_componentWillReceiveProps(nextProps: Props_3): void;
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
// @public (undocumented)
|
|
721
|
-
interface ResourceProvider<Result> {
|
|
722
|
-
subscribe(key: string, callback?: ResultCallback<Result>, errCallback?: ErrorCallback_2, infoCallback?: InfoCallback, allResultsCallback?: ResultCallback<Result>, analyticsCallback?: AnalyticsCallback): void;
|
|
723
|
-
unsubscribe(key: string): void;
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
// @public (undocumented)
|
|
727
|
-
interface ResultCallback<T> {
|
|
728
|
-
// (undocumented)
|
|
729
|
-
(result: T, query?: string, stats?: MentionStats): void;
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
// @public (undocumented)
|
|
733
|
-
interface State {
|
|
734
|
-
// (undocumented)
|
|
735
|
-
selectedIndex: number;
|
|
736
|
-
// (undocumented)
|
|
737
|
-
selectedKey?: string;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
// @public (undocumented)
|
|
741
|
-
interface State_2 {
|
|
742
|
-
// (undocumented)
|
|
743
|
-
mentions: MentionDescription[];
|
|
744
|
-
// (undocumented)
|
|
745
|
-
resourceError?: Error;
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
// @public (undocumented)
|
|
749
|
-
interface State_3 {
|
|
750
|
-
// (undocumented)
|
|
751
|
-
info?: string;
|
|
752
|
-
// (undocumented)
|
|
753
|
-
visible: boolean;
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
// @public (undocumented)
|
|
757
|
-
interface State_4 {
|
|
758
|
-
// (undocumented)
|
|
759
|
-
isHighlighted: boolean;
|
|
760
|
-
// (undocumented)
|
|
761
|
-
resolvedMentionName?: string;
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
// @public (undocumented)
|
|
765
|
-
export interface TeamMember {
|
|
766
|
-
// (undocumented)
|
|
767
|
-
id: string;
|
|
768
|
-
// (undocumented)
|
|
769
|
-
name: string;
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
// @public
|
|
773
|
-
export class TeamMentionResource extends MentionResource implements MentionProvider {
|
|
774
|
-
constructor(userMentionConfig: MentionResourceConfig, teamMentionConfig: TeamMentionResourceConfig);
|
|
775
|
-
// (undocumented)
|
|
776
|
-
filter(query?: string, contextIdentifier?: MentionContextIdentifier): Promise<void>;
|
|
777
|
-
// (undocumented)
|
|
778
|
-
notify(searchTime: number, mentionResult: MentionsResult, query?: string): void;
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
// @public (undocumented)
|
|
782
|
-
export interface TeamMentionResourceConfig extends MentionResourceConfig {
|
|
783
|
-
// (undocumented)
|
|
784
|
-
teamLinkResolver?: (teamId: string) => string;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
// @public (undocumented)
|
|
788
|
-
export enum UserAccessLevel {
|
|
789
|
-
// (undocumented)
|
|
790
|
-
APPLICATION = 2,
|
|
791
|
-
// (undocumented)
|
|
792
|
-
CONTAINER = 3,
|
|
793
|
-
// (undocumented)
|
|
794
|
-
NONE = 0,
|
|
795
|
-
// (undocumented)
|
|
796
|
-
SITE = 1
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
// @public (undocumented)
|
|
800
|
-
export type UserRole = 'admin' | 'basic' | 'trusted';
|
|
801
|
-
|
|
802
|
-
// @public (undocumented)
|
|
803
|
-
export enum UserType {
|
|
804
|
-
// (undocumented)
|
|
805
|
-
APP = 2,
|
|
806
|
-
// (undocumented)
|
|
807
|
-
DEFAULT = 0,
|
|
808
|
-
// (undocumented)
|
|
809
|
-
SPECIAL = 1,
|
|
810
|
-
// (undocumented)
|
|
811
|
-
SYSTEM = 4,
|
|
812
|
-
// (undocumented)
|
|
813
|
-
TEAM = 3
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
// (No @packageDocumentation comment for this package)
|
|
817
|
-
|
|
818
|
-
```
|