@atlaskit/editor-plugin-type-ahead 1.13.1 → 1.13.2

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,13 @@
1
1
  # @atlaskit/editor-plugin-type-ahead
2
2
 
3
+ ## 1.13.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#112186](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/112186)
8
+ [`9462d8ca2405a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9462d8ca2405a) -
9
+ Bump adf-schema to 47.2.1
10
+
3
11
  ## 1.13.1
4
12
 
5
13
  ### Patch Changes
@@ -6,14 +6,12 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.factoryDecorations = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var _reactDom = _interopRequireDefault(require("react-dom"));
10
9
  var _reactIntlNext = require("react-intl-next");
11
10
  var _uuid = _interopRequireDefault(require("uuid"));
12
11
  var _w3cKeyname = require("w3c-keyname");
13
12
  var _history = require("@atlaskit/editor-prosemirror/history");
14
13
  var _state = require("@atlaskit/editor-prosemirror/state");
15
14
  var _view = require("@atlaskit/editor-prosemirror/view");
16
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
15
  var _colors = require("@atlaskit/theme/colors");
18
16
  var _WrapperTypeAhead = require("../ui/WrapperTypeAhead");
19
17
  var _closeTypeAhead = require("./commands/close-type-ahead");
@@ -86,31 +84,9 @@ var factoryDecorations = exports.factoryDecorations = function factoryDecoration
86
84
  }
87
85
  return false;
88
86
  };
89
- if ((0, _platformFeatureFlags.fg)('platform_editor_react18_plugin_portalprovider')) {
90
- nodeViewPortalProviderAPI.render(function () {
91
- var _popupMountRef$curren, _popupMountRef$curren2, _popupMountRef$curren3;
92
- return /*#__PURE__*/_react.default.createElement(_reactIntlNext.IntlProvider, {
93
- locale: intl.locale || 'en',
94
- messages: intl.messages,
95
- formats: intl.formats
96
- }, /*#__PURE__*/_react.default.createElement(_WrapperTypeAhead.WrapperTypeAhead, {
97
- triggerHandler: triggerHandler,
98
- editorView: editorView,
99
- anchorElement: typeaheadComponent,
100
- inputMethod: inputMethod,
101
- getDecorationPosition: getDecorationPosition,
102
- shouldFocusCursorInsideQuery: shouldFocusCursorInsideQuery,
103
- popupsMountPoint: (_popupMountRef$curren = popupMountRef.current) === null || _popupMountRef$curren === void 0 ? void 0 : _popupMountRef$curren.popupsMountPoint,
104
- popupsBoundariesElement: (_popupMountRef$curren2 = popupMountRef.current) === null || _popupMountRef$curren2 === void 0 ? void 0 : _popupMountRef$curren2.popupsBoundariesElement,
105
- popupsScrollableElement: (_popupMountRef$curren3 = popupMountRef.current) === null || _popupMountRef$curren3 === void 0 ? void 0 : _popupMountRef$curren3.popupsScrollableElement,
106
- onUndoRedo: onUndoRedo,
107
- reopenQuery: reopenQuery,
108
- api: api
109
- }));
110
- }, typeaheadComponent, decorationId);
111
- } else {
112
- var _popupMountRef$curren4, _popupMountRef$curren5, _popupMountRef$curren6;
113
- _reactDom.default.render( /*#__PURE__*/_react.default.createElement(_reactIntlNext.IntlProvider, {
87
+ nodeViewPortalProviderAPI.render(function () {
88
+ var _popupMountRef$curren, _popupMountRef$curren2, _popupMountRef$curren3;
89
+ return /*#__PURE__*/_react.default.createElement(_reactIntlNext.IntlProvider, {
114
90
  locale: intl.locale || 'en',
115
91
  messages: intl.messages,
116
92
  formats: intl.formats
@@ -121,14 +97,14 @@ var factoryDecorations = exports.factoryDecorations = function factoryDecoration
121
97
  inputMethod: inputMethod,
122
98
  getDecorationPosition: getDecorationPosition,
123
99
  shouldFocusCursorInsideQuery: shouldFocusCursorInsideQuery,
124
- popupsMountPoint: (_popupMountRef$curren4 = popupMountRef.current) === null || _popupMountRef$curren4 === void 0 ? void 0 : _popupMountRef$curren4.popupsMountPoint,
125
- popupsBoundariesElement: (_popupMountRef$curren5 = popupMountRef.current) === null || _popupMountRef$curren5 === void 0 ? void 0 : _popupMountRef$curren5.popupsBoundariesElement,
126
- popupsScrollableElement: (_popupMountRef$curren6 = popupMountRef.current) === null || _popupMountRef$curren6 === void 0 ? void 0 : _popupMountRef$curren6.popupsScrollableElement,
100
+ popupsMountPoint: (_popupMountRef$curren = popupMountRef.current) === null || _popupMountRef$curren === void 0 ? void 0 : _popupMountRef$curren.popupsMountPoint,
101
+ popupsBoundariesElement: (_popupMountRef$curren2 = popupMountRef.current) === null || _popupMountRef$curren2 === void 0 ? void 0 : _popupMountRef$curren2.popupsBoundariesElement,
102
+ popupsScrollableElement: (_popupMountRef$curren3 = popupMountRef.current) === null || _popupMountRef$curren3 === void 0 ? void 0 : _popupMountRef$curren3.popupsScrollableElement,
127
103
  onUndoRedo: onUndoRedo,
128
104
  reopenQuery: reopenQuery,
129
105
  api: api
130
- })), typeaheadComponent);
131
- }
106
+ }));
107
+ }, typeaheadComponent, decorationId);
132
108
  shouldFocusCursorInsideQuery = false;
133
109
  return typeaheadComponent;
134
110
  }, {
@@ -170,11 +146,7 @@ var factoryDecorations = exports.factoryDecorations = function factoryDecoration
170
146
  if (!decoElement) {
171
147
  return;
172
148
  }
173
- if ((0, _platformFeatureFlags.fg)('platform_editor_react18_plugin_portalprovider')) {
174
- nodeViewPortalProviderAPI.remove(spec.key);
175
- } else {
176
- _reactDom.default.unmountComponentAtNode(decoElement);
177
- }
149
+ nodeViewPortalProviderAPI.remove(spec.key);
178
150
  });
179
151
  return true;
180
152
  };
@@ -1,12 +1,10 @@
1
1
  import React from 'react';
2
- import ReactDOM from 'react-dom';
3
2
  import { IntlProvider } from 'react-intl-next';
4
3
  import uuid from 'uuid';
5
4
  import { keyName as keyNameNormalized } from 'w3c-keyname';
6
5
  import { redo, undo } from '@atlaskit/editor-prosemirror/history';
7
6
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
8
7
  import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
8
  import { B400 } from '@atlaskit/theme/colors';
11
9
  import { WrapperTypeAhead } from '../ui/WrapperTypeAhead';
12
10
  import { closeTypeAhead } from './commands/close-type-ahead';
@@ -85,31 +83,9 @@ export const factoryDecorations = ({
85
83
  }
86
84
  return false;
87
85
  };
88
- if (fg('platform_editor_react18_plugin_portalprovider')) {
89
- nodeViewPortalProviderAPI.render(() => {
90
- var _popupMountRef$curren, _popupMountRef$curren2, _popupMountRef$curren3;
91
- return /*#__PURE__*/React.createElement(IntlProvider, {
92
- locale: intl.locale || 'en',
93
- messages: intl.messages,
94
- formats: intl.formats
95
- }, /*#__PURE__*/React.createElement(WrapperTypeAhead, {
96
- triggerHandler: triggerHandler,
97
- editorView: editorView,
98
- anchorElement: typeaheadComponent,
99
- inputMethod: inputMethod,
100
- getDecorationPosition: getDecorationPosition,
101
- shouldFocusCursorInsideQuery: shouldFocusCursorInsideQuery,
102
- popupsMountPoint: (_popupMountRef$curren = popupMountRef.current) === null || _popupMountRef$curren === void 0 ? void 0 : _popupMountRef$curren.popupsMountPoint,
103
- popupsBoundariesElement: (_popupMountRef$curren2 = popupMountRef.current) === null || _popupMountRef$curren2 === void 0 ? void 0 : _popupMountRef$curren2.popupsBoundariesElement,
104
- popupsScrollableElement: (_popupMountRef$curren3 = popupMountRef.current) === null || _popupMountRef$curren3 === void 0 ? void 0 : _popupMountRef$curren3.popupsScrollableElement,
105
- onUndoRedo: onUndoRedo,
106
- reopenQuery: reopenQuery,
107
- api: api
108
- }));
109
- }, typeaheadComponent, decorationId);
110
- } else {
111
- var _popupMountRef$curren4, _popupMountRef$curren5, _popupMountRef$curren6;
112
- ReactDOM.render( /*#__PURE__*/React.createElement(IntlProvider, {
86
+ nodeViewPortalProviderAPI.render(() => {
87
+ var _popupMountRef$curren, _popupMountRef$curren2, _popupMountRef$curren3;
88
+ return /*#__PURE__*/React.createElement(IntlProvider, {
113
89
  locale: intl.locale || 'en',
114
90
  messages: intl.messages,
115
91
  formats: intl.formats
@@ -120,14 +96,14 @@ export const factoryDecorations = ({
120
96
  inputMethod: inputMethod,
121
97
  getDecorationPosition: getDecorationPosition,
122
98
  shouldFocusCursorInsideQuery: shouldFocusCursorInsideQuery,
123
- popupsMountPoint: (_popupMountRef$curren4 = popupMountRef.current) === null || _popupMountRef$curren4 === void 0 ? void 0 : _popupMountRef$curren4.popupsMountPoint,
124
- popupsBoundariesElement: (_popupMountRef$curren5 = popupMountRef.current) === null || _popupMountRef$curren5 === void 0 ? void 0 : _popupMountRef$curren5.popupsBoundariesElement,
125
- popupsScrollableElement: (_popupMountRef$curren6 = popupMountRef.current) === null || _popupMountRef$curren6 === void 0 ? void 0 : _popupMountRef$curren6.popupsScrollableElement,
99
+ popupsMountPoint: (_popupMountRef$curren = popupMountRef.current) === null || _popupMountRef$curren === void 0 ? void 0 : _popupMountRef$curren.popupsMountPoint,
100
+ popupsBoundariesElement: (_popupMountRef$curren2 = popupMountRef.current) === null || _popupMountRef$curren2 === void 0 ? void 0 : _popupMountRef$curren2.popupsBoundariesElement,
101
+ popupsScrollableElement: (_popupMountRef$curren3 = popupMountRef.current) === null || _popupMountRef$curren3 === void 0 ? void 0 : _popupMountRef$curren3.popupsScrollableElement,
126
102
  onUndoRedo: onUndoRedo,
127
103
  reopenQuery: reopenQuery,
128
104
  api: api
129
- })), typeaheadComponent);
130
- }
105
+ }));
106
+ }, typeaheadComponent, decorationId);
131
107
  shouldFocusCursorInsideQuery = false;
132
108
  return typeaheadComponent;
133
109
  }, {
@@ -170,11 +146,7 @@ export const factoryDecorations = ({
170
146
  if (!decoElement) {
171
147
  return;
172
148
  }
173
- if (fg('platform_editor_react18_plugin_portalprovider')) {
174
- nodeViewPortalProviderAPI.remove(spec.key);
175
- } else {
176
- ReactDOM.unmountComponentAtNode(decoElement);
177
- }
149
+ nodeViewPortalProviderAPI.remove(spec.key);
178
150
  });
179
151
  return true;
180
152
  };
@@ -1,12 +1,10 @@
1
1
  import React from 'react';
2
- import ReactDOM from 'react-dom';
3
2
  import { IntlProvider } from 'react-intl-next';
4
3
  import uuid from 'uuid';
5
4
  import { keyName as keyNameNormalized } from 'w3c-keyname';
6
5
  import { redo, undo } from '@atlaskit/editor-prosemirror/history';
7
6
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
8
7
  import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
8
  import { B400 } from '@atlaskit/theme/colors';
11
9
  import { WrapperTypeAhead } from '../ui/WrapperTypeAhead';
12
10
  import { closeTypeAhead } from './commands/close-type-ahead';
@@ -79,31 +77,9 @@ export var factoryDecorations = function factoryDecorations(_ref) {
79
77
  }
80
78
  return false;
81
79
  };
82
- if (fg('platform_editor_react18_plugin_portalprovider')) {
83
- nodeViewPortalProviderAPI.render(function () {
84
- var _popupMountRef$curren, _popupMountRef$curren2, _popupMountRef$curren3;
85
- return /*#__PURE__*/React.createElement(IntlProvider, {
86
- locale: intl.locale || 'en',
87
- messages: intl.messages,
88
- formats: intl.formats
89
- }, /*#__PURE__*/React.createElement(WrapperTypeAhead, {
90
- triggerHandler: triggerHandler,
91
- editorView: editorView,
92
- anchorElement: typeaheadComponent,
93
- inputMethod: inputMethod,
94
- getDecorationPosition: getDecorationPosition,
95
- shouldFocusCursorInsideQuery: shouldFocusCursorInsideQuery,
96
- popupsMountPoint: (_popupMountRef$curren = popupMountRef.current) === null || _popupMountRef$curren === void 0 ? void 0 : _popupMountRef$curren.popupsMountPoint,
97
- popupsBoundariesElement: (_popupMountRef$curren2 = popupMountRef.current) === null || _popupMountRef$curren2 === void 0 ? void 0 : _popupMountRef$curren2.popupsBoundariesElement,
98
- popupsScrollableElement: (_popupMountRef$curren3 = popupMountRef.current) === null || _popupMountRef$curren3 === void 0 ? void 0 : _popupMountRef$curren3.popupsScrollableElement,
99
- onUndoRedo: onUndoRedo,
100
- reopenQuery: reopenQuery,
101
- api: api
102
- }));
103
- }, typeaheadComponent, decorationId);
104
- } else {
105
- var _popupMountRef$curren4, _popupMountRef$curren5, _popupMountRef$curren6;
106
- ReactDOM.render( /*#__PURE__*/React.createElement(IntlProvider, {
80
+ nodeViewPortalProviderAPI.render(function () {
81
+ var _popupMountRef$curren, _popupMountRef$curren2, _popupMountRef$curren3;
82
+ return /*#__PURE__*/React.createElement(IntlProvider, {
107
83
  locale: intl.locale || 'en',
108
84
  messages: intl.messages,
109
85
  formats: intl.formats
@@ -114,14 +90,14 @@ export var factoryDecorations = function factoryDecorations(_ref) {
114
90
  inputMethod: inputMethod,
115
91
  getDecorationPosition: getDecorationPosition,
116
92
  shouldFocusCursorInsideQuery: shouldFocusCursorInsideQuery,
117
- popupsMountPoint: (_popupMountRef$curren4 = popupMountRef.current) === null || _popupMountRef$curren4 === void 0 ? void 0 : _popupMountRef$curren4.popupsMountPoint,
118
- popupsBoundariesElement: (_popupMountRef$curren5 = popupMountRef.current) === null || _popupMountRef$curren5 === void 0 ? void 0 : _popupMountRef$curren5.popupsBoundariesElement,
119
- popupsScrollableElement: (_popupMountRef$curren6 = popupMountRef.current) === null || _popupMountRef$curren6 === void 0 ? void 0 : _popupMountRef$curren6.popupsScrollableElement,
93
+ popupsMountPoint: (_popupMountRef$curren = popupMountRef.current) === null || _popupMountRef$curren === void 0 ? void 0 : _popupMountRef$curren.popupsMountPoint,
94
+ popupsBoundariesElement: (_popupMountRef$curren2 = popupMountRef.current) === null || _popupMountRef$curren2 === void 0 ? void 0 : _popupMountRef$curren2.popupsBoundariesElement,
95
+ popupsScrollableElement: (_popupMountRef$curren3 = popupMountRef.current) === null || _popupMountRef$curren3 === void 0 ? void 0 : _popupMountRef$curren3.popupsScrollableElement,
120
96
  onUndoRedo: onUndoRedo,
121
97
  reopenQuery: reopenQuery,
122
98
  api: api
123
- })), typeaheadComponent);
124
- }
99
+ }));
100
+ }, typeaheadComponent, decorationId);
125
101
  shouldFocusCursorInsideQuery = false;
126
102
  return typeaheadComponent;
127
103
  }, {
@@ -163,11 +139,7 @@ export var factoryDecorations = function factoryDecorations(_ref) {
163
139
  if (!decoElement) {
164
140
  return;
165
141
  }
166
- if (fg('platform_editor_react18_plugin_portalprovider')) {
167
- nodeViewPortalProviderAPI.remove(spec.key);
168
- } else {
169
- ReactDOM.unmountComponentAtNode(decoElement);
170
- }
142
+ nodeViewPortalProviderAPI.remove(spec.key);
171
143
  });
172
144
  return true;
173
145
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-type-ahead",
3
- "version": "1.13.1",
3
+ "version": "1.13.2",
4
4
  "description": "Type-ahead plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,8 +31,8 @@
31
31
  ".": "./src/index.ts"
32
32
  },
33
33
  "dependencies": {
34
- "@atlaskit/adf-schema": "^46.1.0",
35
- "@atlaskit/editor-common": "^99.11.0",
34
+ "@atlaskit/adf-schema": "^47.2.1",
35
+ "@atlaskit/editor-common": "^99.14.0",
36
36
  "@atlaskit/editor-element-browser": "^0.0.1",
37
37
  "@atlaskit/editor-plugin-analytics": "^1.12.0",
38
38
  "@atlaskit/editor-plugin-connectivity": "^1.3.0",
@@ -44,7 +44,7 @@
44
44
  "@atlaskit/primitives": "^13.5.0",
45
45
  "@atlaskit/prosemirror-input-rules": "^3.3.0",
46
46
  "@atlaskit/theme": "^15.0.0",
47
- "@atlaskit/tmp-editor-statsig": "^2.45.0",
47
+ "@atlaskit/tmp-editor-statsig": "^2.46.0",
48
48
  "@atlaskit/tokens": "^3.3.0",
49
49
  "@babel/runtime": "^7.0.0",
50
50
  "@emotion/react": "^11.7.1",
@@ -94,9 +94,6 @@
94
94
  "platform_editor_react18_phase2_v2": {
95
95
  "type": "boolean"
96
96
  },
97
- "platform_editor_react18_plugin_portalprovider": {
98
- "type": "boolean"
99
- },
100
97
  "platform_editor_offline_editing_ga": {
101
98
  "type": "boolean"
102
99
  }