@atlaskit/editor-plugin-status 7.1.2 → 7.1.4
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 +16 -0
- package/dist/cjs/ui/ContentComponent.js +2 -1
- package/dist/cjs/ui/statusPicker.js +32 -19
- package/dist/es2019/ui/ContentComponent.js +2 -1
- package/dist/es2019/ui/statusPicker.js +28 -19
- package/dist/esm/ui/ContentComponent.js +2 -1
- package/dist/esm/ui/statusPicker.js +32 -19
- package/dist/types/ui/statusPicker.d.ts +3 -0
- package/dist/types-ts4.5/ui/statusPicker.d.ts +3 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-status
|
|
2
2
|
|
|
3
|
+
## 7.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`e727490d9f62f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e727490d9f62f) -
|
|
8
|
+
[ux] EDITOR-2572 Hide floating toolbar when status picker is open
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 7.1.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`21fe79119fe74`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/21fe79119fe74) -
|
|
16
|
+
EDITOR-2447 Bump adf-schema to 51.3.2
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 7.1.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -18,10 +18,12 @@ var _analyticsNext = require("@atlaskit/analytics-next");
|
|
|
18
18
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
19
19
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
20
20
|
var _uiReact = require("@atlaskit/editor-common/ui-react");
|
|
21
|
+
var _userIntent = require("@atlaskit/editor-common/user-intent");
|
|
21
22
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
22
23
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
24
|
var _picker = require("@atlaskit/status/picker");
|
|
24
25
|
var _colors = require("@atlaskit/theme/colors");
|
|
26
|
+
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
25
27
|
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
|
|
26
28
|
var _actions = require("../pm-plugins/actions");
|
|
27
29
|
var _analytics = require("./analytics");
|
|
@@ -289,30 +291,41 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
|
|
|
289
291
|
}, {
|
|
290
292
|
key: "renderWithSetOutsideClickTargetRef",
|
|
291
293
|
value: function renderWithSetOutsideClickTargetRef(setOutsideClickTargetRef) {
|
|
294
|
+
var _this3 = this;
|
|
292
295
|
var _this$props = this.props,
|
|
293
296
|
isNew = _this$props.isNew,
|
|
294
|
-
focusStatusInput = _this$props.focusStatusInput
|
|
297
|
+
focusStatusInput = _this$props.focusStatusInput,
|
|
298
|
+
api = _this$props.api;
|
|
295
299
|
var _this$state3 = this.state,
|
|
296
300
|
color = _this$state3.color,
|
|
297
301
|
text = _this$state3.text;
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
302
|
+
var renderPicker = function renderPicker() {
|
|
303
|
+
return (
|
|
304
|
+
// eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
|
|
305
|
+
(0, _react2.jsx)("div", {
|
|
306
|
+
css: pickerContainerStyles,
|
|
307
|
+
tabIndex: -1,
|
|
308
|
+
ref: _this3.setRef(setOutsideClickTargetRef),
|
|
309
|
+
onClick: _this3.handlePopupClick,
|
|
310
|
+
onKeyDown: _this3.onKeyDown
|
|
311
|
+
}, (0, _react2.jsx)(_picker.StatusPicker, {
|
|
312
|
+
autoFocus: isNew || focusStatusInput,
|
|
313
|
+
selectedColor: color,
|
|
314
|
+
text: text,
|
|
315
|
+
onColorClick: _this3.onColorClick,
|
|
316
|
+
onColorHover: _this3.onColorHover,
|
|
317
|
+
onTextChanged: _this3.onTextChanged,
|
|
318
|
+
onEnter: _this3.onEnter
|
|
319
|
+
}))
|
|
320
|
+
);
|
|
321
|
+
};
|
|
322
|
+
if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_user_intent', 'isEnabled', true)) {
|
|
323
|
+
return (0, _react2.jsx)(_userIntent.UserIntentPopupWrapper, {
|
|
324
|
+
api: api,
|
|
325
|
+
userIntent: "statusPickerOpen"
|
|
326
|
+
}, renderPicker());
|
|
327
|
+
}
|
|
328
|
+
return renderPicker();
|
|
316
329
|
}
|
|
317
330
|
}, {
|
|
318
331
|
key: "render",
|
|
@@ -13,10 +13,12 @@ import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
13
13
|
import { statusMessages as messages } from '@atlaskit/editor-common/messages';
|
|
14
14
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
15
15
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
16
|
+
import { UserIntentPopupWrapper } from '@atlaskit/editor-common/user-intent';
|
|
16
17
|
import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
|
|
17
18
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
19
|
import { StatusPicker as AkStatusPicker } from '@atlaskit/status/picker';
|
|
19
20
|
import { N0 } from '@atlaskit/theme/colors';
|
|
21
|
+
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
20
22
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
21
23
|
import { DEFAULT_STATUS } from '../pm-plugins/actions';
|
|
22
24
|
import { analyticsState, createStatusAnalyticsAndFire } from './analytics';
|
|
@@ -264,30 +266,37 @@ class StatusPickerWithIntl extends React.Component {
|
|
|
264
266
|
renderWithSetOutsideClickTargetRef(setOutsideClickTargetRef) {
|
|
265
267
|
const {
|
|
266
268
|
isNew,
|
|
267
|
-
focusStatusInput
|
|
269
|
+
focusStatusInput,
|
|
270
|
+
api
|
|
268
271
|
} = this.props;
|
|
269
272
|
const {
|
|
270
273
|
color,
|
|
271
274
|
text
|
|
272
275
|
} = this.state;
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
)
|
|
276
|
+
const renderPicker = () =>
|
|
277
|
+
// eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
|
|
278
|
+
jsx("div", {
|
|
279
|
+
css: pickerContainerStyles,
|
|
280
|
+
tabIndex: -1,
|
|
281
|
+
ref: this.setRef(setOutsideClickTargetRef),
|
|
282
|
+
onClick: this.handlePopupClick,
|
|
283
|
+
onKeyDown: this.onKeyDown
|
|
284
|
+
}, jsx(AkStatusPicker, {
|
|
285
|
+
autoFocus: isNew || focusStatusInput,
|
|
286
|
+
selectedColor: color,
|
|
287
|
+
text: text,
|
|
288
|
+
onColorClick: this.onColorClick,
|
|
289
|
+
onColorHover: this.onColorHover,
|
|
290
|
+
onTextChanged: this.onTextChanged,
|
|
291
|
+
onEnter: this.onEnter
|
|
292
|
+
}));
|
|
293
|
+
if (expValEqualsNoExposure('platform_editor_lovability_user_intent', 'isEnabled', true)) {
|
|
294
|
+
return jsx(UserIntentPopupWrapper, {
|
|
295
|
+
api: api,
|
|
296
|
+
userIntent: "statusPickerOpen"
|
|
297
|
+
}, renderPicker());
|
|
298
|
+
}
|
|
299
|
+
return renderPicker();
|
|
291
300
|
}
|
|
292
301
|
render() {
|
|
293
302
|
const {
|
|
@@ -20,10 +20,12 @@ import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
20
20
|
import { statusMessages as messages } from '@atlaskit/editor-common/messages';
|
|
21
21
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
22
22
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
23
|
+
import { UserIntentPopupWrapper } from '@atlaskit/editor-common/user-intent';
|
|
23
24
|
import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
|
|
24
25
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
25
26
|
import { StatusPicker as AkStatusPicker } from '@atlaskit/status/picker';
|
|
26
27
|
import { N0 } from '@atlaskit/theme/colors';
|
|
28
|
+
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
27
29
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
28
30
|
import { DEFAULT_STATUS } from '../pm-plugins/actions';
|
|
29
31
|
import { analyticsState, createStatusAnalyticsAndFire } from './analytics';
|
|
@@ -286,30 +288,41 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
|
|
|
286
288
|
}, {
|
|
287
289
|
key: "renderWithSetOutsideClickTargetRef",
|
|
288
290
|
value: function renderWithSetOutsideClickTargetRef(setOutsideClickTargetRef) {
|
|
291
|
+
var _this3 = this;
|
|
289
292
|
var _this$props = this.props,
|
|
290
293
|
isNew = _this$props.isNew,
|
|
291
|
-
focusStatusInput = _this$props.focusStatusInput
|
|
294
|
+
focusStatusInput = _this$props.focusStatusInput,
|
|
295
|
+
api = _this$props.api;
|
|
292
296
|
var _this$state3 = this.state,
|
|
293
297
|
color = _this$state3.color,
|
|
294
298
|
text = _this$state3.text;
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
299
|
+
var renderPicker = function renderPicker() {
|
|
300
|
+
return (
|
|
301
|
+
// eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
|
|
302
|
+
jsx("div", {
|
|
303
|
+
css: pickerContainerStyles,
|
|
304
|
+
tabIndex: -1,
|
|
305
|
+
ref: _this3.setRef(setOutsideClickTargetRef),
|
|
306
|
+
onClick: _this3.handlePopupClick,
|
|
307
|
+
onKeyDown: _this3.onKeyDown
|
|
308
|
+
}, jsx(AkStatusPicker, {
|
|
309
|
+
autoFocus: isNew || focusStatusInput,
|
|
310
|
+
selectedColor: color,
|
|
311
|
+
text: text,
|
|
312
|
+
onColorClick: _this3.onColorClick,
|
|
313
|
+
onColorHover: _this3.onColorHover,
|
|
314
|
+
onTextChanged: _this3.onTextChanged,
|
|
315
|
+
onEnter: _this3.onEnter
|
|
316
|
+
}))
|
|
317
|
+
);
|
|
318
|
+
};
|
|
319
|
+
if (expValEqualsNoExposure('platform_editor_lovability_user_intent', 'isEnabled', true)) {
|
|
320
|
+
return jsx(UserIntentPopupWrapper, {
|
|
321
|
+
api: api,
|
|
322
|
+
userIntent: "statusPickerOpen"
|
|
323
|
+
}, renderPicker());
|
|
324
|
+
}
|
|
325
|
+
return renderPicker();
|
|
313
326
|
}
|
|
314
327
|
}, {
|
|
315
328
|
key: "render",
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
6
|
import type { ColorType as Color } from '@atlaskit/status/picker';
|
|
7
|
+
import type { StatusPlugin } from '../statusPluginType';
|
|
6
8
|
import type { ClosingPayload, StatusType } from '../types';
|
|
7
9
|
export declare enum InputMethod {
|
|
8
10
|
blur = "blur",
|
|
@@ -14,6 +16,7 @@ export declare enum closingMethods {
|
|
|
14
16
|
ArrowRight = "arrowRight"
|
|
15
17
|
}
|
|
16
18
|
export interface Props {
|
|
19
|
+
api?: ExtractInjectionAPI<StatusPlugin>;
|
|
17
20
|
boundariesElement?: HTMLElement;
|
|
18
21
|
closeStatusPicker: (closingPayload?: ClosingPayload) => void;
|
|
19
22
|
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
6
|
import type { ColorType as Color } from '@atlaskit/status/picker';
|
|
7
|
+
import type { StatusPlugin } from '../statusPluginType';
|
|
6
8
|
import type { ClosingPayload, StatusType } from '../types';
|
|
7
9
|
export declare enum InputMethod {
|
|
8
10
|
blur = "blur",
|
|
@@ -14,6 +16,7 @@ export declare enum closingMethods {
|
|
|
14
16
|
ArrowRight = "arrowRight"
|
|
15
17
|
}
|
|
16
18
|
export interface Props {
|
|
19
|
+
api?: ExtractInjectionAPI<StatusPlugin>;
|
|
17
20
|
boundariesElement?: HTMLElement;
|
|
18
21
|
closeStatusPicker: (closingPayload?: ClosingPayload) => void;
|
|
19
22
|
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-status",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.4",
|
|
4
4
|
"description": "Status plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@atlaskit/adf-schema": "^51.3.
|
|
32
|
+
"@atlaskit/adf-schema": "^51.3.2",
|
|
33
33
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
34
34
|
"@atlaskit/editor-plugin-analytics": "^6.2.0",
|
|
35
35
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
39
39
|
"@atlaskit/status": "^3.0.0",
|
|
40
40
|
"@atlaskit/theme": "^21.0.0",
|
|
41
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
41
|
+
"@atlaskit/tmp-editor-statsig": "^13.22.0",
|
|
42
42
|
"@atlaskit/tokens": "^7.0.0",
|
|
43
43
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"@emotion/react": "^11.7.1"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@atlaskit/editor-common": "^110.
|
|
48
|
+
"@atlaskit/editor-common": "^110.19.0",
|
|
49
49
|
"react": "^18.2.0",
|
|
50
50
|
"react-dom": "^18.2.0",
|
|
51
51
|
"react-intl-next": "npm:react-intl@^5.18.1"
|