@atlaskit/mention 27.11.0 → 27.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/mention
2
2
 
3
+ ## 27.12.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 27.12.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`eb6534b29cb7a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/eb6534b29cb7a) -
14
+ [ux] Fix alignment of NameSectionStyle with AvatarStyle and Add spacing between mention typeahead
15
+ sections
16
+
3
17
  ## 27.11.0
4
18
 
5
19
  ### Minor Changes
@@ -61,6 +61,9 @@
61
61
  {
62
62
  "path": "../../../people-and-teams/teams-avatar/afm-cc/tsconfig.json"
63
63
  },
64
+ {
65
+ "path": "../../../editor/tmp-editor-statsig/afm-cc/tsconfig.json"
66
+ },
64
67
  {
65
68
  "path": "../../../design-system/tokens/afm-cc/tsconfig.json"
66
69
  },
@@ -61,6 +61,9 @@
61
61
  {
62
62
  "path": "../../../people-and-teams/teams-avatar/afm-products/tsconfig.json"
63
63
  },
64
+ {
65
+ "path": "../../../editor/tmp-editor-statsig/afm-products/tsconfig.json"
66
+ },
64
67
  {
65
68
  "path": "../../../design-system/tokens/afm-products/tsconfig.json"
66
69
  },
@@ -30,6 +30,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
30
30
  var _tag = _interopRequireDefault(require("@atlaskit/tag"));
31
31
  var _react = _interopRequireDefault(require("react"));
32
32
  var _statusInformation = _interopRequireDefault(require("@atlaskit/icon/core/status-information"));
33
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
33
34
  var _types = require("../../types");
34
35
  var _i18n = require("../../util/i18n");
35
36
  var _mouse = require("../../util/mouse");
@@ -161,6 +162,7 @@ var MentionItem = exports.default = /*#__PURE__*/function (_React$PureComponent)
161
162
  var restricted = (0, _types.isRestricted)(accessLevel);
162
163
  var nameHighlights = highlight && highlight.name;
163
164
  var xProductUserInfoIconColor = selected ? "var(--ds-icon-selected, #1868DB)" : "var(--ds-icon, #292A2E)";
