@atlaskit/mention 21.0.19 → 22.0.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.
Files changed (167) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/api/MentionNameResolver.js +2 -0
  3. package/dist/cjs/api/MentionResource.js +17 -9
  4. package/dist/cjs/api/TeamMentionResource.js +12 -17
  5. package/dist/cjs/components/Mention/PrimitiveMention.js +1 -0
  6. package/dist/cjs/components/MentionItem/index.js +1 -1
  7. package/dist/cjs/components/MentionListError/GenericErrorIllustration.js +1 -1
  8. package/dist/cjs/components/MentionPicker/index.js +3 -5
  9. package/dist/cjs/components/ResourcedMentionList/index.js +1 -27
  10. package/dist/cjs/components/Scrollable/index.js +1 -1
  11. package/dist/cjs/components/i18n.js +0 -20
  12. package/dist/cjs/i18n/cs.js +16 -15
  13. package/dist/cjs/i18n/da.js +16 -15
  14. package/dist/cjs/i18n/de.js +16 -15
  15. package/dist/cjs/i18n/en.js +16 -15
  16. package/dist/cjs/i18n/en_GB.js +16 -15
  17. package/dist/cjs/i18n/es.js +16 -15
  18. package/dist/cjs/i18n/fi.js +16 -15
  19. package/dist/cjs/i18n/fr.js +16 -15
  20. package/dist/cjs/i18n/hu.js +16 -15
  21. package/dist/cjs/i18n/it.js +16 -15
  22. package/dist/cjs/i18n/ja.js +16 -15
  23. package/dist/cjs/i18n/ko.js +16 -15
  24. package/dist/cjs/i18n/nb.js +16 -15
  25. package/dist/cjs/i18n/nl.js +16 -15
  26. package/dist/cjs/i18n/pl.js +16 -15
  27. package/dist/cjs/i18n/pt_BR.js +16 -15
  28. package/dist/cjs/i18n/ru.js +16 -15
  29. package/dist/cjs/i18n/sv.js +16 -15
  30. package/dist/cjs/i18n/th.js +16 -15
  31. package/dist/cjs/i18n/tr.js +16 -15
  32. package/dist/cjs/i18n/uk.js +16 -15
  33. package/dist/cjs/i18n/vi.js +16 -15
  34. package/dist/cjs/i18n/zh.js +16 -15
  35. package/dist/cjs/i18n/zh_TW.js +16 -15
  36. package/dist/cjs/index.js +0 -14
  37. package/dist/cjs/util/analytics.js +1 -24
  38. package/dist/cjs/util/i18n.js +5 -13
  39. package/dist/cjs/version.json +1 -1
  40. package/dist/es2019/api/MentionNameResolver.js +2 -0
  41. package/dist/es2019/api/MentionResource.js +5 -1
  42. package/dist/es2019/api/TeamMentionResource.js +1 -2
  43. package/dist/es2019/components/MentionItem/index.js +1 -1
  44. package/dist/es2019/components/MentionPicker/index.js +3 -5
  45. package/dist/es2019/components/ResourcedMentionList/index.js +1 -27
  46. package/dist/es2019/components/Scrollable/index.js +1 -1
  47. package/dist/es2019/components/i18n.js +0 -20
  48. package/dist/es2019/i18n/cs.js +16 -15
  49. package/dist/es2019/i18n/da.js +16 -15
  50. package/dist/es2019/i18n/de.js +16 -15
  51. package/dist/es2019/i18n/en.js +16 -15
  52. package/dist/es2019/i18n/en_GB.js +16 -15
  53. package/dist/es2019/i18n/es.js +16 -15
  54. package/dist/es2019/i18n/fi.js +16 -15
  55. package/dist/es2019/i18n/fr.js +16 -15
  56. package/dist/es2019/i18n/hu.js +16 -15
  57. package/dist/es2019/i18n/it.js +16 -15
  58. package/dist/es2019/i18n/ja.js +16 -15
  59. package/dist/es2019/i18n/ko.js +16 -15
  60. package/dist/es2019/i18n/nb.js +16 -15
  61. package/dist/es2019/i18n/nl.js +16 -15
  62. package/dist/es2019/i18n/pl.js +16 -15
  63. package/dist/es2019/i18n/pt_BR.js +16 -15
  64. package/dist/es2019/i18n/ru.js +16 -15
  65. package/dist/es2019/i18n/sv.js +16 -15
  66. package/dist/es2019/i18n/th.js +16 -15
  67. package/dist/es2019/i18n/tr.js +16 -15
  68. package/dist/es2019/i18n/uk.js +16 -15
  69. package/dist/es2019/i18n/vi.js +16 -15
  70. package/dist/es2019/i18n/zh.js +16 -15
  71. package/dist/es2019/i18n/zh_TW.js +16 -15
  72. package/dist/es2019/index.js +1 -3
  73. package/dist/es2019/util/analytics.js +0 -20
  74. package/dist/es2019/util/i18n.js +0 -4
  75. package/dist/es2019/version.json +1 -1
  76. package/dist/esm/api/MentionNameResolver.js +2 -0
  77. package/dist/esm/api/MentionResource.js +15 -10
  78. package/dist/esm/api/TeamMentionResource.js +12 -17
  79. package/dist/esm/components/MentionItem/index.js +1 -1
  80. package/dist/esm/components/MentionPicker/index.js +3 -5
  81. package/dist/esm/components/ResourcedMentionList/index.js +1 -24
  82. package/dist/esm/components/Scrollable/index.js +1 -1
  83. package/dist/esm/components/i18n.js +0 -20
  84. package/dist/esm/i18n/cs.js +16 -15
  85. package/dist/esm/i18n/da.js +16 -15
  86. package/dist/esm/i18n/de.js +16 -15
  87. package/dist/esm/i18n/en.js +16 -15
  88. package/dist/esm/i18n/en_GB.js +16 -15
  89. package/dist/esm/i18n/es.js +16 -15
  90. package/dist/esm/i18n/fi.js +16 -15
  91. package/dist/esm/i18n/fr.js +16 -15
  92. package/dist/esm/i18n/hu.js +16 -15
  93. package/dist/esm/i18n/it.js +16 -15
  94. package/dist/esm/i18n/ja.js +16 -15
  95. package/dist/esm/i18n/ko.js +16 -15
  96. package/dist/esm/i18n/nb.js +16 -15
  97. package/dist/esm/i18n/nl.js +16 -15
  98. package/dist/esm/i18n/pl.js +16 -15
  99. package/dist/esm/i18n/pt_BR.js +16 -15
  100. package/dist/esm/i18n/ru.js +16 -15
  101. package/dist/esm/i18n/sv.js +16 -15
  102. package/dist/esm/i18n/th.js +16 -15
  103. package/dist/esm/i18n/tr.js +16 -15
  104. package/dist/esm/i18n/uk.js +16 -15
  105. package/dist/esm/i18n/vi.js +16 -15
  106. package/dist/esm/i18n/zh.js +16 -15
  107. package/dist/esm/i18n/zh_TW.js +16 -15
  108. package/dist/esm/index.js +1 -3
  109. package/dist/esm/util/analytics.js +0 -22
  110. package/dist/esm/util/i18n.js +4 -7
  111. package/dist/esm/version.json +1 -1
  112. package/dist/types/api/MentionResource.d.ts +0 -6
  113. package/dist/types/api/TeamMentionResource.d.ts +2 -4
  114. package/dist/types/components/MentionPicker/index.d.ts +0 -2
  115. package/dist/types/components/ResourcedMentionList/index.d.ts +0 -4
  116. package/dist/types/components/i18n.d.ts +0 -20
  117. package/dist/types/i18n/cs.d.ts +15 -15
  118. package/dist/types/i18n/da.d.ts +15 -15
  119. package/dist/types/i18n/de.d.ts +15 -15
  120. package/dist/types/i18n/en.d.ts +15 -15
  121. package/dist/types/i18n/en_GB.d.ts +15 -15
  122. package/dist/types/i18n/es.d.ts +15 -15
  123. package/dist/types/i18n/fi.d.ts +15 -15
  124. package/dist/types/i18n/fr.d.ts +15 -15
  125. package/dist/types/i18n/hu.d.ts +15 -15
  126. package/dist/types/i18n/it.d.ts +15 -15
  127. package/dist/types/i18n/ja.d.ts +15 -15
  128. package/dist/types/i18n/ko.d.ts +15 -15
  129. package/dist/types/i18n/nb.d.ts +15 -15
  130. package/dist/types/i18n/nl.d.ts +15 -15
  131. package/dist/types/i18n/pl.d.ts +15 -15
  132. package/dist/types/i18n/pt_BR.d.ts +15 -15
  133. package/dist/types/i18n/ru.d.ts +15 -15
  134. package/dist/types/i18n/sv.d.ts +15 -15
  135. package/dist/types/i18n/th.d.ts +15 -15
  136. package/dist/types/i18n/tr.d.ts +15 -15
  137. package/dist/types/i18n/uk.d.ts +15 -15
  138. package/dist/types/i18n/vi.d.ts +15 -15
  139. package/dist/types/i18n/zh.d.ts +15 -15
  140. package/dist/types/i18n/zh_TW.d.ts +15 -15
  141. package/dist/types/index.d.ts +1 -3
  142. package/dist/types/resource.d.ts +2 -2
  143. package/dist/types/util/analytics.d.ts +1 -3
  144. package/dist/types/util/i18n.d.ts +0 -4
  145. package/package.json +8 -9
  146. package/report.api.md +1 -118
  147. package/dist/cjs/components/TeamMentionHighlight/TeamMentionHighlightController.js +0 -85
  148. package/dist/cjs/components/TeamMentionHighlight/index.js +0 -184
  149. package/dist/cjs/components/TeamMentionHighlight/lazy.js +0 -21
  150. package/dist/cjs/components/TeamMentionHighlight/styles.js +0 -29
  151. package/dist/cjs/spotlight.js +0 -20
  152. package/dist/es2019/components/TeamMentionHighlight/TeamMentionHighlightController.js +0 -64
  153. package/dist/es2019/components/TeamMentionHighlight/index.js +0 -148
  154. package/dist/es2019/components/TeamMentionHighlight/lazy.js +0 -4
  155. package/dist/es2019/components/TeamMentionHighlight/styles.js +0 -40
  156. package/dist/es2019/spotlight.js +0 -5
  157. package/dist/esm/components/TeamMentionHighlight/TeamMentionHighlightController.js +0 -77
  158. package/dist/esm/components/TeamMentionHighlight/index.js +0 -172
  159. package/dist/esm/components/TeamMentionHighlight/lazy.js +0 -8
  160. package/dist/esm/components/TeamMentionHighlight/styles.js +0 -14
  161. package/dist/esm/spotlight.js +0 -5
  162. package/dist/types/components/TeamMentionHighlight/TeamMentionHighlightController.d.ts +0 -17
  163. package/dist/types/components/TeamMentionHighlight/index.d.ts +0 -35
  164. package/dist/types/components/TeamMentionHighlight/lazy.d.ts +0 -4
  165. package/dist/types/components/TeamMentionHighlight/styles.d.ts +0 -33
  166. package/dist/types/spotlight.d.ts +0 -3
  167. package/spotlight/package.json +0 -15
