@atlaskit/editor-common 101.1.0 → 101.1.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/cjs/link/LinkSearch/index.js +11 -35
  3. package/dist/cjs/messages/layout.js +5 -0
  4. package/dist/cjs/monitoring/error.js +1 -1
  5. package/dist/cjs/styles/shared/blockquote.js +6 -0
  6. package/dist/cjs/ui/DropList/index.js +1 -1
  7. package/dist/cjs/ui/Layer/index.js +1 -12
  8. package/dist/cjs/ui/Popup/index.js +2 -17
  9. package/dist/cjs/ui/Toolbar/Separator.js +1 -0
  10. package/dist/cjs/utils/withFeatureFlaggedComponent.js +1 -1
  11. package/dist/es2019/link/LinkSearch/index.js +11 -32
  12. package/dist/es2019/messages/layout.js +5 -0
  13. package/dist/es2019/monitoring/error.js +1 -1
  14. package/dist/es2019/styles/shared/blockquote.js +6 -0
  15. package/dist/es2019/ui/DropList/index.js +1 -1
  16. package/dist/es2019/ui/Layer/index.js +1 -10
  17. package/dist/es2019/ui/Popup/index.js +2 -14
  18. package/dist/es2019/ui/Toolbar/Separator.js +1 -0
  19. package/dist/es2019/utils/withFeatureFlaggedComponent.js +1 -1
  20. package/dist/esm/link/LinkSearch/index.js +11 -35
  21. package/dist/esm/messages/layout.js +5 -0
  22. package/dist/esm/monitoring/error.js +1 -1
  23. package/dist/esm/styles/shared/blockquote.js +6 -0
  24. package/dist/esm/ui/DropList/index.js +1 -1
  25. package/dist/esm/ui/Layer/index.js +1 -12
  26. package/dist/esm/ui/Popup/index.js +2 -17
  27. package/dist/esm/ui/Toolbar/Separator.js +1 -0
  28. package/dist/esm/utils/withFeatureFlaggedComponent.js +1 -1
  29. package/dist/types/messages/layout.d.ts +5 -0
  30. package/dist/types/ui/Layer/index.d.ts +0 -1
  31. package/dist/types/ui/Popup/index.d.ts +0 -1
  32. package/dist/types/utils/withFeatureFlaggedComponent.d.ts +1 -1
  33. package/dist/types-ts4.5/messages/layout.d.ts +5 -0
  34. package/dist/types-ts4.5/ui/Layer/index.d.ts +0 -1
  35. package/dist/types-ts4.5/ui/Popup/index.d.ts +0 -1
  36. package/dist/types-ts4.5/utils/withFeatureFlaggedComponent.d.ts +1 -1
  37. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 101.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#122317](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/122317)
