@atlaskit/editor-plugin-find-replace 3.2.6 → 3.2.8
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 +17 -0
- package/dist/cjs/pm-plugins/commands.js +3 -4
- package/dist/cjs/pm-plugins/plugin-factory.js +1 -2
- package/dist/cjs/ui/Find.js +1 -2
- package/dist/cjs/ui/Replace.js +2 -3
- package/dist/cjs/ui/ReplaceNext.js +2 -3
- package/dist/cjs/ui/styles.js +3 -98
- package/dist/es2019/pm-plugins/commands.js +3 -4
- package/dist/es2019/pm-plugins/plugin-factory.js +1 -2
- package/dist/es2019/ui/Find.js +1 -2
- package/dist/es2019/ui/Replace.js +2 -3
- package/dist/es2019/ui/ReplaceNext.js +2 -3
- package/dist/es2019/ui/styles.js +0 -205
- package/dist/esm/pm-plugins/commands.js +3 -4
- package/dist/esm/pm-plugins/plugin-factory.js +1 -2
- package/dist/esm/ui/Find.js +1 -2
- package/dist/esm/ui/Replace.js +2 -3
- package/dist/esm/ui/ReplaceNext.js +2 -3
- package/dist/esm/ui/styles.js +2 -97
- package/dist/types/findReplacePluginType.d.ts +4 -4
- package/dist/types/pm-plugins/actions.d.ts +15 -15
- package/dist/types/pm-plugins/commands-with-analytics.d.ts +2 -2
- package/dist/types/pm-plugins/utils/index.d.ts +4 -4
- package/dist/types/types/index.d.ts +28 -28
- package/dist/types/ui/Find.d.ts +24 -24
- package/dist/types/ui/FindReplace.d.ts +10 -10
- package/dist/types/ui/FindReplaceDropdown.d.ts +2 -2
- package/dist/types/ui/FindReplaceToolbarButton.d.ts +5 -5
- package/dist/types/ui/FindReplaceTooltipButton.d.ts +4 -4
- package/dist/types/ui/Replace.d.ts +17 -17
- package/dist/types/ui/ReplaceNext.d.ts +16 -16
- package/dist/types/ui/styles.d.ts +0 -1
- package/dist/types-ts4.5/findReplacePluginType.d.ts +4 -4
- package/dist/types-ts4.5/pm-plugins/actions.d.ts +15 -15
- package/dist/types-ts4.5/pm-plugins/commands-with-analytics.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/utils/index.d.ts +4 -4
- package/dist/types-ts4.5/types/index.d.ts +28 -28
- package/dist/types-ts4.5/ui/Find.d.ts +24 -24
- package/dist/types-ts4.5/ui/FindReplace.d.ts +10 -10
- package/dist/types-ts4.5/ui/FindReplaceDropdown.d.ts +2 -2
- package/dist/types-ts4.5/ui/FindReplaceToolbarButton.d.ts +5 -5
- package/dist/types-ts4.5/ui/FindReplaceTooltipButton.d.ts +4 -4
- package/dist/types-ts4.5/ui/Replace.d.ts +17 -17
- package/dist/types-ts4.5/ui/ReplaceNext.d.ts +16 -16
- package/dist/types-ts4.5/ui/styles.d.ts +0 -1
- package/package.json +6 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-find-replace
|
|
2
2
|
|
|
3
|
+
## 3.2.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`e229628ac96dd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e229628ac96dd) -
|
|
8
|
+
[ED-28430] clean up FG platform_editor_find_and_replace_improvements_1 for find & replace
|
|
9
|
+
additional fixes
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 3.2.7
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
|
|
17
|
+
Sorted type and interface props to improve Atlaskit docs
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 3.2.6
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.toggleMatchCase = exports.replaceAll = exports.replace = exports.removeDecorations = exports.findPrevious = exports.findNext = exports.find = exports.cancelSearch = exports.blur = exports.addDecorations = exports.activate = void 0;
|
|
8
8
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
9
9
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
10
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
12
11
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
13
12
|
var _actions = require("./actions");
|
|
@@ -36,7 +35,7 @@ var activate = exports.activate = function activate() {
|
|
|
36
35
|
getIntl: getIntl,
|
|
37
36
|
api: api
|
|
38
37
|
});
|
|
39
|
-
index = (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true)
|
|
38
|
+
index = (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? (0, _utils.findClosestMatch)(selection.from, matches) : (0, _utils.findSearchIndex)(selection.from, matches);
|
|
40
39
|
}
|
|
41
40
|
return {
|
|
42
41
|
type: _actions.FindReplaceActionTypes.ACTIVATE,
|
|
@@ -60,7 +59,7 @@ var find = exports.find = function find(editorView, containerElement, keyword) {
|
|
|
60
59
|
getIntl: getIntl,
|
|
61
60
|
api: api
|
|
62
61
|
}) : [];
|
|
63
|
-
var index = (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true)
|
|
62
|
+
var index = (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? (0, _utils.findClosestMatch)(selection.from, matches) : (0, _utils.findSearchIndex)(selection.from, matches);
|
|
64
63
|
|
|
65
64
|
// we can't just apply all the decorations to highlight the search results at once
|
|
66
65
|
// as if there are a lot ProseMirror cries :'(
|
|
@@ -89,7 +88,7 @@ var find = exports.find = function find(editorView, containerElement, keyword) {
|
|
|
89
88
|
api: api
|
|
90
89
|
}) : [];
|
|
91
90
|
if (matches.length > 0) {
|
|
92
|
-
var index = (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true)
|
|
91
|
+
var index = (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? (0, _utils.findClosestMatch)(selection.from, matches) : (0, _utils.findSearchIndex)(selection.from, matches);
|
|
93
92
|
var newSelection = (0, _utils.getSelectionForMatch)(tr.selection, tr.doc, index, matches);
|
|
94
93
|
if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_toggle_expand_on_match_found', 'isEnabled', true)) {
|
|
95
94
|
var _api$expand;
|
|
@@ -9,7 +9,6 @@ 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 _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
13
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
15
14
|
var _main = require("./main");
|
|
@@ -104,7 +103,7 @@ var handleDocChanged = function handleDocChanged(tr, pluginState) {
|
|
|
104
103
|
});
|
|
105
104
|
}
|
|
106
105
|
if (newIndex === undefined || newIndex === -1) {
|
|
107
|
-
newIndex = (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true)
|
|
106
|
+
newIndex = (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? (0, _utils2.findClosestMatch)(tr.selection.from, newMatches) : (0, _utils2.findSearchIndex)(tr.selection.from, newMatches);
|
|
108
107
|
}
|
|
109
108
|
var newSelectedMatch = newMatches[newIndex];
|
|
110
109
|
decorationSet = (0, _utils2.removeMatchesFromSet)(decorationSet, [selectedMatch, newSelectedMatch], tr.doc);
|
package/dist/cjs/ui/Find.js
CHANGED
|
@@ -22,7 +22,6 @@ var _form = require("@atlaskit/form");
|
|
|
22
22
|
var _textLetterCase = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-letter-case"));
|
|
23
23
|
var _textStyleEmojiKeyboard = _interopRequireDefault(require("@atlaskit/icon/core/migration/text-style--emoji-keyboard"));
|
|
24
24
|
var _textStyle = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/text-style"));
|
|
25
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
26
25
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
27
26
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
28
27
|
var _FindReplaceTooltipButton = require("./FindReplaceTooltipButton");
|
|
@@ -141,7 +140,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
141
140
|
}
|
|
142
141
|
});
|
|
143
142
|
(0, _defineProperty2.default)(_this, "matchCaseIconEle", function (iconProps) {
|
|
144
|
-
return (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true)
|
|
143
|
+
return (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? (0, _react2.jsx)(_textLetterCase.default, {
|
|
145
144
|
LEGACY_size: 'small',
|
|
146
145
|
LEGACY_fallbackIcon: _textStyle.default,
|
|
147
146
|
label: (0, _expValEquals.expValEquals)('platform_editor_find_replace_a11y_fixes', 'isEnabled', true) ? iconProps.label : _this.matchCase,
|
package/dist/cjs/ui/Replace.js
CHANGED
|
@@ -22,7 +22,6 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
22
22
|
var _form = require("@atlaskit/form");
|
|
23
23
|
var _chevronDownHipchatChevronDown = _interopRequireDefault(require("@atlaskit/icon/core/migration/chevron-down--hipchat-chevron-down"));
|
|
24
24
|
var _chevronUpHipchatChevronUp = _interopRequireDefault(require("@atlaskit/icon/core/migration/chevron-up--hipchat-chevron-up"));
|
|
25
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
26
25
|
var _primitives = require("@atlaskit/primitives");
|
|
27
26
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
28
27
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
@@ -292,9 +291,9 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
292
291
|
// Ignored via go/ees005
|
|
293
292
|
// eslint-disable-next-line require-unicode-regexp
|
|
294
293
|
resultsReplace.replace(/ /, "\xA0") : resultsReplace)))), (0, _react2.jsx)("div", {
|
|
295
|
-
css: (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true)
|
|
294
|
+
css: (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? [sectionWrapperStyles, sectionWrapperStylesAlternate, sectionWrapperJustified, sectionWrapperFlexWrap] : [sectionWrapperStyles, sectionWrapperStylesAlternate, sectionWrapperJustified]
|
|
296
295
|
}, (0, _react2.jsx)("div", {
|
|
297
|
-
css: (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true)
|
|
296
|
+
css: (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? orderOneStylesNew : orderOneStyles
|
|
298
297
|
}, (0, _react2.jsx)("div", {
|
|
299
298
|
css: _uiStyles.nextPreviousItemStyles
|
|
300
299
|
}, (0, _react2.jsx)(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
@@ -15,7 +15,6 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
15
15
|
var _form = require("@atlaskit/form");
|
|
16
16
|
var _chevronDownHipchatChevronDown = _interopRequireDefault(require("@atlaskit/icon/core/migration/chevron-down--hipchat-chevron-down"));
|
|
17
17
|
var _chevronUpHipchatChevronUp = _interopRequireDefault(require("@atlaskit/icon/core/migration/chevron-up--hipchat-chevron-up"));
|
|
18
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
18
|
var _primitives = require("@atlaskit/primitives");
|
|
20
19
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
21
20
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
@@ -225,7 +224,7 @@ var Replace = function Replace(_ref) {
|
|
|
225
224
|
resultsReplace.replace(/ /, "\xA0") : resultsReplace)), /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
226
225
|
xcss: actionButtonContainerStyles
|
|
227
226
|
}, /*#__PURE__*/_react.default.createElement(_primitives.Inline, {
|
|
228
|
-
xcss: (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true)
|
|
227
|
+
xcss: (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? [actionButtonInlineStyles, actionButtonParentInlineStylesNew] : [actionButtonInlineStyles, actionButtonParentInlineStyles]
|
|
229
228
|
}, /*#__PURE__*/_react.default.createElement(_primitives.Inline, {
|
|
230
229
|
xcss: actionButtonInlineStyles
|
|
231
230
|
}, /*#__PURE__*/_react.default.createElement(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
|
|
@@ -263,7 +262,7 @@ var Replace = function Replace(_ref) {
|
|
|
263
262
|
id: "replaceAll-button",
|
|
264
263
|
onClick: handleReplaceAllClick,
|
|
265
264
|
isDisabled: (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? count.totalReplaceable === 0 : !canReplace
|
|
266
|
-
}, replaceAll)), (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true)
|
|
265
|
+
}, replaceAll)), (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? /*#__PURE__*/_react.default.createElement(_primitives.Inline, {
|
|
267
266
|
xcss: closeButtonInlineStyles
|
|
268
267
|
}, /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
269
268
|
appearance: "subtle",
|
package/dist/cjs/ui/styles.js
CHANGED
|
@@ -4,12 +4,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.selectedSearchMatchClass = exports.selectedBlockSearchMatchClass = exports.searchMatchTextClass = exports.searchMatchExpandTitleClass = exports.searchMatchClass = exports.
|
|
7
|
+
exports.selectedSearchMatchClass = exports.selectedBlockSearchMatchClass = exports.searchMatchTextClass = exports.searchMatchExpandTitleClass = exports.searchMatchClass = exports.findReplaceStylesNew = exports.findReplaceStyles = exports.darkModeSearchMatchClass = exports.blockSearchMatchClass = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
11
11
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
12
|
-
var _css2
|
|
12
|
+
var _css2;
|
|
13
13
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
14
14
|
// Entry file in package.json
|
|
15
15
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage/preview */
|
|
@@ -36,101 +36,6 @@ var findReplaceStyles = exports.findReplaceStyles = (0, _react.css)((0, _defineP
|
|
|
36
36
|
backgroundColor: "var(--ds-background-accent-teal-subtle, #6CC3E0)"
|
|
37
37
|
}));
|
|
38
38
|
var findReplaceStylesNew = exports.findReplaceStylesNew = (0, _react.css)((_css2 = {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css2, ".".concat(searchMatchTextClass), {
|
|
39
|
-
borderRadius: "var(--ds-space-050, 4px)",
|
|
40
|
-
boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtler, #FDD0EC)", "\n\t\t"),
|
|
41
|
-
// TODO: ED-28376 - clean up !important later
|
|
42
|
-
backgroundColor: "var(--ds-background-accent-magenta-subtler, #FDD0EC)".concat(" !important"),
|
|
43
|
-
color: "var(--ds-text, #172B4D)"
|
|
44
|
-
}), ".".concat(searchMatchTextClass, ".").concat(selectedSearchMatchClass), {
|
|
45
|
-
boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)", "\n\t\t"),
|
|
46
|
-
// TODO: ED-28376 - clean up !important later
|
|
47
|
-
backgroundColor: "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)".concat(" !important")
|
|
48
|
-
}), ".".concat(searchMatchTextClass, ".").concat(darkModeSearchMatchClass), {
|
|
49
|
-
boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-pressed, #50253F)", "\n\t\t"),
|
|
50
|
-
// TODO: ED-28376 - clean up !important later
|
|
51
|
-
backgroundColor: "var(--ds-background-accent-magenta-bolder-pressed, #50253F)".concat(" !important"),
|
|
52
|
-
color: "var(--ds-text-inverse, #FFFFFF)"
|
|
53
|
-
}), ".".concat(searchMatchTextClass, ".").concat(selectedSearchMatchClass, ".").concat(darkModeSearchMatchClass), {
|
|
54
|
-
boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-hovered, #943D73)", "\n\t\t"),
|
|
55
|
-
// TODO: ED-28376 - clean up !important later
|
|
56
|
-
backgroundColor: "var(--ds-background-accent-magenta-bolder-hovered, #943D73)".concat(" !important")
|
|
57
|
-
}), ".".concat(blockSearchMatchClass), (0, _defineProperty2.default)({
|
|
58
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
59
|
-
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
60
|
-
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtler, #FDD0EC)", "\n\t\t\t")
|
|
61
|
-
}
|
|
62
|
-
}, "".concat(inlineCardSelector, ", ").concat(inlineCardWithHoverPreviewSelector, ", ").concat(statusSelector, ", ").concat(mentionSelector, ", ").concat(dateSelector), {
|
|
63
|
-
boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-magenta-subtler, #FDD0EC)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-subtler-pressed, #E774BB)")
|
|
64
|
-
})), ".".concat(blockSearchMatchClass, ".").concat(selectedBlockSearchMatchClass), (0, _defineProperty2.default)({
|
|
65
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
66
|
-
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
67
|
-
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)", "\n\t\t\t")
|
|
68
|
-
}
|
|
69
|
-
}, "".concat(inlineCardSelector, ", ").concat(inlineCardWithHoverPreviewSelector, ", ").concat(statusSelector, ", ").concat(mentionSelector, ", ").concat(dateSelector), {
|
|
70
|
-
boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-subtler-pressed, #E774BB)")
|
|
71
|
-
})), ".".concat(blockSearchMatchClass, ".ak-editor-selected-node"), (0, _defineProperty2.default)({
|
|
72
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
73
|
-
'.loader-wrapper>div::after': {
|
|
74
|
-
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtler, #FDD0EC)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
|
|
75
|
-
}
|
|
76
|
-
}, "".concat(inlineCardSelector, ", ").concat(inlineCardWithHoverPreviewSelector, ", ").concat(statusSelector, ", ").concat(mentionSelector, ", ").concat(dateSelector), {
|
|
77
|
-
// TODO: ED-28376 - will clean up !important later
|
|
78
|
-
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-magenta-subtler, #FDD0EC)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", " !important")
|
|
79
|
-
})), ".".concat(blockSearchMatchClass, ".").concat(selectedBlockSearchMatchClass, ".ak-editor-selected-node"), (0, _defineProperty2.default)({
|
|
80
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
81
|
-
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
82
|
-
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
|
|
83
|
-
}
|
|
84
|
-
}, "".concat(inlineCardSelector, ", ").concat(inlineCardWithHoverPreviewSelector, ", ").concat(statusSelector, ", ").concat(mentionSelector, ", ").concat(dateSelector), {
|
|
85
|
-
// TODO: ED-28376 - will clean up !important later
|
|
86
|
-
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", " !important")
|
|
87
|
-
})), ".".concat(blockSearchMatchClass, ".").concat(darkModeSearchMatchClass), (0, _defineProperty2.default)({
|
|
88
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
89
|
-
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
90
|
-
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-pressed, #50253F)", "\n\t\t\t")
|
|
91
|
-
}
|
|
92
|
-
}, "".concat(inlineCardSelector, ", ").concat(inlineCardWithHoverPreviewSelector, ", ").concat(statusSelector, ", ").concat(mentionSelector, ", ").concat(dateSelector), {
|
|
93
|
-
boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-magenta-bolder-pressed, #50253F)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-bolder, #AE4787)")
|
|
94
|
-
})), ".".concat(blockSearchMatchClass, ".").concat(selectedBlockSearchMatchClass, ".").concat(darkModeSearchMatchClass), (0, _defineProperty2.default)({
|
|
95
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
96
|
-
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
97
|
-
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-magenta-bolder-hovered, #943D73)", "\n\t\t\t")
|
|
98
|
-
}
|
|
99
|
-
}, "".concat(inlineCardSelector, ", ").concat(inlineCardWithHoverPreviewSelector, ", ").concat(statusSelector, ", ").concat(mentionSelector, ", ").concat(dateSelector), {
|
|
100
|
-
boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-magenta-bolder-hovered, #943D73)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-bolder, #AE4787)")
|
|
101
|
-
})), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css2, ".".concat(blockSearchMatchClass, ".").concat(darkModeSearchMatchClass, ".ak-editor-selected-node"), (0, _defineProperty2.default)({
|
|
102
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
103
|
-
'.loader-wrapper>div::after': {
|
|
104
|
-
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-pressed, #50253F)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
|
|
105
|
-
}
|
|
106
|
-
}, "".concat(inlineCardSelector, ", ").concat(inlineCardWithHoverPreviewSelector, ", ").concat(statusSelector, ", ").concat(mentionSelector, ", ").concat(dateSelector), {
|
|
107
|
-
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-magenta-bolder-pressed, #50253F)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-bolder, #AE4787)", " !important")
|
|
108
|
-
})), ".".concat(blockSearchMatchClass, ".").concat(selectedBlockSearchMatchClass, ".").concat(darkModeSearchMatchClass, ".ak-editor-selected-node"), (0, _defineProperty2.default)({
|
|
109
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
110
|
-
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
111
|
-
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-magenta-bolder-hovered, #943D73)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
|
|
112
|
-
}
|
|
113
|
-
}, "".concat(inlineCardSelector, ", ").concat(inlineCardWithHoverPreviewSelector, ", ").concat(statusSelector, ", ").concat(mentionSelector, ", ").concat(dateSelector), {
|
|
114
|
-
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-magenta-bolder-hovered, #943D73)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-bolder, #AE4787)", " !important")
|
|
115
|
-
})), ".".concat(searchMatchExpandTitleClass, " > .").concat(_styles.expandClassNames.titleContainer, " > .").concat(_styles.expandClassNames.inputContainer), (0, _defineProperty2.default)({
|
|
116
|
-
borderRadius: "var(--ds-space-050, 4px)",
|
|
117
|
-
boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtler, #FDD0EC)", "\n\t\t"),
|
|
118
|
-
backgroundColor: "var(--ds-background-accent-magenta-subtler, #FDD0EC)"
|
|
119
|
-
}, ".".concat(_styles.expandClassNames.titleInput), {
|
|
120
|
-
color: "var(--ds-text, #172B4D)"
|
|
121
|
-
})), ".".concat(searchMatchExpandTitleClass, ".").concat(selectedSearchMatchClass, " > .").concat(_styles.expandClassNames.titleContainer, " > .").concat(_styles.expandClassNames.inputContainer), {
|
|
122
|
-
boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)", "\n\t\t"),
|
|
123
|
-
backgroundColor: "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)"
|
|
124
|
-
}), ".".concat(searchMatchExpandTitleClass, ".").concat(darkModeSearchMatchClass, " > .").concat(_styles.expandClassNames.titleContainer, " > .").concat(_styles.expandClassNames.inputContainer), (0, _defineProperty2.default)({
|
|
125
|
-
boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-pressed, #50253F)", "\n\t\t"),
|
|
126
|
-
backgroundColor: "var(--ds-background-accent-magenta-bolder-pressed, #50253F)"
|
|
127
|
-
}, ".".concat(_styles.expandClassNames.titleInput), {
|
|
128
|
-
color: "var(--ds-text-inverse, #FFFFFF)"
|
|
129
|
-
})), ".".concat(searchMatchExpandTitleClass, ".").concat(selectedSearchMatchClass, ".").concat(darkModeSearchMatchClass, " > .").concat(_styles.expandClassNames.titleContainer, " > .").concat(_styles.expandClassNames.inputContainer), {
|
|
130
|
-
boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-hovered, #943D73)", "\n\t\t"),
|
|
131
|
-
backgroundColor: "var(--ds-background-accent-magenta-bolder-hovered, #943D73)"
|
|
132
|
-
})));
|
|
133
|
-
var findReplaceStylesNewNoImportant = exports.findReplaceStylesNewNoImportant = (0, _react.css)((_css3 = {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css3, ".".concat(searchMatchTextClass), {
|
|
134
39
|
borderRadius: "var(--ds-space-050, 4px)",
|
|
135
40
|
boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtler, #FDD0EC)", "\n\t\t"),
|
|
136
41
|
// we need to use !important here as we need to override inline selection styles
|
|
@@ -189,7 +94,7 @@ var findReplaceStylesNewNoImportant = exports.findReplaceStylesNewNoImportant =
|
|
|
189
94
|
}
|
|
190
95
|
}, "".concat(inlineCardSelector, ", ").concat(inlineCardWithHoverPreviewSelector, ", ").concat(statusSelector, ", ").concat(mentionSelector, ", ").concat(dateSelector), {
|
|
191
96
|
boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-magenta-bolder-hovered, #943D73)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-bolder, #AE4787)")
|
|
192
|
-
})), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(
|
|
97
|
+
})), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css2, ".".concat(blockSearchMatchClass, ".").concat(darkModeSearchMatchClass, ".ak-editor-selected-node, .").concat(blockSearchMatchClass, ".").concat(darkModeSearchMatchClass, ".mentionView-content-wrap.ak-editor-selected-node"), (0, _defineProperty2.default)({
|
|
193
98
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
194
99
|
'.loader-wrapper>div::after': {
|
|
195
100
|
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-pressed, #50253F)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
4
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
6
5
|
import { FindReplaceActionTypes } from './actions';
|
|
@@ -31,7 +30,7 @@ export const activate = () => createCommand(state => {
|
|
|
31
30
|
getIntl,
|
|
32
31
|
api
|
|
33
32
|
});
|
|
34
|
-
index = expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true)
|
|
33
|
+
index = expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? findClosestMatch(selection.from, matches) : findSearchIndex(selection.from, matches);
|
|
35
34
|
}
|
|
36
35
|
return {
|
|
37
36
|
type: FindReplaceActionTypes.ACTIVATE,
|
|
@@ -56,7 +55,7 @@ export const find = (editorView, containerElement, keyword) => withScrollIntoVie
|
|
|
56
55
|
getIntl,
|
|
57
56
|
api
|
|
58
57
|
}) : [];
|
|
59
|
-
const index = expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true)
|
|
58
|
+
const index = expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? findClosestMatch(selection.from, matches) : findSearchIndex(selection.from, matches);
|
|
60
59
|
|
|
61
60
|
// we can't just apply all the decorations to highlight the search results at once
|
|
62
61
|
// as if there are a lot ProseMirror cries :'(
|
|
@@ -84,7 +83,7 @@ export const find = (editorView, containerElement, keyword) => withScrollIntoVie
|
|
|
84
83
|
api
|
|
85
84
|
}) : [];
|
|
86
85
|
if (matches.length > 0) {
|
|
87
|
-
const index = expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true)
|
|
86
|
+
const index = expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? findClosestMatch(selection.from, matches) : findSearchIndex(selection.from, matches);
|
|
88
87
|
const newSelection = getSelectionForMatch(tr.selection, tr.doc, index, matches);
|
|
89
88
|
if (expValEqualsNoExposure('platform_editor_toggle_expand_on_match_found', 'isEnabled', true)) {
|
|
90
89
|
var _api$expand;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { pluginFactory, stepHasSlice } from '@atlaskit/editor-common/utils';
|
|
2
2
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
4
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
6
5
|
import { initialState } from './main';
|
|
@@ -84,7 +83,7 @@ const handleDocChanged = (tr, pluginState) => {
|
|
|
84
83
|
newIndex = newMatches.findIndex(match => match.start === selectedMatch.start);
|
|
85
84
|
}
|
|
86
85
|
if (newIndex === undefined || newIndex === -1) {
|
|
87
|
-
newIndex = expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true)
|
|
86
|
+
newIndex = expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? findClosestMatch(tr.selection.from, newMatches) : findSearchIndex(tr.selection.from, newMatches);
|
|
88
87
|
}
|
|
89
88
|
const newSelectedMatch = newMatches[newIndex];
|
|
90
89
|
decorationSet = removeMatchesFromSet(decorationSet, [selectedMatch, newSelectedMatch], tr.doc);
|
package/dist/es2019/ui/Find.js
CHANGED
|
@@ -17,7 +17,6 @@ import { Label } from '@atlaskit/form';
|
|
|
17
17
|
import TextLetterCaseIcon from '@atlaskit/icon-lab/core/text-letter-case';
|
|
18
18
|
import MatchCaseIcon from '@atlaskit/icon/core/migration/text-style--emoji-keyboard';
|
|
19
19
|
import EditorTextStyleIcon from '@atlaskit/icon/glyph/editor/text-style';
|
|
20
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
20
|
import Textfield from '@atlaskit/textfield';
|
|
22
21
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
23
22
|
import { FindReplaceTooltipButton } from './FindReplaceTooltipButton';
|
|
@@ -129,7 +128,7 @@ class Find extends React.Component {
|
|
|
129
128
|
}
|
|
130
129
|
});
|
|
131
130
|
_defineProperty(this, "matchCaseIconEle", iconProps => {
|
|
132
|
-
return expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true)
|
|
131
|
+
return expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? jsx(TextLetterCaseIcon, {
|
|
133
132
|
LEGACY_size: 'small',
|
|
134
133
|
LEGACY_fallbackIcon: EditorTextStyleIcon,
|
|
135
134
|
label: expValEquals('platform_editor_find_replace_a11y_fixes', 'isEnabled', true) ? iconProps.label : this.matchCase,
|
|
@@ -16,7 +16,6 @@ import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
|
16
16
|
import { Label, ValidMessage } from '@atlaskit/form';
|
|
17
17
|
import ChevronDownIcon from '@atlaskit/icon/core/migration/chevron-down--hipchat-chevron-down';
|
|
18
18
|
import ChevronUpIcon from '@atlaskit/icon/core/migration/chevron-up--hipchat-chevron-up';
|
|
19
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
19
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
21
20
|
import { Inline, xcss } from '@atlaskit/primitives';
|
|
22
21
|
import Textfield from '@atlaskit/textfield';
|
|
@@ -273,9 +272,9 @@ class Replace extends React.PureComponent {
|
|
|
273
272
|
// Ignored via go/ees005
|
|
274
273
|
// eslint-disable-next-line require-unicode-regexp
|
|
275
274
|
resultsReplace.replace(/ /, '\u00a0') : resultsReplace)))), jsx("div", {
|
|
276
|
-
css: expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true)
|
|
275
|
+
css: expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? [sectionWrapperStyles, sectionWrapperStylesAlternate, sectionWrapperJustified, sectionWrapperFlexWrap] : [sectionWrapperStyles, sectionWrapperStylesAlternate, sectionWrapperJustified]
|
|
277
276
|
}, jsx("div", {
|
|
278
|
-
css: expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true)
|
|
277
|
+
css: expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? orderOneStylesNew : orderOneStyles
|
|
279
278
|
}, jsx("div", {
|
|
280
279
|
css: nextPreviousItemStyles
|
|
281
280
|
}, jsx(FindReplaceTooltipButton, {
|
|
@@ -6,7 +6,6 @@ import { findReplaceMessages as messages } from '@atlaskit/editor-common/message
|
|
|
6
6
|
import { ValidMessage } from '@atlaskit/form';
|
|
7
7
|
import ChevronDownIcon from '@atlaskit/icon/core/migration/chevron-down--hipchat-chevron-down';
|
|
8
8
|
import ChevronUpIcon from '@atlaskit/icon/core/migration/chevron-up--hipchat-chevron-up';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
11
10
|
import { Box, Inline, Text, xcss } from '@atlaskit/primitives';
|
|
12
11
|
import Textfield from '@atlaskit/textfield';
|
|
@@ -194,7 +193,7 @@ const Replace = ({
|
|
|
194
193
|
resultsReplace.replace(/ /u, '\u00a0') : resultsReplace)), /*#__PURE__*/React.createElement(Box, {
|
|
195
194
|
xcss: actionButtonContainerStyles
|
|
196
195
|
}, /*#__PURE__*/React.createElement(Inline, {
|
|
197
|
-
xcss: expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true)
|
|
196
|
+
xcss: expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? [actionButtonInlineStyles, actionButtonParentInlineStylesNew] : [actionButtonInlineStyles, actionButtonParentInlineStyles]
|
|
198
197
|
}, /*#__PURE__*/React.createElement(Inline, {
|
|
199
198
|
xcss: actionButtonInlineStyles
|
|
200
199
|
}, /*#__PURE__*/React.createElement(FindReplaceTooltipButton, {
|
|
@@ -228,7 +227,7 @@ const Replace = ({
|
|
|
228
227
|
id: "replaceAll-button",
|
|
229
228
|
onClick: handleReplaceAllClick,
|
|
230
229
|
isDisabled: expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? count.totalReplaceable === 0 : !canReplace
|
|
231
|
-
}, replaceAll)), expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true)
|
|
230
|
+
}, replaceAll)), expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? /*#__PURE__*/React.createElement(Inline, {
|
|
232
231
|
xcss: closeButtonInlineStyles
|
|
233
232
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
234
233
|
appearance: "subtle",
|
package/dist/es2019/ui/styles.js
CHANGED
|
@@ -36,211 +36,6 @@ export const findReplaceStylesNew = css({
|
|
|
36
36
|
|
|
37
37
|
/** Light mode */
|
|
38
38
|
|
|
39
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
40
|
-
[`.${searchMatchTextClass}`]: {
|
|
41
|
-
borderRadius: "var(--ds-space-050, 4px)",
|
|
42
|
-
boxShadow: `
|
|
43
|
-
inset 0 0 0 1px ${"var(--ds-background-accent-magenta-subtler-pressed, #E774BB)"},
|
|
44
|
-
inset 0 0 0 5px ${"var(--ds-background-accent-magenta-subtler, #FDD0EC)"}
|
|
45
|
-
`,
|
|
46
|
-
// TODO: ED-28376 - clean up !important later
|
|
47
|
-
backgroundColor: `${"var(--ds-background-accent-magenta-subtler, #FDD0EC)"} !important`,
|
|
48
|
-
color: "var(--ds-text, #172B4D)"
|
|
49
|
-
},
|
|
50
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
51
|
-
[`.${searchMatchTextClass}.${selectedSearchMatchClass}`]: {
|
|
52
|
-
boxShadow: `
|
|
53
|
-
inset 0 0 0 1px ${"var(--ds-background-accent-magenta-subtler-pressed, #E774BB)"},
|
|
54
|
-
inset 0 0 0 5px ${"var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)"}
|
|
55
|
-
`,
|
|
56
|
-
// TODO: ED-28376 - clean up !important later
|
|
57
|
-
backgroundColor: `${"var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)"} !important`
|
|
58
|
-
},
|
|
59
|
-
/** Dark mode */
|
|
60
|
-
|
|
61
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
62
|
-
[`.${searchMatchTextClass}.${darkModeSearchMatchClass}`]: {
|
|
63
|
-
boxShadow: `
|
|
64
|
-
inset 0 0 0 1px ${"var(--ds-background-accent-magenta-bolder, #AE4787)"},
|
|
65
|
-
inset 0 0 0 5px ${"var(--ds-background-accent-magenta-bolder-pressed, #50253F)"}
|
|
66
|
-
`,
|
|
67
|
-
// TODO: ED-28376 - clean up !important later
|
|
68
|
-
backgroundColor: `${"var(--ds-background-accent-magenta-bolder-pressed, #50253F)"} !important`,
|
|
69
|
-
color: "var(--ds-text-inverse, #FFFFFF)"
|
|
70
|
-
},
|
|
71
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
72
|
-
[`.${searchMatchTextClass}.${selectedSearchMatchClass}.${darkModeSearchMatchClass}`]: {
|
|
73
|
-
boxShadow: `
|
|
74
|
-
inset 0 0 0 1px ${"var(--ds-background-accent-magenta-bolder, #AE4787)"},
|
|
75
|
-
inset 0 0 0 5px ${"var(--ds-background-accent-magenta-bolder-hovered, #943D73)"}
|
|
76
|
-
`,
|
|
77
|
-
// TODO: ED-28376 - clean up !important later
|
|
78
|
-
backgroundColor: `${"var(--ds-background-accent-magenta-bolder-hovered, #943D73)"} !important`
|
|
79
|
-
},
|
|
80
|
-
/** Block match styles */
|
|
81
|
-
|
|
82
|
-
/** Light mode */
|
|
83
|
-
|
|
84
|
-
/** Without node selection */
|
|
85
|
-
[`.${blockSearchMatchClass}`]: {
|
|
86
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
87
|
-
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
88
|
-
boxShadow: `
|
|
89
|
-
inset 0 0 0 1px ${"var(--ds-background-accent-magenta-subtler-pressed, #E774BB)"},
|
|
90
|
-
inset 0 0 0 5px ${"var(--ds-background-accent-magenta-subtler, #FDD0EC)"}
|
|
91
|
-
`
|
|
92
|
-
},
|
|
93
|
-
[`${inlineCardSelector}, ${inlineCardWithHoverPreviewSelector}, ${statusSelector}, ${mentionSelector}, ${dateSelector}`]: {
|
|
94
|
-
boxShadow: `0px 0px 0px 4px ${"var(--ds-background-accent-magenta-subtler, #FDD0EC)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-magenta-subtler-pressed, #E774BB)"}`
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
[`.${blockSearchMatchClass}.${selectedBlockSearchMatchClass}`]: {
|
|
98
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
99
|
-
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
100
|
-
boxShadow: `
|
|
101
|
-
inset 0 0 0 1px ${"var(--ds-background-accent-magenta-subtler-pressed, #E774BB)"},
|
|
102
|
-
inset 0 0 0 4px ${"var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)"}
|
|
103
|
-
`
|
|
104
|
-
},
|
|
105
|
-
[`${inlineCardSelector}, ${inlineCardWithHoverPreviewSelector}, ${statusSelector}, ${mentionSelector}, ${dateSelector}`]: {
|
|
106
|
-
boxShadow: `0px 0px 0px 4px ${"var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-magenta-subtler-pressed, #E774BB)"}`
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
/** With node selection */
|
|
110
|
-
[`.${blockSearchMatchClass}.ak-editor-selected-node`]: {
|
|
111
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
112
|
-
'.loader-wrapper>div::after': {
|
|
113
|
-
boxShadow: `
|
|
114
|
-
inset 0 0 0 1px ${"var(--ds-background-accent-magenta-subtler-pressed, #E774BB)"},
|
|
115
|
-
inset 0 0 0 5px ${"var(--ds-background-accent-magenta-subtler, #FDD0EC)"},
|
|
116
|
-
0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}
|
|
117
|
-
`
|
|
118
|
-
},
|
|
119
|
-
[`${inlineCardSelector}, ${inlineCardWithHoverPreviewSelector}, ${statusSelector}, ${mentionSelector}, ${dateSelector}`]: {
|
|
120
|
-
// TODO: ED-28376 - will clean up !important later
|
|
121
|
-
boxShadow: `0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}, 0px 0px 0px 4px ${"var(--ds-background-accent-magenta-subtler, #FDD0EC)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-magenta-subtler-pressed, #E774BB)"} !important`
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
[`.${blockSearchMatchClass}.${selectedBlockSearchMatchClass}.ak-editor-selected-node`]: {
|
|
125
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
126
|
-
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
127
|
-
boxShadow: `
|
|
128
|
-
inset 0 0 0 1px ${"var(--ds-background-accent-magenta-subtler-pressed, #E774BB)"},
|
|
129
|
-
inset 0 0 0 4px ${"var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)"},
|
|
130
|
-
0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}
|
|
131
|
-
`
|
|
132
|
-
},
|
|
133
|
-
[`${inlineCardSelector}, ${inlineCardWithHoverPreviewSelector}, ${statusSelector}, ${mentionSelector}, ${dateSelector}`]: {
|
|
134
|
-
// TODO: ED-28376 - will clean up !important later
|
|
135
|
-
boxShadow: `0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}, 0px 0px 0px 4px ${"var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-magenta-subtler-pressed, #E774BB)"} !important`
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
/** Dark mode */
|
|
139
|
-
/** Without node selection */
|
|
140
|
-
[`.${blockSearchMatchClass}.${darkModeSearchMatchClass}`]: {
|
|
141
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
142
|
-
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
143
|
-
boxShadow: `
|
|
144
|
-
inset 0 0 0 1px ${"var(--ds-background-accent-magenta-bolder, #AE4787)"},
|
|
145
|
-
inset 0 0 0 5px ${"var(--ds-background-accent-magenta-bolder-pressed, #50253F)"}
|
|
146
|
-
`
|
|
147
|
-
},
|
|
148
|
-
[`${inlineCardSelector}, ${inlineCardWithHoverPreviewSelector}, ${statusSelector}, ${mentionSelector}, ${dateSelector}`]: {
|
|
149
|
-
boxShadow: `0px 0px 0px 4px ${"var(--ds-background-accent-magenta-bolder-pressed, #50253F)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-magenta-bolder, #AE4787)"}`
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
[`.${blockSearchMatchClass}.${selectedBlockSearchMatchClass}.${darkModeSearchMatchClass}`]: {
|
|
153
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
154
|
-
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
155
|
-
boxShadow: `
|
|
156
|
-
inset 0 0 0 1px ${"var(--ds-background-accent-magenta-bolder, #AE4787)"},
|
|
157
|
-
inset 0 0 0 4px ${"var(--ds-background-accent-magenta-bolder-hovered, #943D73)"}
|
|
158
|
-
`
|
|
159
|
-
},
|
|
160
|
-
[`${inlineCardSelector}, ${inlineCardWithHoverPreviewSelector}, ${statusSelector}, ${mentionSelector}, ${dateSelector}`]: {
|
|
161
|
-
boxShadow: `0px 0px 0px 4px ${"var(--ds-background-accent-magenta-bolder-hovered, #943D73)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-magenta-bolder, #AE4787)"}`
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
/** With node selection */
|
|
165
|
-
[`.${blockSearchMatchClass}.${darkModeSearchMatchClass}.ak-editor-selected-node`]: {
|
|
166
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
167
|
-
'.loader-wrapper>div::after': {
|
|
168
|
-
boxShadow: `
|
|
169
|
-
inset 0 0 0 1px ${"var(--ds-background-accent-magenta-bolder, #AE4787)"},
|
|
170
|
-
inset 0 0 0 5px ${"var(--ds-background-accent-magenta-bolder-pressed, #50253F)"},
|
|
171
|
-
0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}
|
|
172
|
-
`
|
|
173
|
-
},
|
|
174
|
-
[`${inlineCardSelector}, ${inlineCardWithHoverPreviewSelector}, ${statusSelector}, ${mentionSelector}, ${dateSelector}`]: {
|
|
175
|
-
boxShadow: `0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}, 0px 0px 0px 4px ${"var(--ds-background-accent-magenta-bolder-pressed, #50253F)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-magenta-bolder, #AE4787)"} !important`
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
[`.${blockSearchMatchClass}.${selectedBlockSearchMatchClass}.${darkModeSearchMatchClass}.ak-editor-selected-node`]: {
|
|
179
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
180
|
-
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
181
|
-
boxShadow: `
|
|
182
|
-
inset 0 0 0 1px ${"var(--ds-background-accent-magenta-bolder, #AE4787)"},
|
|
183
|
-
inset 0 0 0 4px ${"var(--ds-background-accent-magenta-bolder-hovered, #943D73)"},
|
|
184
|
-
0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}
|
|
185
|
-
`
|
|
186
|
-
},
|
|
187
|
-
[`${inlineCardSelector}, ${inlineCardWithHoverPreviewSelector}, ${statusSelector}, ${mentionSelector}, ${dateSelector}`]: {
|
|
188
|
-
boxShadow: `0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}, 0px 0px 0px 4px ${"var(--ds-background-accent-magenta-bolder-hovered, #943D73)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-magenta-bolder, #AE4787)"} !important`
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
/** Expand title match styles */
|
|
192
|
-
|
|
193
|
-
/** Light mode */
|
|
194
|
-
|
|
195
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
196
|
-
[`.${searchMatchExpandTitleClass} > .${expandClassNames.titleContainer} > .${expandClassNames.inputContainer}`]: {
|
|
197
|
-
borderRadius: "var(--ds-space-050, 4px)",
|
|
198
|
-
boxShadow: `
|
|
199
|
-
inset 0 0 0 1px ${"var(--ds-background-accent-magenta-subtler-pressed, #E774BB)"},
|
|
200
|
-
inset 0 0 0 5px ${"var(--ds-background-accent-magenta-subtler, #FDD0EC)"}
|
|
201
|
-
`,
|
|
202
|
-
backgroundColor: "var(--ds-background-accent-magenta-subtler, #FDD0EC)",
|
|
203
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
204
|
-
[`.${expandClassNames.titleInput}`]: {
|
|
205
|
-
color: "var(--ds-text, #172B4D)"
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
209
|
-
[`.${searchMatchExpandTitleClass}.${selectedSearchMatchClass} > .${expandClassNames.titleContainer} > .${expandClassNames.inputContainer}`]: {
|
|
210
|
-
boxShadow: `
|
|
211
|
-
inset 0 0 0 1px ${"var(--ds-background-accent-magenta-subtler-pressed, #E774BB)"},
|
|
212
|
-
inset 0 0 0 5px ${"var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)"}
|
|
213
|
-
`,
|
|
214
|
-
backgroundColor: "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)"
|
|
215
|
-
},
|
|
216
|
-
/** Dark mode */
|
|
217
|
-
|
|
218
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
219
|
-
[`.${searchMatchExpandTitleClass}.${darkModeSearchMatchClass} > .${expandClassNames.titleContainer} > .${expandClassNames.inputContainer}`]: {
|
|
220
|
-
boxShadow: `
|
|
221
|
-
inset 0 0 0 1px ${"var(--ds-background-accent-magenta-bolder, #AE4787)"},
|
|
222
|
-
inset 0 0 0 5px ${"var(--ds-background-accent-magenta-bolder-pressed, #50253F)"}
|
|
223
|
-
`,
|
|
224
|
-
backgroundColor: "var(--ds-background-accent-magenta-bolder-pressed, #50253F)",
|
|
225
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
226
|
-
[`.${expandClassNames.titleInput}`]: {
|
|
227
|
-
color: "var(--ds-text-inverse, #FFFFFF)"
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
231
|
-
[`.${searchMatchExpandTitleClass}.${selectedSearchMatchClass}.${darkModeSearchMatchClass} > .${expandClassNames.titleContainer} > .${expandClassNames.inputContainer}`]: {
|
|
232
|
-
boxShadow: `
|
|
233
|
-
inset 0 0 0 1px ${"var(--ds-background-accent-magenta-bolder, #AE4787)"},
|
|
234
|
-
inset 0 0 0 5px ${"var(--ds-background-accent-magenta-bolder-hovered, #943D73)"}
|
|
235
|
-
`,
|
|
236
|
-
backgroundColor: "var(--ds-background-accent-magenta-bolder-hovered, #943D73)"
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
export const findReplaceStylesNewNoImportant = css({
|
|
240
|
-
/** Text match styles */
|
|
241
|
-
|
|
242
|
-
/** Light mode */
|
|
243
|
-
|
|
244
39
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
245
40
|
[`.${searchMatchTextClass}`]: {
|
|
246
41
|
borderRadius: "var(--ds-space-050, 4px)",
|