@atlaskit/editor-plugin-quick-insert 5.0.2 → 6.0.0

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,19 @@
1
1
  # @atlaskit/editor-plugin-quick-insert
2
2
 
3
+ ## 6.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 5.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [`ed4268ebeec91`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ed4268ebeec91) -
14
+ Hydration fixes for quick insert plugin
15
+ - Updated dependencies
16
+
3
17
  ## 5.0.2
4
18
 
5
19
  ### Patch Changes
@@ -11,12 +11,14 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
11
11
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
12
  var _react = _interopRequireDefault(require("react"));
13
13
  var _reactIntlNext = require("react-intl-next");
14
+ var _coreUtils = require("@atlaskit/editor-common/core-utils");
14
15
  var _messages = require("@atlaskit/editor-common/messages");
15
16
  var _quickInsert = require("@atlaskit/editor-common/quick-insert");
16
17
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
17
18
  var _typeAhead = require("@atlaskit/editor-common/type-ahead");
18
19
  var _showMoreHorizontalEditorMore = _interopRequireDefault(require("@atlaskit/icon/core/migration/show-more-horizontal--editor-more"));
19
20
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
21
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
20
22
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
21
23
  var _commands = require("./pm-plugins/commands");
22
24
  var _pluginKey = require("./pm-plugins/plugin-key");
@@ -86,7 +88,7 @@ var quickInsertPlugin = exports.quickInsertPlugin = function quickInsertPlugin(_
86
88
  },
87
89
  contentComponent: function contentComponent(_ref5) {
88
90
  var editorView = _ref5.editorView;
89
- if (!editorView) {
91
+ if (!editorView || (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) && (0, _coreUtils.isSSR)()) {
90
92
  return null;
91
93
  }
92
94
  if (options !== null && options !== void 0 && options.enableElementBrowser) {
@@ -1,11 +1,13 @@
1
1
  import React from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
+ import { isSSR } from '@atlaskit/editor-common/core-utils';
3
4
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
4
5
  import { memoProcessQuickInsertItems } from '@atlaskit/editor-common/quick-insert';
5
6
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
6
7
  import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
7
8
  import ShowMoreHorizontalIcon from '@atlaskit/icon/core/migration/show-more-horizontal--editor-more';
8
9
  import { fg } from '@atlaskit/platform-feature-flags';
10
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
11
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
10
12
  import { createInsertItem, openElementBrowserModal } from './pm-plugins/commands';
11
13
  import { pluginKey } from './pm-plugins/plugin-key';
@@ -76,7 +78,7 @@ export const quickInsertPlugin = ({
76
78
  contentComponent({
77
79
  editorView
78
80
  }) {
79
- if (!editorView) {
81
+ if (!editorView || expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) && isSSR()) {
80
82
  return null;
81
83
  }
82
84
  if (options !== null && options !== void 0 && options.enableElementBrowser) {
@@ -6,12 +6,14 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
6
6
  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; }
7
7
  import React from 'react';
8
8
  import { useIntl } from 'react-intl-next';
9
+ import { isSSR } from '@atlaskit/editor-common/core-utils';
9
10
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
10
11
  import { memoProcessQuickInsertItems } from '@atlaskit/editor-common/quick-insert';
11
12
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
12
13
  import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
13
14
  import ShowMoreHorizontalIcon from '@atlaskit/icon/core/migration/show-more-horizontal--editor-more';
14
15
  import { fg } from '@atlaskit/platform-feature-flags';
16
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
15
17
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
16
18
  import { createInsertItem, openElementBrowserModal as _openElementBrowserModal } from './pm-plugins/commands';
17
19
  import { pluginKey } from './pm-plugins/plugin-key';
@@ -79,7 +81,7 @@ export var quickInsertPlugin = function quickInsertPlugin(_ref) {
79
81
  },
80
82
  contentComponent: function contentComponent(_ref5) {
81
83
  var editorView = _ref5.editorView;
82
- if (!editorView) {
84
+ if (!editorView || expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) && isSSR()) {
83
85
  return null;
84
86
  }
85
87
  if (options !== null && options !== void 0 && options.enableElementBrowser) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-quick-insert",
3
- "version": "5.0.2",
3
+ "version": "6.0.0",
4
4
  "description": "Quick insert plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -30,21 +30,21 @@
30
30
  "atlaskit:src": "src/index.ts",
31
31
  "dependencies": {
32
32
  "@atlaskit/button": "^23.4.0",
33
- "@atlaskit/editor-plugin-connectivity": "^5.0.0",
34
- "@atlaskit/editor-plugin-metrics": "^6.2.0",
35
- "@atlaskit/editor-plugin-type-ahead": "^5.2.0",
33
+ "@atlaskit/editor-plugin-connectivity": "^6.0.0",
34
+ "@atlaskit/editor-plugin-metrics": "^7.0.0",
35
+ "@atlaskit/editor-plugin-type-ahead": "^6.0.0",
36
36
  "@atlaskit/editor-prosemirror": "7.0.0",
37
37
  "@atlaskit/icon": "^28.3.0",
38
38
  "@atlaskit/modal-dialog": "^14.4.0",
39
39
  "@atlaskit/platform-feature-flags": "^1.1.0",
40
40
  "@atlaskit/theme": "^21.0.0",
41
- "@atlaskit/tmp-editor-statsig": "^12.29.0",
41
+ "@atlaskit/tmp-editor-statsig": "^12.31.0",
42
42
  "@atlaskit/tokens": "^6.3.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "@emotion/react": "^11.7.1"
45
45
  },
46
46
  "peerDependencies": {
47
- "@atlaskit/editor-common": "^109.15.0",
47
+ "@atlaskit/editor-common": "^110.0.0",
48
48
  "react": "^18.2.0",
49
49
  "react-dom": "^18.2.0",
50
50
  "react-intl-next": "npm:react-intl@^5.18.1"