@atlaskit/editor-core 195.4.3 → 195.4.4

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,17 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 195.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#129411](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/129411)
8
+ [`080325d254926`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/080325d254926) -
9
+ Added PTW 40% scale to comment editor and renderer in confluence
10
+ - [#129415](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/129415)
11
+ [`f5c556c716ddf`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f5c556c716ddf) -
12
+ Allow collapsed editor to have any child as its child may be a wrapper.
13
+ - Updated dependencies
14
+
3
15
  ## 195.4.3
4
16
 
5
17
  ### Patch Changes
@@ -143,7 +143,7 @@ function createUniversalPresetInternal(_ref) {
143
143
  tableOptions: !props.allowTables || typeof props.allowTables === 'boolean' ? {} : props.allowTables,
144
144
  tableResizingEnabled: isFullPage || isComment && (0, _platformFeatureFlags.fg)('platform_editor_table_support_in_comment'),
145
145
  dragAndDropEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableDragAndDrop) && (isFullPage || (isComment || isChromeless) && (0, _platformFeatureFlags.fg)('platform_editor_table_support_in_comment')),
146
- isTableScalingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tablePreserveWidth) && isFullPage,
146
+ isTableScalingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tablePreserveWidth) && (isFullPage || isComment && (0, _platformFeatureFlags.fg)('platform_editor_table_support_in_comment')),
147
147
  allowContextualMenu: !isMobile,
148
148
  fullWidthEnabled: appearance === 'full-width',
149
149
  wasFullWidthEnabled: prevAppearance && prevAppearance === 'full-width',
@@ -14,9 +14,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
15
  var _react = _interopRequireDefault(require("react"));
16
16
  var _ui = require("@atlaskit/editor-common/ui");
17
- var _composableEditor = require("../../composable-editor");
18
- var _editor = _interopRequireDefault(require("../../editor"));
19
- var _EditorWithActions = _interopRequireDefault(require("../../EditorWithActions"));
20
17
  var _ChromeCollapsed = _interopRequireDefault(require("../ChromeCollapsed"));
