@atlaskit/editor-common 93.2.1 → 93.2.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,22 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 93.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#150908](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/150908)
8
+ [`7aad3c3a375ff`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7aad3c3a375ff) -
9
+ Undoing addition of stopEvent function to extensionNodeView and related tests
10
+ - Updated dependencies
11
+
12
+ ## 93.2.2
13
+
14
+ ### Patch Changes
15
+
16
+ - [#151050](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/151050)
17
+ [`50e38f61af619`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/50e38f61af619) -
18
+ cleaned up ff for extended inline-extensions
19
+
3
20
  ## 93.2.1
4
21
 
5
22
  ### Patch Changes
@@ -10,7 +10,6 @@ var _react = _interopRequireWildcard(require("react"));
10
10
  var _react2 = require("@emotion/react");
11
11
  var _classnames = _interopRequireDefault(require("classnames"));
12
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
13
  var _hooks = require("../../../hooks");
15
14
  var _ui = require("../../../ui");
16
15
  var _Lozenge = _interopRequireDefault(require("../Lozenge"));
@@ -46,7 +45,6 @@ var InlineExtension = function InlineExtension(props) {
46
45
  'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered
47
46
  });
48
47
  var rendererContainerWidth = widthState ? widthState.width - (0, _editorSharedStyles.akEditorGutterPaddingDynamic)() * 2 : 0;
49
- var extendedInlineExtension = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.inline_extension.extended_lcqdn') || false;
50
48
  var handleMouseEvent = function handleMouseEvent(didHover) {
51
49
  if (setIsNodeHovered) {
52
50
  setIsNodeHovered(didHover);
@@ -63,7 +61,7 @@ var InlineExtension = function InlineExtension(props) {
63
61
  "data-testid": "inline-extension-wrapper"
64
62
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
65
63
  ,
66
- css: [_styles2.wrapperStyle, extendedInlineExtension && _styles2.inlineWrapperStyles]
64
+ css: [_styles2.wrapperStyle, _styles2.inlineWrapperStyles]
67
65
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
68
66
  ,
69
67
  className: classNames,
@@ -81,11 +79,8 @@ var InlineExtension = function InlineExtension(props) {
81
79
  isNodeSelected: isNodeSelected,
82
80
  showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
83
81
  })));
84
- if (extendedInlineExtension) {
85
- return (0, _react2.jsx)(_ui.WidthContext.Provider, {
86
- value: (0, _ui.createWidthContext)(rendererContainerWidth)
87
- }, inlineExtensionInternal);
88
- }
89
- return inlineExtensionInternal;
82
+ return (0, _react2.jsx)(_ui.WidthContext.Provider, {
83
+ value: (0, _ui.createWidthContext)(rendererContainerWidth)
84
+ }, inlineExtensionInternal);
90
85
  };
91
86
  var _default = exports.default = InlineExtension;
@@ -12,7 +12,6 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
12
12
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
13
13
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
14
14
  var _react = _interopRequireDefault(require("react"));
15
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
15
  var _reactNodeView = _interopRequireDefault(require("../react-node-view"));
17
16
  var _Extension = require("./Extension");
18
17
  var _ExtensionNodeWrapper = require("./ExtensionNodeWrapper");
@@ -39,18 +38,6 @@ var ExtensionNode = exports.ExtensionNode = /*#__PURE__*/function (_ReactNodeVie
39
38
  // children a chance to recalc
40
39
  return this.node.type.isAtom || mutation.type !== 'selection' && mutation.attributeName !== 'data-layout';
41
40
  }
