@atlaskit/renderer 119.0.6 → 119.0.7

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,15 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 119.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#176907](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/176907)
8
+ [`b3cdb5aa072a9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b3cdb5aa072a9) -
9
+ [ux] Adjust non-empty selection validation logic for the renderer, to disallow annotations on
10
+ empty block nodes like table cells and expands
11
+ - Updated dependencies
12
+
3
13
  ## 119.0.6
4
14
 
5
15
  ### Patch Changes
@@ -69,8 +69,9 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
69
69
  if (!this.doc || !this.schema) {
70
70
  return false;
71
71
  }
72
+ var isEmptyTextSelectionCheck = (0, _platformFeatureFlags.fg)('cc_comments_more_complete_empty_text_check') ? _utils.isEmptyTextSelectionRenderer : _utils.isEmptyTextSelection;
72
73
  var currentSelection = _state.TextSelection.create(this.doc, from, to);
73
- if ((0, _utils.isEmptyTextSelection)(currentSelection, this.schema)) {
74
+ if (isEmptyTextSelectionCheck(currentSelection, this.schema)) {
74
75
  return false;
75
76
  }
76
77
  var result = (0, _utils.canApplyAnnotationOnRange)({
@@ -62,7 +62,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
62
62
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
63
63
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
64
64
  var packageName = "@atlaskit/renderer";
65
- var packageVersion = "119.0.5";
65
+ var packageVersion = "119.0.6";
66
66
  var setAsQueryContainerStyles = (0, _react2.css)({
67
67
  containerName: 'ak-renderer-wrapper',
68
68
  containerType: 'inline-size'
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { AnnotationTypes } from '@atlaskit/adf-schema';
3
- import { canApplyAnnotationOnRange, getAnnotationIdsFromRange, getAnnotationInlineNodeTypes, isEmptyTextSelection } from '@atlaskit/editor-common/utils';
3
+ import { canApplyAnnotationOnRange, getAnnotationIdsFromRange, getAnnotationInlineNodeTypes, isEmptyTextSelection, isEmptyTextSelectionRenderer } from '@atlaskit/editor-common/utils';
4
4
  import { JSONTransformer } from '@atlaskit/editor-json-transformer';
5
5
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
6
6
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
@@ -49,8 +49,9 @@ export default class RendererActions {
49
49
  if (!this.doc || !this.schema) {
50
50
  return false;
51
51
  }
52
+ const isEmptyTextSelectionCheck = fg('cc_comments_more_complete_empty_text_check') ? isEmptyTextSelectionRenderer : isEmptyTextSelection;
52
53
  const currentSelection = TextSelection.create(this.doc, from, to);
53
- if (isEmptyTextSelection(currentSelection, this.schema)) {
54
+ if (isEmptyTextSelectionCheck(currentSelection, this.schema)) {
54
55
  return false;
55
56
  }
56
57
  const result = canApplyAnnotationOnRange({
@@ -48,7 +48,7 @@ import { PortalContext } from './PortalContext';
48
48
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
49
49
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
50
50
  const packageName = "@atlaskit/renderer";
51
- const packageVersion = "119.0.5";
51
+ const packageVersion = "119.0.6";
52
52
  const setAsQueryContainerStyles = css({
53
53
  containerName: 'ak-renderer-wrapper',
54
54
  containerType: 'inline-size'
@@ -5,7 +5,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
5
  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; }
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
  import { AnnotationTypes } from '@atlaskit/adf-schema';
8
- import { canApplyAnnotationOnRange, getAnnotationIdsFromRange, getAnnotationInlineNodeTypes, isEmptyTextSelection } from '@atlaskit/editor-common/utils';
8
+ import { canApplyAnnotationOnRange, getAnnotationIdsFromRange, getAnnotationInlineNodeTypes, isEmptyTextSelection, isEmptyTextSelectionRenderer } from '@atlaskit/editor-common/utils';
9
9
  import { JSONTransformer } from '@atlaskit/editor-json-transformer';
10
10
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
11
11
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
@@ -62,8 +62,9 @@ var RendererActions = /*#__PURE__*/function () {
62
62
  if (!this.doc || !this.schema) {
63
63
  return false;
64
64
  }
65
+ var isEmptyTextSelectionCheck = fg('cc_comments_more_complete_empty_text_check') ? isEmptyTextSelectionRenderer : isEmptyTextSelection;
65
66
  var currentSelection = TextSelection.create(this.doc, from, to);
66
- if (isEmptyTextSelection(currentSelection, this.schema)) {
67
+ if (isEmptyTextSelectionCheck(currentSelection, this.schema)) {
67
68
  return false;
68
69
  }
69
70
  var result = canApplyAnnotationOnRange({
@@ -53,7 +53,7 @@ import { PortalContext } from './PortalContext';
53
53
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
54
54
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
55
55
  var packageName = "@atlaskit/renderer";
56
- var packageVersion = "119.0.5";
56
+ var packageVersion = "119.0.6";
57
57
  var setAsQueryContainerStyles = css({
58
58
  containerName: 'ak-renderer-wrapper',
59
59
  containerType: 'inline-size'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "119.0.6",
3
+ "version": "119.0.7",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -133,6 +133,9 @@
133
133
  "cc_comments_improve_apply_draft_errors": {
134
134
  "type": "boolean"
135
135
  },
136
+ "cc_comments_more_complete_empty_text_check": {
137
+ "type": "boolean"
138
+ },
136
139
  "platform-ssr-table-resize": {
137
140
  "type": "boolean"
138
141
  },