165
+ var RowStyle = (0, _expValEquals.expValEquals)('platform_editor_agent_mentions', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_agent_mentions_drop_one_fixes') ? _styles.RowStyleNext : _styles.RowStyle;
164
166
  return /*#__PURE__*/_react.default.createElement(_MessagesIntlProvider.default, null, /*#__PURE__*/_react.default.createElement(_styles.MentionItemStyle, {
165
167
  selected: selected,
166
168
  height: height,
@@ -173,7 +175,7 @@ var MentionItem = exports.default = /*#__PURE__*/function (_React$PureComponent)
173
175
  "data-mention-name": mentionName,
174
176
  "data-selected": selected,
175
177
  ref: forwardedRef
176
- }, /*#__PURE__*/_react.default.createElement(_styles.RowStyle, null, /*#__PURE__*/_react.default.createElement(_styles.AvatarStyle, {
178
+ }, /*#__PURE__*/_react.default.createElement(RowStyle, null, /*#__PURE__*/_react.default.createElement(_styles.AvatarStyle, {
177
179
  restricted: restricted
178
180
  }, /*#__PURE__*/_react.default.createElement(_MentionAvatar.MentionAvatar, {
179
181
  selected: selected,
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.TimeStyle = exports.RowStyle = exports.NameSectionStyle = exports.MentionItemStyle = exports.MENTION_ITEM_HEIGHT_REFRESHED = exports.MENTION_ITEM_HEIGHT = exports.InfoSectionStyle = exports.FullNameStyle = exports.AvatarStyle = exports.AvatarSkeletonWrapper = exports.AccessSectionStyle = void 0;
7
+ exports.TimeStyle = exports.RowStyleNext = exports.RowStyle = exports.NameSectionStyle = exports.MentionItemStyle = exports.MENTION_ITEM_HEIGHT_REFRESHED = exports.MENTION_ITEM_HEIGHT = exports.InfoSectionStyle = exports.FullNameStyle = exports.AvatarStyle = exports.AvatarSkeletonWrapper = exports.AccessSectionStyle = void 0;
8
8
  var _styled = _interopRequireDefault(require("@emotion/styled"));
9
9
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -23,6 +23,18 @@ var RowStyle = exports.RowStyle = _styled.default.div({
23
23
  verticalAlign: 'middle'
24
24
  });
25
25
 
26
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
27
+ var RowStyleNext = exports.RowStyleNext = _styled.default.div({
28
+ alignItems: 'center',
29
+ display: 'flex',
30
+ flexDirection: 'row',
31
+ flexWrap: 'wrap',
32
+ overflow: 'hidden',
33
+ padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-150, 12px)"),
34
+ textOverflow: 'ellipsis',
35
+ verticalAlign: 'middle'
36
+ });
37
+
26
38
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
27
39
  var AvatarStyle = exports.AvatarStyle = _styled.default.span(function (props) {
28
40
  return {
@@ -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 = "27.10.1";
15
+ var packageVersion = "27.12.0";
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) {
@@ -5,12 +5,13 @@ import { fg } from '@atlaskit/platform-feature-flags';
5
5
  import Tag from '@atlaskit/tag';
6
6
  import React from 'react';
7
7
  import EditorPanelIcon from '@atlaskit/icon/core/status-information';
8
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
9
  import { isRestricted } from '../../types';
9
10
  import { NoAccessLabel } from '../../util/i18n';
10
11
  import { leftClick } from '../../util/mouse';
11
12
  import AsyncNoAccessTooltip from '../NoAccessTooltip';
12
13
  import AsyncLockCircleIcon from '../LockCircleIcon';
13
- import { AccessSectionStyle, AvatarStyle, FullNameStyle, InfoSectionStyle, MentionItemStyle, NameSectionStyle, RowStyle, TimeStyle } from './styles';
14
+ import { AccessSectionStyle, AvatarStyle, FullNameStyle, InfoSectionStyle, MentionItemStyle, NameSectionStyle, RowStyle as RowStyleLegacy, RowStyleNext, TimeStyle } from './styles';
14
15
  import { renderHighlight } from './MentionHighlightHelpers';
15
16
  import MentionDescriptionByline from '../MentionDescriptionByline';
16
17
  import MessagesIntlProvider from '../MessagesIntlProvider';
@@ -130,6 +131,7 @@ export default class MentionItem extends React.PureComponent {
130
131
  const restricted = isRestricted(accessLevel);
131
132
  const nameHighlights = highlight && highlight.name;
132
133
  const xProductUserInfoIconColor = selected ? "var(--ds-icon-selected, #1868DB)" : "var(--ds-icon, #292A2E)";
134
+ const RowStyle = expValEquals('platform_editor_agent_mentions', 'isEnabled', true) && fg('platform_editor_agent_mentions_drop_one_fixes') ? RowStyleNext : RowStyleLegacy;
133
135
  return /*#__PURE__*/React.createElement(MessagesIntlProvider, null, /*#__PURE__*/React.createElement(MentionItemStyle, {
134
136
  selected: selected,
135
137
  height: height,
@@ -15,6 +15,18 @@ export const RowStyle = styled.div({
15
15
  verticalAlign: 'middle'
16
16
  });
17
17
 
18
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
19
+ export const RowStyleNext = styled.div({
20
+ alignItems: 'center',
21
+ display: 'flex',
22
+ flexDirection: 'row',
23
+ flexWrap: 'wrap',
24
+ overflow: 'hidden',
25
+ padding: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-150, 12px)"}`,
26
+ textOverflow: 'ellipsis',
27
+ verticalAlign: 'middle'
28
+ });
29
+
18
30
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
19
31
  export const AvatarStyle = styled.span(props => ({
20
32
  position: 'relative',
@@ -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 = "27.10.1";
5
+ const packageVersion = "27.12.0";
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) => {
@@ -13,12 +13,13 @@ import { fg } from '@atlaskit/platform-feature-flags';
13
13
  import Tag from '@atlaskit/tag';
14
14
  import React from 'react';
15
15
  import EditorPanelIcon from '@atlaskit/icon/core/status-information';
16
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
16
17
  import { isRestricted } from '../../types';
17
18
  import { NoAccessLabel } from '../../util/i18n';
18
19
  import { leftClick } from '../../util/mouse';
19
20
  import AsyncNoAccessTooltip from '../NoAccessTooltip';
20
21
  import AsyncLockCircleIcon from '../LockCircleIcon';
21
- import { AccessSectionStyle, AvatarStyle, FullNameStyle, InfoSectionStyle, MentionItemStyle, NameSectionStyle, RowStyle, TimeStyle } from './styles';
22
+ import { AccessSectionStyle, AvatarStyle, FullNameStyle, InfoSectionStyle, MentionItemStyle, NameSectionStyle, RowStyle as RowStyleLegacy, RowStyleNext, TimeStyle } from './styles';
22
23
  import { renderHighlight } from './MentionHighlightHelpers';
23
24
  import MentionDescriptionByline from '../MentionDescriptionByline';
24
25
  import MessagesIntlProvider from '../MessagesIntlProvider';
@@ -141,6 +142,7 @@ var MentionItem = /*#__PURE__*/function (_React$PureComponent) {
141
142
  var restricted = isRestricted(accessLevel);
142
143
  var nameHighlights = highlight && highlight.name;
143
144
  var xProductUserInfoIconColor = selected ? "var(--ds-icon-selected, #1868DB)" : "var(--ds-icon, #292A2E)";
145
+ var RowStyle = expValEquals('platform_editor_agent_mentions', 'isEnabled', true) && fg('platform_editor_agent_mentions_drop_one_fixes') ? RowStyleNext : RowStyleLegacy;
144
146
  return /*#__PURE__*/React.createElement(MessagesIntlProvider, null, /*#__PURE__*/React.createElement(MentionItemStyle, {
145
147
  selected: selected,
146
148
  height: height,
@@ -15,6 +15,18 @@ export var RowStyle = styled.div({
15
15
  verticalAlign: 'middle'
16
16
  });
17
17
 
18
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
19
+ export var RowStyleNext = styled.div({
20
+ alignItems: 'center',
21
+ display: 'flex',
22
+ flexDirection: 'row',
23
+ flexWrap: 'wrap',
24
+ overflow: 'hidden',
25
+ padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-150, 12px)"),
26
+ textOverflow: 'ellipsis',
27
+ verticalAlign: 'middle'
28
+ });
29
+
18
30
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
19
31
  export var AvatarStyle = styled.span(function (props) {
20
32
  return {
@@ -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 = "27.10.1";
8
+ var packageVersion = "27.12.0";
9
9
  export var SLI_EVENT_TYPE = 'sli';
10
10
  export var SMART_EVENT_TYPE = 'smart';
11
11
  export var fireAnalyticsMentionTypeaheadEvent = function fireAnalyticsMentionTypeaheadEvent(props) {
@@ -18,6 +18,10 @@ export declare const RowStyle: StyledComponent<{
18
18
  as?: React.ElementType;
19
19
  theme?: Theme;
20
20
  }, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
21
+ export declare const RowStyleNext: StyledComponent<{
22
+ as?: React.ElementType;
23
+ theme?: Theme;
24
+ }, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
21
25
  export declare const AvatarStyle: StyledComponent<{
22
26
  as?: React.ElementType;
23
27
  theme?: Theme;
package/package.json CHANGED
@@ -31,7 +31,7 @@
31
31
  "@atlaskit/analytics-next": "^12.3.0",
32
32
  "@atlaskit/avatar": "^26.4.0",
33
33
  "@atlaskit/focus-ring": "^4.2.0",
34
- "@atlaskit/heading": "^6.2.0",
34
+ "@atlaskit/heading": "^7.0.0",
35
35
  "@atlaskit/icon": "^37.2.0",
36
36
  "@atlaskit/lozenge": "^14.1.0",
37
37
  "@atlaskit/platform-feature-flags": "^2.1.0",
@@ -40,8 +40,9 @@
40
40
  "@atlaskit/skeleton": "^4.2.0",
41
41
  "@atlaskit/tag": "^15.4.0",
42
42
  "@atlaskit/teams-avatar": "^4.0.0",
43
+ "@atlaskit/tmp-editor-statsig": "^135.6.0",
43
44
  "@atlaskit/tokens": "^16.3.0",
44
- "@atlaskit/tooltip": "^23.2.0",
45
+ "@atlaskit/tooltip": "^24.0.0",
45
46
  "@atlaskit/ufo": "^1.0.0",
46
47
  "@atlaskit/util-service-support": "^7.2.0",
47
48
  "@babel/runtime": "^7.0.0",
@@ -99,6 +100,9 @@
99
100
  },
100
101
  "platform-dst-lozenge-tag-badge-visual-uplifts": {
101
102
  "type": "boolean"
103
+ },
104
+ "platform_editor_agent_mentions_drop_one_fixes": {
105
+ "type": "boolean"
102
106
  }
103
107
  },
104
108
  "publishConfig": {
@@ -118,5 +122,5 @@
118
122
  }
119
123
  },
120
124
  "types": "dist/types/index.d.ts",
121
- "version": "27.11.0"
125
+ "version": "27.12.1"
122
126
  }