@atlaskit/editor-plugin-find-replace 1.7.13 → 1.7.15
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 +15 -0
- package/dist/cjs/{plugin.js → findReplacePlugin.js} +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/{commands.js → pm-plugins/commands.js} +1 -1
- package/dist/cjs/pm-plugins/keymap.js +1 -1
- package/dist/cjs/pm-plugins/plugin-factory.js +6 -4
- package/dist/cjs/{utils → pm-plugins/utils}/batch-decorations.js +1 -1
- package/dist/cjs/{utils → pm-plugins/utils}/index.js +1 -1
- package/dist/cjs/types/index.js +5 -0
- package/dist/cjs/ui/Find.js +6 -6
- package/dist/cjs/ui/FindReplace.js +3 -3
- package/dist/cjs/{FindReplaceToolbarButtonWithState.js → ui/FindReplaceToolbarButtonWithState.js} +3 -3
- package/dist/cjs/ui/Replace.js +8 -8
- package/dist/cjs/ui/styles.js +17 -145
- package/dist/cjs/ui/ui-styles.js +152 -0
- package/dist/es2019/{plugin.js → findReplacePlugin.js} +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/{commands.js → pm-plugins/commands.js} +1 -1
- package/dist/es2019/pm-plugins/keymap.js +1 -1
- package/dist/es2019/pm-plugins/plugin-factory.js +4 -4
- package/dist/es2019/{utils → pm-plugins/utils}/batch-decorations.js +1 -1
- package/dist/es2019/{utils → pm-plugins/utils}/index.js +1 -1
- package/dist/es2019/ui/Find.js +1 -1
- package/dist/es2019/ui/FindReplace.js +1 -1
- package/dist/es2019/{FindReplaceToolbarButtonWithState.js → ui/FindReplaceToolbarButtonWithState.js} +3 -3
- package/dist/es2019/ui/Replace.js +1 -1
- package/dist/es2019/ui/styles.js +15 -143
- package/dist/es2019/ui/ui-styles.js +147 -0
- package/dist/esm/{plugin.js → findReplacePlugin.js} +1 -1
- package/dist/esm/findReplacePluginType.js +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/{commands.js → pm-plugins/commands.js} +1 -1
- package/dist/esm/pm-plugins/keymap.js +1 -1
- package/dist/esm/pm-plugins/plugin-factory.js +4 -4
- package/dist/esm/{utils → pm-plugins/utils}/batch-decorations.js +1 -1
- package/dist/esm/{utils → pm-plugins/utils}/index.js +1 -1
- package/dist/esm/types/index.js +1 -0
- package/dist/esm/ui/Find.js +1 -1
- package/dist/esm/ui/FindReplace.js +1 -1
- package/dist/esm/{FindReplaceToolbarButtonWithState.js → ui/FindReplaceToolbarButtonWithState.js} +3 -3
- package/dist/esm/ui/Replace.js +1 -1
- package/dist/esm/ui/styles.js +17 -146
- package/dist/esm/ui/ui-styles.js +147 -0
- package/dist/types/findReplacePlugin.d.ts +2 -0
- package/dist/types/findReplacePluginType.d.ts +18 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/{actions.d.ts → pm-plugins/actions.d.ts} +1 -1
- package/dist/types/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types/{reducer.d.ts → pm-plugins/reducer.d.ts} +1 -1
- package/dist/types/{utils → pm-plugins/utils}/index.d.ts +1 -1
- package/dist/{types-ts4.5/types.d.ts → types/types/index.d.ts} +2 -20
- package/dist/types/{FindReplaceToolbarButtonWithState.d.ts → ui/FindReplaceToolbarButtonWithState.d.ts} +1 -1
- package/dist/types/ui/styles.d.ts +3 -15
- package/dist/types/ui/ui-styles.d.ts +15 -0
- package/dist/types-ts4.5/findReplacePlugin.d.ts +2 -0
- package/dist/types-ts4.5/findReplacePluginType.d.ts +21 -0
- package/dist/types-ts4.5/index.d.ts +3 -2
- package/dist/types-ts4.5/{actions.d.ts → pm-plugins/actions.d.ts} +1 -1
- package/dist/types-ts4.5/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types-ts4.5/{reducer.d.ts → pm-plugins/reducer.d.ts} +1 -1
- package/dist/types-ts4.5/{utils → pm-plugins/utils}/index.d.ts +1 -1
- package/dist/{types/types.d.ts → types-ts4.5/types/index.d.ts} +2 -17
- package/dist/types-ts4.5/{FindReplaceToolbarButtonWithState.d.ts → ui/FindReplaceToolbarButtonWithState.d.ts} +1 -1
- package/dist/types-ts4.5/ui/styles.d.ts +3 -15
- package/dist/types-ts4.5/ui/ui-styles.d.ts +15 -0
- package/package.json +14 -11
- package/styles/package.json +5 -5
- package/dist/cjs/styles.js +0 -24
- package/dist/es2019/styles.js +0 -19
- package/dist/esm/styles.js +0 -18
- package/dist/types/plugin.d.ts +0 -2
- package/dist/types/styles.d.ts +0 -3
- package/dist/types-ts4.5/plugin.d.ts +0 -2
- package/dist/types-ts4.5/styles.d.ts +0 -3
- /package/dist/cjs/{types.js → findReplacePluginType.js} +0 -0
- /package/dist/cjs/{actions.js → pm-plugins/actions.js} +0 -0
- /package/dist/cjs/{commands-with-analytics.js → pm-plugins/commands-with-analytics.js} +0 -0
- /package/dist/cjs/{reducer.js → pm-plugins/reducer.js} +0 -0
- /package/dist/cjs/{utils → pm-plugins/utils}/array.js +0 -0
- /package/dist/cjs/{utils → pm-plugins/utils}/commands.js +0 -0
- /package/dist/es2019/{types.js → findReplacePluginType.js} +0 -0
- /package/dist/es2019/{actions.js → pm-plugins/actions.js} +0 -0
- /package/dist/es2019/{commands-with-analytics.js → pm-plugins/commands-with-analytics.js} +0 -0
- /package/dist/es2019/{reducer.js → pm-plugins/reducer.js} +0 -0
- /package/dist/es2019/{utils → pm-plugins/utils}/array.js +0 -0
- /package/dist/es2019/{utils → pm-plugins/utils}/commands.js +0 -0
- /package/dist/{esm/types.js → es2019/types/index.js} +0 -0
- /package/dist/esm/{actions.js → pm-plugins/actions.js} +0 -0
- /package/dist/esm/{commands-with-analytics.js → pm-plugins/commands-with-analytics.js} +0 -0
- /package/dist/esm/{reducer.js → pm-plugins/reducer.js} +0 -0
- /package/dist/esm/{utils → pm-plugins/utils}/array.js +0 -0
- /package/dist/esm/{utils → pm-plugins/utils}/commands.js +0 -0
- /package/dist/types/{commands-with-analytics.d.ts → pm-plugins/commands-with-analytics.d.ts} +0 -0
- /package/dist/types/{commands.d.ts → pm-plugins/commands.d.ts} +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/array.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/batch-decorations.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/commands.d.ts +0 -0
- /package/dist/types-ts4.5/{commands-with-analytics.d.ts → pm-plugins/commands-with-analytics.d.ts} +0 -0
- /package/dist/types-ts4.5/{commands.d.ts → pm-plugins/commands.d.ts} +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/array.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/batch-decorations.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/commands.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-find-replace
|
|
2
2
|
|
|
3
|
+
## 1.7.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#169604](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/169604)
|
|
8
|
+
[`11e14d646fe74`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/11e14d646fe74) -
|
|
9
|
+
ED-25811: refactors plugins to meet folder standards
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 1.7.14
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 1.7.13
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -8,10 +8,10 @@ exports.findReplacePlugin = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _types = require("@atlaskit/editor-common/types");
|
|
10
10
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
|
-
var _FindReplaceToolbarButtonWithState = _interopRequireDefault(require("./FindReplaceToolbarButtonWithState"));
|
|
12
11
|
var _keymap = _interopRequireDefault(require("./pm-plugins/keymap"));
|
|
13
12
|
var _main = require("./pm-plugins/main");
|
|
14
13
|
var _pluginKey = require("./pm-plugins/plugin-key");
|
|
14
|
+
var _FindReplaceToolbarButtonWithState = _interopRequireDefault(require("./ui/FindReplaceToolbarButtonWithState"));
|
|
15
15
|
var findReplacePlugin = exports.findReplacePlugin = function findReplacePlugin(_ref) {
|
|
16
16
|
var _api$primaryToolbar;
|
|
17
17
|
var props = _ref.config,
|
package/dist/cjs/index.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "findReplacePlugin", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function get() {
|
|
9
|
-
return
|
|
9
|
+
return _findReplacePlugin.findReplacePlugin;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
var
|
|
12
|
+
var _findReplacePlugin = require("./findReplacePlugin");
|
|
@@ -8,7 +8,7 @@ exports.toggleMatchCase = exports.replaceAll = exports.replace = exports.removeD
|
|
|
8
8
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
9
9
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
10
10
|
var _actions = require("./actions");
|
|
11
|
-
var _pluginFactory = require("./
|
|
11
|
+
var _pluginFactory = require("./plugin-factory");
|
|
12
12
|
var _utils = require("./utils");
|
|
13
13
|
var _batchDecorations = _interopRequireDefault(require("./utils/batch-decorations"));
|
|
14
14
|
var _commands = require("./utils/commands");
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
8
8
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
9
9
|
var _keymap = require("@atlaskit/editor-prosemirror/keymap");
|
|
10
|
-
var _commandsWithAnalytics = require("
|
|
10
|
+
var _commandsWithAnalytics = require("./commands-with-analytics");
|
|
11
11
|
var activateFindReplace = function activateFindReplace(editorAnalyticsAPI) {
|
|
12
12
|
return function (state, dispatch) {
|
|
13
13
|
(0, _commandsWithAnalytics.activateWithAnalytics)(editorAnalyticsAPI)({
|
|
@@ -9,13 +9,15 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
10
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
11
11
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
12
|
-
var _reducer = _interopRequireDefault(require("../reducer"));
|
|
13
|
-
var _utils2 = require("../utils");
|
|
14
|
-
var _array = require("../utils/array");
|
|
15
12
|
var _main = require("./main");
|
|
16
13
|
var _pluginKey = require("./plugin-key");
|
|
14
|
+
var _reducer = _interopRequireDefault(require("./reducer"));
|
|
15
|
+
var _utils2 = require("./utils");
|
|
16
|
+
var _array = require("./utils/array");
|
|
17
17
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
|
+
// TODO: move into index export
|
|
20
|
+
|
|
19
21
|
var handleDocChanged = function handleDocChanged(tr, pluginState) {
|
|
20
22
|
var isActive = pluginState.isActive,
|
|
21
23
|
findText = pluginState.findText;
|
|
@@ -9,7 +9,7 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
|
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
-
var _pluginFactory = require("../
|
|
12
|
+
var _pluginFactory = require("../plugin-factory");
|
|
13
13
|
var _index = require("./index");
|
|
14
14
|
// max number of decorations to apply at once
|
|
15
15
|
var batchIncrement = 100;
|
|
@@ -10,7 +10,7 @@ exports.getSelectedText = getSelectedText;
|
|
|
10
10
|
exports.removeMatchesFromSet = exports.removeDecorationsFromSet = exports.prevIndex = exports.nextIndex = exports.isMatchAffectedByStep = exports.getSelectionForMatch = void 0;
|
|
11
11
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
12
12
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
13
|
-
var _styles = require("
|
|
13
|
+
var _styles = require("../../ui/styles");
|
|
14
14
|
function getSelectedText(selection) {
|
|
15
15
|
var text = '';
|
|
16
16
|
var selectedContent = selection.content().content;
|
package/dist/cjs/ui/Find.js
CHANGED
|
@@ -23,7 +23,7 @@ var _form = require("@atlaskit/form");
|
|
|
23
23
|
var _keyboard = _interopRequireDefault(require("@atlaskit/icon/glyph/emoji/keyboard"));
|
|
24
24
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
25
25
|
var _FindReplaceTooltipButton = require("./FindReplaceTooltipButton");
|
|
26
|
-
var
|
|
26
|
+
var _uiStyles = require("./ui-styles");
|
|
27
27
|
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
28
28
|
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 */ /**
|
|
29
29
|
* @jsxRuntime classic
|
|
@@ -208,16 +208,16 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
208
208
|
var elemAfterInput =
|
|
209
209
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
210
210
|
(0, _react2.jsx)("div", {
|
|
211
|
-
css:
|
|
211
|
+
css: _uiStyles.afterInputSection
|
|
212
212
|
}, (0, _react2.jsx)("div", {
|
|
213
213
|
"aria-live": "polite"
|
|
214
214
|
}, findText &&
|
|
215
215
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
216
216
|
(0, _react2.jsx)("span", {
|
|
217
217
|
"data-testid": "textfield-count",
|
|
218
|
-
css: [
|
|
218
|
+
css: [_uiStyles.countStyles, _uiStyles.countStylesAlternateStyles]
|
|
219
219
|
}, count.total === 0 ? this.noResultsFound : resultsCount)), (0, _react2.jsx)("div", {
|
|
220
|
-
css:
|
|
220
|
+
css: _uiStyles.matchCaseSection
|
|
221
221
|
}, (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
222
222
|
title: this.matchCase,
|
|
223
223
|
appearance: "default",
|
|
@@ -230,9 +230,9 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
230
230
|
return (
|
|
231
231
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
232
232
|
(0, _react2.jsx)("div", {
|
|
233
|
-
css: [
|
|
233
|
+
css: [_uiStyles.sectionWrapperStyles, _uiStyles.sectionWrapperStylesAlternate]
|
|
234
234
|
}, (0, _react2.jsx)("div", {
|
|
235
|
-
css:
|
|
235
|
+
css: _uiStyles.textFieldWrapper
|
|
236
236
|
}, (0, _react2.jsx)(_form.Label, {
|
|
237
237
|
htmlFor: "find-text-field"
|
|
238
238
|
}, this.find), (0, _react2.jsx)(_textfield.default, {
|
|
@@ -16,7 +16,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
17
17
|
var _Find = _interopRequireDefault(require("./Find"));
|
|
18
18
|
var _Replace = _interopRequireDefault(require("./Replace"));
|
|
19
|
-
var
|
|
19
|
+
var _uiStyles = require("./ui-styles");
|
|
20
20
|
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
21
21
|
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 */ /**
|
|
22
22
|
* @jsxRuntime classic
|
|
@@ -118,7 +118,7 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
118
118
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
119
119
|
(0, _react2.jsx)("div", {
|
|
120
120
|
ref: this.modalRef,
|
|
121
|
-
css: [
|
|
121
|
+
css: [_uiStyles.wrapperStyles, _uiStyles.wrapperPaddingStyles]
|
|
122
122
|
}, (0, _react2.jsx)(_Find.default, {
|
|
123
123
|
allowMatchCase: allowMatchCase,
|
|
124
124
|
shouldMatchCase: shouldMatchCase,
|
|
@@ -136,7 +136,7 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
136
136
|
findTyped: this.state.findTyped,
|
|
137
137
|
setFindTyped: this.setFindTyped
|
|
138
138
|
}), (0, _react2.jsx)("hr", {
|
|
139
|
-
css:
|
|
139
|
+
css: _uiStyles.ruleStyles,
|
|
140
140
|
id: "replace-hr-element"
|
|
141
141
|
}), (0, _react2.jsx)(_Replace.default, {
|
|
142
142
|
canReplace: count.total > 0,
|
package/dist/cjs/{FindReplaceToolbarButtonWithState.js → ui/FindReplaceToolbarButtonWithState.js}
RENAMED
|
@@ -9,9 +9,9 @@ exports.default = void 0;
|
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
12
|
-
var _commands = require("
|
|
13
|
-
var _commandsWithAnalytics = require("
|
|
14
|
-
var _FindReplaceToolbarButton = _interopRequireDefault(require("./
|
|
12
|
+
var _commands = require("../pm-plugins/commands");
|
|
13
|
+
var _commandsWithAnalytics = require("../pm-plugins/commands-with-analytics");
|
|
14
|
+
var _FindReplaceToolbarButton = _interopRequireDefault(require("./FindReplaceToolbarButton"));
|
|
15
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
17
|
// light implementation of useSharedPluginState(). This is due to findreplace
|
package/dist/cjs/ui/Replace.js
CHANGED
|
@@ -25,7 +25,7 @@ var _chevronUp = _interopRequireDefault(require("@atlaskit/icon/glyph/hipchat/ch
|
|
|
25
25
|
var _primitives = require("@atlaskit/primitives");
|
|
26
26
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
27
27
|
var _FindReplaceTooltipButton = require("./FindReplaceTooltipButton");
|
|
28
|
-
var
|
|
28
|
+
var _uiStyles = require("./ui-styles");
|
|
29
29
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
30
30
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
31
31
|
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
@@ -216,9 +216,9 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
216
216
|
numberOfMatches: replaceCount
|
|
217
217
|
});
|
|
218
218
|
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", {
|
|
219
|
-
css: [
|
|
219
|
+
css: [_uiStyles.sectionWrapperStyles, _uiStyles.sectionWrapperStylesAlternate]
|
|
220
220
|
}, (0, _react2.jsx)("div", {
|
|
221
|
-
css:
|
|
221
|
+
css: _uiStyles.textFieldWrapper
|
|
222
222
|
}, (0, _react2.jsx)(_form.Label, {
|
|
223
223
|
htmlFor: "replace-text-field"
|
|
224
224
|
}, this.replaceWith), (0, _react2.jsx)(_textfield.default, {
|
|
@@ -243,11 +243,11 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
243
243
|
'\u00a0' is value for  
|
|
244
244
|
*/
|
|
245
245
|
this.state.fakeSuccessReplacementMessageUpdate ? resultsReplace.replace(/ /, "\xA0") : resultsReplace)))), (0, _react2.jsx)("div", {
|
|
246
|
-
css: [
|
|
246
|
+
css: [_uiStyles.sectionWrapperStyles, _uiStyles.sectionWrapperStylesAlternate, _uiStyles.sectionWrapperJustified]
|
|
247
247
|
}, (0, _react2.jsx)("div", {
|
|
248
|
-
css:
|
|
248
|
+
css: _uiStyles.orderOneStyles
|
|
249
249
|
}, (0, _react2.jsx)("div", {
|
|
250
|
-
css:
|
|
250
|
+
css: _uiStyles.nextPreviousItemStyles
|
|
251
251
|
}, (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
252
252
|
title: this.findNext,
|
|
253
253
|
icon: _chevronDown.default,
|
|
@@ -256,7 +256,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
256
256
|
onClick: this.handleFindNextClick,
|
|
257
257
|
disabled: count.total <= 1
|
|
258
258
|
})), (0, _react2.jsx)("div", {
|
|
259
|
-
css:
|
|
259
|
+
css: _uiStyles.nextPreviousItemStyles
|
|
260
260
|
}, (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
261
261
|
title: this.findPrevious,
|
|
262
262
|
icon: _chevronUp.default,
|
|
@@ -286,7 +286,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
286
286
|
onClick: this.handleReplaceAllClick,
|
|
287
287
|
isDisabled: !canReplace
|
|
288
288
|
}, this.replaceAll))), (0, _react2.jsx)("div", {
|
|
289
|
-
css:
|
|
289
|
+
css: _uiStyles.orderZeroStyles
|
|
290
290
|
}, (0, _react2.jsx)(_new.default, {
|
|
291
291
|
appearance: "subtle",
|
|
292
292
|
testId: this.closeFindReplaceDialog,
|
package/dist/cjs/ui/styles.js
CHANGED
|
@@ -1,152 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports.
|
|
7
|
+
exports.selectedSearchMatchClass = exports.searchMatchClass = exports.findReplaceStyles = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
7
9
|
var _react = require("@emotion/react");
|
|
8
|
-
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
9
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
10
|
-
var
|
|
11
|
-
/* eslint-disable @atlaskit/design-system/
|
|
12
|
-
/* eslint-disable @
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
width: '100%',
|
|
25
|
-
border: 'none',
|
|
26
|
-
backgroundColor: "".concat("var(--ds-border, ".concat(_colors.N30A, ")")),
|
|
27
|
-
margin: "var(--ds-space-050, 4px)".concat(" 0px"),
|
|
28
|
-
height: '1px',
|
|
29
|
-
borderRadius: '1px'
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
33
|
-
var wrapperStyles = exports.wrapperStyles = (0, _react.css)({
|
|
34
|
-
display: 'flex',
|
|
35
|
-
flexDirection: 'column',
|
|
36
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
37
|
-
'> *:not(#replace-hr-element)': {
|
|
38
|
-
margin: "0px ".concat("var(--ds-space-050, 4px)")
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
43
|
-
var wrapperPaddingStyles = exports.wrapperPaddingStyles = (0, _react.css)({
|
|
44
|
-
padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-050, 4px)")
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
48
|
-
var sectionWrapperStyles = exports.sectionWrapperStyles = (0, _react.css)({
|
|
49
|
-
display: 'flex',
|
|
50
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
51
|
-
'& > *': {
|
|
52
|
-
display: 'inline-flex',
|
|
53
|
-
height: '32px',
|
|
54
|
-
flex: '0 0 auto'
|
|
55
|
-
},
|
|
56
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
57
|
-
'& > [data-ds--text-field--container]': {
|
|
58
|
-
display: 'flex',
|
|
59
|
-
flex: '1 1 auto'
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
64
|
-
var sectionWrapperStylesAlternate = exports.sectionWrapperStylesAlternate = (0, _react.css)({
|
|
65
|
-
display: 'flex',
|
|
66
|
-
padding: "var(--ds-space-100, 8px)",
|
|
67
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
68
|
-
'& > *': {
|
|
69
|
-
height: 'unset'
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
74
|
-
var sectionWrapperJustified = exports.sectionWrapperJustified = (0, _react.css)({
|
|
75
|
-
justifyContent: 'space-between',
|
|
76
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
77
|
-
fontSize: (0, _editorSharedStyles.relativeFontSizeToBase16)(14)
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
81
|
-
var textFieldWrapper = exports.textFieldWrapper = (0, _react.css)({
|
|
82
|
-
flex: '1 100%',
|
|
83
|
-
flexWrap: 'wrap',
|
|
84
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
85
|
-
'#find-text-field, #replace-text-field': {
|
|
86
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
87
|
-
height: "".concat(gridSize * 4.5 / fontSize, "em")
|
|
88
|
-
},
|
|
89
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
90
|
-
label: {
|
|
91
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
92
|
-
fontSize: (0, _editorSharedStyles.relativeFontSizeToBase16)(14),
|
|
93
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
94
|
-
lineHeight: "".concat(gridSize * 2, "px")
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
99
|
-
var afterInputSection = exports.afterInputSection = (0, _react.css)({
|
|
100
|
-
display: 'flex',
|
|
101
|
-
flex: '0 0 auto',
|
|
102
|
-
alignItems: 'center'
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
106
|
-
var matchCaseSection = exports.matchCaseSection = (0, _react.css)({
|
|
107
|
-
paddingRight: "var(--ds-space-100, 8px)",
|
|
108
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
109
|
-
button: {
|
|
110
|
-
width: '20px',
|
|
111
|
-
height: '20px'
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
116
|
-
var nextPreviousItemStyles = exports.nextPreviousItemStyles = (0, _react.css)({
|
|
117
|
-
padding: "0px ".concat("var(--ds-space-025, 2px)")
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
121
|
-
var countStyles = exports.countStyles = (0, _react.css)({
|
|
122
|
-
color: "var(--ds-text-subtlest, #626F86)",
|
|
123
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
124
|
-
fontSize: "".concat((0, _editorSharedStyles.relativeFontSizeToBase16)(12)),
|
|
125
|
-
flex: '0 0 auto',
|
|
126
|
-
justifyContent: 'center',
|
|
127
|
-
alignItems: 'center',
|
|
128
|
-
marginLeft: "var(--ds-space-050, 4px)",
|
|
129
|
-
marginRight: "var(--ds-space-100, 8px)"
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
133
|
-
var countStylesAlternateStyles = exports.countStylesAlternateStyles = (0, _react.css)({
|
|
134
|
-
display: 'inline-flex',
|
|
135
|
-
height: '32px'
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
139
|
-
var countWrapperStyles = exports.countWrapperStyles = (0, _react.css)({
|
|
140
|
-
alignItems: 'center'
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
144
|
-
var orderZeroStyles = exports.orderZeroStyles = (0, _react.css)({
|
|
145
|
-
order: '0',
|
|
146
|
-
marginInline: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-025, 2px)")
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
150
|
-
var orderOneStyles = exports.orderOneStyles = (0, _react.css)({
|
|
151
|
-
order: '1'
|
|
152
|
-
});
|
|
11
|
+
var _css;
|
|
12
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage/preview */
|
|
13
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
14
|
+
/* eslint-disable */
|
|
15
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4290
|
|
16
|
+
var searchMatchClass = exports.searchMatchClass = 'search-match';
|
|
17
|
+
var selectedSearchMatchClass = exports.selectedSearchMatchClass = 'selected-search-match';
|
|
18
|
+
var findReplaceStyles = exports.findReplaceStyles = (0, _react.css)((_css = {}, (0, _defineProperty2.default)(_css, ".".concat(searchMatchClass), {
|
|
19
|
+
borderRadius: '3px',
|
|
20
|
+
backgroundColor: "var(--ds-background-accent-teal-subtlest, #E7F9FF)",
|
|
21
|
+
boxShadow: "var(--ds-shadow-raised, ".concat("0 1px 1px 0 ".concat(_colors.N50A, ", 0 0 1px 0 ").concat(_colors.N60A), ")") + ', inset 0 0 0 1px ' + "var(--ds-border-input, ".concat("".concat(_colors.N40A), ")")
|
|
22
|
+
}), (0, _defineProperty2.default)(_css, ".".concat(selectedSearchMatchClass), {
|
|
23
|
+
backgroundColor: "var(--ds-background-accent-teal-subtle, #6CC3E0)"
|
|
24
|
+
}), _css));
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.wrapperStyles = exports.wrapperPaddingStyles = exports.textFieldWrapper = exports.sectionWrapperStylesAlternate = exports.sectionWrapperStyles = exports.sectionWrapperJustified = exports.ruleStyles = exports.orderZeroStyles = exports.orderOneStyles = exports.nextPreviousItemStyles = exports.matchCaseSection = exports.countWrapperStyles = exports.countStylesAlternateStyles = exports.countStyles = exports.afterInputSection = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
9
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
10
|
+
var _constants = require("@atlaskit/theme/constants");
|
|
11
|
+
/* eslint-disable @atlaskit/design-system/no-nested-styles */
|
|
12
|
+
/* eslint-disable @repo/internal/styles/no-exported-styles */
|
|
13
|
+
/**
|
|
14
|
+
* @jsxRuntime classic
|
|
15
|
+
* @jsx jsx
|
|
16
|
+
*/
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
|
+
|
|
19
|
+
var fontSize = (0, _constants.fontSize)();
|
|
20
|
+
var gridSize = (0, _constants.gridSize)();
|
|
21
|
+
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
23
|
+
var ruleStyles = exports.ruleStyles = (0, _react.css)({
|
|
24
|
+
width: '100%',
|
|
25
|
+
border: 'none',
|
|
26
|
+
backgroundColor: "".concat("var(--ds-border, ".concat(_colors.N30A, ")")),
|
|
27
|
+
margin: "var(--ds-space-050, 4px)".concat(" 0px"),
|
|
28
|
+
height: '1px',
|
|
29
|
+
borderRadius: '1px'
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
33
|
+
var wrapperStyles = exports.wrapperStyles = (0, _react.css)({
|
|
34
|
+
display: 'flex',
|
|
35
|
+
flexDirection: 'column',
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
37
|
+
'> *:not(#replace-hr-element)': {
|
|
38
|
+
margin: "0px ".concat("var(--ds-space-050, 4px)")
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
43
|
+
var wrapperPaddingStyles = exports.wrapperPaddingStyles = (0, _react.css)({
|
|
44
|
+
padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-050, 4px)")
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
48
|
+
var sectionWrapperStyles = exports.sectionWrapperStyles = (0, _react.css)({
|
|
49
|
+
display: 'flex',
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
51
|
+
'& > *': {
|
|
52
|
+
display: 'inline-flex',
|
|
53
|
+
height: '32px',
|
|
54
|
+
flex: '0 0 auto'
|
|
55
|
+
},
|
|
56
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
57
|
+
'& > [data-ds--text-field--container]': {
|
|
58
|
+
display: 'flex',
|
|
59
|
+
flex: '1 1 auto'
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
64
|
+
var sectionWrapperStylesAlternate = exports.sectionWrapperStylesAlternate = (0, _react.css)({
|
|
65
|
+
display: 'flex',
|
|
66
|
+
padding: "var(--ds-space-100, 8px)",
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
68
|
+
'& > *': {
|
|
69
|
+
height: 'unset'
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
74
|
+
var sectionWrapperJustified = exports.sectionWrapperJustified = (0, _react.css)({
|
|
75
|
+
justifyContent: 'space-between',
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
77
|
+
fontSize: (0, _editorSharedStyles.relativeFontSizeToBase16)(14)
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
81
|
+
var textFieldWrapper = exports.textFieldWrapper = (0, _react.css)({
|
|
82
|
+
flex: '1 100%',
|
|
83
|
+
flexWrap: 'wrap',
|
|
84
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
85
|
+
'#find-text-field, #replace-text-field': {
|
|
86
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
87
|
+
height: "".concat(gridSize * 4.5 / fontSize, "em")
|
|
88
|
+
},
|
|
89
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
90
|
+
label: {
|
|
91
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
92
|
+
fontSize: (0, _editorSharedStyles.relativeFontSizeToBase16)(14),
|
|
93
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
94
|
+
lineHeight: "".concat(gridSize * 2, "px")
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
99
|
+
var afterInputSection = exports.afterInputSection = (0, _react.css)({
|
|
100
|
+
display: 'flex',
|
|
101
|
+
flex: '0 0 auto',
|
|
102
|
+
alignItems: 'center'
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
106
|
+
var matchCaseSection = exports.matchCaseSection = (0, _react.css)({
|
|
107
|
+
paddingRight: "var(--ds-space-100, 8px)",
|
|
108
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
109
|
+
button: {
|
|
110
|
+
width: '20px',
|
|
111
|
+
height: '20px'
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
116
|
+
var nextPreviousItemStyles = exports.nextPreviousItemStyles = (0, _react.css)({
|
|
117
|
+
padding: "0px ".concat("var(--ds-space-025, 2px)")
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
121
|
+
var countStyles = exports.countStyles = (0, _react.css)({
|
|
122
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
123
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
124
|
+
fontSize: "".concat((0, _editorSharedStyles.relativeFontSizeToBase16)(12)),
|
|
125
|
+
flex: '0 0 auto',
|
|
126
|
+
justifyContent: 'center',
|
|
127
|
+
alignItems: 'center',
|
|
128
|
+
marginLeft: "var(--ds-space-050, 4px)",
|
|
129
|
+
marginRight: "var(--ds-space-100, 8px)"
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
133
|
+
var countStylesAlternateStyles = exports.countStylesAlternateStyles = (0, _react.css)({
|
|
134
|
+
display: 'inline-flex',
|
|
135
|
+
height: '32px'
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
139
|
+
var countWrapperStyles = exports.countWrapperStyles = (0, _react.css)({
|
|
140
|
+
alignItems: 'center'
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
144
|
+
var orderZeroStyles = exports.orderZeroStyles = (0, _react.css)({
|
|
145
|
+
order: '0',
|
|
146
|
+
marginInline: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-025, 2px)")
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
150
|
+
var orderOneStyles = exports.orderOneStyles = (0, _react.css)({
|
|
151
|
+
order: '1'
|
|
152
|
+
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
-
import FindReplaceToolbarButtonWithState from './FindReplaceToolbarButtonWithState';
|
|
5
4
|
import keymapPlugin from './pm-plugins/keymap';
|
|
6
5
|
import { createPlugin } from './pm-plugins/main';
|
|
7
6
|
import { findReplacePluginKey } from './pm-plugins/plugin-key';
|
|
7
|
+
import FindReplaceToolbarButtonWithState from './ui/FindReplaceToolbarButtonWithState';
|
|
8
8
|
export const findReplacePlugin = ({
|
|
9
9
|
config: props,
|
|
10
10
|
api
|
package/dist/es2019/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { findReplacePlugin } from './
|
|
1
|
+
export { findReplacePlugin } from './findReplacePlugin';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import { FindReplaceActionTypes } from './actions';
|
|
4
|
-
import { createCommand, getPluginState } from './
|
|
4
|
+
import { createCommand, getPluginState } from './plugin-factory';
|
|
5
5
|
import { createDecoration, findDecorationFromMatch, findMatches, findSearchIndex, getSelectedText, getSelectionForMatch, nextIndex, prevIndex, removeDecorationsFromSet, removeMatchesFromSet } from './utils';
|
|
6
6
|
import batchDecorations from './utils/batch-decorations';
|
|
7
7
|
import { withScrollIntoView } from './utils/commands';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { bindKeymapWithCommand, find as findKeymap } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
4
|
-
import { activateWithAnalytics } from '
|
|
4
|
+
import { activateWithAnalytics } from './commands-with-analytics';
|
|
5
5
|
const activateFindReplace = editorAnalyticsAPI => (state, dispatch) => {
|
|
6
6
|
activateWithAnalytics(editorAnalyticsAPI)({
|
|
7
7
|
triggerMethod: TRIGGER_METHOD.SHORTCUT
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { pluginFactory, stepHasSlice } from '@atlaskit/editor-common/utils';
|
|
2
2
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
import reducer from '../reducer';
|
|
4
|
-
import { createDecorations, findDecorationFromMatch, findMatches, findSearchIndex, isMatchAffectedByStep, removeDecorationsFromSet, removeMatchesFromSet } from '../utils';
|
|
5
|
-
import { findUniqueItemsIn } from '../utils/array'; // TODO: move into index export
|
|
6
|
-
|
|
7
3
|
import { initialState } from './main';
|
|
8
4
|
import { findReplacePluginKey } from './plugin-key';
|
|
5
|
+
import reducer from './reducer';
|
|
6
|
+
import { createDecorations, findDecorationFromMatch, findMatches, findSearchIndex, isMatchAffectedByStep, removeDecorationsFromSet, removeMatchesFromSet } from './utils';
|
|
7
|
+
import { findUniqueItemsIn } from './utils/array'; // TODO: move into index export
|
|
8
|
+
|
|
9
9
|
const handleDocChanged = (tr, pluginState) => {
|
|
10
10
|
const {
|
|
11
11
|
isActive,
|