@atlaskit/editor-plugin-hyperlink 1.1.4 → 1.3.0
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 +16 -0
- package/dist/cjs/Toolbar.js +4 -2
- package/dist/es2019/Toolbar.js +5 -3
- package/dist/esm/Toolbar.js +5 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-hyperlink
|
|
2
2
|
|
|
3
|
+
## 1.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#84733](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/84733) [`de779b2d9543`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/de779b2d9543) - Modify link-preferences to factor in CLOUD_ENV environment varaible when fetching preferences link
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 1.2.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- [#84054](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/84054) [`43605c45b445`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/43605c45b445) - EDF-468 Added disableFloatingToolbar plugin option to disable showing floating toolbar when hyperlink is clicked.
|
|
18
|
+
|
|
3
19
|
## 1.1.4
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/cjs/Toolbar.js
CHANGED
|
@@ -12,7 +12,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
12
12
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
13
13
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
14
14
|
var _card = require("@atlaskit/editor-common/card");
|
|
15
|
-
var _constants = require("@atlaskit/editor-common/constants");
|
|
16
15
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
17
16
|
var _link2 = require("@atlaskit/editor-common/link");
|
|
18
17
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
@@ -105,13 +104,16 @@ var getSettingsButtonGroup = function getSettingsButtonGroup(intl, editorAnalyti
|
|
|
105
104
|
icon: _settings.default,
|
|
106
105
|
title: intl.formatMessage(_messages.linkToolbarMessages.settingsLink),
|
|
107
106
|
onClick: openLinkSettings(editorAnalyticsApi),
|
|
108
|
-
href:
|
|
107
|
+
href: (0, _link2.getLinkPreferencesURLFromENV)(),
|
|
109
108
|
target: '_blank'
|
|
110
109
|
}];
|
|
111
110
|
};
|
|
112
111
|
var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(options, pluginInjectionApi) {
|
|
113
112
|
return function (state, intl, providerFactory) {
|
|
114
113
|
var _pluginInjectionApi$a, _options$lpLinkPicker;
|
|
114
|
+
if (options.disableFloatingToolbar) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
115
117
|
var formatMessage = intl.formatMessage;
|
|
116
118
|
var linkState = _main.stateKey.getState(state);
|
|
117
119
|
var editorAnalyticsApi = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
|
package/dist/es2019/Toolbar.js
CHANGED
|
@@ -2,9 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT_ID, buildOpenedSettingsPayload, buildVisitedLinkPayload, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { commandWithMetadata } from '@atlaskit/editor-common/card';
|
|
5
|
-
import { productionLinkPreferencesUrl, stagingLinkPreferencesUrl } from '@atlaskit/editor-common/constants';
|
|
6
5
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
7
|
-
import { HyperlinkAddToolbar } from '@atlaskit/editor-common/link';
|
|
6
|
+
import { getLinkPreferencesURLFromENV, HyperlinkAddToolbar } from '@atlaskit/editor-common/link';
|
|
8
7
|
import { linkMessages, linkToolbarMessages as linkToolbarCommonMessages } from '@atlaskit/editor-common/messages';
|
|
9
8
|
import { LINKPICKER_HEIGHT_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '@atlaskit/editor-common/ui';
|
|
10
9
|
import { normalizeUrl } from '@atlaskit/editor-common/utils';
|
|
@@ -89,11 +88,14 @@ const getSettingsButtonGroup = (intl, editorAnalyticsApi) => [{
|
|
|
89
88
|
icon: CogIcon,
|
|
90
89
|
title: intl.formatMessage(linkToolbarCommonMessages.settingsLink),
|
|
91
90
|
onClick: openLinkSettings(editorAnalyticsApi),
|
|
92
|
-
href:
|
|
91
|
+
href: getLinkPreferencesURLFromENV(),
|
|
93
92
|
target: '_blank'
|
|
94
93
|
}];
|
|
95
94
|
export const getToolbarConfig = (options, pluginInjectionApi) => (state, intl, providerFactory) => {
|
|
96
95
|
var _pluginInjectionApi$a, _options$lpLinkPicker;
|
|
96
|
+
if (options.disableFloatingToolbar) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
97
99
|
const {
|
|
98
100
|
formatMessage
|
|
99
101
|
} = intl;
|
package/dist/esm/Toolbar.js
CHANGED
|
@@ -6,9 +6,8 @@ import React from 'react';
|
|
|
6
6
|
import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
7
7
|
import { ACTION, ACTION_SUBJECT_ID, buildOpenedSettingsPayload, buildVisitedLinkPayload, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import { commandWithMetadata } from '@atlaskit/editor-common/card';
|
|
9
|
-
import { productionLinkPreferencesUrl, stagingLinkPreferencesUrl } from '@atlaskit/editor-common/constants';
|
|
10
9
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
11
|
-
import { HyperlinkAddToolbar } from '@atlaskit/editor-common/link';
|
|
10
|
+
import { getLinkPreferencesURLFromENV, HyperlinkAddToolbar } from '@atlaskit/editor-common/link';
|
|
12
11
|
import { linkMessages, linkToolbarMessages as linkToolbarCommonMessages } from '@atlaskit/editor-common/messages';
|
|
13
12
|
import { LINKPICKER_HEIGHT_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '@atlaskit/editor-common/ui';
|
|
14
13
|
import { normalizeUrl } from '@atlaskit/editor-common/utils';
|
|
@@ -97,13 +96,16 @@ var getSettingsButtonGroup = function getSettingsButtonGroup(intl, editorAnalyti
|
|
|
97
96
|
icon: CogIcon,
|
|
98
97
|
title: intl.formatMessage(linkToolbarCommonMessages.settingsLink),
|
|
99
98
|
onClick: openLinkSettings(editorAnalyticsApi),
|
|
100
|
-
href:
|
|
99
|
+
href: getLinkPreferencesURLFromENV(),
|
|
101
100
|
target: '_blank'
|
|
102
101
|
}];
|
|
103
102
|
};
|
|
104
103
|
export var getToolbarConfig = function getToolbarConfig(options, pluginInjectionApi) {
|
|
105
104
|
return function (state, intl, providerFactory) {
|
|
106
105
|
var _pluginInjectionApi$a, _options$lpLinkPicker;
|
|
106
|
+
if (options.disableFloatingToolbar) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
107
109
|
var formatMessage = intl.formatMessage;
|
|
108
110
|
var linkState = stateKey.getState(state);
|
|
109
111
|
var editorAnalyticsApi = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-hyperlink",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Hyperlink plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/adf-schema": "^35.7.0",
|
|
36
36
|
"@atlaskit/analytics-next": "^9.2.0",
|
|
37
|
-
"@atlaskit/editor-common": "^78.
|
|
37
|
+
"@atlaskit/editor-common": "^78.22.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^1.0.0",
|
|
39
39
|
"@atlaskit/editor-prosemirror": "3.0.0",
|
|
40
40
|
"@atlaskit/icon": "^22.1.0",
|