@atlaskit/editor-plugin-card 4.4.1 → 4.4.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,15 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 4.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#163012](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/163012)
8
+ [`3b6b07774a436`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3b6b07774a436) -
9
+ Removes window.open call within link preferences button on click handler in toolbar to prevent
10
+ duplicate opening of link
11
+ - Updated dependencies
12
+
3
13
  ## 4.4.1
4
14
 
5
15
  ### Patch Changes
@@ -87,12 +87,11 @@ var visitCardLink = exports.visitCardLink = function visitCardLink(editorAnalyti
87
87
  return true;
88
88
  };
89
89
  };
90
- var openLinkSettings = exports.openLinkSettings = function openLinkSettings(editorAnalyticsApi, userPreferencesLink) {
90
+ var openLinkSettings = exports.openLinkSettings = function openLinkSettings(editorAnalyticsApi) {
91
91
  return function (state, dispatch) {
92
92
  if (!(state.selection instanceof _state.NodeSelection)) {
93
93
  return false;
94
94
  }
95
- window.open(userPreferencesLink || (0, _link.getLinkPreferencesURLFromENV)());
96
95
  if (dispatch) {
97
96
  var tr = state.tr,
98
97
  type = state.selection.node.type;
@@ -363,7 +362,7 @@ var getSettingsButton = exports.getSettingsButton = function getSettingsButton(i
363
362
  icon: _settings.default,
364
363
  iconFallback: _settings2.default,
365
364
  title: intl.formatMessage(_messages.linkToolbarMessages.settingsLink),
366
- onClick: openLinkSettings(editorAnalyticsApi, userPreferencesLink),
365
+ onClick: openLinkSettings(editorAnalyticsApi),
367
366
  href: userPreferencesLink || (0, _link.getLinkPreferencesURLFromENV)(),
368
367
  target: '_blank'
369
368
  };
@@ -76,11 +76,10 @@ export const visitCardLink = editorAnalyticsApi => (state, dispatch) => {
76
76
  }
77
77
  return true;
78
78
  };
79
- export const openLinkSettings = (editorAnalyticsApi, userPreferencesLink) => (state, dispatch) => {
79
+ export const openLinkSettings = editorAnalyticsApi => (state, dispatch) => {
80
80
  if (!(state.selection instanceof NodeSelection)) {
81
81
  return false;
82
82
  }
83
- window.open(userPreferencesLink || getLinkPreferencesURLFromENV());
84
83
  if (dispatch) {
85
84
  const {
86
85
  tr,
@@ -352,7 +351,7 @@ export const getSettingsButton = (intl, editorAnalyticsApi, userPreferencesLink)
352
351
  icon: SettingsIcon,
353
352
  iconFallback: CogIcon,
354
353
  title: intl.formatMessage(linkToolbarMessages.settingsLink),
355
- onClick: openLinkSettings(editorAnalyticsApi, userPreferencesLink),
354
+ onClick: openLinkSettings(editorAnalyticsApi),
356
355
  href: userPreferencesLink || getLinkPreferencesURLFromENV(),
357
356
  target: '_blank'
358
357
  };
@@ -77,12 +77,11 @@ export var visitCardLink = function visitCardLink(editorAnalyticsApi) {
77
77
  return true;
78
78
  };
79
79
  };
80
- export var openLinkSettings = function openLinkSettings(editorAnalyticsApi, userPreferencesLink) {
80
+ export var openLinkSettings = function openLinkSettings(editorAnalyticsApi) {
81
81
  return function (state, dispatch) {
82
82
  if (!(state.selection instanceof NodeSelection)) {
83
83
  return false;
84
84
  }
85
- window.open(userPreferencesLink || getLinkPreferencesURLFromENV());
86
85
  if (dispatch) {
87
86
  var tr = state.tr,
88
87
  type = state.selection.node.type;
@@ -353,7 +352,7 @@ export var getSettingsButton = function getSettingsButton(intl, editorAnalyticsA
353
352
  icon: SettingsIcon,
354
353
  iconFallback: CogIcon,
355
354
  title: intl.formatMessage(linkToolbarMessages.settingsLink),
356
- onClick: openLinkSettings(editorAnalyticsApi, userPreferencesLink),
355
+ onClick: openLinkSettings(editorAnalyticsApi),
357
356
  href: userPreferencesLink || getLinkPreferencesURLFromENV(),
358
357
  target: '_blank'
359
358
  };
@@ -6,7 +6,7 @@ import type { CardPluginOptions } from './types';
6
6
  import type { cardPlugin } from './index';
7
7
  export declare const removeCard: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
8
8
  export declare const visitCardLink: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
9
- export declare const openLinkSettings: (editorAnalyticsApi: EditorAnalyticsAPI | undefined, userPreferencesLink: string | undefined) => Command;
9
+ export declare const openLinkSettings: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
10
10
  export declare const floatingToolbar: (cardOptions: CardOptions, lpLinkPicker: boolean, linkPickerOptions?: LinkPickerOptions, pluginInjectionApi?: ExtractInjectionAPI<typeof cardPlugin>, disableFloatingToolbar?: boolean) => FloatingToolbarHandler;
11
11
  export declare const getSettingsButton: (intl: IntlShape, editorAnalyticsApi: EditorAnalyticsAPI | undefined, userPreferencesLink?: string) => FloatingToolbarItem<Command>;
12
12
  export declare const shouldRenderToolbarPulse: (embedEnabled: boolean, appearance: string, status: string, isDiscoverabilityEnabled: boolean) => boolean;
@@ -6,7 +6,7 @@ import type { CardPluginOptions } from './types';
6
6
  import type { cardPlugin } from './index';
7
7
  export declare const removeCard: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
8
8
  export declare const visitCardLink: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
9
- export declare const openLinkSettings: (editorAnalyticsApi: EditorAnalyticsAPI | undefined, userPreferencesLink: string | undefined) => Command;
9
+ export declare const openLinkSettings: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
10
10
  export declare const floatingToolbar: (cardOptions: CardOptions, lpLinkPicker: boolean, linkPickerOptions?: LinkPickerOptions, pluginInjectionApi?: ExtractInjectionAPI<typeof cardPlugin>, disableFloatingToolbar?: boolean) => FloatingToolbarHandler;
11
11
  export declare const getSettingsButton: (intl: IntlShape, editorAnalyticsApi: EditorAnalyticsAPI | undefined, userPreferencesLink?: string) => FloatingToolbarItem<Command>;
12
12
  export declare const shouldRenderToolbarPulse: (embedEnabled: boolean, appearance: string, status: string, isDiscoverabilityEnabled: boolean) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "4.4.1",
3
+ "version": "4.4.2",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,7 +34,7 @@
34
34
  "@atlaskit/adf-schema": "^44.2.0",
35
35
  "@atlaskit/analytics-next": "^10.1.0",
36
36
  "@atlaskit/custom-steps": "^0.8.0",
37
- "@atlaskit/editor-common": "^94.13.0",
37
+ "@atlaskit/editor-common": "^94.19.0",
38
38
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
39
39
  "@atlaskit/editor-plugin-decorations": "^1.3.0",
40
40
  "@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
@@ -51,13 +51,13 @@
51
51
  "@atlaskit/link-client-extension": "^2.4.0",
52
52
  "@atlaskit/link-datasource": "^3.8.0",
53
53
  "@atlaskit/linking-common": "^6.0.0",
54
- "@atlaskit/linking-types": "^9.4.0",
54
+ "@atlaskit/linking-types": "^9.5.0",
55
55
  "@atlaskit/menu": "2.13.2",
56
56
  "@atlaskit/platform-feature-flags": "^0.3.0",
57
- "@atlaskit/primitives": "^13.0.0",
57
+ "@atlaskit/primitives": "^13.1.0",
58
58
  "@atlaskit/smart-card": "^30.2.0",
59
59
  "@atlaskit/theme": "^14.0.0",
60
- "@atlaskit/tmp-editor-statsig": "^2.12.0",
60
+ "@atlaskit/tmp-editor-statsig": "^2.14.0",
61
61
  "@atlaskit/tokens": "^2.2.0",
62
62
  "@babel/runtime": "^7.0.0",
63
63
  "@emotion/react": "^11.7.1",