@atlaskit/editor-plugin-loom 8.0.19 → 8.1.0

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,22 @@
1
1
  # @atlaskit/editor-plugin-loom
2
2
 
3
+ ## 8.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`82d57d01a0f61`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/82d57d01a0f61) -
8
+ Distinguish between collab offline and internet offline cases for connectivity mode
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 8.0.20
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
3
20
  ## 8.0.19
4
21
 
5
22
  ### Patch Changes
@@ -11,6 +11,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
11
11
  var _react = _interopRequireWildcard(require("react"));
12
12
  var _react2 = require("@emotion/react");
13
13
  var _hooks = require("@atlaskit/editor-common/hooks");
14
+ var _editorPluginConnectivity = require("@atlaskit/editor-plugin-connectivity");
14
15
  var _commands = require("../pm-plugins/commands");
15
16
  var _ToolbarButtonComponent = _interopRequireDefault(require("./ToolbarButtonComponent"));
16
17
  var _excluded = ["onClickBeforeInit", "isDisabled", "href"];
@@ -51,7 +52,7 @@ var CustomisableLoomToolbarButton = function CustomisableLoomToolbarButton(disab
51
52
  // Ignore href if Loom is enabled so that it doesn't interfere with recording
52
53
  ,
53
54
  href: isLoomEnabled ? undefined : href,
54
- disabled: disabled || isDisabled || connectivityMode === 'offline',
55
+ disabled: disabled || isDisabled || (0, _editorPluginConnectivity.isOfflineMode)(connectivityMode),
55
56
  api: api,
56
57
  appearance: appearance,
57
58
  onClick: function onClick(e) {
@@ -78,7 +79,7 @@ var LoomToolbarButtonWrapper = function LoomToolbarButtonWrapper(_ref) {
78
79
  return (0, _react2.jsx)(_ToolbarButtonComponent.default
79
80
  // Disable the icon while the SDK isn't initialised
80
81
  , {
81
- disabled: disabled || !loomEnabled || connectivityMode === 'offline',
82
+ disabled: disabled || !loomEnabled || (0, _editorPluginConnectivity.isOfflineMode)(connectivityMode),
82
83
  api: api,
83
84
  appearance: appearance,
84
85
  onClick: handleOnClick
@@ -8,6 +8,7 @@ import React, { useCallback } from 'react';
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { jsx } from '@emotion/react';
10
10
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
11
+ import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
11
12
  import { executeRecordVideo } from '../pm-plugins/commands';
12
13
  import ToolbarButtonComponent from './ToolbarButtonComponent';
13
14
  const selector = states => {
@@ -42,7 +43,7 @@ const CustomisableLoomToolbarButton = (disabled, appearance, api) => /*#__PURE__
42
43
  // Ignore href if Loom is enabled so that it doesn't interfere with recording
43
44
  ,
44
45
  href: isLoomEnabled ? undefined : href,
45
- disabled: disabled || isDisabled || connectivityMode === 'offline',
46
+ disabled: disabled || isDisabled || isOfflineMode(connectivityMode),
46
47
  api: api,
47
48
  appearance: appearance,
48
49
  onClick: e => handleOnClick(e)
@@ -66,7 +67,7 @@ const LoomToolbarButtonWrapper = ({
66
67
  return jsx(ToolbarButtonComponent
67
68
  // Disable the icon while the SDK isn't initialised
68
69
  , {
69
- disabled: disabled || !loomEnabled || connectivityMode === 'offline',
70
+ disabled: disabled || !loomEnabled || isOfflineMode(connectivityMode),
70
71
  api: api,
71
72
  appearance: appearance,
72
73
  onClick: handleOnClick
@@ -10,6 +10,7 @@ import React, { useCallback } from 'react';
10
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
11
11
  import { jsx } from '@emotion/react';
12
12
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
13
+ import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
13
14
  import { executeRecordVideo } from '../pm-plugins/commands';
14
15
  import ToolbarButtonComponent from './ToolbarButtonComponent';
15
16
  var selector = function selector(states) {
@@ -43,7 +44,7 @@ var CustomisableLoomToolbarButton = function CustomisableLoomToolbarButton(disab
43
44
  // Ignore href if Loom is enabled so that it doesn't interfere with recording
44
45
  ,
45
46
  href: isLoomEnabled ? undefined : href,
46
- disabled: disabled || isDisabled || connectivityMode === 'offline',
47
+ disabled: disabled || isDisabled || isOfflineMode(connectivityMode),
47
48
  api: api,
48
49
  appearance: appearance,
49
50
  onClick: function onClick(e) {
@@ -70,7 +71,7 @@ var LoomToolbarButtonWrapper = function LoomToolbarButtonWrapper(_ref) {
70
71
  return jsx(ToolbarButtonComponent
71
72
  // Disable the icon while the SDK isn't initialised
72
73
  , {
73
- disabled: disabled || !loomEnabled || connectivityMode === 'offline',
74
+ disabled: disabled || !loomEnabled || isOfflineMode(connectivityMode),
74
75
  api: api,
75
76
  appearance: appearance,
76
77
  onClick: handleOnClick
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-loom",
3
- "version": "8.0.19",
3
+ "version": "8.1.0",
4
4
  "description": "Loom plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,11 +34,12 @@
34
34
  "dependencies": {
35
35
  "@atlaskit/button": "^23.9.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^6.2.0",
37
+ "@atlaskit/editor-plugin-connectivity": "^6.1.0",
37
38
  "@atlaskit/editor-plugin-editor-viewmode": "^8.0.0",
38
- "@atlaskit/editor-plugin-hyperlink": "^8.1.0",
39
+ "@atlaskit/editor-plugin-hyperlink": "^8.2.0",
39
40
  "@atlaskit/editor-plugin-primary-toolbar": "^7.0.0",
40
- "@atlaskit/editor-plugin-quick-insert": "^6.1.0",
41
- "@atlaskit/editor-plugin-toolbar": "^3.4.0",
41
+ "@atlaskit/editor-plugin-quick-insert": "^6.2.0",
42
+ "@atlaskit/editor-plugin-toolbar": "^3.5.0",
42
43
  "@atlaskit/editor-plugin-width": "^7.0.0",
43
44
  "@atlaskit/editor-prosemirror": "^7.2.0",
44
45
  "@atlaskit/editor-toolbar": "^0.18.0",
@@ -46,7 +47,7 @@
46
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
47
48
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
48
49
  "@atlaskit/tmp-editor-statsig": "^16.0.0",
49
- "@atlaskit/tokens": "^8.6.0",
50
+ "@atlaskit/tokens": "^9.0.0",
50
51
  "@babel/runtime": "^7.0.0",
51
52
  "@emotion/react": "^11.7.1",
52
53
  "@loomhq/record-sdk": "^4.4.0"