42
-
43
- // When interacting with input elements inside an extension's body, the events
44
- // bubble up to the editor and get handled by it. This almost always gets in the way
45
- // of being able to actually interact with said input in the extension, i.e.
46
- // typing inside a text field (in an extension body) will print the text in the editor
47
- // content area instead. This change prevents the editor view from trying to handle these events,
48
- // when the target of the event is an input element, so the extension can.
49
- }, {
50
- key: "stopEvent",
51
- value: function stopEvent(event) {
52
- return event.target instanceof HTMLInputElement && (0, _platformFeatureFlags.fg)('cc_page_experiences_live_search_wysiwyg');
53
- }
54
41
  }, {
55
42
  key: "getContentDOM",
56
43
  value: function getContentDOM() {
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  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 && {}.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; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "93.2.1";
20
+ var packageVersion = "93.2.3";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // TODO: Sanitise the URL instead of just removing it
@@ -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 = "93.2.1";
27
+ var packageVersion = "93.2.3";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var DropList = /*#__PURE__*/function (_Component) {
@@ -8,7 +8,6 @@ import React, { Fragment } from 'react';
8
8
  import { jsx } from '@emotion/react';
9
9
  import classnames from 'classnames';
10
10
  import { akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
11
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
12
11
  import { useSharedPluginState } from '../../../hooks';
13
12
  import { createWidthContext, WidthContext } from '../../../ui';
14
13
  import ExtensionLozenge from '../Lozenge';
@@ -39,7 +38,6 @@ const InlineExtension = props => {
39
38
  'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered
40
39
  });
41
40
  const rendererContainerWidth = widthState ? widthState.width - akEditorGutterPaddingDynamic() * 2 : 0;
42
- const extendedInlineExtension = getBooleanFF('platform.editor.inline_extension.extended_lcqdn') || false;
43
41
  const handleMouseEvent = didHover => {
44
42
  if (setIsNodeHovered) {
45
43
  setIsNodeHovered(didHover);
@@ -56,7 +54,7 @@ const InlineExtension = props => {
56
54
  "data-testid": "inline-extension-wrapper"
57
55
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
58
56
  ,
59
- css: [wrapperStyle, extendedInlineExtension && inlineWrapperStyles]
57
+ css: [wrapperStyle, inlineWrapperStyles]
60
58
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
61
59
  ,
62
60
  className: classNames,
@@ -70,11 +68,8 @@ const InlineExtension = props => {
70
68
  isNodeSelected: isNodeSelected,
71
69
  showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
72
70
  })));
73
- if (extendedInlineExtension) {
74
- return jsx(WidthContext.Provider, {
75
- value: createWidthContext(rendererContainerWidth)
76
- }, inlineExtensionInternal);
77
- }
78
- return inlineExtensionInternal;
71
+ return jsx(WidthContext.Provider, {
72
+ value: createWidthContext(rendererContainerWidth)
73
+ }, inlineExtensionInternal);
79
74
  };
80
75
  export default InlineExtension;
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  import ReactNodeView from '../react-node-view';
4
3
  import { Extension } from './Extension';
5
4
  import { ExtensionNodeWrapper } from './ExtensionNodeWrapper';
@@ -16,16 +15,6 @@ export class ExtensionNode extends ReactNodeView {
16
15
  // children a chance to recalc
17
16
  return this.node.type.isAtom || mutation.type !== 'selection' && mutation.attributeName !== 'data-layout';
18
17
  }
19
-
20
- // When interacting with input elements inside an extension's body, the events
21
- // bubble up to the editor and get handled by it. This almost always gets in the way
22
- // of being able to actually interact with said input in the extension, i.e.
23
- // typing inside a text field (in an extension body) will print the text in the editor
24
- // content area instead. This change prevents the editor view from trying to handle these events,
25
- // when the target of the event is an input element, so the extension can.
26
- stopEvent(event) {
27
- return event.target instanceof HTMLInputElement && fg('cc_page_experiences_live_search_wysiwyg');
28
- }
29
18
  getContentDOM() {
30
19
  if (this.node.isInline) {
31
20
  return;
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "93.2.1";
4
+ const packageVersion = "93.2.3";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // TODO: Sanitise the URL instead of just removing it
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "93.2.1";
16
+ const packageVersion = "93.2.3";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  class DropList extends Component {
@@ -8,7 +8,6 @@ import React, { Fragment } from 'react';
8
8
  import { jsx } from '@emotion/react';
9
9
  import classnames from 'classnames';
10
10
  import { akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
11
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
12
11
  import { useSharedPluginState } from '../../../hooks';
13
12
  import { createWidthContext, WidthContext } from '../../../ui';
14
13
  import ExtensionLozenge from '../Lozenge';
@@ -35,7 +34,6 @@ var InlineExtension = function InlineExtension(props) {
35
34
  'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered
36
35
  });
37
36
  var rendererContainerWidth = widthState ? widthState.width - akEditorGutterPaddingDynamic() * 2 : 0;
38
- var extendedInlineExtension = getBooleanFF('platform.editor.inline_extension.extended_lcqdn') || false;
39
37
  var handleMouseEvent = function handleMouseEvent(didHover) {
40
38
  if (setIsNodeHovered) {
41
39
  setIsNodeHovered(didHover);
@@ -52,7 +50,7 @@ var InlineExtension = function InlineExtension(props) {
52
50
  "data-testid": "inline-extension-wrapper"
53
51
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
54
52
  ,
55
- css: [wrapperStyle, extendedInlineExtension && inlineWrapperStyles]
53
+ css: [wrapperStyle, inlineWrapperStyles]
56
54
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
57
55
  ,
58
56
  className: classNames,
@@ -70,11 +68,8 @@ var InlineExtension = function InlineExtension(props) {
70
68
  isNodeSelected: isNodeSelected,
71
69
  showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
72
70
  })));
73
- if (extendedInlineExtension) {
74
- return jsx(WidthContext.Provider, {
75
- value: createWidthContext(rendererContainerWidth)
76
- }, inlineExtensionInternal);
77
- }
78
- return inlineExtensionInternal;
71
+ return jsx(WidthContext.Provider, {
72
+ value: createWidthContext(rendererContainerWidth)
73
+ }, inlineExtensionInternal);
79
74
  };
80
75
  export default InlineExtension;
@@ -6,7 +6,6 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
6
  function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  import React from 'react';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
9
  import ReactNodeView from '../react-node-view';
11
10
  import { Extension } from './Extension';
12
11
  import { ExtensionNodeWrapper } from './ExtensionNodeWrapper';
@@ -31,18 +30,6 @@ export var ExtensionNode = /*#__PURE__*/function (_ReactNodeView) {
31
30
  // children a chance to recalc
32
31
  return this.node.type.isAtom || mutation.type !== 'selection' && mutation.attributeName !== 'data-layout';
33
32
  }
34
-
35
- // When interacting with input elements inside an extension's body, the events
36
- // bubble up to the editor and get handled by it. This almost always gets in the way
37
- // of being able to actually interact with said input in the extension, i.e.
38
- // typing inside a text field (in an extension body) will print the text in the editor
39
- // content area instead. This change prevents the editor view from trying to handle these events,
40
- // when the target of the event is an input element, so the extension can.
41
- }, {
42
- key: "stopEvent",
43
- value: function stopEvent(event) {
44
- return event.target instanceof HTMLInputElement && fg('cc_page_experiences_live_search_wysiwyg');
45
- }
46
33
  }, {
47
34
  key: "getContentDOM",
48
35
  value: function getContentDOM() {
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "93.2.1";
10
+ var packageVersion = "93.2.3";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // TODO: Sanitise the URL instead of just removing it
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
21
21
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "93.2.1";
24
+ var packageVersion = "93.2.3";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var DropList = /*#__PURE__*/function (_Component) {
@@ -17,7 +17,6 @@ export declare class ExtensionNode extends ReactNodeView {
17
17
  type: 'selection';
18
18
  target: Element;
19
19
  }): boolean;
20
- stopEvent(event: Event): boolean;
21
20
  getContentDOM(): {
22
21
  dom: HTMLDivElement;
23
22
  } | undefined;
@@ -17,7 +17,6 @@ export declare class ExtensionNode extends ReactNodeView {
17
17
  type: 'selection';
18
18
  target: Element;
19
19
  }): boolean;
20
- stopEvent(event: Event): boolean;
21
20
  getContentDOM(): {
22
21
  dom: HTMLDivElement;
23
22
  } | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "93.2.1",
3
+ "version": "93.2.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/"
@@ -145,7 +145,7 @@
145
145
  "@atlaskit/primitives": "^12.2.0",
146
146
  "@atlaskit/profilecard": "^20.4.0",
147
147
  "@atlaskit/section-message": "^6.6.0",
148
- "@atlaskit/smart-card": "^29.3.0",
148
+ "@atlaskit/smart-card": "^30.0.0",
149
149
  "@atlaskit/smart-user-picker": "^6.10.0",
150
150
  "@atlaskit/spinner": "^16.3.0",
151
151
  "@atlaskit/task-decision": "^17.11.0",
@@ -238,9 +238,6 @@
238
238
  "platform.linking-platform.datasource-assets_objects": {
239
239
  "type": "boolean"
240
240
  },
241
- "platform.editor.inline_extension.extended_lcqdn": {
242
- "type": "boolean"
243
- },
244
241
  "editor_inline_comments_on_inline_nodes": {
245
242
  "type": "boolean"
246
243
  },
@@ -268,9 +265,6 @@
268
265
  "platform_editor_react18_phase2": {
269
266
  "type": "boolean"
270
267
  },
271
- "cc_page_experiences_live_search_wysiwyg": {
272
- "type": "boolean"
273
- },
274
268
  "use-effect-in-use-previous-props": {
275
269
  "type": "boolean"
276
270
  },