@atlaskit/editor-common 78.28.1 → 78.29.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,17 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 78.29.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#92360](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/92360) [`6050340d4875`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6050340d4875) - [ED-23056] Exclude comment badge component from selector in MediaWrapper so that comment badge for draft comment can be positioned to the top right corner correctly
8
+
9
+ ## 78.29.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#90964](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/90964) [`6e7df33eb280`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6e7df33eb280) - [ux] [ED-22992] Auto-dismiss comment button on media if mouse rolling away from media and comment popup, remove popup position transition so that popup does not appear sliding across the page when mouse moving from one media to another
14
+
3
15
  ## 78.28.1
4
16
 
5
17
  ### Patch Changes
@@ -79,6 +79,10 @@ var CommentBadge = exports.CommentBadge = function CommentBadge(_ref) {
79
79
  }, [status]);
80
80
  return (0, _react2.jsx)("div", {
81
81
  css: isEditor ? [commentBadgeWrapper, commentBadgeEditorOverrides] : commentBadgeWrapper
82
+ // This is needed so that mediaWrapperStyle in editor/editor-common/src/ui/MediaSingle/styled.tsx
83
+ // can target the correct div
84
+ ,
85
+ "data-comment-badge": "true"
82
86
  }, (0, _react2.jsx)(_tooltip.default, {
83
87
  position: "top",
84
88
  content: title
@@ -15,5 +15,10 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
15
15
  id: 'fabric.editor.invalidDateError',
16
16
  defaultMessage: 'Enter a valid date',
17
17
  description: 'Error message when the date typed in is invalid, requesting they inputs a new date'
18
+ },
19
+ onKeyUpDownText: {
20
+ id: 'fabric.editor.upDown',
21
+ defaultMessage: 'On the use of up and down arrow keys into the following input field, the date will update below',
22
+ description: 'The text for the date input informs the user that using the arrow keys (up and down) will update the date picker below'
18
23
  }
19
24
  });
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
16
16
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "78.28.1";
19
+ var packageVersion = "78.29.1";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // TODO: Sanitise the URL instead of just removing it
@@ -22,7 +22,7 @@ var _templateObject, _templateObject2, _templateObject3;
22
22
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
23
23
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
24
24
  var packageName = "@atlaskit/editor-common";
25
- var packageVersion = "78.28.1";
25
+ var packageVersion = "78.29.1";
26
26
  var halfFocusRing = 1;
27
27
  var dropOffset = '0, 8';
