@atlaskit/editor-plugin-help-dialog 5.0.3 → 5.0.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,12 @@
1
1
  # @atlaskit/editor-plugin-help-dialog
2
2
 
3
+ ## 5.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`984f973a1fb80`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/984f973a1fb80) -
8
+ ED-29168: helpdialog hydration fix
9
+
3
10
  ## 5.0.3
4
11
 
5
12
  ### Patch Changes
@@ -7,9 +7,11 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.helpDialogPlugin = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _analytics = require("@atlaskit/editor-common/analytics");
10
+ var _coreUtils = require("@atlaskit/editor-common/core-utils");
10
11
  var _keymaps = require("@atlaskit/editor-common/keymaps");
11
12
  var _messages = require("@atlaskit/editor-common/messages");
12
13
  var _questionCircle = _interopRequireDefault(require("@atlaskit/icon/core/migration/question-circle"));
14
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
15
  var _actions = require("./pm-plugins/actions");
14
16
  var _commands = require("./pm-plugins/commands");
15
17
  var _keymap = require("./pm-plugins/keymap");
@@ -100,11 +102,14 @@ var helpDialogPlugin = exports.helpDialogPlugin = function helpDialogPlugin(_ref
100
102
  },
101
103
  contentComponent: function contentComponent(_ref5) {
102
104
  var editorView = _ref5.editorView;
103
- if (!editorView) {
105
+ if ((0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) && (!editorView || (0, _coreUtils.isSSR)())) {
104
106
  return null;
105
107
  }
106
108
  return /*#__PURE__*/_react.default.createElement(_HelpDialogLoader.HelpDialogLoader, {
107
- pluginInjectionApi: api,
109
+ pluginInjectionApi: api
110
+ // temp non null assertion until platform_editor_hydratable_ui cleaned up
111
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
112
+ ,
108
113
  editorView: editorView,
109
114
  quickInsertEnabled: !!(api !== null && api !== void 0 && api.quickInsert)
110
115
  });
@@ -1,8 +1,10 @@
1
1
  import React from 'react';
2
2
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import { isSSR } from '@atlaskit/editor-common/core-utils';
3
4
  import { openHelp, tooltip } from '@atlaskit/editor-common/keymaps';
4
5
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
5
6
  import QuestionCircleIcon from '@atlaskit/icon/core/migration/question-circle';
7
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
8
  import { closeHelpAction, openHelpAction } from './pm-plugins/actions';
7
9
  import { openHelpCommand } from './pm-plugins/commands';
8
10
  import { keymapPlugin } from './pm-plugins/keymap';
@@ -92,11 +94,14 @@ export const helpDialogPlugin = ({
92
94
  contentComponent({
93
95
  editorView
94
96
  }) {
95
- if (!editorView) {
97
+ if (expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) && (!editorView || isSSR())) {
96
98
  return null;
97
99
  }
98
100
  return /*#__PURE__*/React.createElement(HelpDialogLoader, {
99
- pluginInjectionApi: api,
101
+ pluginInjectionApi: api
102
+ // temp non null assertion until platform_editor_hydratable_ui cleaned up
103
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
104
+ ,
100
105
  editorView: editorView,
101
106
  quickInsertEnabled: !!(api !== null && api !== void 0 && api.quickInsert)
102
107
  });
@@ -1,8 +1,10 @@
1
1
  import React from 'react';
2
2
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import { isSSR } from '@atlaskit/editor-common/core-utils';
3
4
  import { openHelp, tooltip } from '@atlaskit/editor-common/keymaps';
4
5
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
5
6
  import QuestionCircleIcon from '@atlaskit/icon/core/migration/question-circle';
7
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
8
  import { closeHelpAction, openHelpAction } from './pm-plugins/actions';
7
9
  import { openHelpCommand } from './pm-plugins/commands';
8
10
  import { keymapPlugin } from './pm-plugins/keymap';
@@ -94,11 +96,14 @@ export var helpDialogPlugin = function helpDialogPlugin(_ref2) {
94
96
  },
95
97
  contentComponent: function contentComponent(_ref5) {
96
98
  var editorView = _ref5.editorView;
97
- if (!editorView) {
99
+ if (expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) && (!editorView || isSSR())) {
98
100
  return null;
99
101
  }
100
102
  return /*#__PURE__*/React.createElement(HelpDialogLoader, {
101
- pluginInjectionApi: api,
103
+ pluginInjectionApi: api
104
+ // temp non null assertion until platform_editor_hydratable_ui cleaned up
105
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
106
+ ,
102
107
  editorView: editorView,
103
108
  quickInsertEnabled: !!(api !== null && api !== void 0 && api.quickInsert)
104
109
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-help-dialog",
3
- "version": "5.0.3",
3
+ "version": "5.0.4",
4
4
  "description": "Help Dialog plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,12 +34,12 @@
34
34
  "@atlaskit/editor-prosemirror": "7.0.0",
35
35
  "@atlaskit/editor-shared-styles": "^3.6.0",
36
36
  "@atlaskit/heading": "^5.2.0",
37
- "@atlaskit/icon": "^28.1.0",
37
+ "@atlaskit/icon": "^28.2.0",
38
38
  "@atlaskit/modal-dialog": "^14.3.0",
39
39
  "@atlaskit/platform-feature-flags": "^1.1.0",
40
40
  "@atlaskit/primitives": "^14.14.0",
41
41
  "@atlaskit/theme": "^21.0.0",
42
- "@atlaskit/tmp-editor-statsig": "^12.21.0",
42
+ "@atlaskit/tmp-editor-statsig": "^12.25.0",
43
43
  "@atlaskit/tokens": "^6.3.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "@emotion/react": "^11.7.1",
@@ -50,7 +50,7 @@
50
50
  "@testing-library/react": "^13.4.0"
51
51
  },
52
52
  "peerDependencies": {
53
- "@atlaskit/editor-common": "^109.6.0",
53
+ "@atlaskit/editor-common": "^109.9.0",
54
54
  "react": "^18.2.0"
55
55
  },
56
56
  "techstack": {