@atlaskit/editor-plugin-status 1.0.6 → 1.0.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,18 @@
1
1
  # @atlaskit/editor-plugin-status
2
2
 
3
+ ## 1.0.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#91106](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91106) [`b6ffa30186b9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b6ffa30186b9) - Bump ADF-schema package to version 35.0.0
8
+ - Updated dependencies
9
+
10
+ ## 1.0.7
11
+
12
+ ### Patch Changes
13
+
14
+ - [#89995](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/89995) [`997eaf79583d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/997eaf79583d) - Disable status popup when Editor not in editable mode
15
+
3
16
  ## 1.0.6
4
17
 
5
18
  ### Patch Changes
@@ -65,6 +65,7 @@ function ContentComponent(_ref) {
65
65
  onSelect: onSelect,
66
66
  onTextChanged: onTextChanged,
67
67
  closeStatusPicker: closeStatusPicker,
68
- onEnter: onEnter
68
+ onEnter: onEnter,
69
+ editorView: editorView
69
70
  });
70
71
  }
@@ -280,10 +280,14 @@ var StatusPickerWithoutAnalytcs = exports.StatusPickerWithoutAnalytcs = /*#__PUR
280
280
  mountTo = _this$props.mountTo,
281
281
  boundariesElement = _this$props.boundariesElement,
282
282
  scrollableElement = _this$props.scrollableElement,
283
- focusStatusInput = _this$props.focusStatusInput;
283
+ focusStatusInput = _this$props.focusStatusInput,
284
+ editorView = _this$props.editorView;
284
285
  var _this$state3 = this.state,
285
286
  color = _this$state3.color,
286
287
  text = _this$state3.text;
288
+ if (!(editorView !== null && editorView !== void 0 && editorView.editable)) {
289
+ return null;
290
+ }
287
291
  return target && (0, _react2.jsx)(PopupWithListeners, {
288
292
  target: target,
289
293
  offset: [0, 8],
@@ -55,6 +55,7 @@ export function ContentComponent({
55
55
  onSelect: onSelect,
56
56
  onTextChanged: onTextChanged,
57
57
  closeStatusPicker: closeStatusPicker,
58
- onEnter: onEnter
58
+ onEnter: onEnter,
59
+ editorView: editorView
59
60
  });
60
61
  }
@@ -252,12 +252,16 @@ export class StatusPickerWithoutAnalytcs extends React.Component {
252
252
  mountTo,
253
253
  boundariesElement,
254
254
  scrollableElement,
255
- focusStatusInput
255
+ focusStatusInput,
256
+ editorView
256
257
  } = this.props;
257
258
  const {
258
259
  color,
259
260
  text
260
261
  } = this.state;
262
+ if (!(editorView !== null && editorView !== void 0 && editorView.editable)) {
263
+ return null;
264
+ }
261
265
  return target && jsx(PopupWithListeners, {
262
266
  target: target,
263
267
  offset: [0, 8],
@@ -55,6 +55,7 @@ export function ContentComponent(_ref) {
55
55
  onSelect: onSelect,
56
56
  onTextChanged: onTextChanged,
57
57
  closeStatusPicker: closeStatusPicker,
58
- onEnter: onEnter
58
+ onEnter: onEnter,
59
+ editorView: editorView
59
60
  });
60
61
  }
@@ -275,10 +275,14 @@ export var StatusPickerWithoutAnalytcs = /*#__PURE__*/function (_React$Component
275
275
  mountTo = _this$props.mountTo,
276
276
  boundariesElement = _this$props.boundariesElement,
277
277
  scrollableElement = _this$props.scrollableElement,
278
- focusStatusInput = _this$props.focusStatusInput;
278
+ focusStatusInput = _this$props.focusStatusInput,
279
+ editorView = _this$props.editorView;
279
280
  var _this$state3 = this.state,
280
281
  color = _this$state3.color,
281
282
  text = _this$state3.text;
283
+ if (!(editorView !== null && editorView !== void 0 && editorView.editable)) {
284
+ return null;
285
+ }
282
286
  return target && jsx(PopupWithListeners, {
283
287
  target: target,
284
288
  offset: [0, 8],
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { jsx } from '@emotion/react';
3
3
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
4
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
5
  import type { ColorType as Color } from '@atlaskit/status/picker';
5
6
  import type { ClosingPayload, StatusType } from '../types';
6
7
  export declare enum InputMethod {
@@ -27,6 +28,7 @@ export interface Props {
27
28
  mountTo?: HTMLElement;
28
29
  boundariesElement?: HTMLElement;
29
30
  scrollableElement?: HTMLElement;
31
+ editorView: EditorView;
30
32
  }
31
33
  export interface State {
32
34
  color: Color;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { jsx } from '@emotion/react';
3
3
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
4
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
5
  import type { ColorType as Color } from '@atlaskit/status/picker';
5
6
  import type { ClosingPayload, StatusType } from '../types';
6
7
  export declare enum InputMethod {
@@ -27,6 +28,7 @@ export interface Props {
27
28
  mountTo?: HTMLElement;
28
29
  boundariesElement?: HTMLElement;
29
30
  scrollableElement?: HTMLElement;
31
+ editorView: EditorView;
30
32
  }
31
33
  export interface State {
32
34
  color: Color;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-status",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Status plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,15 +33,15 @@
33
33
  ".": "./src/index.ts"
34
34
  },
35
35
  "dependencies": {
36
- "@atlaskit/adf-schema": "^35.8.0",
36
+ "@atlaskit/adf-schema": "^35.9.0",
37
37
  "@atlaskit/analytics-next": "^9.2.0",
38
- "@atlaskit/editor-common": "^78.22.0",
38
+ "@atlaskit/editor-common": "^78.28.0",
39
39
  "@atlaskit/editor-plugin-analytics": "^1.0.0",
40
40
  "@atlaskit/editor-prosemirror": "3.0.0",
41
41
  "@atlaskit/editor-shared-styles": "^2.9.0",
42
42
  "@atlaskit/status": "^1.4.0",
43
43
  "@atlaskit/theme": "^12.7.0",
44
- "@atlaskit/tokens": "^1.42.0",
44
+ "@atlaskit/tokens": "^1.43.0",
45
45
  "@babel/runtime": "^7.0.0",
46
46
  "@emotion/react": "^11.7.1"
47
47
  },