@@ -1,172 +0,0 @@
1
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10
- import React from 'react';
11
- import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
12
- import Button from '@atlaskit/button/custom-theme-button';
13
- import EditorCloseIcon from '@atlaskit/icon/glyph/editor/close';
14
- import Tooltip from '@atlaskit/tooltip';
15
- import TeamMentionHighlightController from './TeamMentionHighlightController';
16
- import { fireAnalyticsTeamMentionHighlightEvent, ComponentNames, Actions } from '../../util/analytics';
17
- import { TeamMentionHighlightTitle, TeamMentionHighlightCloseTooltip, TeamMentionHighlightDescription, TeamMentionHighlightDescriptionLink } from '../../util/i18n';
18
- import * as Styled from './styles';
19
- import MessagesIntlProvider from '../MessagesIntlProvider';
20
- var ICON_URL = 'data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIHdpZHRoPSIxMjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGN4PSI2NCIgY3k9IjY0IiBmaWxsPSIjNTI0M2FhIiBmaWxsLXJ1bGU9Im5vbnplcm8iIHI9IjY0Ii8+PHBhdGggZD0ibTgwIDY0Yy02LjYyNzQxNyAwLTEyLTUuMzcyNTgzLTEyLTEyczUuMzcyNTgzLTEyIDEyLTEyIDEyIDUuMzcyNTgzIDEyIDEyLTUuMzcyNTgzIDEyLTEyIDEyem0tMzItMTJjLTYuNjI3NDE3IDAtMTItNS4zNzI1ODMtMTItMTJzNS4zNzI1ODMtMTIgMTItMTIgMTIgNS4zNzI1ODMgMTIgMTItNS4zNzI1ODMgMTItMTIgMTJ6bTEyIDI0YzAtNC40MiAzLjU0OC04IDgtOGgyNGM0LjQyIDAgOCAzLjU0IDggOHYxNC45MmMwIDEyLjEwOC00MCAxMi4xMDgtNDAgMHptOC0xMmgtLjAxMmMtMy4xODQzNTM3LjAwNDI0LTYuMjM2NTQxIDEuMjczNTYxNS04LjQ4NDg0MjcgMy41Mjg2MTQ5LTIuMjQ4MzAxOCAyLjI1NTA1MzQtMy41MDg0NjU2IDUuMzExMDMzLTMuNTAzMTU3MyA4LjQ5NTM4NTF2MTEuMjI4Yy0xMS43ODQgMi4xMzYtMjgtLjI1Mi0yOC03LjkzNnYtMTUuMzA0YzAtNC40MjQgMy41NDgtOC4wMTIgOC04LjAxMmgyNGMyLjEyMjcwODYtLjAwMzE5MTIgNC4xNTkzOTQ2LjgzODYzODYgNS42NjAzNzggMi4zMzk2MjJzMi4zNDI4MTMyIDMuNTM3NjY5NCAyLjMzOTYyMiA1LjY2MDM3OHoiIGZpbGw9IiNmZmYiIGZpbGwtb3BhY2l0eT0iLjk1Ii8+PC9nPjwvc3ZnPg==';
21
- export var TeamMentionHighlightInternal = /*#__PURE__*/function (_React$Component) {
22
- _inherits(TeamMentionHighlightInternal, _React$Component);
23
- var _super = _createSuper(TeamMentionHighlightInternal);
24
- // Wrap whole dialog so we can catch events, see preventClickOnCard
25
-
26
- // Wrap the close button, so we can still manually invoke onClose()
27
-
28
- // Wrap the create team link, so we can still manually invoke the analytics
29
-
30
- function TeamMentionHighlightInternal(props) {
31
- var _this;
32
- _classCallCheck(this, TeamMentionHighlightInternal);
33
- _this = _super.call(this, props);
34
- _defineProperty(_assertThisInitialized(_this), "onCreateTeamLinkClick", function () {
35
- _this.setState({
36
- isHighlightHidden: true
37
- });
38
- var onCreateTeamLinkClick = _this.props.onCreateTeamLinkClick;
39
- TeamMentionHighlightController.registerCreateLinkClick();
40
- if (onCreateTeamLinkClick) {
41
- onCreateTeamLinkClick();
42
- }
43
- });
44
- _defineProperty(_assertThisInitialized(_this), "preventClickOnCard", function (event) {
45
- // event is a MouseEvent
46
-
47
- // We stop the event from propagating, so we need to manually close
48
- var isClickOnCloseButton = _this.elCloseWrapper.current && _this.elCloseWrapper.current.contains(event.target);
49
- if (isClickOnCloseButton) {
50
- _this.onCloseClick();
51
- }
52
-
53
- // Manually perform on-click for the link, if the link was clicked.
54
- var isClickCreateTeamLink = _this.elCreateTeamWrapper.current && _this.elCreateTeamWrapper.current.contains(event.target);
55
- if (isClickCreateTeamLink) {
56
- _this.onCreateTeamLinkClick();
57
- }
58
-
59
- // Allow default so the link to create team still works, but prevent the rest
60
- event.stopPropagation();
61
- event.stopImmediatePropagation();
62
- });
63
- _defineProperty(_assertThisInitialized(_this), "onCloseClick", function () {
64
- _this.setState({
65
- isHighlightHidden: true
66
- });
67
- _this.props.onClose();
68
- });
69
- _this.elWrapper = /*#__PURE__*/React.createRef();
70
- _this.elCloseWrapper = /*#__PURE__*/React.createRef();
71
- _this.elCreateTeamWrapper = /*#__PURE__*/React.createRef();
72
- _this.state = {
73
- isHighlightHidden: false
74
- };
75
- return _this;
76
- }
77
- _createClass(TeamMentionHighlightInternal, [{
78
- key: "componentDidMount",
79
- value: function componentDidMount() {
80
- var onViewed = this.props.onViewed;
81
- this.addEventHandler();
82
-
83
- // Highlight hiding logic was moved to Mount method because if Highlight is re-rendered after updating the
84
- // counts at MentionHighlightController, Highlight will appear for sometime and then disappear. As of the time
85
- // of writing this code, this was only happening in Fabric Editor ( See TEAMS-623 )
86
- if (!TeamMentionHighlightController.isHighlightEnabled()) {
87
- this.setState({
88
- isHighlightHidden: true
89
- });
90
- } else {
91
- TeamMentionHighlightController.registerRender();
92
- if (onViewed) {
93
- onViewed();
94
- }
95
- }
96
- }
97
- }, {
98
- key: "componentWillUnmount",
99
- value: function componentWillUnmount() {
100
- this.removeEventHandler();
101
- }
102
- }, {
103
- key: "addEventHandler",
104
- value: function addEventHandler() {
105
- this.elWrapper.current && this.elWrapper.current.addEventListener('click', this.preventClickOnCard);
106
- }
107
- }, {
108
- key: "removeEventHandler",
109
- value: function removeEventHandler() {
110
- this.elWrapper.current && this.elWrapper.current.removeEventListener('click', this.preventClickOnCard);
111
- }
112
- }, {
113
- key: "render",
114
- value: function render() {
115
- var _this2 = this;
116
- var createTeamLink = this.props.createTeamLink;
117
- var isHighlightHidden = this.state.isHighlightHidden;
118
- if (isHighlightHidden) {
119
- return null;
120
- }
121
- return /*#__PURE__*/React.createElement(MessagesIntlProvider, null, /*#__PURE__*/React.createElement("div", {
122
- ref: this.elWrapper
123
- }, /*#__PURE__*/React.createElement(Styled.Card, null, /*#__PURE__*/React.createElement(Styled.Content, null, /*#__PURE__*/React.createElement(Styled.Aside, null, /*#__PURE__*/React.createElement("img", {
124
- src: ICON_URL,
125
- height: 32
126
- })), /*#__PURE__*/React.createElement(Styled.Section, null, /*#__PURE__*/React.createElement(Styled.Heading, null, /*#__PURE__*/React.createElement(Styled.Title, null, /*#__PURE__*/React.createElement(TeamMentionHighlightTitle, null))), /*#__PURE__*/React.createElement(Styled.Body, null, /*#__PURE__*/React.createElement(TeamMentionHighlightDescription, null, function (description) {
127
- return /*#__PURE__*/React.createElement("div", null, description, /*#__PURE__*/React.createElement("span", {
128
- ref: _this2.elCreateTeamWrapper
129
- }, /*#__PURE__*/React.createElement(TeamMentionHighlightDescriptionLink, null, function (linkText) {
130
- return /*#__PURE__*/React.createElement("a", {
131
- href: createTeamLink,
132
- target: "_blank"
133
- }, ' ', linkText)
134
- // on click fired by preventClickOnCard, not here
135
- ;
136
- })));
137
- }))), /*#__PURE__*/React.createElement(Styled.Actions, null, /*#__PURE__*/React.createElement("div", {
138
- ref: this.elCloseWrapper
139
- }, /*#__PURE__*/React.createElement(TeamMentionHighlightCloseTooltip, null, function (tooltip) {
140
- return /*#__PURE__*/React.createElement(Tooltip, {
141
- content: tooltip,
142
- position: "bottom"
143
- }, /*#__PURE__*/React.createElement(Button, {
144
- appearance: "subtle",
145
- iconBefore: /*#__PURE__*/React.createElement(EditorCloseIcon, {
146
- label: "Close",
147
- size: "medium"
148
- }),
149
- spacing: "none"
150
- // on click fired by preventClickOnCard, not here
151
- }));
152
- })))))));
153
- }
154
- }]);
155
- return TeamMentionHighlightInternal;
156
- }(React.Component);
157
- _defineProperty(TeamMentionHighlightInternal, "defaultProps", {
158
- createTeamLink: '/people/search#createTeam'
159
- });
160
- var TeamMentionHighlightWithAnalytics = withAnalyticsEvents({
161
- onClose: function onClose(createEvent) {
162
- fireAnalyticsTeamMentionHighlightEvent(createEvent)(ComponentNames.TEAM_MENTION_HIGHLIGHT, Actions.CLOSED, ComponentNames.MENTION, 'closeButton');
163
- },
164
- onCreateTeamLinkClick: function onCreateTeamLinkClick(createEvent) {
165
- fireAnalyticsTeamMentionHighlightEvent(createEvent)(ComponentNames.TEAM_MENTION_HIGHLIGHT, Actions.CLICKED, ComponentNames.MENTION, 'createTeamLink');
166
- },
167
- onViewed: function onViewed(createEvent) {
168
- fireAnalyticsTeamMentionHighlightEvent(createEvent)(ComponentNames.TEAM_MENTION_HIGHLIGHT, Actions.VIEWED, ComponentNames.MENTION, undefined, TeamMentionHighlightController.getSeenCount());
169
- }
170
- })(TeamMentionHighlightInternal);
171
- var TeamMentionHighlight = TeamMentionHighlightWithAnalytics;
172
- export default TeamMentionHighlight;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- export var LazyTeamMentionHighlight = /*#__PURE__*/React.lazy(function () {
3
- return import( /* webpackChunkName: "@atlaskit-internal_@atlassian/mention/TeamMentionHighlight" */'./').then(function (module) {
4
- return {
5
- default: module.default
6
- };
7
- });
8
- });
@@ -1,14 +0,0 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
3
- import styled from '@emotion/styled';
4
- import { gridSize } from '@atlaskit/theme/constants';
5
- import { P50 } from '@atlaskit/theme/colors';
6
- import { h400 } from '@atlaskit/theme/typography';
7
- export var Actions = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n justify-content: flex-end;\n margin-top: -", "px; /* Negative margin is used to middle align x button with title */\n margin-right: ", "px;\n"])), gridSize() * 0.5, gridSize() * 0.5);
8
- export var Title = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", ";\n margin-top: 0px;\n"])), h400);
9
- export var Heading = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-left: ", "px;\n margin-bottom: ", "px;\n"])), gridSize() * 2, gridSize() * 0.5);
10
- export var Card = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n background-color: ", ";\n overflow: hidden;\n line-height: 21px;\n padding-top: ", "px;\n padding-bottom: ", "px;\n padding-left: ", "px;\n padding-right: 0px;\n margin-top: -", "px; /* Negative margin is used to fill the entire top of the mention dropdown with background colour of highlight */\n"])), "var(--ds-background-discovery, ".concat(P50, ")"), gridSize() * 2, gridSize() * 2, gridSize() * 2, gridSize() * 0.5);
11
- export var Content = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n max-width: 290px;\n display: flex;\n"])));
12
- export var Section = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral([""])));
13
- export var Aside = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n opacity: 0.8;\n"])));
14
- export var Body = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-left: ", "px;\n"])), gridSize() * 2);
@@ -1,5 +0,0 @@
1
- import TeamMentionHighlight from './components/TeamMentionHighlight';
2
- import TeamMentionHighlightController from './components/TeamMentionHighlight/TeamMentionHighlightController';
3
- export {
4
- // Components
5
- TeamMentionHighlight, TeamMentionHighlightController };
@@ -1,17 +0,0 @@
1
- interface TeamMentionState {
2
- seenCount: number;
3
- dontShow: boolean;
4
- }
5
- export declare const mentionHighlightLocalStorageKey = "atlassian.people.context.team.mention.highlight";
6
- export default class TeamMentionHighlightController {
7
- private static readFromLocalStorage;
8
- private static saveToLocalStorage;
9
- private static markAsDone;
10
- static isHighlightEnabled: () => boolean;
11
- static registerRender: () => TeamMentionState;
12
- static getSeenCount: () => number;
13
- static registerCreateLinkClick: () => void;
14
- static registerTeamMention: () => void;
15
- static registerClosed: () => void;
16
- }
17
- export {};
@@ -1,35 +0,0 @@
1
- import React, { RefObject } from 'react';
2
- import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
3
- export interface OwnProps {
4
- createTeamLink?: string;
5
- /** Callback to track the event where user click on x icon */
6
- onClose: () => void;
7
- onCreateTeamLinkClick?: () => void;
8
- onViewed?: () => void;
9
- }
10
- export interface State {
11
- isHighlightHidden: boolean;
12
- }
13
- export declare type Props = OwnProps & WithAnalyticsEventsProps;
14
- export declare class TeamMentionHighlightInternal extends React.Component<Props, State> {
15
- elWrapper: RefObject<HTMLDivElement>;
16
- elCloseWrapper: RefObject<HTMLDivElement>;
17
- elCreateTeamWrapper: RefObject<HTMLDivElement>;
18
- static defaultProps: {
19
- createTeamLink: string;
20
- };
21
- constructor(props: Props);
22
- componentDidMount(): void;
23
- componentWillUnmount(): void;
24
- onCreateTeamLinkClick: () => void;
25
- private preventClickOnCard;
26
- private addEventHandler;
27
- private removeEventHandler;
28
- onCloseClick: () => void;
29
- render(): JSX.Element | null;
30
- }
31
- declare const TeamMentionHighlight: React.ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps>, "onClose" | "onCreateTeamLinkClick" | "onViewed"> & Partial<Pick<Omit<Props, keyof WithAnalyticsEventsProps>, "createTeamLink">> & Partial<Pick<{
32
- createTeamLink: string;
33
- }, never>> & React.RefAttributes<any>>;
34
- declare type TeamMentionHighlight = TeamMentionHighlightInternal;
35
- export default TeamMentionHighlight;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export declare const LazyTeamMentionHighlight: React.LazyExoticComponent<React.ForwardRefExoticComponent<Pick<Omit<import("./").Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "onClose" | "onCreateTeamLinkClick" | "onViewed"> & Partial<Pick<Omit<import("./").Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "createTeamLink">> & Partial<Pick<{
3
- createTeamLink: string;
4
- }, never>> & React.RefAttributes<any>>>;
@@ -1,33 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const Actions: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any> | undefined;
5
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
- export declare const Title: import("@emotion/styled").StyledComponent<{
7
- theme?: import("@emotion/react").Theme | undefined;
8
- as?: import("react").ElementType<any> | undefined;
9
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
10
- export declare const Heading: import("@emotion/styled").StyledComponent<{
11
- theme?: import("@emotion/react").Theme | undefined;
12
- as?: import("react").ElementType<any> | undefined;
13
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
14
- export declare const Card: import("@emotion/styled").StyledComponent<{
15
- theme?: import("@emotion/react").Theme | undefined;
16
- as?: import("react").ElementType<any> | undefined;
17
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
18
- export declare const Content: import("@emotion/styled").StyledComponent<{
19
- theme?: import("@emotion/react").Theme | undefined;
20
- as?: import("react").ElementType<any> | undefined;
21
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
22
- export declare const Section: import("@emotion/styled").StyledComponent<{
23
- theme?: import("@emotion/react").Theme | undefined;
24
- as?: import("react").ElementType<any> | undefined;
25
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
26
- export declare const Aside: import("@emotion/styled").StyledComponent<{
27
- theme?: import("@emotion/react").Theme | undefined;
28
- as?: import("react").ElementType<any> | undefined;
29
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
30
- export declare const Body: import("@emotion/styled").StyledComponent<{
31
- theme?: import("@emotion/react").Theme | undefined;
32
- as?: import("react").ElementType<any> | undefined;
33
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,3 +0,0 @@
1
- import TeamMentionHighlight from './components/TeamMentionHighlight';
2
- import TeamMentionHighlightController from './components/TeamMentionHighlight/TeamMentionHighlightController';
3
- export { TeamMentionHighlight, TeamMentionHighlightController, };
@@ -1,15 +0,0 @@
1
- {
2
- "name": "@atlaskit/mention/spotlight",
3
- "main": "../dist/cjs/spotlight.js",
4
- "module": "../dist/esm/spotlight.js",
5
- "module:es2019": "../dist/es2019/spotlight.js",
6
- "sideEffects": false,
7
- "types": "../dist/types/spotlight.d.ts",
8
- "typesVersions": {
9
- ">=4.0 <4.5": {
10
- "*": [
11
- "../dist/types-ts4.0/spotlight.d.ts"
12
- ]
13
- }
14
- }
15
- }