@atlaskit/editor-plugin-hyperlink 0.6.0 → 0.6.2

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,37 @@
1
1
  # @atlaskit/editor-plugin-hyperlink
2
2
 
3
+ ## 0.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#42839](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42839) [`7324375d4fa`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7324375d4fa) - [ux] Cleansup feature flag `prevent-popup-overflow` so that it is permanently enabled when `lp-link-picker` flag is enabled, improving the positioning of the link picker.
8
+
9
+ ## 0.6.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#43646](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43646) [`d43f8e9402f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d43f8e9402f) - Make feature flags plugin optional in all plugins including:
14
+
15
+ - analytics
16
+ - base
17
+ - card
18
+ - code-block
19
+ - expand
20
+ - extension
21
+ - floating-toolbar
22
+ - hyperlink
23
+ - insert-block
24
+ - layout
25
+ - layout
26
+ - list
27
+ - media
28
+ - paste
29
+ - rule
30
+ - table
31
+ - tasks-and-decisions
32
+
33
+ We already treat it as optional in the plugins, so this is just ensuring that the plugin is not mandatory to be added to the preset.
34
+
3
35
  ## 0.6.0
4
36
 
5
37
  ### Minor Changes
@@ -114,8 +114,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(opti
114
114
  var formatMessage = intl.formatMessage;
115
115
  var linkState = _main.stateKey.getState(state);
116
116
  var editorAnalyticsApi = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
117
- var lpLinkPicker = featureFlags.lpLinkPicker,
118
- preventPopupOverflow = featureFlags.preventPopupOverflow;
117
+ var lpLinkPicker = featureFlags.lpLinkPicker;
119
118
  if (linkState && linkState.activeLinkMark) {
120
119
  var activeLinkMark = linkState.activeLinkMark;
121
120
  var hyperLinkToolbar = {
@@ -213,7 +212,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(opti
213
212
  var displayText = isEditLink(activeLinkMark) ? getLinkText(activeLinkMark, state) : linkState.activeText;
214
213
  var popupHeight = lpLinkPicker ? _ui.LINKPICKER_HEIGHT_IN_PX : _ui.RECENT_SEARCH_HEIGHT_IN_PX;
215
214
  return _objectSpread(_objectSpread({}, hyperLinkToolbar), {}, {
216
- preventPopupOverflow: preventPopupOverflow,
215
+ preventPopupOverflow: !!lpLinkPicker,
217
216
  height: popupHeight,
218
217
  width: _ui.RECENT_SEARCH_WIDTH_IN_PX,
219
218
  items: [{
@@ -99,8 +99,7 @@ export const getToolbarConfig = (options, featureFlags, pluginInjectionApi) => (
99
99
  const linkState = stateKey.getState(state);
100
100
  const editorAnalyticsApi = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
101
101
  const {
102
- lpLinkPicker,
103
- preventPopupOverflow
102
+ lpLinkPicker
104
103
  } = featureFlags;
105
104
  if (linkState && linkState.activeLinkMark) {
106
105
  const {
@@ -199,7 +198,7 @@ export const getToolbarConfig = (options, featureFlags, pluginInjectionApi) => (
199
198
  const popupHeight = lpLinkPicker ? LINKPICKER_HEIGHT_IN_PX : RECENT_SEARCH_HEIGHT_IN_PX;
200
199
  return {
201
200
  ...hyperLinkToolbar,
202
- preventPopupOverflow,
201
+ preventPopupOverflow: !!lpLinkPicker,
203
202
  height: popupHeight,
204
203
  width: RECENT_SEARCH_WIDTH_IN_PX,
205
204
  items: [{
@@ -106,8 +106,7 @@ export var getToolbarConfig = function getToolbarConfig(options, featureFlags, p
106
106
  var formatMessage = intl.formatMessage;
107
107
  var linkState = stateKey.getState(state);
108
108
  var editorAnalyticsApi = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
109
- var lpLinkPicker = featureFlags.lpLinkPicker,
110
- preventPopupOverflow = featureFlags.preventPopupOverflow;
109
+ var lpLinkPicker = featureFlags.lpLinkPicker;
111
110
  if (linkState && linkState.activeLinkMark) {
112
111
  var activeLinkMark = linkState.activeLinkMark;
113
112
  var hyperLinkToolbar = {
@@ -205,7 +204,7 @@ export var getToolbarConfig = function getToolbarConfig(options, featureFlags, p
205
204
  var displayText = isEditLink(activeLinkMark) ? getLinkText(activeLinkMark, state) : linkState.activeText;
206
205
  var popupHeight = lpLinkPicker ? LINKPICKER_HEIGHT_IN_PX : RECENT_SEARCH_HEIGHT_IN_PX;
207
206
  return _objectSpread(_objectSpread({}, hyperLinkToolbar), {}, {
208
- preventPopupOverflow: preventPopupOverflow,
207
+ preventPopupOverflow: !!lpLinkPicker,
209
208
  height: popupHeight,
210
209
  width: RECENT_SEARCH_WIDTH_IN_PX,
211
210
  items: [{
@@ -6,7 +6,10 @@ import type { HideLinkToolbar, InsertLink, ShowLinkToolbar, UpdateLink } from '.
6
6
  import type { PrependToolbarButtons } from './pm-plugins/toolbar-buttons';
7
7
  export type HyperlinkPlugin = NextEditorPlugin<'hyperlink', {
8
8
  pluginConfiguration: HyperlinkPluginOptions | undefined;
9
- dependencies: [FeatureFlagsPlugin, OptionalPlugin<AnalyticsPlugin>];
9
+ dependencies: [
10
+ OptionalPlugin<FeatureFlagsPlugin>,
11
+ OptionalPlugin<AnalyticsPlugin>
12
+ ];
10
13
  actions: {
11
14
  /**
12
15
  * Add items to the left of the hyperlink floating toolbar
@@ -7,7 +7,7 @@ import type { PrependToolbarButtons } from './pm-plugins/toolbar-buttons';
7
7
  export type HyperlinkPlugin = NextEditorPlugin<'hyperlink', {
8
8
  pluginConfiguration: HyperlinkPluginOptions | undefined;
9
9
  dependencies: [
10
- FeatureFlagsPlugin,
10
+ OptionalPlugin<FeatureFlagsPlugin>,
11
11
  OptionalPlugin<AnalyticsPlugin>
12
12
  ];
13
13
  actions: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-hyperlink",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "Hyperlink plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^34.0.0",
35
35
  "@atlaskit/analytics-next": "^9.1.0",
36
- "@atlaskit/editor-common": "^76.22.0",
36
+ "@atlaskit/editor-common": "^76.23.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",
package/report.api.md CHANGED
@@ -50,7 +50,10 @@ export type HyperlinkPlugin = NextEditorPlugin<
50
50
  'hyperlink',
51
51
  {
52
52
  pluginConfiguration: HyperlinkPluginOptions | undefined;
53
- dependencies: [FeatureFlagsPlugin, OptionalPlugin<AnalyticsPlugin>];
53
+ dependencies: [
54
+ OptionalPlugin<FeatureFlagsPlugin>,
55
+ OptionalPlugin<AnalyticsPlugin>,
56
+ ];
54
57
  actions: {
55
58
  prependToolbarButtons: PrependToolbarButtons;
56
59
  hideLinkToolbar: HideLinkToolbar;
@@ -32,7 +32,10 @@ export type HideLinkToolbar = (tr: Transaction) => Transaction;
32
32
  // @public (undocumented)
33
33
  export type HyperlinkPlugin = NextEditorPlugin<'hyperlink', {
34
34
  pluginConfiguration: HyperlinkPluginOptions | undefined;
35
- dependencies: [FeatureFlagsPlugin, OptionalPlugin<AnalyticsPlugin>];
35
+ dependencies: [
36
+ OptionalPlugin<FeatureFlagsPlugin>,
37
+ OptionalPlugin<AnalyticsPlugin>
38
+ ];
36
39
  actions: {
37
40
  prependToolbarButtons: PrependToolbarButtons;
38
41
  hideLinkToolbar: HideLinkToolbar;