@atlaskit/editor-plugin-find-replace 1.5.1 → 1.6.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-find-replace
2
2
 
3
+ ## 1.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#126478](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/126478)
8
+ [`ca1665ebbfe4d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ca1665ebbfe4d) -
9
+ [ED-23435] Store primary toolbar component registry in a plugin variable instead of in plugin
10
+ state to avoid having to add effects to all plugins and enable SSR for the toolbar. [Breaking
11
+ change] Converted registerComponent from the primary toolbar plugin into an action.
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 1.5.1
4
18
 
5
19
  ### Patch Changes
@@ -11,6 +11,7 @@ var _keymap = _interopRequireDefault(require("./pm-plugins/keymap"));
11
11
  var _main = require("./pm-plugins/main");
12
12
  var _pluginKey = require("./pm-plugins/plugin-key");
13
13
  var findReplacePlugin = exports.findReplacePlugin = function findReplacePlugin(_ref) {
14
+ var _api$primaryToolbar;
14
15
  var props = _ref.config,
15
16
  api = _ref.api;
16
17
  var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
@@ -37,6 +38,10 @@ var findReplacePlugin = exports.findReplacePlugin = function findReplacePlugin(_
37
38
  });
38
39
  }
39
40
  };
41
+ api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
42
+ name: 'findReplace',
43
+ component: primaryToolbarComponent
44
+ });
40
45
  return {
41
46
  name: 'findReplace',
42
47
  pmPlugins: function pmPlugins() {
@@ -81,13 +86,6 @@ var findReplacePlugin = exports.findReplacePlugin = function findReplacePlugin(_
81
86
  });
82
87
  }
83
88
  },
84
- usePluginHook: function usePluginHook() {
85
- var _api$core, _api$primaryToolbar;
86
- api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
87
- name: 'findReplace',
88
- component: primaryToolbarComponent
89
- }));
90
- },
91
89
  primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
92
90
  };
93
91
  };
@@ -7,6 +7,7 @@ export const findReplacePlugin = ({
7
7
  config: props,
8
8
  api
9
9
  }) => {
10
+ var _api$primaryToolbar;
10
11
  const primaryToolbarComponent = ({
11
12
  popupsBoundariesElement,
12
13
  popupsMountPoint,
@@ -32,6 +33,10 @@ export const findReplacePlugin = ({
32
33
  });
33
34
  }
34
35
  };
36
+ api === null || api === void 0 ? void 0 : (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.actions.registerComponent({
37
+ name: 'findReplace',
38
+ component: primaryToolbarComponent
39
+ });
35
40
  return {
36
41
  name: 'findReplace',
37
42
  pmPlugins() {
@@ -76,13 +81,6 @@ export const findReplacePlugin = ({
76
81
  });
77
82
  }
78
83
  },
79
- usePluginHook: () => {
80
- var _api$core, _api$primaryToolbar;
81
- api === null || api === void 0 ? void 0 : (_api$core = api.core) === null || _api$core === void 0 ? void 0 : _api$core.actions.execute(api === null || api === void 0 ? void 0 : (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
82
- name: 'findReplace',
83
- component: primaryToolbarComponent
84
- }));
85
- },
86
84
  primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
87
85
  };
88
86
  };
@@ -4,6 +4,7 @@ import keymapPlugin from './pm-plugins/keymap';
4
4
  import { createPlugin } from './pm-plugins/main';
5
5
  import { findReplacePluginKey } from './pm-plugins/plugin-key';
6
6
  export var findReplacePlugin = function findReplacePlugin(_ref) {
7
+ var _api$primaryToolbar;
7
8
  var props = _ref.config,
8
9
  api = _ref.api;
9
10
  var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
@@ -30,6 +31,10 @@ export var findReplacePlugin = function findReplacePlugin(_ref) {
30
31
  });
31
32
  }
32
33
  };
34
+ api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
35
+ name: 'findReplace',
36
+ component: primaryToolbarComponent
37
+ });
33
38
  return {
34
39
  name: 'findReplace',
35
40
  pmPlugins: function pmPlugins() {
@@ -74,13 +79,6 @@ export var findReplacePlugin = function findReplacePlugin(_ref) {
74
79
  });
75
80
  }
76
81
  },
77
- usePluginHook: function usePluginHook() {
78
- var _api$core, _api$primaryToolbar;
79
- api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
80
- name: 'findReplace',
81
- component: primaryToolbarComponent
82
- }));
83
- },
84
82
  primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
85
83
  };
86
84
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-find-replace",
3
- "version": "1.5.1",
3
+ "version": "1.6.0",
4
4
  "description": "find replace plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -35,13 +35,13 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@atlaskit/button": "^19.1.0",
38
- "@atlaskit/editor-common": "^87.0.0",
38
+ "@atlaskit/editor-common": "^87.3.0",
39
39
  "@atlaskit/editor-plugin-analytics": "^1.6.0",
40
- "@atlaskit/editor-plugin-primary-toolbar": "^1.3.0",
40
+ "@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
41
41
  "@atlaskit/editor-prosemirror": "5.0.1",
42
42
  "@atlaskit/editor-shared-styles": "^2.13.0",
43
43
  "@atlaskit/form": "^10.4.0",
44
- "@atlaskit/icon": "^22.7.0",
44
+ "@atlaskit/icon": "^22.9.0",
45
45
  "@atlaskit/platform-feature-flags": "^0.3.0",
46
46
  "@atlaskit/primitives": "^11.1.0",
47
47
  "@atlaskit/textfield": "^6.4.0",
@@ -55,8 +55,8 @@
55
55
  },
56
56
  "devDependencies": {
57
57
  "@af/visual-regression": "*",
58
- "@atlaskit/editor-plugin-block-type": "^3.10.0",
59
- "@atlaskit/editor-plugin-text-formatting": "^1.11.0",
58
+ "@atlaskit/editor-plugin-block-type": "^3.11.0",
59
+ "@atlaskit/editor-plugin-text-formatting": "^1.12.0",
60
60
  "@testing-library/react": "^12.1.5",
61
61
  "@testing-library/user-event": "^14.4.3",
62
62
  "mockdate": "^3.0.5",