@atlaskit/editor-plugin-find-replace 8.0.0 → 8.0.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 +12 -0
- package/dist/cjs/pm-plugins/plugin-factory.js +8 -8
- package/dist/cjs/ui/Find.js +3 -2
- package/dist/cjs/ui/FindReplace.js +1 -1
- package/dist/cjs/ui/FindReplaceDropDownOrToolbarButtonWithState.js +2 -1
- package/dist/cjs/ui/FindReplaceDropdown.js +4 -1
- package/dist/cjs/ui/FindReplaceToolbarButton.js +3 -2
- package/dist/cjs/ui/Replace.js +4 -1
- package/dist/es2019/pm-plugins/plugin-factory.js +5 -6
- package/dist/es2019/ui/Find.js +4 -1
- package/dist/es2019/ui/FindReplace.js +1 -1
- package/dist/es2019/ui/FindReplaceDropDownOrToolbarButtonWithState.js +2 -1
- package/dist/es2019/ui/FindReplaceDropdown.js +4 -1
- package/dist/es2019/ui/FindReplaceToolbarButton.js +3 -1
- package/dist/es2019/ui/Replace.js +4 -1
- package/dist/esm/pm-plugins/plugin-factory.js +8 -9
- package/dist/esm/ui/Find.js +3 -2
- package/dist/esm/ui/FindReplace.js +1 -1
- package/dist/esm/ui/FindReplaceDropDownOrToolbarButtonWithState.js +2 -1
- package/dist/esm/ui/FindReplaceDropdown.js +4 -1
- package/dist/esm/ui/FindReplaceToolbarButton.js +3 -2
- package/dist/esm/ui/Replace.js +4 -1
- package/dist/types/pm-plugins/commands.d.ts +12 -11
- package/dist/types/pm-plugins/plugin-factory.d.ts +7 -2
- package/dist/types/ui/Find.d.ts +3 -3
- package/dist/types/ui/FindReplaceDropDownOrToolbarButtonWithState.d.ts +2 -2
- package/dist/types/ui/FindReplaceDropdown.d.ts +3 -3
- package/dist/types/ui/FindReplaceToolbarButton.d.ts +3 -3
- package/dist/types/ui/Replace.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/commands.d.ts +12 -11
- package/dist/types-ts4.5/pm-plugins/plugin-factory.d.ts +7 -2
- package/dist/types-ts4.5/ui/Find.d.ts +3 -3
- package/dist/types-ts4.5/ui/FindReplaceDropDownOrToolbarButtonWithState.d.ts +2 -2
- package/dist/types-ts4.5/ui/FindReplaceDropdown.d.ts +3 -3
- package/dist/types-ts4.5/ui/FindReplaceToolbarButton.d.ts +3 -3
- package/dist/types-ts4.5/ui/Replace.d.ts +3 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -121,11 +121,11 @@ var handleDocChanged = function handleDocChanged(tr, pluginState) {
|
|
|
121
121
|
decorationSet: decorationSet
|
|
122
122
|
});
|
|
123
123
|
};
|
|
124
|
-
var
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
124
|
+
var dest = (0, _utils.pluginFactory)(_pluginKey.findReplacePluginKey, (0, _reducer.default)(function () {
|
|
125
|
+
return _main.initialState;
|
|
126
|
+
}), {
|
|
127
|
+
onDocChanged: handleDocChanged
|
|
128
|
+
});
|
|
129
|
+
var createCommand = exports.createCommand = dest.createCommand;
|
|
130
|
+
var getPluginState = exports.getPluginState = dest.getPluginState;
|
|
131
|
+
var createPluginState = exports.createPluginState = dest.createPluginState;
|
package/dist/cjs/ui/Find.js
CHANGED
|
@@ -264,5 +264,6 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
264
264
|
);
|
|
265
265
|
}
|
|
266
266
|
}]);
|
|
267
|
-
}(_react.default.Component);
|
|
268
|
-
var
|
|
267
|
+
}(_react.default.Component); // eslint-disable-next-line @typescript-eslint/ban-types
|
|
268
|
+
var _default_1 = (0, _reactIntlNext.injectIntl)(Find);
|
|
269
|
+
var _default = exports.default = _default_1;
|
|
@@ -22,7 +22,7 @@ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0,
|
|
|
22
22
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */ /* eslint-disable @atlaskit/design-system/prefer-primitives */ /**
|
|
23
23
|
* @jsxRuntime classic
|
|
24
24
|
* @jsx jsx
|
|
25
|
-
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
25
|
+
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
26
26
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
27
27
|
var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
|
|
28
28
|
function FindReplace(props) {
|
|
@@ -178,4 +178,5 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
|
|
|
178
178
|
isButtonHidden: isButtonHidden
|
|
179
179
|
});
|
|
180
180
|
};
|
|
181
|
-
var
|
|
181
|
+
var _default_1 = /*#__PURE__*/_react.default.memo(FindReplaceToolbarButtonWithState);
|
|
182
|
+
var _default = exports.default = _default_1;
|
|
@@ -69,4 +69,7 @@ var FindReplaceDropdown = function FindReplaceDropdown(props) {
|
|
|
69
69
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
70
70
|
}, props))));
|
|
71
71
|
};
|
|
72
|
-
|
|
72
|
+
|
|
73
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
74
|
+
var _default_1 = (0, _reactIntlNext.injectIntl)(FindReplaceDropdown);
|
|
75
|
+
var _default = exports.default = _default_1;
|
|
@@ -197,5 +197,6 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
197
197
|
}, this.props)))));
|
|
198
198
|
}
|
|
199
199
|
}]);
|
|
200
|
-
}(_react.default.PureComponent);
|
|
201
|
-
var
|
|
200
|
+
}(_react.default.PureComponent); // eslint-disable-next-line @typescript-eslint/ban-types
|
|
201
|
+
var _default_1 = (0, _reactIntlNext.injectIntl)(FindReplaceToolbarButton);
|
|
202
|
+
var _default = exports.default = _default_1;
|
package/dist/cjs/ui/Replace.js
CHANGED
|
@@ -275,4 +275,7 @@ var Replace = function Replace(_ref) {
|
|
|
275
275
|
onClick: clearSearch
|
|
276
276
|
}, closeFindReplaceDialog))));
|
|
277
277
|
};
|
|
278
|
-
|
|
278
|
+
|
|
279
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
280
|
+
var _default_1 = (0, _reactIntlNext.injectIntl)(Replace);
|
|
281
|
+
var _default = exports.default = _default_1;
|
|
@@ -103,10 +103,9 @@ const handleDocChanged = (tr, pluginState) => {
|
|
|
103
103
|
decorationSet
|
|
104
104
|
};
|
|
105
105
|
};
|
|
106
|
-
|
|
107
|
-
createCommand,
|
|
108
|
-
getPluginState,
|
|
109
|
-
createPluginState
|
|
110
|
-
} = pluginFactory(findReplacePluginKey, reducer(() => initialState), {
|
|
106
|
+
const dest = pluginFactory(findReplacePluginKey, reducer(() => initialState), {
|
|
111
107
|
onDocChanged: handleDocChanged
|
|
112
|
-
});
|
|
108
|
+
});
|
|
109
|
+
export const createCommand = dest.createCommand;
|
|
110
|
+
export const getPluginState = dest.getPluginState;
|
|
111
|
+
export const createPluginState = dest.createPluginState;
|
package/dist/es2019/ui/Find.js
CHANGED
|
@@ -7,7 +7,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
9
|
|
|
10
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
11
11
|
import { jsx } from '@emotion/react';
|
|
12
12
|
import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages';
|
|
13
13
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -162,4 +162,5 @@ const FindReplaceToolbarButtonWithState = ({
|
|
|
162
162
|
isButtonHidden: isButtonHidden
|
|
163
163
|
});
|
|
164
164
|
};
|
|
165
|
-
|
|
165
|
+
const _default_1 = /*#__PURE__*/React.memo(FindReplaceToolbarButtonWithState);
|
|
166
|
+
export default _default_1;
|
|
@@ -63,4 +63,7 @@ const FindReplaceDropdown = props => {
|
|
|
63
63
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
64
64
|
}, props))));
|
|
65
65
|
};
|
|
66
|
-
|
|
66
|
+
|
|
67
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
68
|
+
const _default_1 = injectIntl(FindReplaceDropdown);
|
|
69
|
+
export default _default_1;
|
|
@@ -187,4 +187,6 @@ class FindReplaceToolbarButton extends React.PureComponent {
|
|
|
187
187
|
}, this.props)))));
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
|
|
190
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
191
|
+
const _default_1 = injectIntl(FindReplaceToolbarButton);
|
|
192
|
+
export default _default_1;
|
|
@@ -240,4 +240,7 @@ const Replace = ({
|
|
|
240
240
|
onClick: clearSearch
|
|
241
241
|
}, closeFindReplaceDialog))));
|
|
242
242
|
};
|
|
243
|
-
|
|
243
|
+
|
|
244
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
245
|
+
const _default_1 = injectIntl(Replace);
|
|
246
|
+
export default _default_1;
|
|
@@ -114,12 +114,11 @@ var handleDocChanged = function handleDocChanged(tr, pluginState) {
|
|
|
114
114
|
decorationSet: decorationSet
|
|
115
115
|
});
|
|
116
116
|
};
|
|
117
|
-
var
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
export { createCommand, getPluginState, createPluginState };
|
|
117
|
+
var dest = pluginFactory(findReplacePluginKey, reducer(function () {
|
|
118
|
+
return initialState;
|
|
119
|
+
}), {
|
|
120
|
+
onDocChanged: handleDocChanged
|
|
121
|
+
});
|
|
122
|
+
export var createCommand = dest.createCommand;
|
|
123
|
+
export var getPluginState = dest.getPluginState;
|
|
124
|
+
export var createPluginState = dest.createPluginState;
|
package/dist/esm/ui/Find.js
CHANGED
|
@@ -261,5 +261,6 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
261
261
|
);
|
|
262
262
|
}
|
|
263
263
|
}]);
|
|
264
|
-
}(React.Component);
|
|
265
|
-
|
|
264
|
+
}(React.Component); // eslint-disable-next-line @typescript-eslint/ban-types
|
|
265
|
+
var _default_1 = injectIntl(Find);
|
|
266
|
+
export default _default_1;
|
|
@@ -14,7 +14,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
14
14
|
*/
|
|
15
15
|
import React from 'react';
|
|
16
16
|
|
|
17
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
18
18
|
import { jsx } from '@emotion/react';
|
|
19
19
|
import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages';
|
|
20
20
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -170,4 +170,5 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
|
|
|
170
170
|
isButtonHidden: isButtonHidden
|
|
171
171
|
});
|
|
172
172
|
};
|
|
173
|
-
|
|
173
|
+
var _default_1 = /*#__PURE__*/React.memo(FindReplaceToolbarButtonWithState);
|
|
174
|
+
export default _default_1;
|
|
@@ -61,4 +61,7 @@ var FindReplaceDropdown = function FindReplaceDropdown(props) {
|
|
|
61
61
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
62
62
|
}, props))));
|
|
63
63
|
};
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
66
|
+
var _default_1 = injectIntl(FindReplaceDropdown);
|
|
67
|
+
export default _default_1;
|
|
@@ -192,5 +192,6 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
192
192
|
}, this.props)))));
|
|
193
193
|
}
|
|
194
194
|
}]);
|
|
195
|
-
}(React.PureComponent);
|
|
196
|
-
|
|
195
|
+
}(React.PureComponent); // eslint-disable-next-line @typescript-eslint/ban-types
|
|
196
|
+
var _default_1 = injectIntl(FindReplaceToolbarButton);
|
|
197
|
+
export default _default_1;
|
package/dist/esm/ui/Replace.js
CHANGED
|
@@ -265,4 +265,7 @@ var Replace = function Replace(_ref) {
|
|
|
265
265
|
onClick: clearSearch
|
|
266
266
|
}, closeFindReplaceDialog))));
|
|
267
267
|
};
|
|
268
|
-
|
|
268
|
+
|
|
269
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
270
|
+
var _default_1 = injectIntl(Replace);
|
|
271
|
+
export default _default_1;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
1
2
|
import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
-
export declare const activate: () =>
|
|
3
|
-
export declare const find: (editorView: EditorView, containerElement: HTMLElement | null, keyword?: string) =>
|
|
4
|
-
export declare const findNext: (editorView: EditorView) =>
|
|
5
|
-
export declare const findPrevious: (editorView: EditorView) =>
|
|
6
|
-
export declare const replace: (replaceText: string) =>
|
|
7
|
-
export declare const replaceAll: (replaceText: string) =>
|
|
8
|
-
export declare const addDecorations: (decorations: Decoration[]) =>
|
|
9
|
-
export declare const removeDecorations: (decorations: Decoration[]) =>
|
|
10
|
-
export declare const cancelSearch: () =>
|
|
11
|
-
export declare const blur: () =>
|
|
12
|
-
export declare const toggleMatchCase: () =>
|
|
3
|
+
export declare const activate: () => Command;
|
|
4
|
+
export declare const find: (editorView: EditorView, containerElement: HTMLElement | null, keyword?: string) => Command;
|
|
5
|
+
export declare const findNext: (editorView: EditorView) => Command;
|
|
6
|
+
export declare const findPrevious: (editorView: EditorView) => Command;
|
|
7
|
+
export declare const replace: (replaceText: string) => Command;
|
|
8
|
+
export declare const replaceAll: (replaceText: string) => Command;
|
|
9
|
+
export declare const addDecorations: (decorations: Decoration[]) => Command;
|
|
10
|
+
export declare const removeDecorations: (decorations: Decoration[]) => Command;
|
|
11
|
+
export declare const cancelSearch: () => Command;
|
|
12
|
+
export declare const blur: () => Command;
|
|
13
|
+
export declare const toggleMatchCase: () => Command;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorState, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
4
|
import type { FindReplacePluginState } from '../types';
|
|
3
|
-
|
|
5
|
+
import type { FindReplaceAction } from './actions';
|
|
6
|
+
export declare const createCommand: <A = FindReplaceAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
7
|
+
export declare const getPluginState: (state: EditorState) => FindReplacePluginState;
|
|
8
|
+
export declare const createPluginState: (dispatch: Dispatch, initialState: FindReplacePluginState | ((state: EditorState) => FindReplacePluginState)) => SafeStateField<FindReplacePluginState>;
|
package/dist/types/ui/Find.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
6
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
7
7
|
import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import type { MatchCaseProps } from '../types';
|
|
9
9
|
export declare const FIND_DEBOUNCE_MS = 100;
|
|
@@ -30,7 +30,7 @@ export type FindProps = {
|
|
|
30
30
|
setFindTyped: (value: boolean) => void;
|
|
31
31
|
shouldFocus: boolean;
|
|
32
32
|
} & MatchCaseProps;
|
|
33
|
-
declare const
|
|
33
|
+
declare const _default_1: React.FC<WithIntlProps<{
|
|
34
34
|
count: {
|
|
35
35
|
index: number;
|
|
36
36
|
total: number;
|
|
@@ -77,4 +77,4 @@ declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
|
|
|
77
77
|
shouldFocus: boolean;
|
|
78
78
|
} & MatchCaseProps & WrappedComponentProps>;
|
|
79
79
|
};
|
|
80
|
-
export default
|
|
80
|
+
export default _default_1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { FindReplaceToolbarButtonWithStateProps } from '../types';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
3
|
+
declare const _default_1: React.MemoExoticComponent<({ popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, isToolbarReducedSpacing, editorView, containerElement, dispatchAnalyticsEvent, takeFullWidth, api, isButtonHidden, doesNotHaveButton, }: FindReplaceToolbarButtonWithStateProps) => React.JSX.Element | null>;
|
|
4
|
+
export default _default_1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type WrappedComponentProps } from 'react-intl-next';
|
|
2
|
+
import { type WithIntlProps, type WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import type { FindReplaceProps } from './FindReplace';
|
|
5
5
|
export interface FindReplaceDropdownProps extends Omit<FindReplaceProps, 'count'> {
|
|
@@ -11,7 +11,7 @@ export interface FindReplaceDropdownProps extends Omit<FindReplaceProps, 'count'
|
|
|
11
11
|
numReplaceable?: number;
|
|
12
12
|
popupsMountPoint?: HTMLElement;
|
|
13
13
|
}
|
|
14
|
-
declare const
|
|
14
|
+
declare const _default_1: React.FC<WithIntlProps<FindReplaceDropdownProps & WrappedComponentProps>> & {
|
|
15
15
|
WrappedComponent: React.ComponentType<FindReplaceDropdownProps & WrappedComponentProps>;
|
|
16
16
|
};
|
|
17
|
-
export default
|
|
17
|
+
export default _default_1;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
6
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
7
7
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import type { FindReplaceProps } from './FindReplace';
|
|
9
9
|
export interface FindReplaceToolbarButtonProps extends Omit<FindReplaceProps, 'count'> {
|
|
@@ -20,7 +20,7 @@ export interface FindReplaceToolbarButtonProps extends Omit<FindReplaceProps, 'c
|
|
|
20
20
|
popupsScrollableElement?: HTMLElement;
|
|
21
21
|
takeFullWidth: boolean;
|
|
22
22
|
}
|
|
23
|
-
declare const
|
|
23
|
+
declare const _default_1: React.FC<WithIntlProps<FindReplaceToolbarButtonProps & WrappedComponentProps>> & {
|
|
24
24
|
WrappedComponent: React.ComponentType<FindReplaceToolbarButtonProps & WrappedComponentProps>;
|
|
25
25
|
};
|
|
26
|
-
export default
|
|
26
|
+
export default _default_1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
2
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
export type ReplaceProps = {
|
|
@@ -33,7 +33,7 @@ export type ReplaceProps = {
|
|
|
33
33
|
replaceText?: string;
|
|
34
34
|
setFindTyped: (value: boolean) => void;
|
|
35
35
|
};
|
|
36
|
-
declare const
|
|
36
|
+
declare const _default_1: React.FC<WithIntlProps<ReplaceProps & WrappedComponentProps>> & {
|
|
37
37
|
WrappedComponent: React.ComponentType<ReplaceProps & WrappedComponentProps>;
|
|
38
38
|
};
|
|
39
|
-
export default
|
|
39
|
+
export default _default_1;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
1
2
|
import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
-
export declare const activate: () =>
|
|
3
|
-
export declare const find: (editorView: EditorView, containerElement: HTMLElement | null, keyword?: string) =>
|
|
4
|
-
export declare const findNext: (editorView: EditorView) =>
|
|
5
|
-
export declare const findPrevious: (editorView: EditorView) =>
|
|
6
|
-
export declare const replace: (replaceText: string) =>
|
|
7
|
-
export declare const replaceAll: (replaceText: string) =>
|
|
8
|
-
export declare const addDecorations: (decorations: Decoration[]) =>
|
|
9
|
-
export declare const removeDecorations: (decorations: Decoration[]) =>
|
|
10
|
-
export declare const cancelSearch: () =>
|
|
11
|
-
export declare const blur: () =>
|
|
12
|
-
export declare const toggleMatchCase: () =>
|
|
3
|
+
export declare const activate: () => Command;
|
|
4
|
+
export declare const find: (editorView: EditorView, containerElement: HTMLElement | null, keyword?: string) => Command;
|
|
5
|
+
export declare const findNext: (editorView: EditorView) => Command;
|
|
6
|
+
export declare const findPrevious: (editorView: EditorView) => Command;
|
|
7
|
+
export declare const replace: (replaceText: string) => Command;
|
|
8
|
+
export declare const replaceAll: (replaceText: string) => Command;
|
|
9
|
+
export declare const addDecorations: (decorations: Decoration[]) => Command;
|
|
10
|
+
export declare const removeDecorations: (decorations: Decoration[]) => Command;
|
|
11
|
+
export declare const cancelSearch: () => Command;
|
|
12
|
+
export declare const blur: () => Command;
|
|
13
|
+
export declare const toggleMatchCase: () => Command;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorState, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
4
|
import type { FindReplacePluginState } from '../types';
|
|
3
|
-
|
|
5
|
+
import type { FindReplaceAction } from './actions';
|
|
6
|
+
export declare const createCommand: <A = FindReplaceAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
7
|
+
export declare const getPluginState: (state: EditorState) => FindReplacePluginState;
|
|
8
|
+
export declare const createPluginState: (dispatch: Dispatch, initialState: FindReplacePluginState | ((state: EditorState) => FindReplacePluginState)) => SafeStateField<FindReplacePluginState>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
6
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
7
7
|
import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import type { MatchCaseProps } from '../types';
|
|
9
9
|
export declare const FIND_DEBOUNCE_MS = 100;
|
|
@@ -30,7 +30,7 @@ export type FindProps = {
|
|
|
30
30
|
setFindTyped: (value: boolean) => void;
|
|
31
31
|
shouldFocus: boolean;
|
|
32
32
|
} & MatchCaseProps;
|
|
33
|
-
declare const
|
|
33
|
+
declare const _default_1: React.FC<WithIntlProps<{
|
|
34
34
|
count: {
|
|
35
35
|
index: number;
|
|
36
36
|
total: number;
|
|
@@ -77,4 +77,4 @@ declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
|
|
|
77
77
|
shouldFocus: boolean;
|
|
78
78
|
} & MatchCaseProps & WrappedComponentProps>;
|
|
79
79
|
};
|
|
80
|
-
export default
|
|
80
|
+
export default _default_1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { FindReplaceToolbarButtonWithStateProps } from '../types';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
3
|
+
declare const _default_1: React.MemoExoticComponent<({ popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, isToolbarReducedSpacing, editorView, containerElement, dispatchAnalyticsEvent, takeFullWidth, api, isButtonHidden, doesNotHaveButton, }: FindReplaceToolbarButtonWithStateProps) => React.JSX.Element | null>;
|
|
4
|
+
export default _default_1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type WrappedComponentProps } from 'react-intl-next';
|
|
2
|
+
import { type WithIntlProps, type WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import type { FindReplaceProps } from './FindReplace';
|
|
5
5
|
export interface FindReplaceDropdownProps extends Omit<FindReplaceProps, 'count'> {
|
|
@@ -11,7 +11,7 @@ export interface FindReplaceDropdownProps extends Omit<FindReplaceProps, 'count'
|
|
|
11
11
|
numReplaceable?: number;
|
|
12
12
|
popupsMountPoint?: HTMLElement;
|
|
13
13
|
}
|
|
14
|
-
declare const
|
|
14
|
+
declare const _default_1: React.FC<WithIntlProps<FindReplaceDropdownProps & WrappedComponentProps>> & {
|
|
15
15
|
WrappedComponent: React.ComponentType<FindReplaceDropdownProps & WrappedComponentProps>;
|
|
16
16
|
};
|
|
17
|
-
export default
|
|
17
|
+
export default _default_1;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
6
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
7
7
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import type { FindReplaceProps } from './FindReplace';
|
|
9
9
|
export interface FindReplaceToolbarButtonProps extends Omit<FindReplaceProps, 'count'> {
|
|
@@ -20,7 +20,7 @@ export interface FindReplaceToolbarButtonProps extends Omit<FindReplaceProps, 'c
|
|
|
20
20
|
popupsScrollableElement?: HTMLElement;
|
|
21
21
|
takeFullWidth: boolean;
|
|
22
22
|
}
|
|
23
|
-
declare const
|
|
23
|
+
declare const _default_1: React.FC<WithIntlProps<FindReplaceToolbarButtonProps & WrappedComponentProps>> & {
|
|
24
24
|
WrappedComponent: React.ComponentType<FindReplaceToolbarButtonProps & WrappedComponentProps>;
|
|
25
25
|
};
|
|
26
|
-
export default
|
|
26
|
+
export default _default_1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
2
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
export type ReplaceProps = {
|
|
@@ -33,7 +33,7 @@ export type ReplaceProps = {
|
|
|
33
33
|
replaceText?: string;
|
|
34
34
|
setFindTyped: (value: boolean) => void;
|
|
35
35
|
};
|
|
36
|
-
declare const
|
|
36
|
+
declare const _default_1: React.FC<WithIntlProps<ReplaceProps & WrappedComponentProps>> & {
|
|
37
37
|
WrappedComponent: React.ComponentType<ReplaceProps & WrappedComponentProps>;
|
|
38
38
|
};
|
|
39
|
-
export default
|
|
39
|
+
export default _default_1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-find-replace",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.2",
|
|
4
4
|
"description": "find replace plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/primitives": "^18.0.0",
|
|
45
45
|
"@atlaskit/textfield": "^8.2.0",
|
|
46
46
|
"@atlaskit/theme": "^22.0.0",
|
|
47
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
47
|
+
"@atlaskit/tmp-editor-statsig": "^37.0.0",
|
|
48
48
|
"@atlaskit/tokens": "^11.1.0",
|
|
49
49
|
"@atlaskit/tooltip": "^20.14.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"react-dom": "^18.2.0"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@atlaskit/editor-common": "^112.
|
|
64
|
+
"@atlaskit/editor-common": "^112.2.0",
|
|
65
65
|
"react": "^18.2.0",
|
|
66
66
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
67
67
|
},
|