@atlaskit/editor-plugin-find-replace 25.0.3 → 26.0.1
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 +18 -0
- package/dist/cjs/findReplacePlugin.js +1 -2
- package/dist/cjs/ui/FindReplaceToolbarButton.js +3 -23
- package/dist/es2019/findReplacePlugin.js +1 -2
- package/dist/es2019/ui/FindReplaceToolbarButton.js +3 -23
- package/dist/esm/findReplacePlugin.js +1 -2
- package/dist/esm/ui/FindReplaceToolbarButton.js +3 -23
- package/package.json +12 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-find-replace
|
|
2
2
|
|
|
3
|
+
## 26.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 26.0.0
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`92fc57a354c33`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/92fc57a354c33) -
|
|
14
|
+
Clean up feature gate `platform_editor_toolbar_responsive_fixes`. The responsive toolbar behaviour
|
|
15
|
+
is now permanently enabled. Remove the obsolete `ToolbarWidths` and `ToolbarWidthsFullPage`
|
|
16
|
+
exports; consumers should use `ToolbarWidthsNext` and `ToolbarWidthsFullPageNext`. Also remove the
|
|
17
|
+
unread `BlockTypePluginOptions.isUndoRedoButtonsEnabled` option, which no longer affects toolbar
|
|
18
|
+
sizing.
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 25.0.3
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -10,7 +10,6 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
10
10
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
11
11
|
var _types = require("@atlaskit/editor-common/types");
|
|
12
12
|
var _unsafeExpValNoExposure = require("@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure");
|
|
13
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
14
13
|
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
15
14
|
var _commands = require("./pm-plugins/commands");
|
|
16
15
|
var _commandsWithAnalytics = require("./pm-plugins/commands-with-analytics");
|
|
@@ -41,7 +40,7 @@ var findReplacePlugin = exports.findReplacePlugin = function findReplacePlugin(_
|
|
|
41
40
|
if (!editorView) {
|
|
42
41
|
return null;
|
|
43
42
|
}
|
|
44
|
-
var isButtonHidden =
|
|
43
|
+
var isButtonHidden = toolbarSize < _types.ToolbarSize.XL;
|
|
45
44
|
if (props !== null && props !== void 0 && props.twoLineEditorToolbar) {
|
|
46
45
|
return null;
|
|
47
46
|
} else if (toolbarButtonRegisteredExternally.current && (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
@@ -22,7 +22,6 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
22
22
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
23
23
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
24
24
|
var _search = _interopRequireDefault(require("@atlaskit/icon/core/search"));
|
|
25
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
26
25
|
var _FindReplace = _interopRequireDefault(require("./FindReplace"));
|
|
27
26
|
var _templateObject;
|
|
28
27
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
@@ -115,7 +114,7 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
115
114
|
var stackBelowOtherEditorFloatingPanels = _editorSharedStyles.akEditorFloatingPanelZIndex - 1;
|
|
116
115
|
var keymap = (0, _keymaps.findKeymapByDescription)('Find');
|
|
117
116
|
return (0, _react2.jsx)("div", {
|
|
118
|
-
css: [toolbarButtonWrapper, takeFullWidth && toolbarButtonWrapperFullWidth, isButtonHidden &&
|
|
117
|
+
css: [toolbarButtonWrapper, takeFullWidth && toolbarButtonWrapperFullWidth, isButtonHidden && toolbarButtonWrapperHidden]
|
|
119
118
|
}, (0, _react2.jsx)(_uiMenu.Dropdown, {
|
|
120
119
|
mountTo: popupsMountPoint,
|
|
121
120
|
boundariesElement: popupsBoundariesElement,
|
|
@@ -144,7 +143,7 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
144
143
|
type: _uiMenu.ArrowKeyNavigationType.MENU,
|
|
145
144
|
disableArrowKeyNavigation: true
|
|
146
145
|
},
|
|
147
|
-
trigger: (0,
|
|
146
|
+
trigger: (0, _react2.jsx)(TriggerButtonWrapper, {
|
|
148
147
|
isButtonHidden: isButtonHidden
|
|
149
148
|
}, (0, _react2.jsx)(_uiMenu.ToolbarButton, {
|
|
150
149
|
buttonId: _uiMenu.TOOLBAR_BUTTON.FIND_REPLACE,
|
|
@@ -165,26 +164,7 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
165
164
|
"aria-label": keymap ? (0, _keymaps.tooltip)(keymap, title) : title,
|
|
166
165
|
"aria-keyshortcuts": (0, _keymaps.getAriaKeyshortcuts)(keymap),
|
|
167
166
|
ref: this.toolbarButtonRef
|
|
168
|
-
}))
|
|
169
|
-
buttonId: _uiMenu.TOOLBAR_BUTTON.FIND_REPLACE,
|
|
170
|
-
testId: "editor-toolbar__".concat(_uiMenu.TOOLBAR_BUTTON.FIND_REPLACE),
|
|
171
|
-
spacing: isReducedSpacing ? 'none' : 'default',
|
|
172
|
-
selected: isActive,
|
|
173
|
-
title: (0, _react2.jsx)(_keymaps.ToolTipContent, {
|
|
174
|
-
description: title,
|
|
175
|
-
keymap: keymap
|
|
176
|
-
}),
|
|
177
|
-
iconBefore: (0, _react2.jsx)(_search.default, {
|
|
178
|
-
label: title,
|
|
179
|
-
spacing: "spacious"
|
|
180
|
-
}),
|
|
181
|
-
onClick: this.toggleOpen,
|
|
182
|
-
"aria-expanded": isActive,
|
|
183
|
-
"aria-haspopup": true,
|
|
184
|
-
"aria-label": keymap ? (0, _keymaps.tooltip)(keymap, title) : title,
|
|
185
|
-
"aria-keyshortcuts": (0, _keymaps.getAriaKeyshortcuts)(keymap),
|
|
186
|
-
ref: this.toolbarButtonRef
|
|
187
|
-
})
|
|
167
|
+
}))
|
|
188
168
|
}, (0, _react2.jsx)("div", {
|
|
189
169
|
css: wrapper
|
|
190
170
|
}, (0, _react2.jsx)(_FindReplace.default, (0, _extends2.default)({
|
|
@@ -3,7 +3,6 @@ import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
5
5
|
import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
6
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
8
7
|
import { activate } from './pm-plugins/commands';
|
|
9
8
|
import { activateWithAnalytics } from './pm-plugins/commands-with-analytics';
|
|
@@ -36,7 +35,7 @@ export const findReplacePlugin = ({
|
|
|
36
35
|
if (!editorView) {
|
|
37
36
|
return null;
|
|
38
37
|
}
|
|
39
|
-
const isButtonHidden =
|
|
38
|
+
const isButtonHidden = toolbarSize < ToolbarSize.XL;
|
|
40
39
|
if (props !== null && props !== void 0 && props.twoLineEditorToolbar) {
|
|
41
40
|
return null;
|
|
42
41
|
} else if (toolbarButtonRegisteredExternally.current && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
@@ -17,7 +17,6 @@ import { findReplaceMessages as messages } from '@atlaskit/editor-common/message
|
|
|
17
17
|
import { ArrowKeyNavigationType, Dropdown, TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
18
18
|
import { akEditorFloatingPanelZIndex, akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
19
19
|
import SearchIcon from '@atlaskit/icon/core/search';
|
|
20
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
21
20
|
import FindReplace from './FindReplace';
|
|
22
21
|
|
|
23
22
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
@@ -106,7 +105,7 @@ class FindReplaceToolbarButton extends React.PureComponent {
|
|
|
106
105
|
const stackBelowOtherEditorFloatingPanels = akEditorFloatingPanelZIndex - 1;
|
|
107
106
|
const keymap = findKeymapByDescription('Find');
|
|
108
107
|
return jsx("div", {
|
|
109
|
-
css: [toolbarButtonWrapper, takeFullWidth && toolbarButtonWrapperFullWidth, isButtonHidden &&
|
|
108
|
+
css: [toolbarButtonWrapper, takeFullWidth && toolbarButtonWrapperFullWidth, isButtonHidden && toolbarButtonWrapperHidden]
|
|
110
109
|
}, jsx(Dropdown, {
|
|
111
110
|
mountTo: popupsMountPoint,
|
|
112
111
|
boundariesElement: popupsBoundariesElement,
|
|
@@ -135,7 +134,7 @@ class FindReplaceToolbarButton extends React.PureComponent {
|
|
|
135
134
|
type: ArrowKeyNavigationType.MENU,
|
|
136
135
|
disableArrowKeyNavigation: true
|
|
137
136
|
},
|
|
138
|
-
trigger:
|
|
137
|
+
trigger: jsx(TriggerButtonWrapper, {
|
|
139
138
|
isButtonHidden: isButtonHidden
|
|
140
139
|
}, jsx(ToolbarButton, {
|
|
141
140
|
buttonId: TOOLBAR_BUTTON.FIND_REPLACE,
|
|
@@ -156,26 +155,7 @@ class FindReplaceToolbarButton extends React.PureComponent {
|
|
|
156
155
|
"aria-label": keymap ? tooltip(keymap, title) : title,
|
|
157
156
|
"aria-keyshortcuts": getAriaKeyshortcuts(keymap),
|
|
158
157
|
ref: this.toolbarButtonRef
|
|
159
|
-
}))
|
|
160
|
-
buttonId: TOOLBAR_BUTTON.FIND_REPLACE,
|
|
161
|
-
testId: `editor-toolbar__${TOOLBAR_BUTTON.FIND_REPLACE}`,
|
|
162
|
-
spacing: isReducedSpacing ? 'none' : 'default',
|
|
163
|
-
selected: isActive,
|
|
164
|
-
title: jsx(ToolTipContent, {
|
|
165
|
-
description: title,
|
|
166
|
-
keymap: keymap
|
|
167
|
-
}),
|
|
168
|
-
iconBefore: jsx(SearchIcon, {
|
|
169
|
-
label: title,
|
|
170
|
-
spacing: "spacious"
|
|
171
|
-
}),
|
|
172
|
-
onClick: this.toggleOpen,
|
|
173
|
-
"aria-expanded": isActive,
|
|
174
|
-
"aria-haspopup": true,
|
|
175
|
-
"aria-label": keymap ? tooltip(keymap, title) : title,
|
|
176
|
-
"aria-keyshortcuts": getAriaKeyshortcuts(keymap),
|
|
177
|
-
ref: this.toolbarButtonRef
|
|
178
|
-
})
|
|
158
|
+
}))
|
|
179
159
|
}, jsx("div", {
|
|
180
160
|
css: wrapper
|
|
181
161
|
}, jsx(FindReplace, _extends({
|
|
@@ -3,7 +3,6 @@ import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
5
5
|
import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
6
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
8
7
|
import { activate } from './pm-plugins/commands';
|
|
9
8
|
import { activateWithAnalytics } from './pm-plugins/commands-with-analytics';
|
|
@@ -34,7 +33,7 @@ export var findReplacePlugin = function findReplacePlugin(_ref) {
|
|
|
34
33
|
if (!editorView) {
|
|
35
34
|
return null;
|
|
36
35
|
}
|
|
37
|
-
var isButtonHidden =
|
|
36
|
+
var isButtonHidden = toolbarSize < ToolbarSize.XL;
|
|
38
37
|
if (props !== null && props !== void 0 && props.twoLineEditorToolbar) {
|
|
39
38
|
return null;
|
|
40
39
|
} else if (toolbarButtonRegisteredExternally.current && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
@@ -26,7 +26,6 @@ import { findReplaceMessages as messages } from '@atlaskit/editor-common/message
|
|
|
26
26
|
import { ArrowKeyNavigationType, Dropdown, TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
27
27
|
import { akEditorFloatingPanelZIndex, akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
28
28
|
import SearchIcon from '@atlaskit/icon/core/search';
|
|
29
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
30
29
|
import FindReplace from './FindReplace';
|
|
31
30
|
|
|
32
31
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
@@ -111,7 +110,7 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
111
110
|
var stackBelowOtherEditorFloatingPanels = akEditorFloatingPanelZIndex - 1;
|
|
112
111
|
var keymap = findKeymapByDescription('Find');
|
|
113
112
|
return jsx("div", {
|
|
114
|
-
css: [toolbarButtonWrapper, takeFullWidth && toolbarButtonWrapperFullWidth, isButtonHidden &&
|
|
113
|
+
css: [toolbarButtonWrapper, takeFullWidth && toolbarButtonWrapperFullWidth, isButtonHidden && toolbarButtonWrapperHidden]
|
|
115
114
|
}, jsx(Dropdown, {
|
|
116
115
|
mountTo: popupsMountPoint,
|
|
117
116
|
boundariesElement: popupsBoundariesElement,
|
|
@@ -140,7 +139,7 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
140
139
|
type: ArrowKeyNavigationType.MENU,
|
|
141
140
|
disableArrowKeyNavigation: true
|
|
142
141
|
},
|
|
143
|
-
trigger:
|
|
142
|
+
trigger: jsx(TriggerButtonWrapper, {
|
|
144
143
|
isButtonHidden: isButtonHidden
|
|
145
144
|
}, jsx(ToolbarButton, {
|
|
146
145
|
buttonId: TOOLBAR_BUTTON.FIND_REPLACE,
|
|
@@ -161,26 +160,7 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
161
160
|
"aria-label": keymap ? tooltip(keymap, title) : title,
|
|
162
161
|
"aria-keyshortcuts": getAriaKeyshortcuts(keymap),
|
|
163
162
|
ref: this.toolbarButtonRef
|
|
164
|
-
}))
|
|
165
|
-
buttonId: TOOLBAR_BUTTON.FIND_REPLACE,
|
|
166
|
-
testId: "editor-toolbar__".concat(TOOLBAR_BUTTON.FIND_REPLACE),
|
|
167
|
-
spacing: isReducedSpacing ? 'none' : 'default',
|
|
168
|
-
selected: isActive,
|
|
169
|
-
title: jsx(ToolTipContent, {
|
|
170
|
-
description: title,
|
|
171
|
-
keymap: keymap
|
|
172
|
-
}),
|
|
173
|
-
iconBefore: jsx(SearchIcon, {
|
|
174
|
-
label: title,
|
|
175
|
-
spacing: "spacious"
|
|
176
|
-
}),
|
|
177
|
-
onClick: this.toggleOpen,
|
|
178
|
-
"aria-expanded": isActive,
|
|
179
|
-
"aria-haspopup": true,
|
|
180
|
-
"aria-label": keymap ? tooltip(keymap, title) : title,
|
|
181
|
-
"aria-keyshortcuts": getAriaKeyshortcuts(keymap),
|
|
182
|
-
ref: this.toolbarButtonRef
|
|
183
|
-
})
|
|
163
|
+
}))
|
|
184
164
|
}, jsx("div", {
|
|
185
165
|
css: wrapper
|
|
186
166
|
}, jsx(FindReplace, _extends({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-find-replace",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.0.1",
|
|
4
4
|
"description": "find replace plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"atlaskit:src": "src/index.ts",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@atlaskit/button": "^25.4.0",
|
|
24
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
25
|
-
"@atlaskit/editor-plugin-block-collapse": "^
|
|
26
|
-
"@atlaskit/editor-plugin-card": "^
|
|
27
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
28
|
-
"@atlaskit/editor-plugin-expand": "^
|
|
29
|
-
"@atlaskit/editor-plugin-mentions": "^
|
|
30
|
-
"@atlaskit/editor-plugin-primary-toolbar": "^
|
|
31
|
-
"@atlaskit/editor-plugin-synced-block": "^
|
|
24
|
+
"@atlaskit/editor-plugin-analytics": "^26.0.0",
|
|
25
|
+
"@atlaskit/editor-plugin-block-collapse": "^12.0.0",
|
|
26
|
+
"@atlaskit/editor-plugin-card": "^32.1.0",
|
|
27
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^28.0.0",
|
|
28
|
+
"@atlaskit/editor-plugin-expand": "^27.0.0",
|
|
29
|
+
"@atlaskit/editor-plugin-mentions": "^28.0.0",
|
|
30
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^27.0.0",
|
|
31
|
+
"@atlaskit/editor-plugin-synced-block": "^24.0.0",
|
|
32
32
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
33
33
|
"@atlaskit/editor-shared-styles": "^4.3.0",
|
|
34
34
|
"@atlaskit/form": "^18.2.0",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"@atlaskit/platform-feature-flags-react": "^1.2.0",
|
|
41
41
|
"@atlaskit/primitives": "^22.5.0",
|
|
42
42
|
"@atlaskit/textfield": "^10.2.0",
|
|
43
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
44
|
-
"@atlaskit/tokens": "^20.
|
|
43
|
+
"@atlaskit/tmp-editor-statsig": "^228.0.0",
|
|
44
|
+
"@atlaskit/tokens": "^20.4.0",
|
|
45
45
|
"@atlaskit/tooltip": "^24.4.0",
|
|
46
46
|
"@babel/runtime": "^7.0.0",
|
|
47
47
|
"@emotion/react": "^11.7.1",
|
|
@@ -60,13 +60,8 @@
|
|
|
60
60
|
"react-intl": "^7.0.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@atlaskit/editor-common": "^
|
|
63
|
+
"@atlaskit/editor-common": "^130.1.0",
|
|
64
64
|
"react": "^18.2.0 || ^19.2.0",
|
|
65
65
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
66
|
-
},
|
|
67
|
-
"platform-feature-flags": {
|
|
68
|
-
"platform_editor_toolbar_responsive_fixes": {
|
|
69
|
-
"type": "boolean"
|
|
70
|
-
}
|
|
71
66
|
}
|
|
72
67
|
}
|