@atlaskit/editor-common 110.41.0 → 110.41.2

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,24 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 110.41.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4ac3023fb991b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4ac3023fb991b) -
8
+ EDITOR-2478 Clean up experiment `platform_editor_nested_table_detection`
9
+ - Updated dependencies
10
+
11
+ ## 110.41.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [`4a36acece29b9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4a36acece29b9) -
16
+ [ux] Fix synced block label id collision
17
+ - [`b083a0f3cd801`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b083a0f3cd801) -
18
+ EDITOR-3869 Update experiment flag check to fire exposures in expand keymap and update variable
19
+ names
20
+ - Updated dependencies
21
+
3
22
  ## 110.41.0
4
23
 
5
24
  ### Minor Changes
@@ -5,7 +5,8 @@
5
5
  "target": "es5",
6
6
  "outDir": "../../../../../confluence/tsDist/@atlaskit__editor-common",
7
7
  "rootDir": "../",
8
- "composite": true
8
+ "composite": true,
9
+ "noCheck": true
9
10
  },
10
11
  "include": [
11
12
  "../src/**/*.ts",
@@ -5,7 +5,8 @@
5
5
  "target": "es5",
6
6
  "outDir": "../../../../../jira/tsDist/@atlaskit__editor-common/app",
7
7
  "rootDir": "../",
8
- "composite": true
8
+ "composite": true,
9
+ "noCheck": true
9
10
  },
10
11
  "include": [
11
12
  "../src/**/*.ts",
@@ -5,7 +5,8 @@
5
5
  "target": "es5",
6
6
  "outDir": "../../../../../tsDist/@atlaskit__editor-common/app",
7
7
  "rootDir": "../",
8
- "composite": true
8
+ "composite": true,
9
+ "noCheck": true
9
10
  },
10
11
  "include": [
11
12
  "../src/**/*.ts",
@@ -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.1";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.isSelectionTableNestedInTable = exports.isNestedTablesSupported = exports.getPositionAfterTopParentNodeOfType = exports.getParentOfTypeCount = void 0;
7
7
  var _editorTables = require("@atlaskit/editor-tables");
8
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
9
8
  /*
10
9
  * Returns the level of nesting of a given `nodeType` in the current position.
11
10
  * eg. table > table is nested 1 level, table > table > table is nested 2 levels.
@@ -76,9 +75,6 @@ var isSelectionTableNestedInTable = exports.isSelectionTableNestedInTable = func
76
75
  */
77
76
  var isNestedTablesSupported = exports.isNestedTablesSupported = function isNestedTablesSupported(schema) {
78
77
  var _tableCell$contentMat, _tableHeader$contentM;
79
- if (!(0, _expValEquals.expValEquals)('platform_editor_nested_table_detection', 'isEnabled', true)) {
80
- return true;
81
- }
82
78
  var _schema$nodes = schema.nodes,
83
79
  table = _schema$nodes.table,
84
80
  tableCell = _schema$nodes.tableCell,
@@ -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.1";
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.1";
8
8
  const sanitiseSentryEvents = (data, _hint) => {
9
9
  // Remove URL as it has UGC
10
10
  // Ignored via go/ees007
@@ -1,5 +1,4 @@
1
1
  import { findTable } from '@atlaskit/editor-tables';
2
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
2
 
4
3
  /*
5
4
  * Returns the level of nesting of a given `nodeType` in the current position.
@@ -67,9 +66,6 @@ export const isSelectionTableNestedInTable = state => {
67
66
  */
68
67
  export const isNestedTablesSupported = schema => {
69
68
  var _tableCell$contentMat, _tableHeader$contentM;
70
- if (!expValEquals('platform_editor_nested_table_detection', 'isEnabled', true)) {
71
- return true;
72
- }
73
69
  const {
74
70
  table,
75
71
  tableCell,
@@ -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.1";
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.1";
14
14
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
15
15
  // Remove URL as it has UGC
16
16
  // Ignored via go/ees007
@@ -1,5 +1,4 @@
1
1
  import { findTable } from '@atlaskit/editor-tables';
2
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
2
 
4
3
  /*
5
4
  * Returns the level of nesting of a given `nodeType` in the current position.
@@ -71,9 +70,6 @@ export var isSelectionTableNestedInTable = function isSelectionTableNestedInTabl
71
70
  */
72
71
  export var isNestedTablesSupported = function isNestedTablesSupported(schema) {
73
72
  var _tableCell$contentMat, _tableHeader$contentM;
74
- if (!expValEquals('platform_editor_nested_table_detection', 'isEnabled', true)) {
75
- return true;
76
- }
77
73
  var _schema$nodes = schema.nodes,
78
74
  table = _schema$nodes.table,
79
75
  tableCell = _schema$nodes.tableCell,
@@ -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.1";
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.2",
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.4.0",
85
85
  "@atlaskit/tokens": "^8.4.0",
86
86
  "@atlaskit/tooltip": "^20.11.0",
87
87
  "@atlaskit/width-detector": "^5.0.0",