@atlaskit/editor-plugin-hyperlink 5.4.11 → 5.4.13
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
|
+
## 5.4.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a2cd8c46a3e94`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a2cd8c46a3e94) -
|
|
8
|
+
EDITOR-1442 Bump adf-schema
|
|
9
|
+
- [`ec65234ef4b55`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ec65234ef4b55) -
|
|
10
|
+
Tidy up FG platform_editor_usesharedpluginstatewithselector for highlight and hyperlink
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 5.4.12
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 5.4.11
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -71,17 +71,6 @@ var selector = function selector(states) {
|
|
|
71
71
|
searchSessionId: (_states$hyperlinkStat3 = states.hyperlinkState) === null || _states$hyperlinkStat3 === void 0 ? void 0 : _states$hyperlinkStat3.searchSessionId
|
|
72
72
|
};
|
|
73
73
|
};
|
|
74
|
-
var useSharedState = (0, _hooks.sharedPluginStateHookMigratorFactory)(function (api) {
|
|
75
|
-
return (0, _hooks.useSharedPluginStateWithSelector)(api, ['hyperlink'], selector);
|
|
76
|
-
}, function (api) {
|
|
77
|
-
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(api, ['hyperlink']),
|
|
78
|
-
hyperlinkState = _useSharedPluginState.hyperlinkState;
|
|
79
|
-
return {
|
|
80
|
-
timesViewed: hyperlinkState === null || hyperlinkState === void 0 ? void 0 : hyperlinkState.timesViewed,
|
|
81
|
-
inputMethod: hyperlinkState === null || hyperlinkState === void 0 ? void 0 : hyperlinkState.inputMethod,
|
|
82
|
-
searchSessionId: hyperlinkState === null || hyperlinkState === void 0 ? void 0 : hyperlinkState.searchSessionId
|
|
83
|
-
};
|
|
84
|
-
});
|
|
85
74
|
function HyperlinkAddToolbarWithState(_ref) {
|
|
86
75
|
var _pluginInjectionApi$c;
|
|
87
76
|
var _ref$linkPickerOption = _ref.linkPickerOptions,
|
|
@@ -98,10 +87,10 @@ function HyperlinkAddToolbarWithState(_ref) {
|
|
|
98
87
|
onEscapeCallback = _ref.onEscapeCallback,
|
|
99
88
|
onClickAwayCallback = _ref.onClickAwayCallback,
|
|
100
89
|
pluginInjectionApi = _ref.pluginInjectionApi;
|
|
101
|
-
var
|
|
102
|
-
timesViewed =
|
|
103
|
-
inputMethod =
|
|
104
|
-
searchSessionId =
|
|
90
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(pluginInjectionApi, ['hyperlink'], selector),
|
|
91
|
+
timesViewed = _useSharedPluginState.timesViewed,
|
|
92
|
+
inputMethod = _useSharedPluginState.inputMethod,
|
|
93
|
+
searchSessionId = _useSharedPluginState.searchSessionId;
|
|
105
94
|
|
|
106
95
|
// This is constant rather than dynamic - because if someone's already got a hyperlink toolbar open,
|
|
107
96
|
// we don't want to dynamically change it on them as this would cause data loss if they've already
|
|
@@ -2,7 +2,7 @@ import React, { useRef } from 'react';
|
|
|
2
2
|
import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT_ID, INPUT_METHOD, buildVisitedLinkPayload } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { commandWithMetadata } from '@atlaskit/editor-common/card';
|
|
5
|
-
import {
|
|
5
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
6
6
|
import { HyperlinkAddToolbar } from '@atlaskit/editor-common/link';
|
|
7
7
|
import { linkMessages, linkToolbarMessages as linkToolbarCommonMessages } from '@atlaskit/editor-common/messages';
|
|
8
8
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
@@ -56,18 +56,6 @@ const selector = states => {
|
|
|
56
56
|
searchSessionId: (_states$hyperlinkStat3 = states.hyperlinkState) === null || _states$hyperlinkStat3 === void 0 ? void 0 : _states$hyperlinkStat3.searchSessionId
|
|
57
57
|
};
|
|
58
58
|
};
|
|
59
|
-
const useSharedState = sharedPluginStateHookMigratorFactory(api => {
|
|
60
|
-
return useSharedPluginStateWithSelector(api, ['hyperlink'], selector);
|
|
61
|
-
}, api => {
|
|
62
|
-
const {
|
|
63
|
-
hyperlinkState
|
|
64
|
-
} = useSharedPluginState(api, ['hyperlink']);
|
|
65
|
-
return {
|
|
66
|
-
timesViewed: hyperlinkState === null || hyperlinkState === void 0 ? void 0 : hyperlinkState.timesViewed,
|
|
67
|
-
inputMethod: hyperlinkState === null || hyperlinkState === void 0 ? void 0 : hyperlinkState.inputMethod,
|
|
68
|
-
searchSessionId: hyperlinkState === null || hyperlinkState === void 0 ? void 0 : hyperlinkState.searchSessionId
|
|
69
|
-
};
|
|
70
|
-
});
|
|
71
59
|
export function HyperlinkAddToolbarWithState({
|
|
72
60
|
linkPickerOptions = {},
|
|
73
61
|
onSubmit,
|
|
@@ -88,7 +76,7 @@ export function HyperlinkAddToolbarWithState({
|
|
|
88
76
|
timesViewed,
|
|
89
77
|
inputMethod,
|
|
90
78
|
searchSessionId
|
|
91
|
-
} =
|
|
79
|
+
} = useSharedPluginStateWithSelector(pluginInjectionApi, ['hyperlink'], selector);
|
|
92
80
|
|
|
93
81
|
// This is constant rather than dynamic - because if someone's already got a hyperlink toolbar open,
|
|
94
82
|
// we don't want to dynamically change it on them as this would cause data loss if they've already
|
|
@@ -6,7 +6,7 @@ import React, { useRef } from 'react';
|
|
|
6
6
|
import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
7
7
|
import { ACTION, ACTION_SUBJECT_ID, INPUT_METHOD, buildVisitedLinkPayload } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import { commandWithMetadata } from '@atlaskit/editor-common/card';
|
|
9
|
-
import {
|
|
9
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
10
10
|
import { HyperlinkAddToolbar } from '@atlaskit/editor-common/link';
|
|
11
11
|
import { linkMessages, linkToolbarMessages as linkToolbarCommonMessages } from '@atlaskit/editor-common/messages';
|
|
12
12
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
@@ -62,17 +62,6 @@ var selector = function selector(states) {
|
|
|
62
62
|
searchSessionId: (_states$hyperlinkStat3 = states.hyperlinkState) === null || _states$hyperlinkStat3 === void 0 ? void 0 : _states$hyperlinkStat3.searchSessionId
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
-
var useSharedState = sharedPluginStateHookMigratorFactory(function (api) {
|
|
66
|
-
return useSharedPluginStateWithSelector(api, ['hyperlink'], selector);
|
|
67
|
-
}, function (api) {
|
|
68
|
-
var _useSharedPluginState = useSharedPluginState(api, ['hyperlink']),
|
|
69
|
-
hyperlinkState = _useSharedPluginState.hyperlinkState;
|
|
70
|
-
return {
|
|
71
|
-
timesViewed: hyperlinkState === null || hyperlinkState === void 0 ? void 0 : hyperlinkState.timesViewed,
|
|
72
|
-
inputMethod: hyperlinkState === null || hyperlinkState === void 0 ? void 0 : hyperlinkState.inputMethod,
|
|
73
|
-
searchSessionId: hyperlinkState === null || hyperlinkState === void 0 ? void 0 : hyperlinkState.searchSessionId
|
|
74
|
-
};
|
|
75
|
-
});
|
|
76
65
|
export function HyperlinkAddToolbarWithState(_ref) {
|
|
77
66
|
var _pluginInjectionApi$c;
|
|
78
67
|
var _ref$linkPickerOption = _ref.linkPickerOptions,
|
|
@@ -89,10 +78,10 @@ export function HyperlinkAddToolbarWithState(_ref) {
|
|
|
89
78
|
onEscapeCallback = _ref.onEscapeCallback,
|
|
90
79
|
onClickAwayCallback = _ref.onClickAwayCallback,
|
|
91
80
|
pluginInjectionApi = _ref.pluginInjectionApi;
|
|
92
|
-
var
|
|
93
|
-
timesViewed =
|
|
94
|
-
inputMethod =
|
|
95
|
-
searchSessionId =
|
|
81
|
+
var _useSharedPluginState = useSharedPluginStateWithSelector(pluginInjectionApi, ['hyperlink'], selector),
|
|
82
|
+
timesViewed = _useSharedPluginState.timesViewed,
|
|
83
|
+
inputMethod = _useSharedPluginState.inputMethod,
|
|
84
|
+
searchSessionId = _useSharedPluginState.searchSessionId;
|
|
96
85
|
|
|
97
86
|
// This is constant rather than dynamic - because if someone's already got a hyperlink toolbar open,
|
|
98
87
|
// we don't want to dynamically change it on them as this would cause data loss if they've already
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-hyperlink",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.13",
|
|
4
4
|
"description": "Hyperlink plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,32 +28,29 @@
|
|
|
28
28
|
"*.compiled.css"
|
|
29
29
|
],
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
|
-
"af:exports": {
|
|
32
|
-
".": "./src/index.ts"
|
|
33
|
-
},
|
|
34
31
|
"dependencies": {
|
|
35
|
-
"@atlaskit/adf-schema": "^50.2.
|
|
32
|
+
"@atlaskit/adf-schema": "^50.2.3",
|
|
36
33
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
37
34
|
"@atlaskit/editor-plugin-analytics": "^3.0.0",
|
|
38
|
-
"@atlaskit/editor-plugin-card": "^7.
|
|
35
|
+
"@atlaskit/editor-plugin-card": "^7.6.0",
|
|
39
36
|
"@atlaskit/editor-plugin-connectivity": "^3.1.0",
|
|
40
37
|
"@atlaskit/editor-plugin-editor-viewmode": "^5.0.0",
|
|
41
38
|
"@atlaskit/editor-plugin-primary-toolbar": "^4.1.0",
|
|
42
39
|
"@atlaskit/editor-plugin-selection-toolbar": "^4.3.0",
|
|
43
40
|
"@atlaskit/editor-plugin-toolbar": "^0.4.0",
|
|
44
41
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
45
|
-
"@atlaskit/editor-toolbar": "^0.
|
|
42
|
+
"@atlaskit/editor-toolbar": "^0.5.0",
|
|
46
43
|
"@atlaskit/editor-toolbar-model": "^0.1.0",
|
|
47
|
-
"@atlaskit/icon": "^28.
|
|
44
|
+
"@atlaskit/icon": "^28.1.0",
|
|
48
45
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
46
|
"@atlaskit/prosemirror-input-rules": "^3.4.0",
|
|
50
|
-
"@atlaskit/tmp-editor-statsig": "^11.
|
|
47
|
+
"@atlaskit/tmp-editor-statsig": "^11.9.0",
|
|
51
48
|
"@babel/runtime": "^7.0.0",
|
|
52
49
|
"@emotion/react": "^11.7.1",
|
|
53
50
|
"uuid": "^3.1.0"
|
|
54
51
|
},
|
|
55
52
|
"peerDependencies": {
|
|
56
|
-
"@atlaskit/editor-common": "^107.
|
|
53
|
+
"@atlaskit/editor-common": "^107.33.0",
|
|
57
54
|
"react": "^18.2.0",
|
|
58
55
|
"react-dom": "^18.2.0",
|
|
59
56
|
"react-intl-next": "npm:react-intl@^5.18.1"
|