@atlaskit/editor-common 110.41.0 → 110.41.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,16 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 110.41.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4a36acece29b9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4a36acece29b9) -
8
+ [ux] Fix synced block label id collision
9
+ - [`b083a0f3cd801`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b083a0f3cd801) -
10
+ EDITOR-3869 Update experiment flag check to fire exposures in expand keymap and update variable
11
+ names
12
+ - Updated dependencies
13
+
3
14
  ## 110.41.0
4
15
 
5
16
  ### Minor Changes
@@ -15,20 +15,23 @@ var isExpandCollapsed = exports.isExpandCollapsed = function isExpandCollapsed(n
15
15
  return (_expandedState$get = !expandedState.get(node)) !== null && _expandedState$get !== void 0 ? _expandedState$get : false;
16
16
  };
17
17
  var getNextNodeExpandPos = exports.getNextNodeExpandPos = function getNextNodeExpandPos(editorView, selection) {
18
- var parentNodePos = (0, _utils.findParentNodeOfType)([editorView.state.schema.nodes.listItem, editorView.state.schema.nodes.heading, editorView.state.schema.nodes.blockquote, editorView.state.schema.nodes.taskItem, editorView.state.schema.nodes.mediaSingle])(selection);
19
- if (!parentNodePos) {
18
+ var parentNode = (0, _utils.findParentNodeOfType)([editorView.state.schema.nodes.listItem, editorView.state.schema.nodes.heading, editorView.state.schema.nodes.blockquote, editorView.state.schema.nodes.taskItem, editorView.state.schema.nodes.mediaSingle])(selection);
19
+ var tableRowNode = (0, _utils.findParentNodeOfType)([editorView.state.schema.nodes.tableRow])(selection);
20
+ if (tableRowNode) {
21
+ parentNode = tableRowNode;
22
+ }
23
+ if (!parentNode) {
20
24
  var paragraphNode = (0, _utils.findParentNodeOfType)([editorView.state.schema.nodes.paragraph])(selection);
21
25
  if (!paragraphNode) {
22
26
  return;
23
27
  }
24
- parentNodePos = paragraphNode;
28
+ parentNode = paragraphNode;
25
29
  }
26
- var tableRowNodePos = (0, _utils.findParentNodeOfType)([editorView.state.schema.nodes.tableRow])(selection);
27
- if (tableRowNodePos) {
28
- parentNodePos = tableRowNodePos;
30
+ if (!parentNode) {
31
+ return undefined;
29
32
  }
30
- var endPosOffset = parentNodePos && ['taskItem', 'listItem', 'tableRow'].includes(parentNodePos.node.type.name) ? 1 : 0;
31
- var endOfTextblockPos = parentNodePos.start + parentNodePos.node.content.size + endPosOffset + 1;
33
+ var endPosOffset = parentNode && ['taskItem', 'listItem', 'tableRow'].includes(parentNode.node.type.name) ? 1 : 0;
34
+ var endOfTextblockPos = parentNode.start + parentNode.node.content.size + endPosOffset + 1;
32
35
  if (endOfTextblockPos > editorView.state.doc.content.size) {
33
36
  return undefined;
34
37
  }
@@ -37,7 +37,7 @@ var syncBlockMessages = exports.syncBlockMessages = (0, _reactIntlNext.defineMes
37
37
  description: 'aria-label for group of sync block the floating toolbar'
38
38
  },
39
39
  syncedBlockLabel: {
40
- id: 'fabric.editor.syncedBlock',
40
+ id: 'fabric.editor.syncedBlock.label.text',
41
41
  defaultMessage: 'Synced block',
42
42
  description: 'Label which appears above the synced block when it is selected'
43
43
  },
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
20
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
21
21
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
22
- var packageVersion = "0.0.0-development";
22
+ var packageVersion = "110.41.0";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "0.0.0-development";
27
+ var packageVersion = "110.41.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -9,20 +9,23 @@ export const isExpandCollapsed = node => {
9
9
  return (_expandedState$get = !expandedState.get(node)) !== null && _expandedState$get !== void 0 ? _expandedState$get : false;
10
10
  };
11
11
  export const getNextNodeExpandPos = (editorView, selection) => {
12
- let parentNodePos = findParentNodeOfType([editorView.state.schema.nodes.listItem, editorView.state.schema.nodes.heading, editorView.state.schema.nodes.blockquote, editorView.state.schema.nodes.taskItem, editorView.state.schema.nodes.mediaSingle])(selection);
13
- if (!parentNodePos) {
12
+ let parentNode = findParentNodeOfType([editorView.state.schema.nodes.listItem, editorView.state.schema.nodes.heading, editorView.state.schema.nodes.blockquote, editorView.state.schema.nodes.taskItem, editorView.state.schema.nodes.mediaSingle])(selection);
13
+ const tableRowNode = findParentNodeOfType([editorView.state.schema.nodes.tableRow])(selection);
14
+ if (tableRowNode) {
15
+ parentNode = tableRowNode;
16
+ }
17
+ if (!parentNode) {
14
18
  const paragraphNode = findParentNodeOfType([editorView.state.schema.nodes.paragraph])(selection);
15
19
  if (!paragraphNode) {
16
20
  return;
17
21
  }
18
- parentNodePos = paragraphNode;
22
+ parentNode = paragraphNode;
19
23
  }
20
- const tableRowNodePos = findParentNodeOfType([editorView.state.schema.nodes.tableRow])(selection);
21
- if (tableRowNodePos) {
22
- parentNodePos = tableRowNodePos;
24
+ if (!parentNode) {
25
+ return undefined;
23
26
  }
24
- const endPosOffset = parentNodePos && ['taskItem', 'listItem', 'tableRow'].includes(parentNodePos.node.type.name) ? 1 : 0;
25
- const endOfTextblockPos = parentNodePos.start + parentNodePos.node.content.size + endPosOffset + 1;
27
+ const endPosOffset = parentNode && ['taskItem', 'listItem', 'tableRow'].includes(parentNode.node.type.name) ? 1 : 0;
28
+ const endOfTextblockPos = parentNode.start + parentNode.node.content.size + endPosOffset + 1;
26
29
  if (endOfTextblockPos > editorView.state.doc.content.size) {
27
30
  return undefined;
28
31
  }
@@ -31,7 +31,7 @@ export const syncBlockMessages = defineMessages({
31
31
  description: 'aria-label for group of sync block the floating toolbar'
32
32
  },
33
33
  syncedBlockLabel: {
34
- id: 'fabric.editor.syncedBlock',
34
+ id: 'fabric.editor.syncedBlock.label.text',
35
35
  defaultMessage: 'Synced block',
36
36
  description: 'Label which appears above the synced block when it is selected'
37
37
  },
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
4
4
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
5
5
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
6
6
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
7
- const packageVersion = "0.0.0-development";
7
+ const packageVersion = "110.41.0";
8
8
  const sanitiseSentryEvents = (data, _hint) => {
9
9
  // Remove URL as it has UGC
10
10
  // Ignored via go/ees007
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "0.0.0-development";
17
+ const packageVersion = "110.41.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -9,20 +9,23 @@ export var isExpandCollapsed = function isExpandCollapsed(node) {
9
9
  return (_expandedState$get = !expandedState.get(node)) !== null && _expandedState$get !== void 0 ? _expandedState$get : false;
10
10
  };
11
11
  export var getNextNodeExpandPos = function getNextNodeExpandPos(editorView, selection) {
12
- var parentNodePos = findParentNodeOfType([editorView.state.schema.nodes.listItem, editorView.state.schema.nodes.heading, editorView.state.schema.nodes.blockquote, editorView.state.schema.nodes.taskItem, editorView.state.schema.nodes.mediaSingle])(selection);
13
- if (!parentNodePos) {
12
+ var parentNode = findParentNodeOfType([editorView.state.schema.nodes.listItem, editorView.state.schema.nodes.heading, editorView.state.schema.nodes.blockquote, editorView.state.schema.nodes.taskItem, editorView.state.schema.nodes.mediaSingle])(selection);
13
+ var tableRowNode = findParentNodeOfType([editorView.state.schema.nodes.tableRow])(selection);
14
+ if (tableRowNode) {
15
+ parentNode = tableRowNode;
16
+ }
17
+ if (!parentNode) {
14
18
  var paragraphNode = findParentNodeOfType([editorView.state.schema.nodes.paragraph])(selection);
15
19
  if (!paragraphNode) {
16
20
  return;
17
21
  }
18
- parentNodePos = paragraphNode;
22
+ parentNode = paragraphNode;
19
23
  }
20
- var tableRowNodePos = findParentNodeOfType([editorView.state.schema.nodes.tableRow])(selection);
21
- if (tableRowNodePos) {
22
- parentNodePos = tableRowNodePos;
24
+ if (!parentNode) {
25
+ return undefined;
23
26
  }
24
- var endPosOffset = parentNodePos && ['taskItem', 'listItem', 'tableRow'].includes(parentNodePos.node.type.name) ? 1 : 0;
25
- var endOfTextblockPos = parentNodePos.start + parentNodePos.node.content.size + endPosOffset + 1;
27
+ var endPosOffset = parentNode && ['taskItem', 'listItem', 'tableRow'].includes(parentNode.node.type.name) ? 1 : 0;
28
+ var endOfTextblockPos = parentNode.start + parentNode.node.content.size + endPosOffset + 1;
26
29
  if (endOfTextblockPos > editorView.state.doc.content.size) {
27
30
  return undefined;
28
31
  }
@@ -31,7 +31,7 @@ export var syncBlockMessages = defineMessages({
31
31
  description: 'aria-label for group of sync block the floating toolbar'
32
32
  },
33
33
  syncedBlockLabel: {
34
- id: 'fabric.editor.syncedBlock',
34
+ id: 'fabric.editor.syncedBlock.label.text',
35
35
  defaultMessage: 'Synced block',
36
36
  description: 'Label which appears above the synced block when it is selected'
37
37
  },
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
10
10
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
11
11
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
12
12
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
13
- var packageVersion = "0.0.0-development";
13
+ var packageVersion = "110.41.0";
14
14
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
15
15
  // Remove URL as it has UGC
16
16
  // Ignored via go/ees007
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "0.0.0-development";
24
+ var packageVersion = "110.41.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "110.41.0",
3
+ "version": "110.41.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/"
@@ -81,7 +81,7 @@
81
81
  "@atlaskit/task-decision": "^19.2.0",
82
82
  "@atlaskit/textfield": "^8.1.0",
83
83
  "@atlaskit/theme": "^21.0.0",
84
- "@atlaskit/tmp-editor-statsig": "^15.2.0",
84
+ "@atlaskit/tmp-editor-statsig": "^15.3.0",
85
85
  "@atlaskit/tokens": "^8.4.0",
86
86
  "@atlaskit/tooltip": "^20.11.0",
87
87
  "@atlaskit/width-detector": "^5.0.0",