@atlaskit/editor-common 114.18.1 → 114.18.3

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,20 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 114.18.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 114.18.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`d5eb28ba8a0f8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d5eb28ba8a0f8) -
14
+ EDITOR-6724: Fix object assignment issue in attrs comparison util to avoid attrs being dropped in
15
+ ProseMirror when they're being compared.
16
+ - Updated dependencies
17
+
3
18
  ## 114.18.1
4
19
 
5
20
  ### Patch Changes
@@ -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 = "114.18.0";
22
+ var packageVersion = "0.0.0-development";
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 = "114.18.0";
27
+ var packageVersion = "0.0.0-development";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -13,10 +13,13 @@ exports.hasVisibleContent = hasVisibleContent;
13
13
  exports.isEmptyDocument = isEmptyDocument;
14
14
  exports.isSelectionEndOfParagraph = exports.isReplaceDocOperation = void 0;
15
15
  exports.nodesBetweenChanged = nodesBetweenChanged;
16
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
17
  var _clamp = _interopRequireDefault(require("lodash/clamp"));
17
18
  var _transform = require("@atlaskit/editor-prosemirror/transform");
18
19
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
19
20
  var _editorCoreUtils = require("./editor-core-utils");
21
+ 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; }
22
+ 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) { (0, _defineProperty2.default)(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; }
20
23
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
21
24
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
22
25
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
@@ -226,7 +229,7 @@ function areNodesEqualIgnoreAttrs(node1, node2, attributesToIgnore, opts) {
226
229
  }
227
230
 
228
231
  // Build attrs to compare by excluding ignored attributes
229
- var attrsToCompare = node2.attrs;
232
+ var attrsToCompare = (0, _expValEquals.expValEquals)('platform_editor_show_diff_fix_missing_attrs', 'isEnabled', true) ? _objectSpread({}, node2.attrs) : node2.attrs;
230
233
  var ignoreSet = new Set(attributesToIgnore);
231
234
  for (var key in node2.attrs) {
232
235
  if (ignoreSet.has(key)) {
@@ -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 = "114.18.0";
7
+ const packageVersion = "0.0.0-development";
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 = "114.18.0";
17
+ const packageVersion = "0.0.0-development";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -190,7 +190,9 @@ export function areNodesEqualIgnoreAttrs(node1, node2, attributesToIgnore, opts)
190
190
  }
191
191
 
192
192
  // Build attrs to compare by excluding ignored attributes
193
- const attrsToCompare = node2.attrs;
193
+ const attrsToCompare = expValEquals('platform_editor_show_diff_fix_missing_attrs', 'isEnabled', true) ? {
194
+ ...node2.attrs
195
+ } : node2.attrs;
194
196
  const ignoreSet = new Set(attributesToIgnore);
195
197
  for (const key in node2.attrs) {
196
198
  if (ignoreSet.has(key)) {
@@ -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 = "114.18.0";
13
+ var packageVersion = "0.0.0-development";
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 = "114.18.0";
24
+ var packageVersion = "0.0.0-development";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -1,3 +1,6 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ 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; }
3
+ 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; }
1
4
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
2
5
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
3
6
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
@@ -211,7 +214,7 @@ export function areNodesEqualIgnoreAttrs(node1, node2, attributesToIgnore, opts)
211
214
  }
212
215
 
213
216
  // Build attrs to compare by excluding ignored attributes
214
- var attrsToCompare = node2.attrs;
217
+ var attrsToCompare = expValEquals('platform_editor_show_diff_fix_missing_attrs', 'isEnabled', true) ? _objectSpread({}, node2.attrs) : node2.attrs;
215
218
  var ignoreSet = new Set(attributesToIgnore);
216
219
  for (var key in node2.attrs) {
217
220
  if (ignoreSet.has(key)) {
@@ -34,12 +34,12 @@ export declare const syncBlockMessages: {
34
34
  description: string;
35
35
  id: string;
36
36
  };
37
- cannotPasteSyncedBlockUnsupportedDescription: {
37
+ cannotPasteSyncedBlockTitle: {
38
38
  defaultMessage: string;
39
39
  description: string;
40
40
  id: string;
41
41
  };
42
- cannotPasteSyncedBlockTitle: {
42
+ cannotPasteSyncedBlockUnsupportedDescription: {
43
43
  defaultMessage: string;
44
44
  description: string;
45
45
  id: string;
@@ -34,12 +34,12 @@ export declare const syncBlockMessages: {
34
34
  description: string;
35
35
  id: string;
36
36
  };
37
- cannotPasteSyncedBlockUnsupportedDescription: {
37
+ cannotPasteSyncedBlockTitle: {
38
38
  defaultMessage: string;
39
39
  description: string;
40
40
  id: string;
41
41
  };
42
- cannotPasteSyncedBlockTitle: {
42
+ cannotPasteSyncedBlockUnsupportedDescription: {
43
43
  defaultMessage: string;
44
44
  description: string;
45
45
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "114.18.1",
3
+ "version": "114.18.3",
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/"
@@ -37,8 +37,8 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@atlaskit/activity-provider": "^2.5.0",
40
- "@atlaskit/adf-schema": "^52.7.0",
41
- "@atlaskit/adf-utils": "^19.28.0",
40
+ "@atlaskit/adf-schema": "^52.9.0",
41
+ "@atlaskit/adf-utils": "^19.29.0",
42
42
  "@atlaskit/afm-i18n-platform-editor-editor-common": "2.18.0",
43
43
  "@atlaskit/analytics-listeners": "^10.0.0",
44
44
  "@atlaskit/analytics-namespaced-context": "^7.2.0",
@@ -57,7 +57,7 @@
57
57
  "@atlaskit/editor-tables": "^2.9.0",
58
58
  "@atlaskit/editor-toolbar": "^1.0.0",
59
59
  "@atlaskit/editor-toolbar-model": "^0.4.0",
60
- "@atlaskit/emoji": "^70.2.0",
60
+ "@atlaskit/emoji": "^70.3.0",
61
61
  "@atlaskit/icon": "^34.3.0",
62
62
  "@atlaskit/link": "^3.4.0",
63
63
  "@atlaskit/link-datasource": "^5.2.0",
@@ -86,9 +86,9 @@
86
86
  "@atlaskit/spinner": "^19.1.0",
87
87
  "@atlaskit/task-decision": "^20.0.0",
88
88
  "@atlaskit/textfield": "^8.3.0",
89
- "@atlaskit/tmp-editor-statsig": "^74.4.0",
89
+ "@atlaskit/tmp-editor-statsig": "^74.7.0",
90
90
  "@atlaskit/tokens": "^13.0.0",
91
- "@atlaskit/tooltip": "^21.2.0",
91
+ "@atlaskit/tooltip": "^22.0.0",
92
92
  "@atlaskit/width-detector": "^5.1.0",
93
93
  "@babel/runtime": "^7.0.0",
94
94
  "@compiled/react": "^0.20.0",