@atlaskit/editor-plugin-hyperlink 4.2.4 → 4.2.6
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
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-hyperlink
|
|
2
2
|
|
|
3
|
+
## 4.2.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 4.2.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#125391](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/125391)
|
|
14
|
+
[`ead20443d03e8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ead20443d03e8) -
|
|
15
|
+
[ux] When Editor Controls enabled, we show Text Formatting toolbar on range selection inside of a
|
|
16
|
+
hyperlink.
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 4.2.4
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -18,6 +18,7 @@ var _link2 = require("@atlaskit/editor-common/link");
|
|
|
18
18
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
19
19
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
20
20
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
21
|
+
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
21
22
|
var _linkBroken = _interopRequireDefault(require("@atlaskit/icon/core/link-broken"));
|
|
22
23
|
var _linkExternal = _interopRequireDefault(require("@atlaskit/icon/core/link-external"));
|
|
23
24
|
var _unlink = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/unlink"));
|
|
@@ -108,6 +109,12 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(opti
|
|
|
108
109
|
if (options.disableFloatingToolbar) {
|
|
109
110
|
return;
|
|
110
111
|
}
|
|
112
|
+
|
|
113
|
+
// If range selection, we don't show hyperlink floating toolbar.
|
|
114
|
+
// Text Formattting toolbar is shown instaed.
|
|
115
|
+
if (state.selection instanceof _state.TextSelection && state.selection.to !== state.selection.from && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
111
118
|
var formatMessage = intl.formatMessage;
|
|
112
119
|
var linkState = _main.stateKey.getState(state);
|
|
113
120
|
var editorCardActions = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$c2 = pluginInjectionApi.card) === null || _pluginInjectionApi$c2 === void 0 ? void 0 : _pluginInjectionApi$c2.actions;
|
|
@@ -7,6 +7,7 @@ import { HyperlinkAddToolbar } from '@atlaskit/editor-common/link';
|
|
|
7
7
|
import { linkMessages, linkToolbarMessages as linkToolbarCommonMessages } from '@atlaskit/editor-common/messages';
|
|
8
8
|
import { LINKPICKER_HEIGHT_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '@atlaskit/editor-common/ui';
|
|
9
9
|
import { normalizeUrl } from '@atlaskit/editor-common/utils';
|
|
10
|
+
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
10
11
|
import LinkBrokenIcon from '@atlaskit/icon/core/link-broken';
|
|
11
12
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
12
13
|
import UnlinkIcon from '@atlaskit/icon/glyph/editor/unlink';
|
|
@@ -92,6 +93,12 @@ export const getToolbarConfig = (options, pluginInjectionApi) => (state, intl, p
|
|
|
92
93
|
if (options.disableFloatingToolbar) {
|
|
93
94
|
return;
|
|
94
95
|
}
|
|
96
|
+
|
|
97
|
+
// If range selection, we don't show hyperlink floating toolbar.
|
|
98
|
+
// Text Formattting toolbar is shown instaed.
|
|
99
|
+
if (state.selection instanceof TextSelection && state.selection.to !== state.selection.from && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
95
102
|
const {
|
|
96
103
|
formatMessage
|
|
97
104
|
} = intl;
|
|
@@ -11,6 +11,7 @@ import { HyperlinkAddToolbar } from '@atlaskit/editor-common/link';
|
|
|
11
11
|
import { linkMessages, linkToolbarMessages as linkToolbarCommonMessages } from '@atlaskit/editor-common/messages';
|
|
12
12
|
import { LINKPICKER_HEIGHT_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '@atlaskit/editor-common/ui';
|
|
13
13
|
import { normalizeUrl } from '@atlaskit/editor-common/utils';
|
|
14
|
+
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
14
15
|
import LinkBrokenIcon from '@atlaskit/icon/core/link-broken';
|
|
15
16
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
16
17
|
import UnlinkIcon from '@atlaskit/icon/glyph/editor/unlink';
|
|
@@ -98,6 +99,12 @@ export var getToolbarConfig = function getToolbarConfig(options, pluginInjection
|
|
|
98
99
|
if (options.disableFloatingToolbar) {
|
|
99
100
|
return;
|
|
100
101
|
}
|
|
102
|
+
|
|
103
|
+
// If range selection, we don't show hyperlink floating toolbar.
|
|
104
|
+
// Text Formattting toolbar is shown instaed.
|
|
105
|
+
if (state.selection instanceof TextSelection && state.selection.to !== state.selection.from && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
101
108
|
var formatMessage = intl.formatMessage;
|
|
102
109
|
var linkState = stateKey.getState(state);
|
|
103
110
|
var editorCardActions = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$c2 = pluginInjectionApi.card) === null || _pluginInjectionApi$c2 === void 0 ? void 0 : _pluginInjectionApi$c2.actions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-hyperlink",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.6",
|
|
4
4
|
"description": "Hyperlink plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
37
37
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
38
|
-
"@atlaskit/editor-common": "^102.
|
|
38
|
+
"@atlaskit/editor-common": "^102.4.0",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^2.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-card": "^5.2.0",
|
|
41
41
|
"@atlaskit/editor-plugin-connectivity": "^2.0.0",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"@atlaskit/editor-plugin-primary-toolbar": "^3.0.0",
|
|
44
44
|
"@atlaskit/editor-plugin-selection-toolbar": "^2.0.0",
|
|
45
45
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
46
|
-
"@atlaskit/icon": "^
|
|
46
|
+
"@atlaskit/icon": "^25.0.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
48
48
|
"@atlaskit/prosemirror-input-rules": "^3.3.0",
|
|
49
|
-
"@atlaskit/tmp-editor-statsig": "^3.
|
|
49
|
+
"@atlaskit/tmp-editor-statsig": "^3.6.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"@emotion/react": "^11.7.1",
|
|
52
52
|
"uuid": "^3.1.0"
|