@atlaskit/editor-plugin-floating-toolbar 8.2.7 → 8.2.8

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,12 @@
1
1
  # @atlaskit/editor-plugin-floating-toolbar
2
2
 
3
+ ## 8.2.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [`c73240f29d437`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c73240f29d437) -
8
+ upgrade use of browser util
9
+
3
10
  ## 8.2.7
4
11
 
5
12
  ### Patch Changes
@@ -8,6 +8,7 @@ var _browser = require("@atlaskit/editor-common/browser");
8
8
  var _clipboard = require("@atlaskit/editor-common/clipboard");
9
9
  var _copyButton = require("@atlaskit/editor-common/copy-button");
10
10
  var _state = require("@atlaskit/editor-prosemirror/state");
11
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
11
12
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
12
13
  var copyNode = exports.copyNode = function copyNode(nodeType, editorAnalyticsApi, inputMethod) {
13
14
  return function (_ref) {
@@ -31,6 +32,7 @@ var copyNode = exports.copyNode = function copyNode(nodeType, editorAnalyticsApi
31
32
  } else {
32
33
  if (domNode) {
33
34
  var div = document.createElement('div');
35
+ var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
34
36
  div.appendChild(domNode);
35
37
 
36
38
  // if copying inline content
@@ -51,7 +53,7 @@ var copyNode = exports.copyNode = function copyNode(nodeType, editorAnalyticsApi
51
53
  }
52
54
  // ED-17083 safari seems have bugs for extension copy because exntension do not have a child text(innerText) and it will not recognized as html in clipboard, this could be merge into one if this extension fixed children issue or safari fix the copy bug
53
55
  // MEX-2528 safari has a bug related to the mediaSingle node with border or link. The image tag within the clipboard is not recognized as HTML when using the ClipboardItem API. To address this, we have to switch to ClipboardPolyfill
54
- if (_browser.browser.safari && tr.selection instanceof _state.NodeSelection && (tr.selection.node.type === schema.nodes.extension || tr.selection.node.type === schema.nodes.mediaSingle)) {
56
+ if (browser.safari && tr.selection instanceof _state.NodeSelection && (tr.selection.node.type === schema.nodes.extension || tr.selection.node.type === schema.nodes.mediaSingle)) {
55
57
  (0, _clipboard.copyHTMLToClipboardPolyfill)(div);
56
58
  } else {
57
59
  (0, _clipboard.copyHTMLToClipboard)(div);
@@ -1,7 +1,8 @@
1
- import { browser } from '@atlaskit/editor-common/browser';
1
+ import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
2
2
  import { copyHTMLToClipboard, copyHTMLToClipboardPolyfill, getNodeCopiedAnalyticsPayload } from '@atlaskit/editor-common/clipboard';
3
3
  import { copyDomNode, getSelectedNodeOrNodeParentByNodeType, toDOM } from '@atlaskit/editor-common/copy-button';
4
4
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
5
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
6
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
6
7
  export const copyNode = (nodeType, editorAnalyticsApi, inputMethod) => ({
7
8
  tr
@@ -25,6 +26,7 @@ export const copyNode = (nodeType, editorAnalyticsApi, inputMethod) => ({
25
26
  } else {
26
27
  if (domNode) {
27
28
  const div = document.createElement('div');
29
+ const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
28
30
  div.appendChild(domNode);
29
31
 
30
32
  // if copying inline content
@@ -1,7 +1,8 @@
1
- import { browser } from '@atlaskit/editor-common/browser';
1
+ import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
2
2
  import { copyHTMLToClipboard, copyHTMLToClipboardPolyfill, getNodeCopiedAnalyticsPayload } from '@atlaskit/editor-common/clipboard';
3
3
  import { copyDomNode, getSelectedNodeOrNodeParentByNodeType, toDOM } from '@atlaskit/editor-common/copy-button';
4
4
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
5
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
6
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
6
7
  export var copyNode = function copyNode(nodeType, editorAnalyticsApi, inputMethod) {
7
8
  return function (_ref) {
@@ -25,6 +26,7 @@ export var copyNode = function copyNode(nodeType, editorAnalyticsApi, inputMetho
25
26
  } else {
26
27
  if (domNode) {
27
28
  var div = document.createElement('div');
29
+ var browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
28
30
  div.appendChild(domNode);
29
31
 
30
32
  // if copying inline content
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-floating-toolbar",
3
- "version": "8.2.7",
3
+ "version": "8.2.8",
4
4
  "description": "Floating toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -47,7 +47,7 @@
47
47
  "@atlaskit/theme": "^21.0.0",
48
48
  "@atlaskit/tmp-editor-statsig": "^13.13.0",
49
49
  "@atlaskit/tokens": "^7.0.0",
50
- "@atlaskit/tooltip": "^20.5.0",
50
+ "@atlaskit/tooltip": "^20.6.0",
51
51
  "@babel/runtime": "^7.0.0",
52
52
  "@emotion/react": "^11.7.1",
53
53
  "bind-event-listener": "^3.0.0",