@atlaskit/editor-plugin-status 2.6.6 → 2.7.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 +20 -0
- package/dist/cjs/pm-plugins/actions.js +1 -4
- package/dist/cjs/ui/statusPicker.js +2 -22
- package/dist/es2019/pm-plugins/actions.js +1 -4
- package/dist/es2019/ui/statusPicker.js +2 -23
- package/dist/esm/pm-plugins/actions.js +1 -4
- package/dist/esm/ui/statusPicker.js +2 -22
- package/dist/types/statusPluginType.d.ts +16 -13
- package/dist/types-ts4.5/statusPluginType.d.ts +16 -13
- package/package.json +9 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-status
|
|
2
2
|
|
|
3
|
+
## 2.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#109060](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109060)
|
|
8
|
+
[`4660ec858a305`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4660ec858a305) -
|
|
9
|
+
Update `React` from v16 to v18
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 2.6.7
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#103440](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103440)
|
|
20
|
+
[`2a34d82d95e38`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2a34d82d95e38) -
|
|
21
|
+
Cleaned up feature flag that cleans up findDOMNode usages
|
|
22
|
+
|
|
3
23
|
## 2.6.6
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -134,10 +134,7 @@ var setFocusOnStatusInput = exports.setFocusOnStatusInput = function setFocusOnS
|
|
|
134
134
|
return true;
|
|
135
135
|
};
|
|
136
136
|
};
|
|
137
|
-
var handleClosingByArrows = function handleClosingByArrows(closingMethod, state, showStatusPickerAt, tr
|
|
138
|
-
// Ignored via go/ees005
|
|
139
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
140
|
-
) {
|
|
137
|
+
var handleClosingByArrows = function handleClosingByArrows(closingMethod, state, showStatusPickerAt, tr) {
|
|
141
138
|
if (closingMethod === 'arrowLeft') {
|
|
142
139
|
// put cursor right before status Lozenge
|
|
143
140
|
tr = tr.setSelection(_state.Selection.near(state.tr.doc.resolve(showStatusPickerAt), -1));
|
|
@@ -17,7 +17,6 @@ var _analyticsNext = require("@atlaskit/analytics-next");
|
|
|
17
17
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
18
18
|
var _uiReact = require("@atlaskit/editor-common/ui-react");
|
|
19
19
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
20
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
20
|
var _picker = require("@atlaskit/status/picker");
|
|
22
21
|
var _colors = require("@atlaskit/theme/colors");
|
|
23
22
|
var _constants = require("@atlaskit/theme/constants");
|
|
@@ -52,6 +51,7 @@ var pickerContainerStyles = (0, _react2.css)({
|
|
|
52
51
|
},
|
|
53
52
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
54
53
|
input: {
|
|
54
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
55
55
|
textTransform: 'uppercase'
|
|
56
56
|
}
|
|
57
57
|
});
|
|
@@ -316,16 +316,11 @@ var StatusPickerWithoutAnalytcs = exports.StatusPickerWithoutAnalytcs = /*#__PUR
|
|
|
316
316
|
key: "render",
|
|
317
317
|
value: function render() {
|
|
318
318
|
var _this$props2 = this.props,
|
|
319
|
-
isNew = _this$props2.isNew,
|
|
320
319
|
target = _this$props2.target,
|
|
321
320
|
mountTo = _this$props2.mountTo,
|
|
322
321
|
boundariesElement = _this$props2.boundariesElement,
|
|
323
322
|
scrollableElement = _this$props2.scrollableElement,
|
|
324
|
-
focusStatusInput = _this$props2.focusStatusInput,
|
|
325
323
|
editorView = _this$props2.editorView;
|
|
326
|
-
var _this$state4 = this.state,
|
|
327
|
-
color = _this$state4.color,
|
|
328
|
-
text = _this$state4.text;
|
|
329
324
|
if (!(editorView !== null && editorView !== void 0 && editorView.editable)) {
|
|
330
325
|
return null;
|
|
331
326
|
}
|
|
@@ -340,22 +335,7 @@ var StatusPickerWithoutAnalytcs = exports.StatusPickerWithoutAnalytcs = /*#__PUR
|
|
|
340
335
|
boundariesElement: boundariesElement,
|
|
341
336
|
scrollableElement: scrollableElement,
|
|
342
337
|
closeOnTab: false
|
|
343
|
-
}, (0,
|
|
344
|
-
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
345
|
-
(0, _react2.jsx)("div", {
|
|
346
|
-
css: pickerContainerStyles,
|
|
347
|
-
tabIndex: -1,
|
|
348
|
-
onClick: this.handlePopupClick,
|
|
349
|
-
onKeyDown: this.onKeyDown
|
|
350
|
-
}, (0, _react2.jsx)(_picker.StatusPicker, {
|
|
351
|
-
autoFocus: isNew || focusStatusInput,
|
|
352
|
-
selectedColor: color,
|
|
353
|
-
text: text,
|
|
354
|
-
onColorClick: this.onColorClick,
|
|
355
|
-
onColorHover: this.onColorHover,
|
|
356
|
-
onTextChanged: this.onTextChanged,
|
|
357
|
-
onEnter: this.onEnter
|
|
358
|
-
})));
|
|
338
|
+
}, (0, _react2.jsx)(_uiReact.OutsideClickTargetRefContext.Consumer, null, this.renderWithSetOutsideClickTargetRef.bind(this)));
|
|
359
339
|
}
|
|
360
340
|
}]);
|
|
361
341
|
}(_react.default.Component);
|
|
@@ -116,10 +116,7 @@ export const setFocusOnStatusInput = () => (state, dispatch) => {
|
|
|
116
116
|
dispatch(tr);
|
|
117
117
|
return true;
|
|
118
118
|
};
|
|
119
|
-
const handleClosingByArrows = (closingMethod, state, showStatusPickerAt, tr
|
|
120
|
-
// Ignored via go/ees005
|
|
121
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
122
|
-
) => {
|
|
119
|
+
const handleClosingByArrows = (closingMethod, state, showStatusPickerAt, tr) => {
|
|
123
120
|
if (closingMethod === 'arrowLeft') {
|
|
124
121
|
// put cursor right before status Lozenge
|
|
125
122
|
tr = tr.setSelection(Selection.near(state.tr.doc.resolve(showStatusPickerAt), -1));
|
|
@@ -12,7 +12,6 @@ import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
12
12
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
13
13
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
14
14
|
import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
15
|
import { StatusPicker as AkStatusPicker } from '@atlaskit/status/picker';
|
|
17
16
|
import { N0 } from '@atlaskit/theme/colors';
|
|
18
17
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
@@ -42,6 +41,7 @@ const pickerContainerStyles = css({
|
|
|
42
41
|
},
|
|
43
42
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
44
43
|
input: {
|
|
44
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
45
45
|
textTransform: 'uppercase'
|
|
46
46
|
}
|
|
47
47
|
});
|
|
@@ -289,18 +289,12 @@ export class StatusPickerWithoutAnalytcs extends React.Component {
|
|
|
289
289
|
}
|
|
290
290
|
render() {
|
|
291
291
|
const {
|
|
292
|
-
isNew,
|
|
293
292
|
target,
|
|
294
293
|
mountTo,
|
|
295
294
|
boundariesElement,
|
|
296
295
|
scrollableElement,
|
|
297
|
-
focusStatusInput,
|
|
298
296
|
editorView
|
|
299
297
|
} = this.props;
|
|
300
|
-
const {
|
|
301
|
-
color,
|
|
302
|
-
text
|
|
303
|
-
} = this.state;
|
|
304
298
|
if (!(editorView !== null && editorView !== void 0 && editorView.editable)) {
|
|
305
299
|
return null;
|
|
306
300
|
}
|
|
@@ -315,22 +309,7 @@ export class StatusPickerWithoutAnalytcs extends React.Component {
|
|
|
315
309
|
boundariesElement: boundariesElement,
|
|
316
310
|
scrollableElement: scrollableElement,
|
|
317
311
|
closeOnTab: false
|
|
318
|
-
},
|
|
319
|
-
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
320
|
-
jsx("div", {
|
|
321
|
-
css: pickerContainerStyles,
|
|
322
|
-
tabIndex: -1,
|
|
323
|
-
onClick: this.handlePopupClick,
|
|
324
|
-
onKeyDown: this.onKeyDown
|
|
325
|
-
}, jsx(AkStatusPicker, {
|
|
326
|
-
autoFocus: isNew || focusStatusInput,
|
|
327
|
-
selectedColor: color,
|
|
328
|
-
text: text,
|
|
329
|
-
onColorClick: this.onColorClick,
|
|
330
|
-
onColorHover: this.onColorHover,
|
|
331
|
-
onTextChanged: this.onTextChanged,
|
|
332
|
-
onEnter: this.onEnter
|
|
333
|
-
})));
|
|
312
|
+
}, jsx(OutsideClickTargetRefContext.Consumer, null, this.renderWithSetOutsideClickTargetRef.bind(this)));
|
|
334
313
|
}
|
|
335
314
|
}
|
|
336
315
|
export default withAnalyticsEvents()(StatusPickerWithoutAnalytcs);
|
|
@@ -127,10 +127,7 @@ export var setFocusOnStatusInput = function setFocusOnStatusInput() {
|
|
|
127
127
|
return true;
|
|
128
128
|
};
|
|
129
129
|
};
|
|
130
|
-
var handleClosingByArrows = function handleClosingByArrows(closingMethod, state, showStatusPickerAt, tr
|
|
131
|
-
// Ignored via go/ees005
|
|
132
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
133
|
-
) {
|
|
130
|
+
var handleClosingByArrows = function handleClosingByArrows(closingMethod, state, showStatusPickerAt, tr) {
|
|
134
131
|
if (closingMethod === 'arrowLeft') {
|
|
135
132
|
// put cursor right before status Lozenge
|
|
136
133
|
tr = tr.setSelection(Selection.near(state.tr.doc.resolve(showStatusPickerAt), -1));
|
|
@@ -19,7 +19,6 @@ import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
19
19
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
20
20
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
21
21
|
import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
|
|
22
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
23
22
|
import { StatusPicker as AkStatusPicker } from '@atlaskit/status/picker';
|
|
24
23
|
import { N0 } from '@atlaskit/theme/colors';
|
|
25
24
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
@@ -49,6 +48,7 @@ var pickerContainerStyles = css({
|
|
|
49
48
|
},
|
|
50
49
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
51
50
|
input: {
|
|
51
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
52
52
|
textTransform: 'uppercase'
|
|
53
53
|
}
|
|
54
54
|
});
|
|
@@ -313,16 +313,11 @@ export var StatusPickerWithoutAnalytcs = /*#__PURE__*/function (_React$Component
|
|
|
313
313
|
key: "render",
|
|
314
314
|
value: function render() {
|
|
315
315
|
var _this$props2 = this.props,
|
|
316
|
-
isNew = _this$props2.isNew,
|
|
317
316
|
target = _this$props2.target,
|
|
318
317
|
mountTo = _this$props2.mountTo,
|
|
319
318
|
boundariesElement = _this$props2.boundariesElement,
|
|
320
319
|
scrollableElement = _this$props2.scrollableElement,
|
|
321
|
-
focusStatusInput = _this$props2.focusStatusInput,
|
|
322
320
|
editorView = _this$props2.editorView;
|
|
323
|
-
var _this$state4 = this.state,
|
|
324
|
-
color = _this$state4.color,
|
|
325
|
-
text = _this$state4.text;
|
|
326
321
|
if (!(editorView !== null && editorView !== void 0 && editorView.editable)) {
|
|
327
322
|
return null;
|
|
328
323
|
}
|
|
@@ -337,22 +332,7 @@ export var StatusPickerWithoutAnalytcs = /*#__PURE__*/function (_React$Component
|
|
|
337
332
|
boundariesElement: boundariesElement,
|
|
338
333
|
scrollableElement: scrollableElement,
|
|
339
334
|
closeOnTab: false
|
|
340
|
-
},
|
|
341
|
-
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
342
|
-
jsx("div", {
|
|
343
|
-
css: pickerContainerStyles,
|
|
344
|
-
tabIndex: -1,
|
|
345
|
-
onClick: this.handlePopupClick,
|
|
346
|
-
onKeyDown: this.onKeyDown
|
|
347
|
-
}, jsx(AkStatusPicker, {
|
|
348
|
-
autoFocus: isNew || focusStatusInput,
|
|
349
|
-
selectedColor: color,
|
|
350
|
-
text: text,
|
|
351
|
-
onColorClick: this.onColorClick,
|
|
352
|
-
onColorHover: this.onColorHover,
|
|
353
|
-
onTextChanged: this.onTextChanged,
|
|
354
|
-
onEnter: this.onEnter
|
|
355
|
-
})));
|
|
335
|
+
}, jsx(OutsideClickTargetRefContext.Consumer, null, this.renderWithSetOutsideClickTargetRef.bind(this)));
|
|
356
336
|
}
|
|
357
337
|
}]);
|
|
358
338
|
}(React.Component);
|
|
@@ -21,21 +21,24 @@ type DummyEditorViewModePlugin = NextEditorPlugin<'editorViewMode', {
|
|
|
21
21
|
mode: 'view' | 'edit';
|
|
22
22
|
};
|
|
23
23
|
}>;
|
|
24
|
+
export type StatusPluginDependencies = [
|
|
25
|
+
OptionalPlugin<AnalyticsPlugin>,
|
|
26
|
+
OptionalPlugin<DummyAnnotationPlugin>,
|
|
27
|
+
OptionalPlugin<DummyEditorViewModePlugin>
|
|
28
|
+
];
|
|
29
|
+
export type StatusPluginActions = {
|
|
30
|
+
commitStatusPicker: typeof commitStatusPicker;
|
|
31
|
+
updateStatus: UpdateStatus;
|
|
32
|
+
};
|
|
33
|
+
export type StatusPluginCommands = {
|
|
34
|
+
removeStatus: typeof removeStatus;
|
|
35
|
+
insertStatus: ReturnType<typeof insertStatus>;
|
|
36
|
+
};
|
|
24
37
|
export type StatusPlugin = NextEditorPlugin<'status', {
|
|
25
|
-
dependencies:
|
|
26
|
-
OptionalPlugin<AnalyticsPlugin>,
|
|
27
|
-
OptionalPlugin<DummyAnnotationPlugin>,
|
|
28
|
-
OptionalPlugin<DummyEditorViewModePlugin>
|
|
29
|
-
];
|
|
38
|
+
dependencies: StatusPluginDependencies;
|
|
30
39
|
pluginConfiguration: StatusPluginOptions | undefined;
|
|
31
|
-
actions:
|
|
32
|
-
|
|
33
|
-
updateStatus: UpdateStatus;
|
|
34
|
-
};
|
|
35
|
-
commands: {
|
|
36
|
-
removeStatus: typeof removeStatus;
|
|
37
|
-
insertStatus: ReturnType<typeof insertStatus>;
|
|
38
|
-
};
|
|
40
|
+
actions: StatusPluginActions;
|
|
41
|
+
commands: StatusPluginCommands;
|
|
39
42
|
sharedState: StatusState | undefined;
|
|
40
43
|
}>;
|
|
41
44
|
export {};
|
|
@@ -21,21 +21,24 @@ type DummyEditorViewModePlugin = NextEditorPlugin<'editorViewMode', {
|
|
|
21
21
|
mode: 'view' | 'edit';
|
|
22
22
|
};
|
|
23
23
|
}>;
|
|
24
|
+
export type StatusPluginDependencies = [
|
|
25
|
+
OptionalPlugin<AnalyticsPlugin>,
|
|
26
|
+
OptionalPlugin<DummyAnnotationPlugin>,
|
|
27
|
+
OptionalPlugin<DummyEditorViewModePlugin>
|
|
28
|
+
];
|
|
29
|
+
export type StatusPluginActions = {
|
|
30
|
+
commitStatusPicker: typeof commitStatusPicker;
|
|
31
|
+
updateStatus: UpdateStatus;
|
|
32
|
+
};
|
|
33
|
+
export type StatusPluginCommands = {
|
|
34
|
+
removeStatus: typeof removeStatus;
|
|
35
|
+
insertStatus: ReturnType<typeof insertStatus>;
|
|
36
|
+
};
|
|
24
37
|
export type StatusPlugin = NextEditorPlugin<'status', {
|
|
25
|
-
dependencies:
|
|
26
|
-
OptionalPlugin<AnalyticsPlugin>,
|
|
27
|
-
OptionalPlugin<DummyAnnotationPlugin>,
|
|
28
|
-
OptionalPlugin<DummyEditorViewModePlugin>
|
|
29
|
-
];
|
|
38
|
+
dependencies: StatusPluginDependencies;
|
|
30
39
|
pluginConfiguration: StatusPluginOptions | undefined;
|
|
31
|
-
actions:
|
|
32
|
-
|
|
33
|
-
updateStatus: UpdateStatus;
|
|
34
|
-
};
|
|
35
|
-
commands: {
|
|
36
|
-
removeStatus: typeof removeStatus;
|
|
37
|
-
insertStatus: ReturnType<typeof insertStatus>;
|
|
38
|
-
};
|
|
40
|
+
actions: StatusPluginActions;
|
|
41
|
+
commands: StatusPluginCommands;
|
|
39
42
|
sharedState: StatusState | undefined;
|
|
40
43
|
}>;
|
|
41
44
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-status",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "Status plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
35
|
-
"@atlaskit/analytics-next": "^10.
|
|
36
|
-
"@atlaskit/editor-common": "^99.
|
|
37
|
-
"@atlaskit/editor-plugin-analytics": "^1.
|
|
35
|
+
"@atlaskit/analytics-next": "^10.3.0",
|
|
36
|
+
"@atlaskit/editor-common": "^99.6.0",
|
|
37
|
+
"@atlaskit/editor-plugin-analytics": "^1.11.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
39
39
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
40
|
-
"@atlaskit/icon": "^23.
|
|
40
|
+
"@atlaskit/icon": "^23.5.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
42
|
-
"@atlaskit/status": "^1.
|
|
43
|
-
"@atlaskit/theme": "^14.
|
|
44
|
-
"@atlaskit/tokens": "^3.
|
|
42
|
+
"@atlaskit/status": "^1.9.0",
|
|
43
|
+
"@atlaskit/theme": "^14.1.0",
|
|
44
|
+
"@atlaskit/tokens": "^3.3.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
46
46
|
"@emotion/react": "^11.7.1"
|
|
47
47
|
},
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@af/visual-regression": "*",
|
|
55
55
|
"@atlaskit/ssr": "*",
|
|
56
56
|
"@atlaskit/visual-regression": "*",
|
|
57
|
-
"@testing-library/react": "^
|
|
57
|
+
"@testing-library/react": "^13.4.0",
|
|
58
58
|
"raf-stub": "^2.0.1",
|
|
59
59
|
"typescript": "~5.4.2"
|
|
60
60
|
},
|
|
@@ -101,9 +101,6 @@
|
|
|
101
101
|
"platform-component-visual-refresh": {
|
|
102
102
|
"type": "boolean"
|
|
103
103
|
},
|
|
104
|
-
"platform_editor_replace_finddomnode_in_common": {
|
|
105
|
-
"type": "boolean"
|
|
106
|
-
},
|
|
107
104
|
"platform_inline_node_as_valid_annotation_selection": {
|
|
108
105
|
"type": "boolean"
|
|
109
106
|
}
|