@atlaskit/editor-plugin-hyperlink 0.5.5 → 0.5.7
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 +13 -0
- package/dist/cjs/Toolbar.js +1 -13
- package/dist/es2019/Toolbar.js +1 -11
- package/dist/esm/Toolbar.js +1 -13
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-hyperlink
|
|
2
2
|
|
|
3
|
+
## 0.5.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#43379](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43379) [`482c025520d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/482c025520d) - ED-20763 Upgrade ADF schema version to 33.2.3 for MBE nodes.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 0.5.6
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#42848](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42848) [`f2f8428f703`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f2f8428f703) - Abandons feature flag lp-link-picker-focus-trap as it was not successfully rolled out. Will re-introduce as platform feature flag as/when necessary.
|
|
15
|
+
|
|
3
16
|
## 0.5.5
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/cjs/Toolbar.js
CHANGED
|
@@ -115,14 +115,8 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(opti
|
|
|
115
115
|
var formatMessage = intl.formatMessage;
|
|
116
116
|
var linkState = _main.stateKey.getState(state);
|
|
117
117
|
var editorAnalyticsApi = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Enable focus trap only if feature flag is enabled AND for the new version of the picker
|
|
121
|
-
*/
|
|
122
118
|
var lpLinkPicker = featureFlags.lpLinkPicker,
|
|
123
|
-
lpLinkPickerFocusTrap = featureFlags.lpLinkPickerFocusTrap,
|
|
124
119
|
preventPopupOverflow = featureFlags.preventPopupOverflow;
|
|
125
|
-
var shouldEnableFocusTrap = Boolean(lpLinkPicker && lpLinkPickerFocusTrap);
|
|
126
120
|
if (linkState && linkState.activeLinkMark) {
|
|
127
121
|
var activeLinkMark = linkState.activeLinkMark;
|
|
128
122
|
var hyperLinkToolbar = {
|
|
@@ -223,7 +217,6 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(opti
|
|
|
223
217
|
preventPopupOverflow: preventPopupOverflow,
|
|
224
218
|
height: popupHeight,
|
|
225
219
|
width: _ui.RECENT_SEARCH_WIDTH_IN_PX,
|
|
226
|
-
focusTrap: shouldEnableFocusTrap,
|
|
227
220
|
items: [{
|
|
228
221
|
type: 'custom',
|
|
229
222
|
fallback: [],
|
|
@@ -244,9 +237,6 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(opti
|
|
|
244
237
|
onCancel: function onCancel() {
|
|
245
238
|
return view.focus();
|
|
246
239
|
},
|
|
247
|
-
onClose: lpLinkPickerFocusTrap ? function () {
|
|
248
|
-
return view.focus();
|
|
249
|
-
} : undefined,
|
|
250
240
|
onEscapeCallback: _commands.onEscapeCallback,
|
|
251
241
|
onClickAwayCallback: _commands.onClickAwayCallback,
|
|
252
242
|
onSubmit: function onSubmit(href) {
|
|
@@ -263,9 +253,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(opti
|
|
|
263
253
|
sourceEvent: analytic
|
|
264
254
|
}) : (0, _commands.insertLinkWithAnalytics)(inputMethod, activeLinkMark.from, activeLinkMark.to, href, editorAnalyticsApi, title, displayText, !!(options !== null && options !== void 0 && (_options$cardOptions = options.cardOptions) !== null && _options$cardOptions !== void 0 && _options$cardOptions.provider), analytic);
|
|
265
255
|
command(view.state, view.dispatch, view);
|
|
266
|
-
|
|
267
|
-
view.focus();
|
|
268
|
-
}
|
|
256
|
+
view.focus();
|
|
269
257
|
}
|
|
270
258
|
});
|
|
271
259
|
}
|
package/dist/es2019/Toolbar.js
CHANGED
|
@@ -103,16 +103,10 @@ export const getToolbarConfig = (options, featureFlags, pluginInjectionApi) => (
|
|
|
103
103
|
} = intl;
|
|
104
104
|
const linkState = stateKey.getState(state);
|
|
105
105
|
const editorAnalyticsApi = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Enable focus trap only if feature flag is enabled AND for the new version of the picker
|
|
109
|
-
*/
|
|
110
106
|
const {
|
|
111
107
|
lpLinkPicker,
|
|
112
|
-
lpLinkPickerFocusTrap,
|
|
113
108
|
preventPopupOverflow
|
|
114
109
|
} = featureFlags;
|
|
115
|
-
const shouldEnableFocusTrap = Boolean(lpLinkPicker && lpLinkPickerFocusTrap);
|
|
116
110
|
if (linkState && linkState.activeLinkMark) {
|
|
117
111
|
const {
|
|
118
112
|
activeLinkMark
|
|
@@ -213,7 +207,6 @@ export const getToolbarConfig = (options, featureFlags, pluginInjectionApi) => (
|
|
|
213
207
|
preventPopupOverflow,
|
|
214
208
|
height: popupHeight,
|
|
215
209
|
width: RECENT_SEARCH_WIDTH_IN_PX,
|
|
216
|
-
focusTrap: shouldEnableFocusTrap,
|
|
217
210
|
items: [{
|
|
218
211
|
type: 'custom',
|
|
219
212
|
fallback: [],
|
|
@@ -232,7 +225,6 @@ export const getToolbarConfig = (options, featureFlags, pluginInjectionApi) => (
|
|
|
232
225
|
displayText: displayText || '',
|
|
233
226
|
providerFactory: providerFactory,
|
|
234
227
|
onCancel: () => view.focus(),
|
|
235
|
-
onClose: lpLinkPickerFocusTrap ? () => view.focus() : undefined,
|
|
236
228
|
onEscapeCallback: onEscapeCallback,
|
|
237
229
|
onClickAwayCallback: onClickAwayCallback,
|
|
238
230
|
onSubmit: (href, title = '', displayText, inputMethod, analytic) => {
|
|
@@ -245,9 +237,7 @@ export const getToolbarConfig = (options, featureFlags, pluginInjectionApi) => (
|
|
|
245
237
|
sourceEvent: analytic
|
|
246
238
|
}) : insertLinkWithAnalytics(inputMethod, activeLinkMark.from, activeLinkMark.to, href, editorAnalyticsApi, title, displayText, !!(options !== null && options !== void 0 && (_options$cardOptions = options.cardOptions) !== null && _options$cardOptions !== void 0 && _options$cardOptions.provider), analytic);
|
|
247
239
|
command(view.state, view.dispatch, view);
|
|
248
|
-
|
|
249
|
-
view.focus();
|
|
250
|
-
}
|
|
240
|
+
view.focus();
|
|
251
241
|
}
|
|
252
242
|
});
|
|
253
243
|
}
|
package/dist/esm/Toolbar.js
CHANGED
|
@@ -107,14 +107,8 @@ export var getToolbarConfig = function getToolbarConfig(options, featureFlags, p
|
|
|
107
107
|
var formatMessage = intl.formatMessage;
|
|
108
108
|
var linkState = stateKey.getState(state);
|
|
109
109
|
var editorAnalyticsApi = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Enable focus trap only if feature flag is enabled AND for the new version of the picker
|
|
113
|
-
*/
|
|
114
110
|
var lpLinkPicker = featureFlags.lpLinkPicker,
|
|
115
|
-
lpLinkPickerFocusTrap = featureFlags.lpLinkPickerFocusTrap,
|
|
116
111
|
preventPopupOverflow = featureFlags.preventPopupOverflow;
|
|
117
|
-
var shouldEnableFocusTrap = Boolean(lpLinkPicker && lpLinkPickerFocusTrap);
|
|
118
112
|
if (linkState && linkState.activeLinkMark) {
|
|
119
113
|
var activeLinkMark = linkState.activeLinkMark;
|
|
120
114
|
var hyperLinkToolbar = {
|
|
@@ -215,7 +209,6 @@ export var getToolbarConfig = function getToolbarConfig(options, featureFlags, p
|
|
|
215
209
|
preventPopupOverflow: preventPopupOverflow,
|
|
216
210
|
height: popupHeight,
|
|
217
211
|
width: RECENT_SEARCH_WIDTH_IN_PX,
|
|
218
|
-
focusTrap: shouldEnableFocusTrap,
|
|
219
212
|
items: [{
|
|
220
213
|
type: 'custom',
|
|
221
214
|
fallback: [],
|
|
@@ -236,9 +229,6 @@ export var getToolbarConfig = function getToolbarConfig(options, featureFlags, p
|
|
|
236
229
|
onCancel: function onCancel() {
|
|
237
230
|
return view.focus();
|
|
238
231
|
},
|
|
239
|
-
onClose: lpLinkPickerFocusTrap ? function () {
|
|
240
|
-
return view.focus();
|
|
241
|
-
} : undefined,
|
|
242
232
|
onEscapeCallback: onEscapeCallback,
|
|
243
233
|
onClickAwayCallback: onClickAwayCallback,
|
|
244
234
|
onSubmit: function onSubmit(href) {
|
|
@@ -255,9 +245,7 @@ export var getToolbarConfig = function getToolbarConfig(options, featureFlags, p
|
|
|
255
245
|
sourceEvent: analytic
|
|
256
246
|
}) : insertLinkWithAnalytics(inputMethod, activeLinkMark.from, activeLinkMark.to, href, editorAnalyticsApi, title, displayText, !!(options !== null && options !== void 0 && (_options$cardOptions = options.cardOptions) !== null && _options$cardOptions !== void 0 && _options$cardOptions.provider), analytic);
|
|
257
247
|
command(view.state, view.dispatch, view);
|
|
258
|
-
|
|
259
|
-
view.focus();
|
|
260
|
-
}
|
|
248
|
+
view.focus();
|
|
261
249
|
}
|
|
262
250
|
});
|
|
263
251
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-hyperlink",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.7",
|
|
4
4
|
"description": "Hyperlink plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/adf-schema": "^
|
|
34
|
+
"@atlaskit/adf-schema": "^33.2.3",
|
|
35
35
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
36
|
-
"@atlaskit/editor-common": "^76.
|
|
36
|
+
"@atlaskit/editor-common": "^76.22.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^0.3.0",
|
|
38
38
|
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|
|
39
39
|
"@atlaskit/editor-prosemirror": "1.1.0",
|