@atlaskit/editor-plugin-hyperlink 4.5.2 → 4.5.3
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,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-hyperlink
|
|
2
2
|
|
|
3
|
+
## 4.5.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#173379](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173379)
|
|
8
|
+
[`99e2b882f5cf0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/99e2b882f5cf0) -
|
|
9
|
+
Clean up platform_editor_controls_patch_3
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 4.5.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -24,7 +24,6 @@ var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
|
24
24
|
var _edit = _interopRequireDefault(require("@atlaskit/icon/core/edit"));
|
|
25
25
|
var _linkBrokenEditorUnlink = _interopRequireDefault(require("@atlaskit/icon/core/migration/link-broken--editor-unlink"));
|
|
26
26
|
var _linkExternalShortcut = _interopRequireDefault(require("@atlaskit/icon/core/migration/link-external--shortcut"));
|
|
27
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
28
27
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
29
28
|
var _commands = require("../../editor-commands/commands");
|
|
30
29
|
var _main = require("../../pm-plugins/main");
|
|
@@ -155,7 +154,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(opti
|
|
|
155
154
|
// getDomRef by default uses view.state.selection.from to position the toolbar.
|
|
156
155
|
// However, when the user clicks in right after the link the view.state.selection.from references to the dom after the selection.
|
|
157
156
|
// So instead we want to use the activeLinkMark.pos which has been calculated as the position before the click so that would be the link node
|
|
158
|
-
getDomRef: activeLinkMark && (activeLinkMark.type === 'EDIT_INSERTED' || activeLinkMark.type === 'EDIT') && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')
|
|
157
|
+
getDomRef: activeLinkMark && (activeLinkMark.type === 'EDIT_INSERTED' || activeLinkMark.type === 'EDIT') && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? function (view) {
|
|
159
158
|
var domRef = (0, _utils2.findDomRefAtPos)(activeLinkMark.pos, view.domAtPos.bind(view));
|
|
160
159
|
return domRef instanceof HTMLElement ? domRef : undefined;
|
|
161
160
|
} : undefined
|
|
@@ -13,7 +13,6 @@ import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
|
13
13
|
import EditIcon from '@atlaskit/icon/core/edit';
|
|
14
14
|
import LinkBrokenIcon from '@atlaskit/icon/core/migration/link-broken--editor-unlink';
|
|
15
15
|
import LinkExternalIcon from '@atlaskit/icon/core/migration/link-external--shortcut';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
16
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
17
|
import { editInsertedLink, insertLinkWithAnalytics, onClickAwayCallback, onEscapeCallback, removeLink, updateLink } from '../../editor-commands/commands';
|
|
19
18
|
import { stateKey } from '../../pm-plugins/main';
|
|
@@ -141,7 +140,7 @@ export const getToolbarConfig = (options, pluginInjectionApi) => (state, intl, p
|
|
|
141
140
|
// getDomRef by default uses view.state.selection.from to position the toolbar.
|
|
142
141
|
// However, when the user clicks in right after the link the view.state.selection.from references to the dom after the selection.
|
|
143
142
|
// So instead we want to use the activeLinkMark.pos which has been calculated as the position before the click so that would be the link node
|
|
144
|
-
getDomRef: activeLinkMark && (activeLinkMark.type === 'EDIT_INSERTED' || activeLinkMark.type === 'EDIT') && editorExperiment('platform_editor_controls', 'variant1')
|
|
143
|
+
getDomRef: activeLinkMark && (activeLinkMark.type === 'EDIT_INSERTED' || activeLinkMark.type === 'EDIT') && editorExperiment('platform_editor_controls', 'variant1') ? view => {
|
|
145
144
|
const domRef = findDomRefAtPos(activeLinkMark.pos, view.domAtPos.bind(view));
|
|
146
145
|
return domRef instanceof HTMLElement ? domRef : undefined;
|
|
147
146
|
} : undefined
|
|
@@ -17,7 +17,6 @@ import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
|
17
17
|
import EditIcon from '@atlaskit/icon/core/edit';
|
|
18
18
|
import LinkBrokenIcon from '@atlaskit/icon/core/migration/link-broken--editor-unlink';
|
|
19
19
|
import LinkExternalIcon from '@atlaskit/icon/core/migration/link-external--shortcut';
|
|
20
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
20
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
22
21
|
import { editInsertedLink, insertLinkWithAnalytics, onClickAwayCallback, onEscapeCallback, removeLink, updateLink } from '../../editor-commands/commands';
|
|
23
22
|
import { stateKey } from '../../pm-plugins/main';
|
|
@@ -146,7 +145,7 @@ export var getToolbarConfig = function getToolbarConfig(options, pluginInjection
|
|
|
146
145
|
// getDomRef by default uses view.state.selection.from to position the toolbar.
|
|
147
146
|
// However, when the user clicks in right after the link the view.state.selection.from references to the dom after the selection.
|
|
148
147
|
// So instead we want to use the activeLinkMark.pos which has been calculated as the position before the click so that would be the link node
|
|
149
|
-
getDomRef: activeLinkMark && (activeLinkMark.type === 'EDIT_INSERTED' || activeLinkMark.type === 'EDIT') && editorExperiment('platform_editor_controls', 'variant1')
|
|
148
|
+
getDomRef: activeLinkMark && (activeLinkMark.type === 'EDIT_INSERTED' || activeLinkMark.type === 'EDIT') && editorExperiment('platform_editor_controls', 'variant1') ? function (view) {
|
|
150
149
|
var domRef = findDomRefAtPos(activeLinkMark.pos, view.domAtPos.bind(view));
|
|
151
150
|
return domRef instanceof HTMLElement ? domRef : undefined;
|
|
152
151
|
} : undefined
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-hyperlink",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.3",
|
|
4
4
|
"description": "Hyperlink plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/icon": "^27.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": "^7.
|
|
49
|
+
"@atlaskit/tmp-editor-statsig": "^7.2.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"@emotion/react": "^11.7.1",
|
|
52
52
|
"uuid": "^3.1.0"
|
|
@@ -107,9 +107,6 @@
|
|
|
107
107
|
},
|
|
108
108
|
"platform_editor_use_preferences_plugin": {
|
|
109
109
|
"type": "boolean"
|
|
110
|
-
},
|
|
111
|
-
"platform_editor_controls_patch_3": {
|
|
112
|
-
"type": "boolean"
|
|
113
110
|
}
|
|
114
111
|
}
|
|
115
112
|
}
|