@atlaskit/mention 24.2.2 → 24.2.4
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 +14 -0
- package/afm-cc/tsconfig.json +1 -4
- package/afm-jira/tsconfig.json +0 -3
- package/afm-post-office/tsconfig.json +0 -3
- package/dist/cjs/components/Mention/ResourcedMention.js +2 -1
- package/dist/cjs/components/Mention/index.js +7 -2
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/es2019/components/Mention/ResourcedMention.js +2 -1
- package/dist/es2019/components/Mention/index.js +7 -2
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/esm/components/Mention/ResourcedMention.js +2 -1
- package/dist/esm/components/Mention/index.js +7 -2
- package/dist/esm/util/analytics.js +1 -1
- package/dist/types/components/Mention/ResourcedMention.d.ts +1 -0
- package/dist/types/components/Mention/index.d.ts +1 -0
- package/dist/types-ts4.5/components/Mention/ResourcedMention.d.ts +1 -0
- package/dist/types-ts4.5/components/Mention/index.d.ts +1 -0
- package/docs/1-in-editor.tsx +1 -7
- package/package.json +5 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/mention
|
|
2
2
|
|
|
3
|
+
## 24.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#173636](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173636)
|
|
8
|
+
[`22b85a186fb8a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/22b85a186fb8a) -
|
|
9
|
+
SSR placeholder for mention profile card trigger
|
|
10
|
+
|
|
11
|
+
## 24.2.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 24.2.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"declaration": true,
|
|
5
5
|
"target": "es5",
|
|
6
6
|
"composite": true,
|
|
7
|
-
"outDir": "
|
|
7
|
+
"outDir": "../../../../../confluence/tsDist/@atlaskit__mention",
|
|
8
8
|
"rootDir": "../"
|
|
9
9
|
},
|
|
10
10
|
"include": [
|
|
@@ -35,9 +35,6 @@
|
|
|
35
35
|
{
|
|
36
36
|
"path": "../../../design-system/icon/afm-cc/tsconfig.json"
|
|
37
37
|
},
|
|
38
|
-
{
|
|
39
|
-
"path": "../../../design-system/link/afm-cc/tsconfig.json"
|
|
40
|
-
},
|
|
41
38
|
{
|
|
42
39
|
"path": "../../../design-system/lozenge/afm-cc/tsconfig.json"
|
|
43
40
|
},
|
package/afm-jira/tsconfig.json
CHANGED
|
@@ -124,7 +124,8 @@ var ResourcedMention = exports.default = /*#__PURE__*/function (_React$PureCompo
|
|
|
124
124
|
localId: props.localId,
|
|
125
125
|
onClick: props.onClick,
|
|
126
126
|
onMouseEnter: props.onMouseEnter,
|
|
127
|
-
onMouseLeave: props.onMouseLeave
|
|
127
|
+
onMouseLeave: props.onMouseLeave,
|
|
128
|
+
ssrPlaceholderId: props.ssrPlaceholderId
|
|
128
129
|
});
|
|
129
130
|
}
|
|
130
131
|
}]);
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.UNKNOWN_USER_ID = exports.MentionInternal = exports.ANALYTICS_HOVER_DELAY = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
8
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
11
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
@@ -13,6 +14,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
13
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
15
|
var _react = _interopRequireDefault(require("react"));
|
|
15
16
|
var _focusRing = _interopRequireDefault(require("@atlaskit/focus-ring"));
|
|
17
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
18
|
var _MessagesIntlProvider = _interopRequireDefault(require("../MessagesIntlProvider"));
|
|
17
19
|
var _PrimitiveMention = _interopRequireDefault(require("./PrimitiveMention"));
|
|
18
20
|
var _NoAccessTooltip = _interopRequireDefault(require("../NoAccessTooltip"));
|
|
@@ -135,15 +137,18 @@ var MentionInternal = exports.MentionInternal = /*#__PURE__*/function (_React$Pu
|
|
|
135
137
|
"data-mention-type": mentionType,
|
|
136
138
|
"data-mention-tooltip": showTooltip
|
|
137
139
|
}, failedMention ? this.renderUnknownUserError(id) : text || '@...'));
|
|
140
|
+
var ssrPlaceholderProp = (0, _platformFeatureFlags.fg)('cc_mention_ssr_placeholder') ? {
|
|
141
|
+
"data-ssr-placeholder": props.ssrPlaceholderId
|
|
142
|
+
} : {};
|
|
138
143
|
return /*#__PURE__*/_react.default.createElement(_ufoExperiences.UfoErrorBoundary, {
|
|
139
144
|
id: id
|
|
140
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
145
|
+
}, /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({
|
|
141
146
|
id: localId,
|
|
142
147
|
"data-mention-id": id,
|
|
143
148
|
"data-local-id": localId,
|
|
144
149
|
"data-access-level": accessLevel,
|
|
145
150
|
spellCheck: false
|
|
146
|
-
}, /*#__PURE__*/_react.default.createElement(_MessagesIntlProvider.default, null, showTooltip ? /*#__PURE__*/_react.default.createElement(_react.default.Suspense, {
|
|
151
|
+
}, ssrPlaceholderProp), /*#__PURE__*/_react.default.createElement(_MessagesIntlProvider.default, null, showTooltip ? /*#__PURE__*/_react.default.createElement(_react.default.Suspense, {
|
|
147
152
|
fallback: mentionComponent
|
|
148
153
|
}, /*#__PURE__*/_react.default.createElement(_NoAccessTooltip.default, {
|
|
149
154
|
name: text
|
|
@@ -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 = "24.2.
|
|
15
|
+
var packageVersion = "24.2.3";
|
|
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 fireAnalyticsMentionTypeaheadEvent = exports.fireAnalyticsMentionTypeaheadEvent = function fireAnalyticsMentionTypeaheadEvent(props) {
|
|
@@ -98,7 +98,8 @@ export default class ResourcedMention extends React.PureComponent {
|
|
|
98
98
|
localId: props.localId,
|
|
99
99
|
onClick: props.onClick,
|
|
100
100
|
onMouseEnter: props.onMouseEnter,
|
|
101
|
-
onMouseLeave: props.onMouseLeave
|
|
101
|
+
onMouseLeave: props.onMouseLeave,
|
|
102
|
+
ssrPlaceholderId: props.ssrPlaceholderId
|
|
102
103
|
});
|
|
103
104
|
}
|
|
104
105
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import FocusRing from '@atlaskit/focus-ring';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
6
|
import MessagesIntlProvider from '../MessagesIntlProvider';
|
|
5
7
|
import PrimitiveMention from './PrimitiveMention';
|
|
6
8
|
import AsyncNoAccessTooltip from '../NoAccessTooltip';
|
|
@@ -115,15 +117,18 @@ export class MentionInternal extends React.PureComponent {
|
|
|
115
117
|
"data-mention-type": mentionType,
|
|
116
118
|
"data-mention-tooltip": showTooltip
|
|
117
119
|
}, failedMention ? this.renderUnknownUserError(id) : text || '@...'));
|
|
120
|
+
const ssrPlaceholderProp = fg('cc_mention_ssr_placeholder') ? {
|
|
121
|
+
"data-ssr-placeholder": props.ssrPlaceholderId
|
|
122
|
+
} : {};
|
|
118
123
|
return /*#__PURE__*/React.createElement(UfoErrorBoundary, {
|
|
119
124
|
id: id
|
|
120
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
125
|
+
}, /*#__PURE__*/React.createElement("span", _extends({
|
|
121
126
|
id: localId,
|
|
122
127
|
"data-mention-id": id,
|
|
123
128
|
"data-local-id": localId,
|
|
124
129
|
"data-access-level": accessLevel,
|
|
125
130
|
spellCheck: false
|
|
126
|
-
}, /*#__PURE__*/React.createElement(MessagesIntlProvider, null, showTooltip ? /*#__PURE__*/React.createElement(React.Suspense, {
|
|
131
|
+
}, ssrPlaceholderProp), /*#__PURE__*/React.createElement(MessagesIntlProvider, null, showTooltip ? /*#__PURE__*/React.createElement(React.Suspense, {
|
|
127
132
|
fallback: mentionComponent
|
|
128
133
|
}, /*#__PURE__*/React.createElement(AsyncNoAccessTooltip, {
|
|
129
134
|
name: text
|
|
@@ -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 { ComponentNames, isSpecialMentionText } from '../types';
|
|
4
4
|
const packageName = "@atlaskit/mention";
|
|
5
|
-
const packageVersion = "24.2.
|
|
5
|
+
const packageVersion = "24.2.3";
|
|
6
6
|
export const SLI_EVENT_TYPE = 'sli';
|
|
7
7
|
export const SMART_EVENT_TYPE = 'smart';
|
|
8
8
|
export const fireAnalyticsMentionTypeaheadEvent = props => (action, duration, userIds = [], query) => {
|
|
@@ -115,7 +115,8 @@ var ResourcedMention = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
115
115
|
localId: props.localId,
|
|
116
116
|
onClick: props.onClick,
|
|
117
117
|
onMouseEnter: props.onMouseEnter,
|
|
118
|
-
onMouseLeave: props.onMouseLeave
|
|
118
|
+
onMouseLeave: props.onMouseLeave,
|
|
119
|
+
ssrPlaceholderId: props.ssrPlaceholderId
|
|
119
120
|
});
|
|
120
121
|
}
|
|
121
122
|
}]);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
@@ -8,6 +9,7 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
|
|
|
8
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
10
|
import React from 'react';
|
|
10
11
|
import FocusRing from '@atlaskit/focus-ring';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
13
|
import MessagesIntlProvider from '../MessagesIntlProvider';
|
|
12
14
|
import PrimitiveMention from './PrimitiveMention';
|
|
13
15
|
import AsyncNoAccessTooltip from '../NoAccessTooltip';
|
|
@@ -128,15 +130,18 @@ export var MentionInternal = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
128
130
|
"data-mention-type": mentionType,
|
|
129
131
|
"data-mention-tooltip": showTooltip
|
|
130
132
|
}, failedMention ? this.renderUnknownUserError(id) : text || '@...'));
|
|
133
|
+
var ssrPlaceholderProp = fg('cc_mention_ssr_placeholder') ? {
|
|
134
|
+
"data-ssr-placeholder": props.ssrPlaceholderId
|
|
135
|
+
} : {};
|
|
131
136
|
return /*#__PURE__*/React.createElement(UfoErrorBoundary, {
|
|
132
137
|
id: id
|
|
133
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
138
|
+
}, /*#__PURE__*/React.createElement("span", _extends({
|
|
134
139
|
id: localId,
|
|
135
140
|
"data-mention-id": id,
|
|
136
141
|
"data-local-id": localId,
|
|
137
142
|
"data-access-level": accessLevel,
|
|
138
143
|
spellCheck: false
|
|
139
|
-
}, /*#__PURE__*/React.createElement(MessagesIntlProvider, null, showTooltip ? /*#__PURE__*/React.createElement(React.Suspense, {
|
|
144
|
+
}, ssrPlaceholderProp), /*#__PURE__*/React.createElement(MessagesIntlProvider, null, showTooltip ? /*#__PURE__*/React.createElement(React.Suspense, {
|
|
140
145
|
fallback: mentionComponent
|
|
141
146
|
}, /*#__PURE__*/React.createElement(AsyncNoAccessTooltip, {
|
|
142
147
|
name: text
|
|
@@ -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 { ComponentNames, isSpecialMentionText } from '../types';
|
|
7
7
|
var packageName = "@atlaskit/mention";
|
|
8
|
-
var packageVersion = "24.2.
|
|
8
|
+
var packageVersion = "24.2.3";
|
|
9
9
|
export var SLI_EVENT_TYPE = 'sli';
|
|
10
10
|
export var SMART_EVENT_TYPE = 'smart';
|
|
11
11
|
export var fireAnalyticsMentionTypeaheadEvent = function fireAnalyticsMentionTypeaheadEvent(props) {
|
|
@@ -13,6 +13,7 @@ export type OwnProps = {
|
|
|
13
13
|
onMouseEnter?: MentionEventHandler;
|
|
14
14
|
onMouseLeave?: MentionEventHandler;
|
|
15
15
|
onHover?: () => void;
|
|
16
|
+
ssrPlaceholderId?: string;
|
|
16
17
|
};
|
|
17
18
|
export type Props = OwnProps & WithAnalyticsEventsProps;
|
|
18
19
|
export declare class MentionInternal extends React.PureComponent<Props, {}> {
|
|
@@ -13,6 +13,7 @@ export type OwnProps = {
|
|
|
13
13
|
onMouseEnter?: MentionEventHandler;
|
|
14
14
|
onMouseLeave?: MentionEventHandler;
|
|
15
15
|
onHover?: () => void;
|
|
16
|
+
ssrPlaceholderId?: string;
|
|
16
17
|
};
|
|
17
18
|
export type Props = OwnProps & WithAnalyticsEventsProps;
|
|
18
19
|
export declare class MentionInternal extends React.PureComponent<Props, {}> {
|
package/docs/1-in-editor.tsx
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import Link from '@atlaskit/link';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
5
4
|
import { md, Example, code, AtlassianInternalWarning } from '@atlaskit/docs';
|
|
@@ -7,10 +6,6 @@ import { md, Example, code, AtlassianInternalWarning } from '@atlaskit/docs';
|
|
|
7
6
|
import MentionWithEditorExample from '../examples/14-mention-with-editor-extending-abstract-mention-resource';
|
|
8
7
|
const MentionWithEditorExampleSource = require('!!raw-loader!../examples/14-mention-with-editor-extending-abstract-mention-resource');
|
|
9
8
|
|
|
10
|
-
const LinkComponent = (props: any) =>
|
|
11
|
-
// eslint-disable-next-line @atlaskit/design-system/no-html-anchor, jsx-a11y/anchor-has-content
|
|
12
|
-
fg('dst-a11y__replace-anchor-with-link__search-platfor') ? <Link {...props} /> : <a {...props} />;
|
|
13
|
-
|
|
14
9
|
export default md`
|
|
15
10
|
${(<AtlassianInternalWarning />)}
|
|
16
11
|
|
|
@@ -19,8 +14,7 @@ export default md`
|
|
|
19
14
|
${(
|
|
20
15
|
<>
|
|
21
16
|
<Text as="p">
|
|
22
|
-
To use Mention in
|
|
23
|
-
<LinkComponent href="/packages/editor/editor-core">@atlaskit/editor-core</LinkComponent>
|
|
17
|
+
To use Mention in <Link href="/packages/editor/editor-core">@atlaskit/editor-core</Link>
|
|
24
18
|
{', '}
|
|
25
19
|
check the 'Editor with mentions' section in editor-core, then follow these steps for a more
|
|
26
20
|
involved tutorial:
|
package/package.json
CHANGED
|
@@ -36,14 +36,13 @@
|
|
|
36
36
|
"@atlaskit/avatar": "^25.1.0",
|
|
37
37
|
"@atlaskit/focus-ring": "^3.0.0",
|
|
38
38
|
"@atlaskit/heading": "^5.2.0",
|
|
39
|
-
"@atlaskit/icon": "^
|
|
40
|
-
"@atlaskit/link": "^3.2.0",
|
|
39
|
+
"@atlaskit/icon": "^27.0.0",
|
|
41
40
|
"@atlaskit/lozenge": "^13.0.0",
|
|
42
41
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
43
|
-
"@atlaskit/primitives": "^14.
|
|
42
|
+
"@atlaskit/primitives": "^14.9.0",
|
|
44
43
|
"@atlaskit/teams-avatar": "^2.3.0",
|
|
45
44
|
"@atlaskit/theme": "^18.0.0",
|
|
46
|
-
"@atlaskit/tokens": "^5.
|
|
45
|
+
"@atlaskit/tokens": "^5.3.0",
|
|
47
46
|
"@atlaskit/tooltip": "^20.3.0",
|
|
48
47
|
"@atlaskit/ufo": "^0.4.0",
|
|
49
48
|
"@atlaskit/util-service-support": "^6.3.0",
|
|
@@ -94,7 +93,7 @@
|
|
|
94
93
|
"team-avatar-in-mention-picker": {
|
|
95
94
|
"type": "boolean"
|
|
96
95
|
},
|
|
97
|
-
"
|
|
96
|
+
"cc_mention_ssr_placeholder": {
|
|
98
97
|
"type": "boolean"
|
|
99
98
|
}
|
|
100
99
|
},
|
|
@@ -123,5 +122,5 @@
|
|
|
123
122
|
]
|
|
124
123
|
}
|
|
125
124
|
},
|
|
126
|
-
"version": "24.2.
|
|
125
|
+
"version": "24.2.4"
|
|
127
126
|
}
|