@atlaskit/editor-plugin-card 11.4.0 → 11.4.1

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,13 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 11.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`3660feecde98f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3660feecde98f) -
8
+ upgrade use of browser util
9
+ - Updated dependencies
10
+
3
11
  ## 11.4.0
4
12
 
5
13
  ### Minor Changes
@@ -18,6 +18,7 @@ var _react = _interopRequireDefault(require("react"));
18
18
  var _rafSchd = _interopRequireDefault(require("raf-schd"));
19
19
  var _v = _interopRequireDefault(require("uuid/v4"));
20
20
  var _editorCardProvider = require("@atlaskit/editor-card-provider");
21
+ var _browser = require("@atlaskit/editor-common/browser");
21
22
  var _reactNodeView = _interopRequireDefault(require("@atlaskit/editor-common/react-node-view"));
22
23
  var _ui = require("@atlaskit/editor-common/ui");
23
24
  var _utils = require("@atlaskit/editor-common/utils");
@@ -71,9 +72,10 @@ var BlockCardComponent = exports.BlockCardComponent = /*#__PURE__*/function (_Re
71
72
  });
72
73
  (0, _defineProperty2.default)(_this, "removeCardDispatched", false);
73
74
  (0, _defineProperty2.default)(_this, "gapCursorSpan", function () {
75
+ var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
74
76
  // Don't render in EdgeHTMl version <= 18 (Edge version 44)
75
77
  // as it forces the edit popup to render 24px lower than it should
76
- if (_utils.browser.ie && _utils.browser.ie_version < 79) {
78
+ if (browser.ie && browser.ie_version < 79) {
77
79
  return;
78
80
  }
79
81
 
@@ -9,6 +9,7 @@ var _keymaps = require("@atlaskit/editor-common/keymaps");
9
9
  var _keymap = require("@atlaskit/editor-prosemirror/keymap");
10
10
  var _state = require("@atlaskit/editor-prosemirror/state");
11
11
  var _utils = require("@atlaskit/editor-prosemirror/utils");
12
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
13
  var lookupPixel = 10;
13
14
  var getClosestInlineCardPos = function getClosestInlineCardPos(state, editorView, direction) {
14
15
  var _editorView$posAtCoor;
@@ -54,9 +55,9 @@ var selectAboveBelowInlineCard = function selectAboveBelowInlineCard(direction)
54
55
  };
55
56
  function cardKeymap(featureFlags) {
56
57
  var list = {};
57
-
58
+ var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
58
59
  // https://bugs.chromium.org/p/chromium/issues/detail?id=1227468 introduced since Chrome 91
59
- if (_browser.browser.chrome && _browser.browser.chrome_version > 90) {
60
+ if (browser.chrome && browser.chrome_version > 90) {
60
61
  // Ignored via go/ees005
61
62
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
62
63
  (0, _keymaps.bindKeymapWithCommand)(_keymaps.moveUp.common, selectAboveBelowInlineCard('up'), list);
@@ -3,9 +3,10 @@ import React from 'react';
3
3
  import rafSchedule from 'raf-schd';
4
4
  import uuid from 'uuid/v4';
5
5
  import { EditorCardProvider } from '@atlaskit/editor-card-provider';
6
+ import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
6
7
  import ReactNodeView from '@atlaskit/editor-common/react-node-view';
7
8
  import { findOverflowScrollParent, UnsupportedBlock } from '@atlaskit/editor-common/ui';
8
- import { browser, canRenderDatasource } from '@atlaskit/editor-common/utils';
9
+ import { canRenderDatasource } from '@atlaskit/editor-common/utils';
9
10
  import { Card as SmartCard } from '@atlaskit/smart-card';
10
11
  import { CardSSR } from '@atlaskit/smart-card/ssr';
11
12
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -52,6 +53,7 @@ export class BlockCardComponent extends React.PureComponent {
52
53
  });
53
54
  _defineProperty(this, "removeCardDispatched", false);
54
55
  _defineProperty(this, "gapCursorSpan", () => {
56
+ const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
55
57
  // Don't render in EdgeHTMl version <= 18 (Edge version 44)
56
58
  // as it forces the edit popup to render 24px lower than it should
57
59
  if (browser.ie && browser.ie_version < 79) {
@@ -1,8 +1,9 @@
1
- import { browser } from '@atlaskit/editor-common/browser';
1
+ import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
2
2
  import { bindKeymapWithCommand, moveDown, moveUp } from '@atlaskit/editor-common/keymaps';
3
3
  import { keymap } from '@atlaskit/editor-prosemirror/keymap';
4
4
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { findChildren, flatten } from '@atlaskit/editor-prosemirror/utils';
6
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
7
  const lookupPixel = 10;
7
8
  const getClosestInlineCardPos = (state, editorView, direction) => {
8
9
  var _editorView$posAtCoor;
@@ -49,7 +50,7 @@ const selectAboveBelowInlineCard = direction => {
49
50
  };
50
51
  export function cardKeymap(featureFlags) {
51
52
  const list = {};
52
-
53
+ const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
53
54
  // https://bugs.chromium.org/p/chromium/issues/detail?id=1227468 introduced since Chrome 91
54
55
  if (browser.chrome && browser.chrome_version > 90) {
55
56
  // Ignored via go/ees005
@@ -16,9 +16,10 @@ import React from 'react';
16
16
  import rafSchedule from 'raf-schd';
17
17
  import uuid from 'uuid/v4';
18
18
  import { EditorCardProvider } from '@atlaskit/editor-card-provider';
19
+ import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
19
20
  import ReactNodeView from '@atlaskit/editor-common/react-node-view';
20
21
  import { findOverflowScrollParent, UnsupportedBlock } from '@atlaskit/editor-common/ui';
21
- import { browser, canRenderDatasource } from '@atlaskit/editor-common/utils';
22
+ import { canRenderDatasource } from '@atlaskit/editor-common/utils';
22
23
  import { Card as SmartCard } from '@atlaskit/smart-card';
23
24
  import { CardSSR } from '@atlaskit/smart-card/ssr';
24
25
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -64,6 +65,7 @@ export var BlockCardComponent = /*#__PURE__*/function (_React$PureComponent) {
64
65
  });
65
66
  _defineProperty(_this, "removeCardDispatched", false);
66
67
  _defineProperty(_this, "gapCursorSpan", function () {
68
+ var browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
67
69
  // Don't render in EdgeHTMl version <= 18 (Edge version 44)
68
70
  // as it forces the edit popup to render 24px lower than it should
69
71
  if (browser.ie && browser.ie_version < 79) {
@@ -1,8 +1,9 @@
1
- import { browser } from '@atlaskit/editor-common/browser';
1
+ import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
2
2
  import { bindKeymapWithCommand, moveDown, moveUp } from '@atlaskit/editor-common/keymaps';
3
3
  import { keymap } from '@atlaskit/editor-prosemirror/keymap';
4
4
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { findChildren, flatten } from '@atlaskit/editor-prosemirror/utils';
6
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
7
  var lookupPixel = 10;
7
8
  var getClosestInlineCardPos = function getClosestInlineCardPos(state, editorView, direction) {
8
9
  var _editorView$posAtCoor;
@@ -48,7 +49,7 @@ var selectAboveBelowInlineCard = function selectAboveBelowInlineCard(direction)
48
49
  };
49
50
  export function cardKeymap(featureFlags) {
50
51
  var list = {};
51
-
52
+ var browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
52
53
  // https://bugs.chromium.org/p/chromium/issues/detail?id=1227468 introduced since Chrome 91
53
54
  if (browser.chrome && browser.chrome_version > 90) {
54
55
  // Ignored via go/ees005
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "11.4.0",
3
+ "version": "11.4.1",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -61,7 +61,7 @@
61
61
  "@atlaskit/platform-feature-flags-react": "^0.3.0",
62
62
  "@atlaskit/primitives": "^16.0.0",
63
63
  "@atlaskit/prosemirror-history": "^0.2.0",
64
- "@atlaskit/smart-card": "^43.1.0",
64
+ "@atlaskit/smart-card": "^43.2.0",
65
65
  "@atlaskit/theme": "^21.0.0",
66
66
  "@atlaskit/tmp-editor-statsig": "^13.13.0",
67
67
  "@atlaskit/tokens": "^7.0.0",