21
18
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
22
19
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
@@ -52,10 +49,7 @@ var CollapsedEditor = exports.default = /*#__PURE__*/function (_React$Component)
52
49
  value: function render() {
53
50
  var _this2 = this;
54
51
  var child = _react.default.Children.only(this.props.children);
55
- if (child.type !== _editor.default && child.type !== _EditorWithActions.default && child.type !== _composableEditor.ComposableEditor) {
56
- throw new Error('Expected child to be of type `Editor`');
57
- }
58
- this.functionalEditor = child.type === _composableEditor.ComposableEditor;
52
+ this.functionalEditor = typeof child.type === 'function';
59
53
  if (!this.props.isExpanded) {
60
54
  return /*#__PURE__*/_react.default.createElement(_ui.IntlProviderIfMissingWrapper, null, /*#__PURE__*/_react.default.createElement(_ChromeCollapsed.default, {
61
55
  onFocus: this.props.onFocus,
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "195.4.3";
8
+ var version = exports.version = "195.4.4";
@@ -134,7 +134,7 @@ export default function createUniversalPresetInternal({
134
134
  tableOptions: !props.allowTables || typeof props.allowTables === 'boolean' ? {} : props.allowTables,
135
135
  tableResizingEnabled: isFullPage || isComment && fg('platform_editor_table_support_in_comment'),
136
136
  dragAndDropEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableDragAndDrop) && (isFullPage || (isComment || isChromeless) && fg('platform_editor_table_support_in_comment')),
137
- isTableScalingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tablePreserveWidth) && isFullPage,
137
+ isTableScalingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tablePreserveWidth) && (isFullPage || isComment && fg('platform_editor_table_support_in_comment')),
138
138
  allowContextualMenu: !isMobile,
139
139
  fullWidthEnabled: appearance === 'full-width',
140
140
  wasFullWidthEnabled: prevAppearance && prevAppearance === 'full-width',
@@ -1,9 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
3
  import { IntlProviderIfMissingWrapper } from '@atlaskit/editor-common/ui';
4
- import { ComposableEditor } from '../../composable-editor';
5
- import Editor from '../../editor';
6
- import EditorWithActions from '../../EditorWithActions';
7
4
  import ChromeCollapsed from '../ChromeCollapsed';
8
5
  export default class CollapsedEditor extends React.Component {
9
6
  constructor(...args) {
@@ -24,10 +21,7 @@ export default class CollapsedEditor extends React.Component {
24
21
  }
25
22
  render() {
26
23
  const child = React.Children.only(this.props.children);
27
- if (child.type !== Editor && child.type !== EditorWithActions && child.type !== ComposableEditor) {
28
- throw new Error('Expected child to be of type `Editor`');
29
- }
30
- this.functionalEditor = child.type === ComposableEditor;
24
+ this.functionalEditor = typeof child.type === 'function';
31
25
  if (!this.props.isExpanded) {
32
26
  return /*#__PURE__*/React.createElement(IntlProviderIfMissingWrapper, null, /*#__PURE__*/React.createElement(ChromeCollapsed, {
33
27
  onFocus: this.props.onFocus,
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "195.4.3";
2
+ export const version = "195.4.4";
@@ -136,7 +136,7 @@ export default function createUniversalPresetInternal(_ref) {
136
136
  tableOptions: !props.allowTables || typeof props.allowTables === 'boolean' ? {} : props.allowTables,
137
137
  tableResizingEnabled: isFullPage || isComment && fg('platform_editor_table_support_in_comment'),
138
138
  dragAndDropEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableDragAndDrop) && (isFullPage || (isComment || isChromeless) && fg('platform_editor_table_support_in_comment')),
139
- isTableScalingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tablePreserveWidth) && isFullPage,
139
+ isTableScalingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tablePreserveWidth) && (isFullPage || isComment && fg('platform_editor_table_support_in_comment')),
140
140
  allowContextualMenu: !isMobile,
141
141
  fullWidthEnabled: appearance === 'full-width',
142
142
  wasFullWidthEnabled: prevAppearance && prevAppearance === 'full-width',
@@ -9,9 +9,6 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
9
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
10
  import React from 'react';
11
11
  import { IntlProviderIfMissingWrapper } from '@atlaskit/editor-common/ui';
12
- import { ComposableEditor } from '../../composable-editor';
13
- import Editor from '../../editor';
14
- import EditorWithActions from '../../EditorWithActions';
15
12
  import ChromeCollapsed from '../ChromeCollapsed';
16
13
  var CollapsedEditor = /*#__PURE__*/function (_React$Component) {
17
14
  _inherits(CollapsedEditor, _React$Component);
@@ -45,10 +42,7 @@ var CollapsedEditor = /*#__PURE__*/function (_React$Component) {
45
42
  value: function render() {
46
43
  var _this2 = this;
47
44
  var child = React.Children.only(this.props.children);
48
- if (child.type !== Editor && child.type !== EditorWithActions && child.type !== ComposableEditor) {
49
- throw new Error('Expected child to be of type `Editor`');
50
- }
51
- this.functionalEditor = child.type === ComposableEditor;
45
+ this.functionalEditor = typeof child.type === 'function';
52
46
  if (!this.props.isExpanded) {
53
47
  return /*#__PURE__*/React.createElement(IntlProviderIfMissingWrapper, null, /*#__PURE__*/React.createElement(ChromeCollapsed, {
54
48
  onFocus: this.props.onFocus,
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "195.4.3";
2
+ export var version = "195.4.4";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "195.4.3",
3
+ "version": "195.4.4",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/analytics-next": "^10.1.0",
46
46
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
47
47
  "@atlaskit/button": "^19.2.0",
48
- "@atlaskit/editor-common": "^87.9.0",
48
+ "@atlaskit/editor-common": "^87.10.0",
49
49
  "@atlaskit/editor-plugins": "^3.6.0",
50
50
  "@atlaskit/editor-prosemirror": "5.0.1",
51
51
  "@atlaskit/editor-shared-styles": "^2.13.0",
@@ -56,7 +56,7 @@
56
56
  "@atlaskit/platform-feature-flags": "^0.3.0",
57
57
  "@atlaskit/spinner": "^16.3.0",
58
58
  "@atlaskit/task-decision": "^17.10.0",
59
- "@atlaskit/theme": "^12.12.0",
59
+ "@atlaskit/theme": "^13.0.0",
60
60
  "@atlaskit/tokens": "^1.58.0",
61
61
  "@atlaskit/tooltip": "^18.7.0",
62
62
  "@atlaskit/width-detector": "^4.3.0",
@@ -80,7 +80,7 @@
80
80
  "react-intl-next": "npm:react-intl@^5.18.1"
81
81
  },
82
82
  "devDependencies": {
83
- "@af/editor-examples-helpers": "0.1.4",
83
+ "@af/editor-examples-helpers": "0.1.5",
84
84
  "@af/editor-libra": "*",
85
85
  "@af/visual-regression": "*",
86
86
  "@atlaskit/adf-utils": "^19.8.0",
@@ -88,7 +88,7 @@
88
88
  "@atlaskit/collab-provider": "9.37.1",
89
89
  "@atlaskit/editor-json-transformer": "^8.18.0",
90
90
  "@atlaskit/editor-plugin-annotation": "1.19.0",
91
- "@atlaskit/editor-plugin-card": "^2.12.0",
91
+ "@atlaskit/editor-plugin-card": "^2.13.0",
92
92
  "@atlaskit/editor-plugin-editor-viewmode": "^2.1.0",
93
93
  "@atlaskit/editor-plugin-list": "^3.8.0",
94
94
  "@atlaskit/editor-plugin-paste": "^1.8.0",
@@ -101,14 +101,14 @@
101
101
  "@atlaskit/modal-dialog": "^12.15.0",
102
102
  "@atlaskit/primitives": "^12.0.0",
103
103
  "@atlaskit/renderer": "^109.46.0",
104
- "@atlaskit/smart-card": "^27.14.0",
104
+ "@atlaskit/smart-card": "^27.15.0",
105
105
  "@atlaskit/synchrony-test-helpers": "^2.5.0",
106
106
  "@atlaskit/toggle": "^13.3.0",
107
107
  "@atlaskit/util-data-test": "^17.9.0",
108
108
  "@atlaskit/visual-regression": "*",
109
109
  "@atlassian/adf-schema-json": "^1.22.0",
110
110
  "@atlassian/feature-flags-test-utils": "*",
111
- "@atlassian/search-provider": "2.4.103",
111
+ "@atlassian/search-provider": "2.4.104",
112
112
  "@emotion/jest": "^11.8.0",
113
113
  "@storybook/addon-knobs": "^5.3.18",
114
114
  "@testing-library/react": "^12.1.5",