@atlaskit/editor-plugin-find-replace 1.0.2 → 1.1.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/.eslintrc.js +4 -0
- package/CHANGELOG.md +37 -0
- package/dist/cjs/FindReplaceToolbarButtonWithState.js +0 -3
- package/dist/cjs/plugin.js +1 -9
- package/dist/cjs/ui/Find.js +3 -4
- package/dist/cjs/ui/Replace.js +5 -3
- package/dist/cjs/ui/styles.js +10 -4
- package/dist/es2019/FindReplaceToolbarButtonWithState.js +0 -5
- package/dist/es2019/plugin.js +1 -9
- package/dist/es2019/ui/Find.js +3 -4
- package/dist/es2019/ui/Replace.js +6 -4
- package/dist/es2019/ui/styles.js +8 -4
- package/dist/esm/FindReplaceToolbarButtonWithState.js +0 -3
- package/dist/esm/plugin.js +1 -9
- package/dist/esm/ui/Find.js +3 -4
- package/dist/esm/ui/Replace.js +6 -4
- package/dist/esm/ui/styles.js +9 -3
- package/dist/types/FindReplaceToolbarButtonWithState.d.ts +1 -1
- package/dist/types/types.d.ts +3 -8
- package/dist/types/ui/styles.d.ts +2 -1
- package/dist/types-ts4.5/FindReplaceToolbarButtonWithState.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +2 -5
- package/dist/types-ts4.5/ui/styles.d.ts +2 -1
- package/package.json +3 -4
package/.eslintrc.js
CHANGED
|
@@ -2,6 +2,10 @@ module.exports = {
|
|
|
2
2
|
rules: {
|
|
3
3
|
'@typescript-eslint/no-duplicate-imports': 'error',
|
|
4
4
|
'@typescript-eslint/no-explicit-any': 'error',
|
|
5
|
+
'@atlaskit/design-system/ensure-design-token-usage/preview': [
|
|
6
|
+
'error',
|
|
7
|
+
{ domains: ['spacing'], shouldEnforceFallbacks: false },
|
|
8
|
+
],
|
|
5
9
|
'@typescript-eslint/ban-types': [
|
|
6
10
|
'error',
|
|
7
11
|
{
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-find-replace
|
|
2
2
|
|
|
3
|
+
## 1.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#73177](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/73177) [`22452599ed8f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/22452599ed8f) - Move styling for certain packages to tokens.
|
|
8
|
+
|
|
9
|
+
## 1.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#72122](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72122) [`c3186450404a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c3186450404a) - Breaking change:
|
|
14
|
+
|
|
15
|
+
## WHAT?:
|
|
16
|
+
|
|
17
|
+
Removing feature flags:
|
|
18
|
+
|
|
19
|
+
- singleLayout
|
|
20
|
+
- newInsertionBehaviour
|
|
21
|
+
- interactiveExpand
|
|
22
|
+
- findReplace
|
|
23
|
+
- findReplaceMatchCase
|
|
24
|
+
- extendFloatingToolbar
|
|
25
|
+
|
|
26
|
+
## WHY?:
|
|
27
|
+
|
|
28
|
+
Because the flags and props are unused/by default active. Removing them will reduce our maintenance burden
|
|
29
|
+
|
|
30
|
+
## HOW to update your code:
|
|
31
|
+
|
|
32
|
+
- If you were using the feature flag - the behaviour is now default and you can remove the flags
|
|
33
|
+
- If you were not using the feature flag - the behaviour is now default.
|
|
34
|
+
- If you have opted out of using the feature flag - we have been careful to ensure no-one has opted out of the behaviours. If you do have an issue please reach out to #help-editor.
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- Updated dependencies
|
|
39
|
+
|
|
3
40
|
## 1.0.2
|
|
4
41
|
|
|
5
42
|
### Patch Changes
|
|
@@ -48,7 +48,6 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
|
|
|
48
48
|
editorView = _ref2.editorView,
|
|
49
49
|
containerElement = _ref2.containerElement,
|
|
50
50
|
dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
|
|
51
|
-
featureFlags = _ref2.featureFlags,
|
|
52
51
|
takeFullWidth = _ref2.takeFullWidth,
|
|
53
52
|
api = _ref2.api;
|
|
54
53
|
var editorAnalyticsAPI = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
@@ -135,12 +134,10 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
|
|
|
135
134
|
var handleToggleMatchCase = function handleToggleMatchCase() {
|
|
136
135
|
dispatchCommand((0, _commands.toggleMatchCase)());
|
|
137
136
|
};
|
|
138
|
-
var findReplaceMatchCase = featureFlags.findReplaceMatchCase;
|
|
139
137
|
if (!findReplaceState) {
|
|
140
138
|
return null;
|
|
141
139
|
}
|
|
142
140
|
return /*#__PURE__*/_react.default.createElement(_FindReplaceToolbarButton.default, {
|
|
143
|
-
allowMatchCase: findReplaceMatchCase,
|
|
144
141
|
shouldMatchCase: findReplaceState.shouldMatchCase,
|
|
145
142
|
onToggleMatchCase: handleToggleMatchCase,
|
|
146
143
|
isActive: findReplaceState.isActive,
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -11,10 +11,8 @@ 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$featureFlags;
|
|
15
14
|
var props = _ref.config,
|
|
16
15
|
api = _ref.api;
|
|
17
|
-
var featureFlags = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
18
16
|
return {
|
|
19
17
|
name: 'findReplace',
|
|
20
18
|
pmPlugins: function pmPlugins() {
|
|
@@ -53,12 +51,7 @@ var findReplacePlugin = exports.findReplacePlugin = function findReplacePlugin(_
|
|
|
53
51
|
popupsScrollableElement: popupsScrollableElement,
|
|
54
52
|
editorView: editorView,
|
|
55
53
|
containerElement: containerElement,
|
|
56
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
57
|
-
// `allowMatchCase` comes through the preset, but not the feature flags
|
|
58
|
-
// prop with the `ComposableEditor` - grab the FFs from the editor API
|
|
59
|
-
// instead until we clean this up.
|
|
60
|
-
,
|
|
61
|
-
featureFlags: featureFlags,
|
|
54
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
62
55
|
isToolbarReducedSpacing: isToolbarReducedSpacing,
|
|
63
56
|
api: api
|
|
64
57
|
});
|
|
@@ -84,7 +77,6 @@ var findReplacePlugin = exports.findReplacePlugin = function findReplacePlugin(_
|
|
|
84
77
|
containerElement: containerElement,
|
|
85
78
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
86
79
|
takeFullWidth: props === null || props === void 0 ? void 0 : props.takeFullWidth,
|
|
87
|
-
featureFlags: featureFlags,
|
|
88
80
|
api: api
|
|
89
81
|
});
|
|
90
82
|
}
|
package/dist/cjs/ui/Find.js
CHANGED
|
@@ -135,7 +135,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
135
135
|
});
|
|
136
136
|
});
|
|
137
137
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleMatchCaseClick", function (buttonRef) {
|
|
138
|
-
if (_this.props.
|
|
138
|
+
if (_this.props.onToggleMatchCase) {
|
|
139
139
|
_this.props.onToggleMatchCase();
|
|
140
140
|
_this.props.onFind(_this.props.findText);
|
|
141
141
|
}
|
|
@@ -216,7 +216,6 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
216
216
|
var _this$props = this.props,
|
|
217
217
|
findText = _this$props.findText,
|
|
218
218
|
count = _this$props.count,
|
|
219
|
-
allowMatchCase = _this$props.allowMatchCase,
|
|
220
219
|
shouldMatchCase = _this$props.shouldMatchCase,
|
|
221
220
|
formatMessage = _this$props.intl.formatMessage;
|
|
222
221
|
var resultsCount = formatMessage(_messages.findReplaceMessages.resultsCount, {
|
|
@@ -231,7 +230,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
231
230
|
}, findText && (0, _react2.jsx)("span", {
|
|
232
231
|
"data-testid": "textfield-count",
|
|
233
232
|
css: [_styles.countStyles, _styles.countStylesAlternateStyles]
|
|
234
|
-
}, count.total === 0 ? this.noResultsFound : resultsCount)),
|
|
233
|
+
}, count.total === 0 ? this.noResultsFound : resultsCount)), (0, _react2.jsx)("div", {
|
|
235
234
|
css: _styles.matchCaseSection
|
|
236
235
|
}, (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
237
236
|
title: this.matchCase,
|
|
@@ -286,7 +285,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
286
285
|
}, findText && (0, _react2.jsx)("span", {
|
|
287
286
|
"data-testid": "textfield-count",
|
|
288
287
|
css: _styles.countStyles
|
|
289
|
-
}, count.total === 0 ? this.noResultsFound : resultsCount)),
|
|
288
|
+
}, count.total === 0 ? this.noResultsFound : resultsCount)), (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
290
289
|
title: this.matchCase,
|
|
291
290
|
icon: this.matchCaseIcon,
|
|
292
291
|
newIcon: _keyboard.default,
|
package/dist/cjs/ui/Replace.js
CHANGED
|
@@ -253,7 +253,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
253
253
|
}, (0, _react2.jsx)("div", {
|
|
254
254
|
css: _styles.orderOneStyles
|
|
255
255
|
}, (0, _react2.jsx)("div", {
|
|
256
|
-
css: _styles.
|
|
256
|
+
css: _styles.nextPreviousItemStyles
|
|
257
257
|
}, (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
258
258
|
title: this.findNext,
|
|
259
259
|
icon: this.findNextIcon,
|
|
@@ -263,7 +263,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
263
263
|
onClick: this.handleFindNextClick,
|
|
264
264
|
disabled: count.total <= 1
|
|
265
265
|
})), (0, _react2.jsx)("div", {
|
|
266
|
-
css: _styles.
|
|
266
|
+
css: _styles.nextPreviousItemStyles
|
|
267
267
|
}, (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
268
268
|
title: this.findPrevious,
|
|
269
269
|
icon: this.findPrevIcon,
|
|
@@ -275,7 +275,9 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
275
275
|
})), (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.editor-new-button_jjjdo') ? (0, _react2.jsx)(_primitives.Inline, {
|
|
276
276
|
space: "space.075",
|
|
277
277
|
xcss: (0, _primitives.xcss)({
|
|
278
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
278
279
|
paddingInlineStart: 'space.050',
|
|
280
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
279
281
|
paddingInlineEnd: 'space.025'
|
|
280
282
|
})
|
|
281
283
|
}, (0, _react2.jsx)(_new.default, {
|
|
@@ -303,7 +305,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
303
305
|
onClick: this.handleReplaceAllClick,
|
|
304
306
|
isDisabled: !canReplace
|
|
305
307
|
}, this.replaceAll))), (0, _react2.jsx)("div", {
|
|
306
|
-
css: _styles.orderZeroStyles
|
|
308
|
+
css: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.editor-new-button_jjjdo') ? _styles.orderZeroStyles : _styles.orderZeroDeprecatedStyles
|
|
307
309
|
}, (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.editor-new-button_jjjdo') ? (0, _react2.jsx)(_new.default, {
|
|
308
310
|
appearance: "subtle",
|
|
309
311
|
testId: this.closeFindReplaceDialog,
|
package/dist/cjs/ui/styles.js
CHANGED
|
@@ -4,14 +4,14 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.wrapperStyles = exports.wrapperPaddingStyles = exports.textFieldWrapper = exports.sectionWrapperStylesAlternate = exports.sectionWrapperStyles = exports.sectionWrapperJustified = exports.ruleStyles = exports.replaceSectionButtonStyles = exports.orderZeroStyles = exports.orderOneStyles = exports.matchCaseSection = exports.countWrapperStyles = exports.countStylesAlternateStyles = exports.countStyles = exports.afterInputSection =
|
|
7
|
+
exports.wrapperStyles = exports.wrapperPaddingStyles = exports.textFieldWrapper = exports.sectionWrapperStylesAlternate = exports.sectionWrapperStyles = exports.sectionWrapperJustified = exports.ruleStyles = exports.replaceSectionButtonStyles = exports.orderZeroStyles = exports.orderZeroDeprecatedStyles = exports.orderOneStyles = exports.nextPreviousItemStyles = exports.matchCaseSection = exports.countWrapperStyles = exports.countStylesAlternateStyles = exports.countStyles = exports.afterInputSection = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
11
11
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
12
|
var _colors = require("@atlaskit/theme/colors");
|
|
13
13
|
var _constants = require("@atlaskit/theme/constants");
|
|
14
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
15
15
|
/* eslint-disable @atlaskit/design-system/no-nested-styles */
|
|
16
16
|
/* eslint-disable @repo/internal/styles/no-exported-styles */
|
|
17
17
|
/** @jsx jsx */
|
|
@@ -47,7 +47,9 @@ var sectionWrapperJustified = exports.sectionWrapperJustified = (0, _react.css)(
|
|
|
47
47
|
var textFieldWrapper = exports.textFieldWrapper = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n flex: 1 100%;\n flex-wrap: wrap;\n\n #find-text-field,\n #replace-text-field {\n height: ", "em;\n }\n\n label {\n font-size: ", ";\n line-height: ", "px;\n }\n"])), gridSize * 4.5 / fontSize, (0, _editorSharedStyles.relativeFontSizeToBase16)(14), gridSize * 2);
|
|
48
48
|
var afterInputSection = exports.afterInputSection = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n"])));
|
|
49
49
|
var matchCaseSection = exports.matchCaseSection = (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n padding-right: ", ";\n\n button {\n width: 20px;\n height: 20px;\n }\n"])), "var(--ds-space-100, 8px)");
|
|
50
|
-
var
|
|
50
|
+
var nextPreviousItemStyles = exports.nextPreviousItemStyles = (0, _react.css)({
|
|
51
|
+
padding: "0px ".concat("var(--ds-space-025, 2px)")
|
|
52
|
+
});
|
|
51
53
|
var countStyles = exports.countStyles = (0, _react.css)({
|
|
52
54
|
color: "var(--ds-text-subtlest, #626F86)",
|
|
53
55
|
fontSize: "".concat((0, _editorSharedStyles.relativeFontSizeToBase16)(12)),
|
|
@@ -66,7 +68,11 @@ var countWrapperStyles = exports.countWrapperStyles = (0, _react.css)({
|
|
|
66
68
|
});
|
|
67
69
|
var orderZeroStyles = exports.orderZeroStyles = (0, _react.css)({
|
|
68
70
|
order: '0',
|
|
69
|
-
marginInline:
|
|
71
|
+
marginInline: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-025, 2px)")
|
|
72
|
+
});
|
|
73
|
+
var orderZeroDeprecatedStyles = exports.orderZeroDeprecatedStyles = (0, _react.css)({
|
|
74
|
+
order: '0',
|
|
75
|
+
marginInline: 0
|
|
70
76
|
});
|
|
71
77
|
var orderOneStyles = exports.orderOneStyles = (0, _react.css)({
|
|
72
78
|
order: '1'
|
|
@@ -35,7 +35,6 @@ const FindReplaceToolbarButtonWithState = ({
|
|
|
35
35
|
editorView,
|
|
36
36
|
containerElement,
|
|
37
37
|
dispatchAnalyticsEvent,
|
|
38
|
-
featureFlags,
|
|
39
38
|
takeFullWidth,
|
|
40
39
|
api
|
|
41
40
|
}) => {
|
|
@@ -120,14 +119,10 @@ const FindReplaceToolbarButtonWithState = ({
|
|
|
120
119
|
const handleToggleMatchCase = () => {
|
|
121
120
|
dispatchCommand(toggleMatchCase());
|
|
122
121
|
};
|
|
123
|
-
const {
|
|
124
|
-
findReplaceMatchCase
|
|
125
|
-
} = featureFlags;
|
|
126
122
|
if (!findReplaceState) {
|
|
127
123
|
return null;
|
|
128
124
|
}
|
|
129
125
|
return /*#__PURE__*/React.createElement(FindReplaceToolbarButton, {
|
|
130
|
-
allowMatchCase: findReplaceMatchCase,
|
|
131
126
|
shouldMatchCase: findReplaceState.shouldMatchCase,
|
|
132
127
|
onToggleMatchCase: handleToggleMatchCase,
|
|
133
128
|
isActive: findReplaceState.isActive,
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -7,8 +7,6 @@ export const findReplacePlugin = ({
|
|
|
7
7
|
config: props,
|
|
8
8
|
api
|
|
9
9
|
}) => {
|
|
10
|
-
var _api$featureFlags;
|
|
11
|
-
const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
12
10
|
return {
|
|
13
11
|
name: 'findReplace',
|
|
14
12
|
pmPlugins() {
|
|
@@ -47,12 +45,7 @@ export const findReplacePlugin = ({
|
|
|
47
45
|
popupsScrollableElement: popupsScrollableElement,
|
|
48
46
|
editorView: editorView,
|
|
49
47
|
containerElement: containerElement,
|
|
50
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
51
|
-
// `allowMatchCase` comes through the preset, but not the feature flags
|
|
52
|
-
// prop with the `ComposableEditor` - grab the FFs from the editor API
|
|
53
|
-
// instead until we clean this up.
|
|
54
|
-
,
|
|
55
|
-
featureFlags: featureFlags,
|
|
48
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
56
49
|
isToolbarReducedSpacing: isToolbarReducedSpacing,
|
|
57
50
|
api: api
|
|
58
51
|
});
|
|
@@ -79,7 +72,6 @@ export const findReplacePlugin = ({
|
|
|
79
72
|
containerElement: containerElement,
|
|
80
73
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
81
74
|
takeFullWidth: props === null || props === void 0 ? void 0 : props.takeFullWidth,
|
|
82
|
-
featureFlags: featureFlags,
|
|
83
75
|
api: api
|
|
84
76
|
});
|
|
85
77
|
}
|
package/dist/es2019/ui/Find.js
CHANGED
|
@@ -118,7 +118,7 @@ class Find extends React.Component {
|
|
|
118
118
|
});
|
|
119
119
|
});
|
|
120
120
|
_defineProperty(this, "handleMatchCaseClick", buttonRef => {
|
|
121
|
-
if (this.props.
|
|
121
|
+
if (this.props.onToggleMatchCase) {
|
|
122
122
|
this.props.onToggleMatchCase();
|
|
123
123
|
this.props.onFind(this.props.findText);
|
|
124
124
|
}
|
|
@@ -192,7 +192,6 @@ class Find extends React.Component {
|
|
|
192
192
|
const {
|
|
193
193
|
findText,
|
|
194
194
|
count,
|
|
195
|
-
allowMatchCase,
|
|
196
195
|
shouldMatchCase,
|
|
197
196
|
intl: {
|
|
198
197
|
formatMessage
|
|
@@ -210,7 +209,7 @@ class Find extends React.Component {
|
|
|
210
209
|
}, findText && jsx("span", {
|
|
211
210
|
"data-testid": "textfield-count",
|
|
212
211
|
css: [countStyles, countStylesAlternateStyles]
|
|
213
|
-
}, count.total === 0 ? this.noResultsFound : resultsCount)),
|
|
212
|
+
}, count.total === 0 ? this.noResultsFound : resultsCount)), jsx("div", {
|
|
214
213
|
css: matchCaseSection
|
|
215
214
|
}, jsx(FindReplaceTooltipButton, {
|
|
216
215
|
title: this.matchCase,
|
|
@@ -265,7 +264,7 @@ class Find extends React.Component {
|
|
|
265
264
|
}, findText && jsx("span", {
|
|
266
265
|
"data-testid": "textfield-count",
|
|
267
266
|
css: countStyles
|
|
268
|
-
}, count.total === 0 ? this.noResultsFound : resultsCount)),
|
|
267
|
+
}, count.total === 0 ? this.noResultsFound : resultsCount)), jsx(FindReplaceTooltipButton, {
|
|
269
268
|
title: this.matchCase,
|
|
270
269
|
icon: this.matchCaseIcon,
|
|
271
270
|
newIcon: MatchCaseIcon,
|
|
@@ -15,7 +15,7 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
|
15
15
|
import { Inline, xcss } from '@atlaskit/primitives';
|
|
16
16
|
import Textfield from '@atlaskit/textfield';
|
|
17
17
|
import { FindReplaceTooltipButton } from './FindReplaceTooltipButton';
|
|
18
|
-
import {
|
|
18
|
+
import { nextPreviousItemStyles, orderOneStyles, orderZeroDeprecatedStyles, orderZeroStyles, replaceSectionButtonStyles, sectionWrapperJustified, sectionWrapperStyles, sectionWrapperStylesAlternate, textFieldWrapper } from './styles';
|
|
19
19
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
20
20
|
class Replace extends React.PureComponent {
|
|
21
21
|
constructor(props) {
|
|
@@ -229,7 +229,7 @@ class Replace extends React.PureComponent {
|
|
|
229
229
|
}, jsx("div", {
|
|
230
230
|
css: orderOneStyles
|
|
231
231
|
}, jsx("div", {
|
|
232
|
-
css:
|
|
232
|
+
css: nextPreviousItemStyles
|
|
233
233
|
}, jsx(FindReplaceTooltipButton, {
|
|
234
234
|
title: this.findNext,
|
|
235
235
|
icon: this.findNextIcon,
|
|
@@ -239,7 +239,7 @@ class Replace extends React.PureComponent {
|
|
|
239
239
|
onClick: this.handleFindNextClick,
|
|
240
240
|
disabled: count.total <= 1
|
|
241
241
|
})), jsx("div", {
|
|
242
|
-
css:
|
|
242
|
+
css: nextPreviousItemStyles
|
|
243
243
|
}, jsx(FindReplaceTooltipButton, {
|
|
244
244
|
title: this.findPrevious,
|
|
245
245
|
icon: this.findPrevIcon,
|
|
@@ -251,7 +251,9 @@ class Replace extends React.PureComponent {
|
|
|
251
251
|
})), getBooleanFF('platform.design-system-team.editor-new-button_jjjdo') ? jsx(Inline, {
|
|
252
252
|
space: "space.075",
|
|
253
253
|
xcss: xcss({
|
|
254
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
254
255
|
paddingInlineStart: 'space.050',
|
|
256
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
255
257
|
paddingInlineEnd: 'space.025'
|
|
256
258
|
})
|
|
257
259
|
}, jsx(Button, {
|
|
@@ -279,7 +281,7 @@ class Replace extends React.PureComponent {
|
|
|
279
281
|
onClick: this.handleReplaceAllClick,
|
|
280
282
|
isDisabled: !canReplace
|
|
281
283
|
}, this.replaceAll))), jsx("div", {
|
|
282
|
-
css: orderZeroStyles
|
|
284
|
+
css: getBooleanFF('platform.design-system-team.editor-new-button_jjjdo') ? orderZeroStyles : orderZeroDeprecatedStyles
|
|
283
285
|
}, getBooleanFF('platform.design-system-team.editor-new-button_jjjdo') ? jsx(Button, {
|
|
284
286
|
appearance: "subtle",
|
|
285
287
|
testId: this.closeFindReplaceDialog,
|
package/dist/es2019/ui/styles.js
CHANGED
|
@@ -87,9 +87,9 @@ export const matchCaseSection = css`
|
|
|
87
87
|
height: 20px;
|
|
88
88
|
}
|
|
89
89
|
`;
|
|
90
|
-
export const
|
|
91
|
-
padding: 0px
|
|
92
|
-
|
|
90
|
+
export const nextPreviousItemStyles = css({
|
|
91
|
+
padding: `0px ${"var(--ds-space-025, 2px)"}`
|
|
92
|
+
});
|
|
93
93
|
export const countStyles = css({
|
|
94
94
|
color: `${"var(--ds-text-subtlest, #626F86)"}`,
|
|
95
95
|
fontSize: `${relativeFontSizeToBase16(12)}`,
|
|
@@ -108,7 +108,11 @@ export const countWrapperStyles = css({
|
|
|
108
108
|
});
|
|
109
109
|
export const orderZeroStyles = css({
|
|
110
110
|
order: '0',
|
|
111
|
-
marginInline:
|
|
111
|
+
marginInline: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-025, 2px)"}`
|
|
112
|
+
});
|
|
113
|
+
export const orderZeroDeprecatedStyles = css({
|
|
114
|
+
order: '0',
|
|
115
|
+
marginInline: 0
|
|
112
116
|
});
|
|
113
117
|
export const orderOneStyles = css({
|
|
114
118
|
order: '1'
|
|
@@ -39,7 +39,6 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
|
|
|
39
39
|
editorView = _ref2.editorView,
|
|
40
40
|
containerElement = _ref2.containerElement,
|
|
41
41
|
dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
|
|
42
|
-
featureFlags = _ref2.featureFlags,
|
|
43
42
|
takeFullWidth = _ref2.takeFullWidth,
|
|
44
43
|
api = _ref2.api;
|
|
45
44
|
var editorAnalyticsAPI = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
@@ -126,12 +125,10 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
|
|
|
126
125
|
var handleToggleMatchCase = function handleToggleMatchCase() {
|
|
127
126
|
dispatchCommand(toggleMatchCase());
|
|
128
127
|
};
|
|
129
|
-
var findReplaceMatchCase = featureFlags.findReplaceMatchCase;
|
|
130
128
|
if (!findReplaceState) {
|
|
131
129
|
return null;
|
|
132
130
|
}
|
|
133
131
|
return /*#__PURE__*/React.createElement(FindReplaceToolbarButton, {
|
|
134
|
-
allowMatchCase: findReplaceMatchCase,
|
|
135
132
|
shouldMatchCase: findReplaceState.shouldMatchCase,
|
|
136
133
|
onToggleMatchCase: handleToggleMatchCase,
|
|
137
134
|
isActive: findReplaceState.isActive,
|
package/dist/esm/plugin.js
CHANGED
|
@@ -4,10 +4,8 @@ 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$featureFlags;
|
|
8
7
|
var props = _ref.config,
|
|
9
8
|
api = _ref.api;
|
|
10
|
-
var featureFlags = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
11
9
|
return {
|
|
12
10
|
name: 'findReplace',
|
|
13
11
|
pmPlugins: function pmPlugins() {
|
|
@@ -46,12 +44,7 @@ export var findReplacePlugin = function findReplacePlugin(_ref) {
|
|
|
46
44
|
popupsScrollableElement: popupsScrollableElement,
|
|
47
45
|
editorView: editorView,
|
|
48
46
|
containerElement: containerElement,
|
|
49
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
50
|
-
// `allowMatchCase` comes through the preset, but not the feature flags
|
|
51
|
-
// prop with the `ComposableEditor` - grab the FFs from the editor API
|
|
52
|
-
// instead until we clean this up.
|
|
53
|
-
,
|
|
54
|
-
featureFlags: featureFlags,
|
|
47
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
55
48
|
isToolbarReducedSpacing: isToolbarReducedSpacing,
|
|
56
49
|
api: api
|
|
57
50
|
});
|
|
@@ -77,7 +70,6 @@ export var findReplacePlugin = function findReplacePlugin(_ref) {
|
|
|
77
70
|
containerElement: containerElement,
|
|
78
71
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
79
72
|
takeFullWidth: props === null || props === void 0 ? void 0 : props.takeFullWidth,
|
|
80
|
-
featureFlags: featureFlags,
|
|
81
73
|
api: api
|
|
82
74
|
});
|
|
83
75
|
}
|
package/dist/esm/ui/Find.js
CHANGED
|
@@ -130,7 +130,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
130
130
|
});
|
|
131
131
|
});
|
|
132
132
|
_defineProperty(_assertThisInitialized(_this), "handleMatchCaseClick", function (buttonRef) {
|
|
133
|
-
if (_this.props.
|
|
133
|
+
if (_this.props.onToggleMatchCase) {
|
|
134
134
|
_this.props.onToggleMatchCase();
|
|
135
135
|
_this.props.onFind(_this.props.findText);
|
|
136
136
|
}
|
|
@@ -211,7 +211,6 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
211
211
|
var _this$props = this.props,
|
|
212
212
|
findText = _this$props.findText,
|
|
213
213
|
count = _this$props.count,
|
|
214
|
-
allowMatchCase = _this$props.allowMatchCase,
|
|
215
214
|
shouldMatchCase = _this$props.shouldMatchCase,
|
|
216
215
|
formatMessage = _this$props.intl.formatMessage;
|
|
217
216
|
var resultsCount = formatMessage(messages.resultsCount, {
|
|
@@ -226,7 +225,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
226
225
|
}, findText && jsx("span", {
|
|
227
226
|
"data-testid": "textfield-count",
|
|
228
227
|
css: [countStyles, countStylesAlternateStyles]
|
|
229
|
-
}, count.total === 0 ? this.noResultsFound : resultsCount)),
|
|
228
|
+
}, count.total === 0 ? this.noResultsFound : resultsCount)), jsx("div", {
|
|
230
229
|
css: matchCaseSection
|
|
231
230
|
}, jsx(FindReplaceTooltipButton, {
|
|
232
231
|
title: this.matchCase,
|
|
@@ -281,7 +280,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
281
280
|
}, findText && jsx("span", {
|
|
282
281
|
"data-testid": "textfield-count",
|
|
283
282
|
css: countStyles
|
|
284
|
-
}, count.total === 0 ? this.noResultsFound : resultsCount)),
|
|
283
|
+
}, count.total === 0 ? this.noResultsFound : resultsCount)), jsx(FindReplaceTooltipButton, {
|
|
285
284
|
title: this.matchCase,
|
|
286
285
|
icon: this.matchCaseIcon,
|
|
287
286
|
newIcon: MatchCaseIcon,
|
package/dist/esm/ui/Replace.js
CHANGED
|
@@ -23,7 +23,7 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
|
23
23
|
import { Inline, xcss } from '@atlaskit/primitives';
|
|
24
24
|
import Textfield from '@atlaskit/textfield';
|
|
25
25
|
import { FindReplaceTooltipButton } from './FindReplaceTooltipButton';
|
|
26
|
-
import {
|
|
26
|
+
import { nextPreviousItemStyles, orderOneStyles, orderZeroDeprecatedStyles, orderZeroStyles, replaceSectionButtonStyles, sectionWrapperJustified, sectionWrapperStyles, sectionWrapperStylesAlternate, textFieldWrapper } from './styles';
|
|
27
27
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
28
28
|
var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
29
29
|
_inherits(Replace, _React$PureComponent);
|
|
@@ -245,7 +245,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
245
245
|
}, jsx("div", {
|
|
246
246
|
css: orderOneStyles
|
|
247
247
|
}, jsx("div", {
|
|
248
|
-
css:
|
|
248
|
+
css: nextPreviousItemStyles
|
|
249
249
|
}, jsx(FindReplaceTooltipButton, {
|
|
250
250
|
title: this.findNext,
|
|
251
251
|
icon: this.findNextIcon,
|
|
@@ -255,7 +255,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
255
255
|
onClick: this.handleFindNextClick,
|
|
256
256
|
disabled: count.total <= 1
|
|
257
257
|
})), jsx("div", {
|
|
258
|
-
css:
|
|
258
|
+
css: nextPreviousItemStyles
|
|
259
259
|
}, jsx(FindReplaceTooltipButton, {
|
|
260
260
|
title: this.findPrevious,
|
|
261
261
|
icon: this.findPrevIcon,
|
|
@@ -267,7 +267,9 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
267
267
|
})), getBooleanFF('platform.design-system-team.editor-new-button_jjjdo') ? jsx(Inline, {
|
|
268
268
|
space: "space.075",
|
|
269
269
|
xcss: xcss({
|
|
270
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
270
271
|
paddingInlineStart: 'space.050',
|
|
272
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
271
273
|
paddingInlineEnd: 'space.025'
|
|
272
274
|
})
|
|
273
275
|
}, jsx(Button, {
|
|
@@ -295,7 +297,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
295
297
|
onClick: this.handleReplaceAllClick,
|
|
296
298
|
isDisabled: !canReplace
|
|
297
299
|
}, this.replaceAll))), jsx("div", {
|
|
298
|
-
css: orderZeroStyles
|
|
300
|
+
css: getBooleanFF('platform.design-system-team.editor-new-button_jjjdo') ? orderZeroStyles : orderZeroDeprecatedStyles
|
|
299
301
|
}, getBooleanFF('platform.design-system-team.editor-new-button_jjjdo') ? jsx(Button, {
|
|
300
302
|
appearance: "subtle",
|
|
301
303
|
testId: this.closeFindReplaceDialog,
|
package/dist/esm/ui/styles.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
3
3
|
/* eslint-disable @atlaskit/design-system/no-nested-styles */
|
|
4
4
|
/* eslint-disable @repo/internal/styles/no-exported-styles */
|
|
5
5
|
/** @jsx jsx */
|
|
@@ -42,7 +42,9 @@ export var sectionWrapperJustified = css(_templateObject3 || (_templateObject3 =
|
|
|
42
42
|
export var textFieldWrapper = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex: 1 100%;\n flex-wrap: wrap;\n\n #find-text-field,\n #replace-text-field {\n height: ", "em;\n }\n\n label {\n font-size: ", ";\n line-height: ", "px;\n }\n"])), gridSize * 4.5 / fontSize, relativeFontSizeToBase16(14), gridSize * 2);
|
|
43
43
|
export var afterInputSection = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n"])));
|
|
44
44
|
export var matchCaseSection = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding-right: ", ";\n\n button {\n width: 20px;\n height: 20px;\n }\n"])), "var(--ds-space-100, 8px)");
|
|
45
|
-
export var
|
|
45
|
+
export var nextPreviousItemStyles = css({
|
|
46
|
+
padding: "0px ".concat("var(--ds-space-025, 2px)")
|
|
47
|
+
});
|
|
46
48
|
export var countStyles = css({
|
|
47
49
|
color: "var(--ds-text-subtlest, #626F86)",
|
|
48
50
|
fontSize: "".concat(relativeFontSizeToBase16(12)),
|
|
@@ -61,7 +63,11 @@ export var countWrapperStyles = css({
|
|
|
61
63
|
});
|
|
62
64
|
export var orderZeroStyles = css({
|
|
63
65
|
order: '0',
|
|
64
|
-
marginInline:
|
|
66
|
+
marginInline: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-025, 2px)")
|
|
67
|
+
});
|
|
68
|
+
export var orderZeroDeprecatedStyles = css({
|
|
69
|
+
order: '0',
|
|
70
|
+
marginInline: 0
|
|
65
71
|
});
|
|
66
72
|
export var orderOneStyles = css({
|
|
67
73
|
order: '1'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { FindReplaceToolbarButtonWithStateProps } from './types';
|
|
3
|
-
declare const _default: React.MemoExoticComponent<({ popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, isToolbarReducedSpacing, editorView, containerElement, dispatchAnalyticsEvent,
|
|
3
|
+
declare const _default: React.MemoExoticComponent<({ popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, isToolbarReducedSpacing, editorView, containerElement, dispatchAnalyticsEvent, takeFullWidth, api, }: FindReplaceToolbarButtonWithStateProps) => JSX.Element | null>;
|
|
4
4
|
export default _default;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { ExtractInjectionAPI,
|
|
3
|
+
import type { ExtractInjectionAPI, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
|
-
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
6
5
|
import type { DecorationSet, EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
6
|
export interface FindReplacePluginState {
|
|
8
7
|
/** Whether find/replace is active, i.e. displayed */
|
|
@@ -34,10 +33,9 @@ export type FindReplaceToolbarButtonWithStateProps = {
|
|
|
34
33
|
containerElement: HTMLElement | null;
|
|
35
34
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
36
35
|
takeFullWidth?: boolean;
|
|
37
|
-
featureFlags: FeatureFlags;
|
|
38
36
|
api: ExtractInjectionAPI<FindReplacePlugin> | undefined;
|
|
39
37
|
};
|
|
40
|
-
export type FindReplaceToolbarButtonActionProps = Omit<FindReplaceToolbarButtonWithStateProps, '
|
|
38
|
+
export type FindReplaceToolbarButtonActionProps = Omit<FindReplaceToolbarButtonWithStateProps, 'api'>;
|
|
41
39
|
type Config = {
|
|
42
40
|
takeFullWidth: boolean;
|
|
43
41
|
twoLineEditorToolbar: boolean;
|
|
@@ -45,10 +43,7 @@ type Config = {
|
|
|
45
43
|
export type FindReplacePlugin = NextEditorPlugin<'findReplace', {
|
|
46
44
|
pluginConfiguration: Config;
|
|
47
45
|
sharedState: FindReplacePluginState | undefined;
|
|
48
|
-
dependencies: [
|
|
49
|
-
OptionalPlugin<FeatureFlagsPlugin>,
|
|
50
|
-
OptionalPlugin<AnalyticsPlugin>
|
|
51
|
-
];
|
|
46
|
+
dependencies: [OptionalPlugin<AnalyticsPlugin>];
|
|
52
47
|
actions: {
|
|
53
48
|
getToolbarButton: (params: FindReplaceToolbarButtonActionProps) => React.ReactNode;
|
|
54
49
|
};
|
|
@@ -8,9 +8,10 @@ export declare const sectionWrapperJustified: import("@emotion/react").Serialize
|
|
|
8
8
|
export declare const textFieldWrapper: import("@emotion/react").SerializedStyles;
|
|
9
9
|
export declare const afterInputSection: import("@emotion/react").SerializedStyles;
|
|
10
10
|
export declare const matchCaseSection: import("@emotion/react").SerializedStyles;
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const nextPreviousItemStyles: import("@emotion/react").SerializedStyles;
|
|
12
12
|
export declare const countStyles: import("@emotion/react").SerializedStyles;
|
|
13
13
|
export declare const countStylesAlternateStyles: import("@emotion/react").SerializedStyles;
|
|
14
14
|
export declare const countWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
15
15
|
export declare const orderZeroStyles: import("@emotion/react").SerializedStyles;
|
|
16
|
+
export declare const orderZeroDeprecatedStyles: import("@emotion/react").SerializedStyles;
|
|
16
17
|
export declare const orderOneStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { FindReplaceToolbarButtonWithStateProps } from './types';
|
|
3
|
-
declare const _default: React.MemoExoticComponent<({ popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, isToolbarReducedSpacing, editorView, containerElement, dispatchAnalyticsEvent,
|
|
3
|
+
declare const _default: React.MemoExoticComponent<({ popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, isToolbarReducedSpacing, editorView, containerElement, dispatchAnalyticsEvent, takeFullWidth, api, }: FindReplaceToolbarButtonWithStateProps) => JSX.Element | null>;
|
|
4
4
|
export default _default;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { ExtractInjectionAPI,
|
|
3
|
+
import type { ExtractInjectionAPI, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
|
-
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
6
5
|
import type { DecorationSet, EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
6
|
export interface FindReplacePluginState {
|
|
8
7
|
/** Whether find/replace is active, i.e. displayed */
|
|
@@ -34,10 +33,9 @@ export type FindReplaceToolbarButtonWithStateProps = {
|
|
|
34
33
|
containerElement: HTMLElement | null;
|
|
35
34
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
36
35
|
takeFullWidth?: boolean;
|
|
37
|
-
featureFlags: FeatureFlags;
|
|
38
36
|
api: ExtractInjectionAPI<FindReplacePlugin> | undefined;
|
|
39
37
|
};
|
|
40
|
-
export type FindReplaceToolbarButtonActionProps = Omit<FindReplaceToolbarButtonWithStateProps, '
|
|
38
|
+
export type FindReplaceToolbarButtonActionProps = Omit<FindReplaceToolbarButtonWithStateProps, 'api'>;
|
|
41
39
|
type Config = {
|
|
42
40
|
takeFullWidth: boolean;
|
|
43
41
|
twoLineEditorToolbar: boolean;
|
|
@@ -46,7 +44,6 @@ export type FindReplacePlugin = NextEditorPlugin<'findReplace', {
|
|
|
46
44
|
pluginConfiguration: Config;
|
|
47
45
|
sharedState: FindReplacePluginState | undefined;
|
|
48
46
|
dependencies: [
|
|
49
|
-
OptionalPlugin<FeatureFlagsPlugin>,
|
|
50
47
|
OptionalPlugin<AnalyticsPlugin>
|
|
51
48
|
];
|
|
52
49
|
actions: {
|
|
@@ -8,9 +8,10 @@ export declare const sectionWrapperJustified: import("@emotion/react").Serialize
|
|
|
8
8
|
export declare const textFieldWrapper: import("@emotion/react").SerializedStyles;
|
|
9
9
|
export declare const afterInputSection: import("@emotion/react").SerializedStyles;
|
|
10
10
|
export declare const matchCaseSection: import("@emotion/react").SerializedStyles;
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const nextPreviousItemStyles: import("@emotion/react").SerializedStyles;
|
|
12
12
|
export declare const countStyles: import("@emotion/react").SerializedStyles;
|
|
13
13
|
export declare const countStylesAlternateStyles: import("@emotion/react").SerializedStyles;
|
|
14
14
|
export declare const countWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
15
15
|
export declare const orderZeroStyles: import("@emotion/react").SerializedStyles;
|
|
16
|
+
export declare const orderZeroDeprecatedStyles: import("@emotion/react").SerializedStyles;
|
|
16
17
|
export declare const orderOneStyles: import("@emotion/react").SerializedStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-find-replace",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "find replace plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,10 +34,9 @@
|
|
|
34
34
|
"./styles": "./src/styles.ts"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@atlaskit/button": "^17.
|
|
38
|
-
"@atlaskit/editor-common": "^
|
|
37
|
+
"@atlaskit/button": "^17.4.0",
|
|
38
|
+
"@atlaskit/editor-common": "^78.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^1.0.0",
|
|
40
|
-
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|
|
41
40
|
"@atlaskit/editor-prosemirror": "3.0.0",
|
|
42
41
|
"@atlaskit/editor-shared-styles": "^2.9.0",
|
|
43
42
|
"@atlaskit/form": "^9.0.5",
|