8
+ [`95cee3591ab39`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/95cee3591ab39) -
9
+ [ux] [ED-26905] This change allows NBMs to be nested inside blockquotes at full width by
10
+ overriding the display styling for NBMs that happen to be the last child of a blockquote.
11
+ - [#122347](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/122347)
12
+ [`8d2ed43cc291b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8d2ed43cc291b) -
13
+ Migrating from using emotion css to compiled
14
+ - [#122344](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/122344)
15
+ [`3c4b4acd41ca1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3c4b4acd41ca1) -
16
+ FD-80149: cleans up platform_editor_react18_phase2_v2 in editor-common ui comps
17
+ - [#122260](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/122260)
18
+ [`10eabde04f773`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/10eabde04f773) -
19
+ FD-80149: cleans up platform_editor_react18_phase2_v2 from with_editor_actions
20
+ - Updated dependencies
21
+
3
22
  ## 101.1.0
4
23
 
5
24
  ### Minor Changes
@@ -16,7 +16,6 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
16
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
17
  var _react = _interopRequireDefault(require("react"));
18
18
  var _reactIntlNext = require("react-intl-next");
19
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
20
19
  var _analytics = require("../../analytics");
21
20
  var _LinkSearchList = _interopRequireDefault(require("./LinkSearchList"));
22
21
  var _withActivityProvider = _interopRequireDefault(require("./withActivityProvider"));
@@ -205,43 +204,20 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
205
204
  }
206
205
  (0, _inherits2.default)(RecentLink, _React$Component);
207
206
  return (0, _createClass2.default)(RecentLink, [{
208
- key: "UNSAFE_componentWillReceiveProps",
209
- value:
210
- // Ignored via go/ees005
211
- // eslint-disable-next-line react/no-unsafe
212
- function UNSAFE_componentWillReceiveProps(nextProps) {
213
- if (!(0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2')) {
214
- if (this.props.defaultUrl !== nextProps.defaultUrl) {
215
- this.setState(function (state) {
216
- if (state.url !== nextProps.defaultUrl) {
217
- return {
218
- items: [],
219
- selectedIndex: -1,
220
- url: nextProps.defaultUrl || ''
221
- };
222
- }
223
- return null;
224
- });
225
- }
226
- }
227
- }
228
- }, {
229
207
  key: "componentDidUpdate",
230
208
  value: function componentDidUpdate(prevProps) {
231
209
  var _this2 = this;
232
- if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2')) {
233
- if (prevProps.defaultUrl !== this.props.defaultUrl) {
234
- this.setState(function (state) {
235
- if (state.url !== _this2.props.defaultUrl) {
236
- return {
237
- items: [],
238
- selectedIndex: -1,
239
- url: _this2.props.defaultUrl || ''
240
- };
241
- }
242
- return null;
243
- });
244
- }
210
+ if (prevProps.defaultUrl !== this.props.defaultUrl) {
211
+ this.setState(function (state) {
212
+ if (state.url !== _this2.props.defaultUrl) {
213
+ return {
214
+ items: [],
215
+ selectedIndex: -1,
216
+ url: _this2.props.defaultUrl || ''
217
+ };
218
+ }
219
+ return null;
220
+ });
245
221
  }
246
222
  }
247
223
  }, {
@@ -76,6 +76,11 @@ var toolbarMessages = exports.toolbarMessages = (0, _reactIntlNext.defineMessage
76
76
  defaultMessage: 'Add content',
77
77
  description: 'Add placeholder text for empty layout'
78
78
  },
79
+ controlslayoutPlaceholder: {
80
+ id: 'fabric.editor.layout.controls.placeholder',
81
+ defaultMessage: '/ to insert',
82
+ description: 'Add placeholder text for empty layout'
83
+ },
79
84
  columnOption: {
80
85
  id: 'fabric.editor.layout.columnOption',
81
86
  defaultMessage: '{count, plural, one { Column} other {{count} Columns}}',
@@ -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 = "101.1.0";
20
+ var packageVersion = "101.1.1";
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
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.blockquoteSharedStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
9
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
9
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
11
 
11
12
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
@@ -49,6 +50,11 @@ var blockquoteSharedStyles = exports.blockquoteSharedStyles = (0, _react.css)({
49
50
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
50
51
  '> .code-block:last-child, >.mediaSingleView-content-wrap:last-child, >.mediaGroupView-content-wrap:last-child': {
51
52
  display: 'block'
53
+ },
54
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
55
+ '> .extensionView-content-wrap:last-child': {
56
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
57
+ display: "".concat((0, _experiments.editorExperiment)('platform_editor_nested_non_bodied_macros', 'test')) ? 'block' : 'inline-block'
52
58
  }
53
59
  }
54
60
  });
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "101.1.0";
26
+ var packageVersion = "101.1.1";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -15,7 +15,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
15
15
  var _react = _interopRequireWildcard(require("react"));
16
16
  var _popper = _interopRequireDefault(require("popper.js"));
17
17
  var _rafSchd = _interopRequireDefault(require("raf-schd"));
18
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
18
  var _helpers = require("./internal/helpers");
20
19
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
21
20
  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; }
@@ -77,22 +76,12 @@ var Layer = exports.default = /*#__PURE__*/function (_Component) {
77
76
  value: function componentDidMount() {
78
77
  this.applyPopper(this.props);
79
78
  }
80
-
81
- // Ignored via go/ees005
82
- // eslint-disable-next-line react/no-unsafe
83
- }, {
84
- key: "UNSAFE_componentWillReceiveProps",
85
- value: function UNSAFE_componentWillReceiveProps(nextProps) {
86
- if (!(0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2')) {
87
- this.applyPopper(nextProps);
88
- }
89
- }
90
79
  }, {
91
80
  key: "componentDidUpdate",
92
81
  value: function componentDidUpdate(prevProps, prevState) {
93
82
  var onPositioned = this.props.onPositioned;
94
83
  var hasExtractedStyles = this.state.hasExtractedStyles;
95
- if (this.props !== prevProps && (0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2')) {
84
+ if (this.props !== prevProps) {
96
85
  this.applyPopper(this.props);
97
86
  }
98
87
 
@@ -16,7 +16,6 @@ var _focusTrap = _interopRequireDefault(require("focus-trap"));
16
16
  var _rafSchd = _interopRequireDefault(require("raf-schd"));
17
17
  var _reactDom = require("react-dom");
18
18
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
19
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
20
19
  var _utils = require("./utils");
21
20
  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
21
  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; }
@@ -202,18 +201,6 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
202
201
  this.initFocusTrap();
203
202
  }
204
203
  }
205
- }, {
206
- key: "UNSAFE_componentWillReceiveProps",
207
- value:
208
- // Ignored via go/ees005
209
- // eslint-disable-next-line react/no-unsafe
210
- function UNSAFE_componentWillReceiveProps(newProps) {
211
- // We are delaying `updatePosition` otherwise it happens before the children
212
- // get rendered and we end up with a wrong position
213
- if (!(0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2')) {
214
- this.scheduledUpdatePosition(newProps);
215
- }
216
- }
217
204
  }, {
218
205
  key: "destroyFocusTrap",
219
206
  value:
@@ -253,10 +240,8 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
253
240
  key: "componentDidUpdate",
254
241
  value: function componentDidUpdate(prevProps) {
255
242
  this.handleChangedFocusTrapProp(prevProps);
256
- if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2')) {
257
- if (this.props !== prevProps) {
258
- this.scheduledUpdatePosition(prevProps);
259
- }
243
+ if (this.props !== prevProps) {
244
+ this.scheduledUpdatePosition(prevProps);
260
245
  }
261
246
  }
262
247
  }, {
@@ -14,6 +14,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
14
14
  var separatorStyles = null;
15
15
  function ToolbarSeparator() {
16
16
  return /*#__PURE__*/React.createElement("span", {
17
+ "data-testid": "editor-toolbar-seperator",
17
18
  className: (0, _runtime.ax)(["_1e0c1o8l _1bsbt94y _4t3i1tcg _19pkze3t _otyrze3t _18u0u2gc _2hwxu2gc _uiztglyw _bfhk15ej"])
18
19
  });
19
20
  }
@@ -10,7 +10,7 @@ var _react = _interopRequireDefault(require("react"));
10
10
  * This function is used to switch between two components based on a feature flag
11
11
  * @param ComponentOld
12
12
  * @param ComponentNext
13
- * @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('platform_editor_react18_phase2_v2')
13
+ * @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('my_flag_name')
14
14
  * @returns
15
15
  */
16
16
  var withFeatureFlaggedComponent = exports.withFeatureFlaggedComponent = function withFeatureFlaggedComponent(ComponentOld, ComponentNext, featureFlagFn) {
@@ -1,7 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
3
  import { injectIntl } from 'react-intl-next';
4
- import { fg } from '@atlaskit/platform-feature-flags';
5
4
  import { INPUT_METHOD } from '../../analytics';
6
5
  import LinkSearchList from './LinkSearchList';
7
6
  import withActivityProvider from './withActivityProvider';
@@ -148,38 +147,18 @@ class RecentLink extends React.Component {
148
147
  url: props.defaultUrl || ''
149
148
  };
150
149
  }
151
- // Ignored via go/ees005
152
- // eslint-disable-next-line react/no-unsafe
153
- UNSAFE_componentWillReceiveProps(nextProps) {
154
- if (!fg('platform_editor_react18_phase2_v2')) {
155
- if (this.props.defaultUrl !== nextProps.defaultUrl) {
156
- this.setState(state => {
157
- if (state.url !== nextProps.defaultUrl) {
158
- return {
159
- items: [],
160
- selectedIndex: -1,
161
- url: nextProps.defaultUrl || ''
162
- };
163
- }
164
- return null;
165
- });
166
- }
167
- }
168
- }
169
150
  componentDidUpdate(prevProps) {
170
- if (fg('platform_editor_react18_phase2_v2')) {
171
- if (prevProps.defaultUrl !== this.props.defaultUrl) {
172
- this.setState(state => {
173
- if (state.url !== this.props.defaultUrl) {
174
- return {
175
- items: [],
176
- selectedIndex: -1,
177
- url: this.props.defaultUrl || ''
178
- };
179
- }
180
- return null;
181
- });
182
- }
151
+ if (prevProps.defaultUrl !== this.props.defaultUrl) {
152
+ this.setState(state => {
153
+ if (state.url !== this.props.defaultUrl) {
154
+ return {
155
+ items: [],
156
+ selectedIndex: -1,
157
+ url: this.props.defaultUrl || ''
158
+ };
159
+ }
160
+ return null;
161
+ });
183
162
  }
184
163
  }
185
164
  async componentDidMount() {
@@ -70,6 +70,11 @@ export const toolbarMessages = defineMessages({
70
70
  defaultMessage: 'Add content',
71
71
  description: 'Add placeholder text for empty layout'
72
72
  },
73
+ controlslayoutPlaceholder: {
74
+ id: 'fabric.editor.layout.controls.placeholder',
75
+ defaultMessage: '/ to insert',
76
+ description: 'Add placeholder text for empty layout'
77
+ },
73
78
  columnOption: {
74
79
  id: 'fabric.editor.layout.columnOption',
75
80
  defaultMessage: '{count, plural, one { Column} other {{count} Columns}}',
@@ -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 = "101.1.0";
4
+ const packageVersion = "101.1.1";
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
@@ -1,6 +1,7 @@
1
1
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
2
  import { css } from '@emotion/react';
3
3
  import { akEditorBlockquoteBorderColor, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
4
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
5
6
  export const blockquoteSharedStyles = css({
6
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
@@ -42,6 +43,11 @@ export const blockquoteSharedStyles = css({
42
43
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
43
44
  '> .code-block:last-child, >.mediaSingleView-content-wrap:last-child, >.mediaGroupView-content-wrap:last-child': {
44
45
  display: 'block'
46
+ },
47
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
48
+ '> .extensionView-content-wrap:last-child': {
49
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
50
+ display: `${editorExperiment('platform_editor_nested_non_bodied_macros', 'test')}` ? 'block' : 'inline-block'
45
51
  }
46
52
  }
47
53
  });
@@ -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 = "101.1.0";
16
+ const packageVersion = "101.1.1";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -2,7 +2,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React, { Component } from 'react';
3
3
  import Popper from 'popper.js'; // eslint-disable-line import/extensions
4
4
  import rafSchedule from 'raf-schd';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  import { positionPropToPopperPosition } from './internal/helpers';
7
6
  const defaultState = {
8
7
  hasExtractedStyles: false,
@@ -52,14 +51,6 @@ export default class Layer extends Component {
52
51
  componentDidMount() {
53
52
  this.applyPopper(this.props);
54
53
  }
55
-
56
- // Ignored via go/ees005
57
- // eslint-disable-next-line react/no-unsafe
58
- UNSAFE_componentWillReceiveProps(nextProps) {
59
- if (!fg('platform_editor_react18_phase2_v2')) {
60
- this.applyPopper(nextProps);
61
- }
62
- }
63
54
  componentDidUpdate(prevProps, prevState) {
64
55
  const {
65
56
  onPositioned
@@ -67,7 +58,7 @@ export default class Layer extends Component {
67
58
  const {
68
59
  hasExtractedStyles
69
60
  } = this.state;
70
- if (this.props !== prevProps && fg('platform_editor_react18_phase2_v2')) {
61
+ if (this.props !== prevProps) {
71
62
  this.applyPopper(this.props);
72
63
  }
73
64
 
@@ -4,7 +4,6 @@ import createFocusTrap from 'focus-trap';
4
4
  import rafSchedule from 'raf-schd';
5
5
  import { createPortal, flushSync } from 'react-dom';
6
6
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
7
  import { calculatePlacement, calculatePosition, findOverflowScrollParent, validatePosition } from './utils';
9
8
  // Ignored via go/ees005
10
9
  // eslint-disable-next-line @repo/internal/react/no-class-components
@@ -172,15 +171,6 @@ export default class Popup extends React.Component {
172
171
  this.initFocusTrap();
173
172
  }
174
173
  }
175
- // Ignored via go/ees005
176
- // eslint-disable-next-line react/no-unsafe
177
- UNSAFE_componentWillReceiveProps(newProps) {
178
- // We are delaying `updatePosition` otherwise it happens before the children
179
- // get rendered and we end up with a wrong position
180
- if (!fg('platform_editor_react18_phase2_v2')) {
181
- this.scheduledUpdatePosition(newProps);
182
- }
183
- }
184
174
  /**
185
175
  * Cancels the initialisation of the focus trap if it has not yet occured
186
176
  * Deactivates the focus trap if it exists
@@ -213,10 +203,8 @@ export default class Popup extends React.Component {
213
203
  }
214
204
  componentDidUpdate(prevProps) {
215
205
  this.handleChangedFocusTrapProp(prevProps);
216
- if (fg('platform_editor_react18_phase2_v2')) {
217
- if (this.props !== prevProps) {
218
- this.scheduledUpdatePosition(prevProps);
219
- }
206
+ if (this.props !== prevProps) {
207
+ this.scheduledUpdatePosition(prevProps);
220
208
  }
221
209
  }
222
210
  componentDidMount() {
@@ -5,6 +5,7 @@ import { ax, ix } from "@compiled/react/runtime";
5
5
  const separatorStyles = null;
6
6
  export function ToolbarSeparator() {
7
7
  return /*#__PURE__*/React.createElement("span", {
8
+ "data-testid": "editor-toolbar-seperator",
8
9
  className: ax(["_1e0c1o8l _1bsbt94y _4t3i1tcg _19pkze3t _otyrze3t _18u0u2gc _2hwxu2gc _uiztglyw _bfhk15ej"])
9
10
  });
10
11
  }
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  * This function is used to switch between two components based on a feature flag
5
5
  * @param ComponentOld
6
6
  * @param ComponentNext
7
- * @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('platform_editor_react18_phase2_v2')
7
+ * @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('my_flag_name')
8
8
  * @returns
9
9
  */
10
10
  export const withFeatureFlaggedComponent = (ComponentOld, ComponentNext, featureFlagFn) => {
@@ -11,7 +11,6 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
11
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
12
  import React from 'react';
13
13
  import { injectIntl } from 'react-intl-next';
14
- import { fg } from '@atlaskit/platform-feature-flags';
15
14
  import { INPUT_METHOD } from '../../analytics';
16
15
  import LinkSearchList from './LinkSearchList';
17
16
  import withActivityProvider from './withActivityProvider';
@@ -198,43 +197,20 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
198
197
  }
199
198
  _inherits(RecentLink, _React$Component);
200
199
  return _createClass(RecentLink, [{
201
- key: "UNSAFE_componentWillReceiveProps",
202
- value:
203
- // Ignored via go/ees005
204
- // eslint-disable-next-line react/no-unsafe
205
- function UNSAFE_componentWillReceiveProps(nextProps) {
206
- if (!fg('platform_editor_react18_phase2_v2')) {
207
- if (this.props.defaultUrl !== nextProps.defaultUrl) {
208
- this.setState(function (state) {
209
- if (state.url !== nextProps.defaultUrl) {
210
- return {
211
- items: [],
212
- selectedIndex: -1,
213
- url: nextProps.defaultUrl || ''
214
- };
215
- }
216
- return null;
217
- });
218
- }
219
- }
220
- }
221
- }, {
222
200
  key: "componentDidUpdate",
223
201
  value: function componentDidUpdate(prevProps) {
224
202
  var _this2 = this;
225
- if (fg('platform_editor_react18_phase2_v2')) {
226
- if (prevProps.defaultUrl !== this.props.defaultUrl) {
227
- this.setState(function (state) {
228
- if (state.url !== _this2.props.defaultUrl) {
229
- return {
230
- items: [],
231
- selectedIndex: -1,
232
- url: _this2.props.defaultUrl || ''
233
- };
234
- }
235
- return null;
236
- });
237
- }
203
+ if (prevProps.defaultUrl !== this.props.defaultUrl) {
204
+ this.setState(function (state) {
205
+ if (state.url !== _this2.props.defaultUrl) {
206
+ return {
207
+ items: [],
208
+ selectedIndex: -1,
209
+ url: _this2.props.defaultUrl || ''
210
+ };
211
+ }
212
+ return null;
213
+ });
238
214
  }
239
215
  }
240
216
  }, {
@@ -70,6 +70,11 @@ export var toolbarMessages = defineMessages({
70
70
  defaultMessage: 'Add content',
71
71
  description: 'Add placeholder text for empty layout'
72
72
  },
73
+ controlslayoutPlaceholder: {
74
+ id: 'fabric.editor.layout.controls.placeholder',
75
+ defaultMessage: '/ to insert',
76
+ description: 'Add placeholder text for empty layout'
77
+ },
73
78
  columnOption: {
74
79
  id: 'fabric.editor.layout.columnOption',
75
80
  defaultMessage: '{count, plural, one { Column} other {{count} Columns}}',
@@ -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 = "101.1.0";
10
+ var packageVersion = "101.1.1";
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
@@ -1,6 +1,7 @@
1
1
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
2
  import { css } from '@emotion/react';
3
3
  import { akEditorBlockquoteBorderColor, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
4
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
5
6
  export var blockquoteSharedStyles = css({
6
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
@@ -42,6 +43,11 @@ export var blockquoteSharedStyles = css({
42
43
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
43
44
  '> .code-block:last-child, >.mediaSingleView-content-wrap:last-child, >.mediaGroupView-content-wrap:last-child': {
44
45
  display: 'block'
46
+ },
47
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
48
+ '> .extensionView-content-wrap:last-child': {
49
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
50
+ display: "".concat(editorExperiment('platform_editor_nested_non_bodied_macros', 'test')) ? 'block' : 'inline-block'
45
51
  }
46
52
  }
47
53
  });
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "101.1.0";
23
+ var packageVersion = "101.1.1";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -11,7 +11,6 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
11
11
  import React, { Component } from 'react';
12
12
  import Popper from 'popper.js'; // eslint-disable-line import/extensions
13
13
  import rafSchedule from 'raf-schd';
14
- import { fg } from '@atlaskit/platform-feature-flags';
15
14
  import { positionPropToPopperPosition } from './internal/helpers';
16
15
  var defaultState = {
17
16
  hasExtractedStyles: false,
@@ -67,22 +66,12 @@ var Layer = /*#__PURE__*/function (_Component) {
67
66
  value: function componentDidMount() {
68
67
  this.applyPopper(this.props);
69
68
  }
70
-
71
- // Ignored via go/ees005
72
- // eslint-disable-next-line react/no-unsafe
73
- }, {
74
- key: "UNSAFE_componentWillReceiveProps",
75
- value: function UNSAFE_componentWillReceiveProps(nextProps) {
76
- if (!fg('platform_editor_react18_phase2_v2')) {
77
- this.applyPopper(nextProps);
78
- }
79
- }
80
69
  }, {
81
70
  key: "componentDidUpdate",
82
71
  value: function componentDidUpdate(prevProps, prevState) {
83
72
  var onPositioned = this.props.onPositioned;
84
73
  var hasExtractedStyles = this.state.hasExtractedStyles;
85
- if (this.props !== prevProps && fg('platform_editor_react18_phase2_v2')) {
74
+ if (this.props !== prevProps) {
86
75
  this.applyPopper(this.props);
87
76
  }
88
77
 
@@ -13,7 +13,6 @@ import createFocusTrap from 'focus-trap';
13
13
  import rafSchedule from 'raf-schd';
14
14
  import { createPortal, flushSync } from 'react-dom';
15
15
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
16
- import { fg } from '@atlaskit/platform-feature-flags';
17
16
  import { calculatePlacement, calculatePosition as _calculatePosition, findOverflowScrollParent, validatePosition } from './utils';
18
17
  // Ignored via go/ees005
19
18
  // eslint-disable-next-line @repo/internal/react/no-class-components
@@ -195,18 +194,6 @@ var Popup = /*#__PURE__*/function (_React$Component) {
195
194
  this.initFocusTrap();
196
195
  }
197
196
  }
198
- }, {
199
- key: "UNSAFE_componentWillReceiveProps",
200
- value:
201
- // Ignored via go/ees005
202
- // eslint-disable-next-line react/no-unsafe
203
- function UNSAFE_componentWillReceiveProps(newProps) {
204
- // We are delaying `updatePosition` otherwise it happens before the children
205
- // get rendered and we end up with a wrong position
206
- if (!fg('platform_editor_react18_phase2_v2')) {
207
- this.scheduledUpdatePosition(newProps);
208
- }
209
- }
210
197
  }, {
211
198
  key: "destroyFocusTrap",
212
199
  value:
@@ -246,10 +233,8 @@ var Popup = /*#__PURE__*/function (_React$Component) {
246
233
  key: "componentDidUpdate",
247
234
  value: function componentDidUpdate(prevProps) {
248
235
  this.handleChangedFocusTrapProp(prevProps);
249
- if (fg('platform_editor_react18_phase2_v2')) {
250
- if (this.props !== prevProps) {
251
- this.scheduledUpdatePosition(prevProps);
252
- }
236
+ if (this.props !== prevProps) {
237
+ this.scheduledUpdatePosition(prevProps);
253
238
  }
254
239
  }
255
240
  }, {
@@ -5,6 +5,7 @@ import { ax, ix } from "@compiled/react/runtime";
5
5
  var separatorStyles = null;
6
6
  export function ToolbarSeparator() {
7
7
  return /*#__PURE__*/React.createElement("span", {
8
+ "data-testid": "editor-toolbar-seperator",
8
9
  className: ax(["_1e0c1o8l _1bsbt94y _4t3i1tcg _19pkze3t _otyrze3t _18u0u2gc _2hwxu2gc _uiztglyw _bfhk15ej"])
9
10
  });
10
11
  }
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  * This function is used to switch between two components based on a feature flag
5
5
  * @param ComponentOld
6
6
  * @param ComponentNext
7
- * @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('platform_editor_react18_phase2_v2')
7
+ * @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('my_flag_name')
8
8
  * @returns
9
9
  */
10
10
  export var withFeatureFlaggedComponent = function withFeatureFlaggedComponent(ComponentOld, ComponentNext, featureFlagFn) {
@@ -69,6 +69,11 @@ export declare const toolbarMessages: {
69
69
  defaultMessage: string;
70
70
  description: string;
71
71
  };
72
+ controlslayoutPlaceholder: {
73
+ id: string;
74
+ defaultMessage: string;
75
+ description: string;
76
+ };
72
77
  columnOption: {
73
78
  id: string;
74
79
  defaultMessage: string;
@@ -38,7 +38,6 @@ export default class Layer extends Component<Props, State> {
38
38
  };
39
39
  constructor(props: Props);
40
40
  componentDidMount(): void;
41
- UNSAFE_componentWillReceiveProps(nextProps: Props): void;
42
41
  componentDidUpdate(prevProps: Props, prevState: State): void;
43
42
  componentWillUnmount(): void;
44
43
  calculateMaxHeight(originalHeight: number, currentHeight: number, positionTop: number, cssPosition: string): number | null;
@@ -59,7 +59,6 @@ export default class Popup extends React.Component<Props, State> {
59
59
  private handleRef;
60
60
  private scheduledUpdatePosition;
61
61
  onResize: () => void;
62
- UNSAFE_componentWillReceiveProps(newProps: Props): void;
63
62
  resizeObserver: ResizeObserver | undefined;
64
63
  /**
65
64
  * Raf scheduled so that it also occurs after the initial update position
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  * This function is used to switch between two components based on a feature flag
4
4
  * @param ComponentOld
5
5
  * @param ComponentNext
6
- * @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('platform_editor_react18_phase2_v2')
6
+ * @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('my_flag_name')
7
7
  * @returns
8
8
  */
9
9
  export declare const withFeatureFlaggedComponent: <P extends object>(ComponentOld: React.ComponentType<P>, ComponentNext: React.ComponentType<P>, featureFlagFn: () => boolean) => (props: P) => React.JSX.Element;
@@ -69,6 +69,11 @@ export declare const toolbarMessages: {
69
69
  defaultMessage: string;
70
70
  description: string;
71
71
  };
72
+ controlslayoutPlaceholder: {
73
+ id: string;
74
+ defaultMessage: string;
75
+ description: string;
76
+ };
72
77
  columnOption: {
73
78
  id: string;
74
79
  defaultMessage: string;
@@ -38,7 +38,6 @@ export default class Layer extends Component<Props, State> {
38
38
  };
39
39
  constructor(props: Props);
40
40
  componentDidMount(): void;
41
- UNSAFE_componentWillReceiveProps(nextProps: Props): void;
42
41
  componentDidUpdate(prevProps: Props, prevState: State): void;
43
42
  componentWillUnmount(): void;
44
43
  calculateMaxHeight(originalHeight: number, currentHeight: number, positionTop: number, cssPosition: string): number | null;
@@ -62,7 +62,6 @@ export default class Popup extends React.Component<Props, State> {
62
62
  private handleRef;
63
63
  private scheduledUpdatePosition;
64
64
  onResize: () => void;
65
- UNSAFE_componentWillReceiveProps(newProps: Props): void;
66
65
  resizeObserver: ResizeObserver | undefined;
67
66
  /**
68
67
  * Raf scheduled so that it also occurs after the initial update position
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  * This function is used to switch between two components based on a feature flag
4
4
  * @param ComponentOld
5
5
  * @param ComponentNext
6
- * @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('platform_editor_react18_phase2_v2')
6
+ * @param featureFlagFn function that returns a boolean value to switch to the next component, e.g. () => fg('my_flag_name')
7
7
  * @returns
8
8
  */
9
9
  export declare const withFeatureFlaggedComponent: <P extends object>(ComponentOld: React.ComponentType<P>, ComponentNext: React.ComponentType<P>, featureFlagFn: () => boolean) => (props: P) => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "101.1.0",
3
+ "version": "101.1.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/"
@@ -145,7 +145,7 @@
145
145
  "@atlaskit/media-file-preview": "^0.11.0",
146
146
  "@atlaskit/media-picker": "^68.0.0",
147
147
  "@atlaskit/media-ui": "^28.0.0",
148
- "@atlaskit/media-viewer": "52.0.0",
148
+ "@atlaskit/media-viewer": "52.0.1",
149
149
  "@atlaskit/mention": "^24.1.0",
150
150
  "@atlaskit/menu": "^3.1.0",
151
151
  "@atlaskit/onboarding": "^13.0.0",
@@ -154,7 +154,7 @@
154
154
  "@atlaskit/primitives": "^14.1.0",
155
155
  "@atlaskit/profilecard": "^23.2.0",
156
156
  "@atlaskit/section-message": "^8.0.0",
157
- "@atlaskit/smart-card": "^35.1.0",
157
+ "@atlaskit/smart-card": "^35.2.0",
158
158
  "@atlaskit/smart-user-picker": "^8.0.0",
159
159
  "@atlaskit/spinner": "^18.0.0",
160
160
  "@atlaskit/task-decision": "^19.0.0",