28
28
  var DropList = /*#__PURE__*/function (_Component) {
@@ -180,7 +180,7 @@ var RenderFallbackContainer = function RenderFallbackContainer(_ref2) {
180
180
 
181
181
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
182
182
  var mediaWrapperStyle = exports.mediaWrapperStyle = function mediaWrapperStyle(props) {
183
- return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n\n ", "\n\n /* Editor */\n & > figure {\n position: ", ";\n height: 100%;\n width: 100%;\n }\n\n & > div {\n position: ", ";\n height: 100%;\n width: 100%;\n }\n\n & * [data-mark-annotation-type='inlineComment'] {\n width: 100%;\n height: 100%;\n }\n\n &[data-node-type='embedCard'] > div {\n width: 100%;\n }\n\n /* Renderer */\n [data-node-type='media'] {\n position: static !important;\n\n > div {\n position: absolute;\n height: 100%;\n }\n }\n"])), RenderFallbackContainer(props), props.hasFallbackContainer ? 'absolute' : 'relative', props.hasFallbackContainer ? 'absolute' : 'relative');
183
+ return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n\n ", "\n\n /* Editor */\n & > figure {\n position: ", ";\n height: 100%;\n width: 100%;\n }\n\n // Comments on media project adds comment badge as child of the media wrapper,\n // thus we need to exclude it so that style is applied to intended div\n & > div:not([data-comment-badge='true']) {\n position: ", ";\n height: 100%;\n width: 100%;\n }\n\n & * [data-mark-annotation-type='inlineComment'] {\n width: 100%;\n height: 100%;\n }\n\n &[data-node-type='embedCard'] > div {\n width: 100%;\n }\n\n /* Renderer */\n [data-node-type='media'] {\n position: static !important;\n\n > div {\n position: absolute;\n height: 100%;\n }\n }\n"])), RenderFallbackContainer(props), props.hasFallbackContainer ? 'absolute' : 'relative', props.hasFallbackContainer ? 'absolute' : 'relative');
184
184
  };
185
185
  var MediaWrapper = exports.MediaWrapper = function MediaWrapper(_ref3) {
186
186
  var children = _ref3.children,
@@ -66,6 +66,10 @@ export const CommentBadge = ({
66
66
  }, [status]);
67
67
  return jsx("div", {
68
68
  css: isEditor ? [commentBadgeWrapper, commentBadgeEditorOverrides] : commentBadgeWrapper
69
+ // This is needed so that mediaWrapperStyle in editor/editor-common/src/ui/MediaSingle/styled.tsx
70
+ // can target the correct div
71
+ ,
72
+ "data-comment-badge": "true"
69
73
  }, jsx(Tooltip, {
70
74
  position: "top",
71
75
  content: title
@@ -9,5 +9,10 @@ export const messages = defineMessages({
9
9
  id: 'fabric.editor.invalidDateError',
10
10
  defaultMessage: 'Enter a valid date',
11
11
  description: 'Error message when the date typed in is invalid, requesting they inputs a new date'
12
+ },
13
+ onKeyUpDownText: {
14
+ id: 'fabric.editor.upDown',
15
+ defaultMessage: 'On the use of up and down arrow keys into the following input field, the date will update below',
16
+ description: 'The text for the date input informs the user that using the arrow keys (up and down) will update the date picker below'
12
17
  }
13
18
  });
@@ -1,6 +1,6 @@
1
1
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
2
2
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
3
- const packageVersion = "78.28.1";
3
+ const packageVersion = "78.29.1";
4
4
  const sanitiseSentryEvents = (data, _hint) => {
5
5
  // Remove URL as it has UGC
6
6
  // TODO: Sanitise the URL instead of just removing it
@@ -7,7 +7,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
7
7
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
8
8
  import Layer from '../Layer';
9
9
  const packageName = "@atlaskit/editor-common";
10
- const packageVersion = "78.28.1";
10
+ const packageVersion = "78.29.1";
11
11
  const halfFocusRing = 1;
12
12
  const dropOffset = '0, 8';
13
13
  class DropList extends Component {
@@ -214,7 +214,9 @@ export const mediaWrapperStyle = props => css`
214
214
  width: 100%;
215
215
  }
216
216
 
217
- & > div {
217
+ // Comments on media project adds comment badge as child of the media wrapper,
218
+ // thus we need to exclude it so that style is applied to intended div
219
+ & > div:not([data-comment-badge='true']) {
218
220
  position: ${props.hasFallbackContainer ? 'absolute' : 'relative'};
219
221
  height: 100%;
220
222
  width: 100%;
@@ -71,6 +71,10 @@ export var CommentBadge = function CommentBadge(_ref) {
71
71
  }, [status]);
72
72
  return jsx("div", {
73
73
  css: isEditor ? [commentBadgeWrapper, commentBadgeEditorOverrides] : commentBadgeWrapper
74
+ // This is needed so that mediaWrapperStyle in editor/editor-common/src/ui/MediaSingle/styled.tsx
75
+ // can target the correct div
76
+ ,
77
+ "data-comment-badge": "true"
74
78
  }, jsx(Tooltip, {
75
79
  position: "top",
76
80
  content: title
@@ -9,5 +9,10 @@ export var messages = defineMessages({
9
9
  id: 'fabric.editor.invalidDateError',
10
10
  defaultMessage: 'Enter a valid date',
11
11
  description: 'Error message when the date typed in is invalid, requesting they inputs a new date'
12
+ },
13
+ onKeyUpDownText: {
14
+ id: 'fabric.editor.upDown',
15
+ defaultMessage: 'On the use of up and down arrow keys into the following input field, the date will update below',
16
+ description: 'The text for the date input informs the user that using the arrow keys (up and down) will update the date picker below'
12
17
  }
13
18
  });
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
6
6
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
7
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
8
8
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
9
- var packageVersion = "78.28.1";
9
+ var packageVersion = "78.29.1";
10
10
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
11
11
  // Remove URL as it has UGC
12
12
  // TODO: Sanitise the URL instead of just removing it
@@ -17,7 +17,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
17
17
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
18
18
  import Layer from '../Layer';
19
19
  var packageName = "@atlaskit/editor-common";
20
- var packageVersion = "78.28.1";
20
+ var packageVersion = "78.29.1";
21
21
  var halfFocusRing = 1;
22
22
  var dropOffset = '0, 8';
23
23
  var DropList = /*#__PURE__*/function (_Component) {
@@ -170,7 +170,7 @@ var RenderFallbackContainer = function RenderFallbackContainer(_ref2) {
170
170
 
171
171
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
172
172
  export var mediaWrapperStyle = function mediaWrapperStyle(props) {
173
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n\n ", "\n\n /* Editor */\n & > figure {\n position: ", ";\n height: 100%;\n width: 100%;\n }\n\n & > div {\n position: ", ";\n height: 100%;\n width: 100%;\n }\n\n & * [data-mark-annotation-type='inlineComment'] {\n width: 100%;\n height: 100%;\n }\n\n &[data-node-type='embedCard'] > div {\n width: 100%;\n }\n\n /* Renderer */\n [data-node-type='media'] {\n position: static !important;\n\n > div {\n position: absolute;\n height: 100%;\n }\n }\n"])), RenderFallbackContainer(props), props.hasFallbackContainer ? 'absolute' : 'relative', props.hasFallbackContainer ? 'absolute' : 'relative');
173
+ return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n\n ", "\n\n /* Editor */\n & > figure {\n position: ", ";\n height: 100%;\n width: 100%;\n }\n\n // Comments on media project adds comment badge as child of the media wrapper,\n // thus we need to exclude it so that style is applied to intended div\n & > div:not([data-comment-badge='true']) {\n position: ", ";\n height: 100%;\n width: 100%;\n }\n\n & * [data-mark-annotation-type='inlineComment'] {\n width: 100%;\n height: 100%;\n }\n\n &[data-node-type='embedCard'] > div {\n width: 100%;\n }\n\n /* Renderer */\n [data-node-type='media'] {\n position: static !important;\n\n > div {\n position: absolute;\n height: 100%;\n }\n }\n"])), RenderFallbackContainer(props), props.hasFallbackContainer ? 'absolute' : 'relative', props.hasFallbackContainer ? 'absolute' : 'relative');
174
174
  };
175
175
  export var MediaWrapper = function MediaWrapper(_ref3) {
176
176
  var children = _ref3.children,
@@ -11,5 +11,6 @@ export type CommentBadgeProps = {
11
11
  onMouseEnter?: (e: React.MouseEvent) => void;
12
12
  onMouseLeave?: (e: React.MouseEvent) => void;
13
13
  isEditor?: boolean;
14
+ isDrafting?: boolean;
14
15
  };
15
16
  export declare const CommentBadge: ({ intl, width, height, status, mediaElement, onClick, onMouseEnter, onMouseLeave, isEditor, }: CommentBadgeProps) => jsx.JSX.Element;
@@ -9,4 +9,9 @@ export declare const messages: {
9
9
  defaultMessage: string;
10
10
  description: string;
11
11
  };
12
+ onKeyUpDownText: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
12
17
  };
@@ -79,6 +79,10 @@ export type InlineCommentHoverComponentProps = {
79
79
  * Range selected
80
80
  */
81
81
  range: Range;
82
+ /**
83
+ * Is mouse within the range container
84
+ */
85
+ isWithinRange: boolean;
82
86
  /**
83
87
  * Renderer/Editor DOM element ancestors wrapping the selection.
84
88
  */
@@ -11,5 +11,6 @@ export type CommentBadgeProps = {
11
11
  onMouseEnter?: (e: React.MouseEvent) => void;
12
12
  onMouseLeave?: (e: React.MouseEvent) => void;
13
13
  isEditor?: boolean;
14
+ isDrafting?: boolean;
14
15
  };
15
16
  export declare const CommentBadge: ({ intl, width, height, status, mediaElement, onClick, onMouseEnter, onMouseLeave, isEditor, }: CommentBadgeProps) => jsx.JSX.Element;
@@ -9,4 +9,9 @@ export declare const messages: {
9
9
  defaultMessage: string;
10
10
  description: string;
11
11
  };
12
+ onKeyUpDownText: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
12
17
  };
@@ -79,6 +79,10 @@ export type InlineCommentHoverComponentProps = {
79
79
  * Range selected
80
80
  */
81
81
  range: Range;
82
+ /**
83
+ * Is mouse within the range container
84
+ */
85
+ isWithinRange: boolean;
82
86
  /**
83
87
  * Renderer/Editor DOM element ancestors wrapping the selection.
84
88
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "78.28.1",
3
+ "version": "78.29.1",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -113,7 +113,7 @@
113
113
  "@atlaskit/icon": "^22.1.0",
114
114
  "@atlaskit/icon-object": "^6.3.0",
115
115
  "@atlaskit/in-product-testing": "^0.2.0",
116
- "@atlaskit/link-datasource": "^1.27.0",
116
+ "@atlaskit/link-datasource": "^1.28.0",
117
117
  "@atlaskit/link-picker": "^1.34.0",
118
118
  "@atlaskit/media-card": "^77.11.0",
119
119
  "@atlaskit/media-client": "^26.3.0",