@atlaskit/editor-plugin-status 27.0.4 → 27.0.7
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 +21 -0
- package/dist/cjs/nodeviews/StatusNodeView.js +2 -2
- package/dist/cjs/nodeviews/statusNodeSpec.js +4 -4
- package/dist/cjs/pm-plugins/actions.js +16 -16
- package/dist/cjs/statusPlugin.js +19 -18
- package/dist/cjs/ui/ContentComponent.js +2 -2
- package/dist/cjs/ui/quick-insert/StatusQuickInsertMenuItem.js +7 -7
- package/dist/cjs/ui/quick-insert/getStatusQuickInsertComponents.js +3 -3
- package/dist/cjs/ui/statusBlockMenuItem.js +10 -10
- package/dist/cjs/ui/statusPicker.js +17 -26
- package/dist/es2019/nodeviews/StatusNodeView.js +1 -1
- package/dist/es2019/nodeviews/statusNodeSpec.js +2 -2
- package/dist/es2019/pm-plugins/actions.js +3 -3
- package/dist/es2019/statusPlugin.js +7 -6
- package/dist/es2019/ui/ContentComponent.js +1 -1
- package/dist/es2019/ui/quick-insert/StatusQuickInsertMenuItem.js +2 -2
- package/dist/es2019/ui/quick-insert/getStatusQuickInsertComponents.js +1 -1
- package/dist/es2019/ui/statusBlockMenuItem.js +3 -3
- package/dist/es2019/ui/statusPicker.js +13 -22
- package/dist/esm/nodeviews/StatusNodeView.js +1 -1
- package/dist/esm/nodeviews/statusNodeSpec.js +2 -2
- package/dist/esm/pm-plugins/actions.js +3 -3
- package/dist/esm/statusPlugin.js +7 -6
- package/dist/esm/ui/ContentComponent.js +1 -1
- package/dist/esm/ui/quick-insert/StatusQuickInsertMenuItem.js +2 -2
- package/dist/esm/ui/quick-insert/getStatusQuickInsertComponents.js +1 -1
- package/dist/esm/ui/statusBlockMenuItem.js +3 -3
- package/dist/esm/ui/statusPicker.js +13 -22
- package/dist/types/pm-plugins/actions.d.ts +5 -3
- package/dist/types/pm-plugins/plugin.d.ts +1 -1
- package/dist/types/statusPluginType.d.ts +5 -4
- package/dist/types/ui/ContentComponent.d.ts +1 -1
- package/dist/types/ui/quick-insert/StatusQuickInsertMenuItem.d.ts +1 -1
- package/dist/types/ui/quick-insert/getStatusQuickInsertComponents.d.ts +1 -1
- package/dist/types/ui/statusBlockMenuItem.d.ts +1 -1
- package/dist/types/ui/statusPicker.d.ts +1 -1
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-status
|
|
2
2
|
|
|
3
|
+
## 27.0.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 27.0.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 27.0.5
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`c55f775ee9bc7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c55f775ee9bc7) -
|
|
20
|
+
Clean up the shipped platform_editor_status_popup_suggestions_patch_3 feature gate, keeping its
|
|
21
|
+
enabled behaviour
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 27.0.4
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -8,7 +8,7 @@ exports.StatusNodeView = void 0;
|
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
var
|
|
11
|
+
var _status = require("@atlaskit/editor-common/messages/status");
|
|
12
12
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
13
13
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
14
14
|
var _normalizeStatusColor = require("../utils/normalizeStatusColor");
|
|
@@ -46,7 +46,7 @@ var StatusNodeView = exports.StatusNodeView = /*#__PURE__*/function () {
|
|
|
46
46
|
key: "setPlaceholder",
|
|
47
47
|
value: function setPlaceholder() {
|
|
48
48
|
if (this.textContainer && this.domElement) {
|
|
49
|
-
this.textContainer.textContent = this.intl.formatMessage(
|
|
49
|
+
this.textContainer.textContent = this.intl.formatMessage(_status.messages.placeholder);
|
|
50
50
|
this.domElement.style.setProperty('opacity', '0.83');
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -7,8 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.statusToDOM = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _browser = require("@atlaskit/editor-common/browser");
|
|
10
|
-
var
|
|
11
|
-
var _whitespace = require("@atlaskit/editor-common/whitespace");
|
|
10
|
+
var _cssHelper = require("@atlaskit/editor-common/css-helper");
|
|
11
|
+
var _whitespace = require("@atlaskit/editor-common/whitespace/whitespace");
|
|
12
12
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
13
13
|
var _normalizeStatusColor = require("../utils/normalizeStatusColor");
|
|
14
14
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -34,7 +34,7 @@ var statusToDOM = exports.statusToDOM = function statusToDOM(node) {
|
|
|
34
34
|
'data-text': text // Text stored as attribute for parseDOM extraction
|
|
35
35
|
};
|
|
36
36
|
var statusElementAttrs = {
|
|
37
|
-
style: (0,
|
|
37
|
+
style: (0, _cssHelper.convertToInlineCss)(isAndroidChromium ? {
|
|
38
38
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
39
39
|
display: 'inline-block !important',
|
|
40
40
|
verticalAlign: 'middle'
|
|
@@ -49,7 +49,7 @@ var statusToDOM = exports.statusToDOM = function statusToDOM(node) {
|
|
|
49
49
|
};
|
|
50
50
|
var lozengeTextAttrs = {
|
|
51
51
|
class: 'lozenge-text',
|
|
52
|
-
style: (0,
|
|
52
|
+
style: (0, _cssHelper.convertToInlineCss)(_objectSpread({
|
|
53
53
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
54
54
|
letterSpacing: '0.165px'
|
|
55
55
|
}, style !== 'mixedCase' && (0, _fg.fg)('platform-dst-lozenge-tag-badge-visual-uplifts') ? {
|
|
@@ -7,19 +7,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.verifyAndInsertStatus = exports.updateStatusWithAnalytics = exports.updateStatus = exports.setStatusPickerAt = exports.setFocusOnStatusInput = exports.removeStatus = exports.insertStatus = exports.createStatus = exports.commitStatusPicker = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _uuid = require("@atlaskit/adf-schema/uuid");
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
10
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
11
|
+
var _annotation = require("@atlaskit/editor-common/utils/annotation");
|
|
12
|
+
var _withAnalytics = require("@atlaskit/editor-common/withAnalytics");
|
|
13
13
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
14
14
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
15
|
-
var
|
|
15
|
+
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
16
16
|
var _createStatusNode = require("../utils/createStatusNode");
|
|
17
17
|
var _pluginKey = require("./plugin-key");
|
|
18
18
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
19
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // oxlint-disable-next-line import/no-duplicates
|
|
20
20
|
var verifyAndInsertStatus = exports.verifyAndInsertStatus = function verifyAndInsertStatus(statusNode, tr, annotationMarks) {
|
|
21
21
|
var fragment = _model.Fragment.fromArray([statusNode, tr.doc.type.schema.text(' ', annotationMarks)]);
|
|
22
|
-
var insertable = (0,
|
|
22
|
+
var insertable = (0, _utils.canInsert)(tr.selection.$from, fragment);
|
|
23
23
|
if (!insertable) {
|
|
24
24
|
var parentSelection = _state.NodeSelection.create(tr.doc, tr.selection.from - tr.selection.$anchor.parentOffset - 1);
|
|
25
25
|
tr.insert(parentSelection.to, fragment).setSelection(_state.NodeSelection.create(tr.doc, parentSelection.to + 1));
|
|
@@ -32,24 +32,24 @@ var verifyAndInsertStatus = exports.verifyAndInsertStatus = function verifyAndIn
|
|
|
32
32
|
}).scrollIntoView();
|
|
33
33
|
};
|
|
34
34
|
var createStatus = exports.createStatus = function createStatus(tr) {
|
|
35
|
-
var annotationMarksForPos = (0,
|
|
35
|
+
var annotationMarksForPos = (0, _annotation.getAnnotationMarksForPos)(tr.selection.$head);
|
|
36
36
|
var statusNode = (0, _createStatusNode.createStatusNode)(tr.doc.type.schema, {}, annotationMarksForPos);
|
|
37
37
|
return verifyAndInsertStatus(statusNode, tr, annotationMarksForPos);
|
|
38
38
|
};
|
|
39
39
|
var insertStatus = exports.insertStatus = function insertStatus(editorAnalyticsAPI) {
|
|
40
40
|
return function () {
|
|
41
|
-
var inputMethod = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] :
|
|
41
|
+
var inputMethod = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _enums.INPUT_METHOD.TOOLBAR;
|
|
42
42
|
return function (_ref) {
|
|
43
43
|
var tr = _ref.tr;
|
|
44
44
|
var statusTr = createStatus(tr);
|
|
45
45
|
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent({
|
|
46
|
-
action:
|
|
47
|
-
actionSubject:
|
|
48
|
-
actionSubjectId:
|
|
46
|
+
action: _enums.ACTION.INSERTED,
|
|
47
|
+
actionSubject: _enums.ACTION_SUBJECT.DOCUMENT,
|
|
48
|
+
actionSubjectId: _enums.ACTION_SUBJECT_ID.STATUS,
|
|
49
49
|
attributes: {
|
|
50
50
|
inputMethod: inputMethod
|
|
51
51
|
},
|
|
52
|
-
eventType:
|
|
52
|
+
eventType: _enums.EVENT_TYPE.TRACK
|
|
53
53
|
})(statusTr);
|
|
54
54
|
return statusTr;
|
|
55
55
|
};
|
|
@@ -89,14 +89,14 @@ var updateStatus = exports.updateStatus = function updateStatus(status) {
|
|
|
89
89
|
};
|
|
90
90
|
var updateStatusWithAnalytics = exports.updateStatusWithAnalytics = function updateStatusWithAnalytics(editorAnalyticsAPI) {
|
|
91
91
|
return function (inputMethod, status) {
|
|
92
|
-
return (0,
|
|
93
|
-
action:
|
|
94
|
-
actionSubject:
|
|
95
|
-
actionSubjectId:
|
|
92
|
+
return (0, _withAnalytics.withAnalytics)(editorAnalyticsAPI, {
|
|
93
|
+
action: _enums.ACTION.INSERTED,
|
|
94
|
+
actionSubject: _enums.ACTION_SUBJECT.DOCUMENT,
|
|
95
|
+
actionSubjectId: _enums.ACTION_SUBJECT_ID.STATUS,
|
|
96
96
|
attributes: {
|
|
97
97
|
inputMethod: inputMethod
|
|
98
98
|
},
|
|
99
|
-
eventType:
|
|
99
|
+
eventType: _enums.EVENT_TYPE.TRACK
|
|
100
100
|
})(updateStatus(status));
|
|
101
101
|
};
|
|
102
102
|
};
|
package/dist/cjs/statusPlugin.js
CHANGED
|
@@ -8,13 +8,14 @@ exports.statusPlugin = void 0;
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _status = require("@atlaskit/adf-schema/status");
|
|
11
|
-
var
|
|
12
|
-
var
|
|
11
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
12
|
+
var _assets = require("@atlaskit/editor-common/assets");
|
|
13
13
|
var _key = require("@atlaskit/editor-common/block-menu/key");
|
|
14
|
+
var _rank = require("@atlaskit/editor-common/block-menu/rank");
|
|
14
15
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
16
|
+
var _annotation = require("@atlaskit/editor-common/messages/annotation");
|
|
17
|
+
var _insertBlock = require("@atlaskit/editor-common/messages/insert-block");
|
|
18
|
+
var _calculateToolbarPosition = require("@atlaskit/editor-common/utils/calculate-toolbar-position");
|
|
18
19
|
var _comment = _interopRequireDefault(require("@atlaskit/icon/core/comment"));
|
|
19
20
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
20
21
|
var _actions = require("./pm-plugins/actions");
|
|
@@ -38,8 +39,8 @@ var statusPlugin = exports.statusPlugin = function statusPlugin(_ref) {
|
|
|
38
39
|
key: _key.TRANSFORM_STRUCTURE_STATUS_MENU_ITEM.key,
|
|
39
40
|
parent: {
|
|
40
41
|
type: 'block-menu-section',
|
|
41
|
-
key:
|
|
42
|
-
rank:
|
|
42
|
+
key: _key.TRANSFORM_STRUCTURE_MENU_SECTION.key,
|
|
43
|
+
rank: _rank.TRANSFORM_STRUCTURE_MENU_SECTION_RANK[_key.TRANSFORM_STRUCTURE_STATUS_MENU_ITEM.key]
|
|
43
44
|
},
|
|
44
45
|
component: (0, _statusBlockMenuItem.createStatusBlockMenuItem)(api),
|
|
45
46
|
isHidden: function isHidden() {
|
|
@@ -101,16 +102,16 @@ var statusPlugin = exports.statusPlugin = function statusPlugin(_ref) {
|
|
|
101
102
|
}
|
|
102
103
|
return [{
|
|
103
104
|
id: 'status',
|
|
104
|
-
title: formatMessage(
|
|
105
|
-
description: formatMessage(
|
|
105
|
+
title: formatMessage(_insertBlock.toolbarInsertBlockMessages.status),
|
|
106
|
+
description: formatMessage(_insertBlock.toolbarInsertBlockMessages.statusDescription),
|
|
106
107
|
priority: 700,
|
|
107
108
|
keywords: ['lozenge'],
|
|
108
109
|
icon: function icon() {
|
|
109
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
110
|
+
return /*#__PURE__*/_react.default.createElement(_assets.IconStatus, null);
|
|
110
111
|
},
|
|
111
112
|
action: function action(_insert, state) {
|
|
112
113
|
var _insertStatus, _api$analytics3;
|
|
113
|
-
return (_insertStatus = (0, _actions.insertStatus)(api === null || api === void 0 || (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 ? void 0 : _api$analytics3.actions)(
|
|
114
|
+
return (_insertStatus = (0, _actions.insertStatus)(api === null || api === void 0 || (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 ? void 0 : _api$analytics3.actions)(_enums.INPUT_METHOD.QUICK_INSERT)({
|
|
114
115
|
tr: state.tr
|
|
115
116
|
})) !== null && _insertStatus !== void 0 ? _insertStatus : state.tr;
|
|
116
117
|
}
|
|
@@ -128,7 +129,7 @@ var statusPlugin = exports.statusPlugin = function statusPlugin(_ref) {
|
|
|
128
129
|
return {
|
|
129
130
|
title: 'Status floating toolbar',
|
|
130
131
|
nodeType: state.schema.nodes.status,
|
|
131
|
-
onPositionCalculated: (0,
|
|
132
|
+
onPositionCalculated: (0, _calculateToolbarPosition.calculateToolbarPositionAboveSelection)('Status floating toolbar'),
|
|
132
133
|
items: function items(node) {
|
|
133
134
|
var _api$annotation;
|
|
134
135
|
var annotationState = api === null || api === void 0 || (_api$annotation = api.annotation) === null || _api$annotation === void 0 ? void 0 : _api$annotation.sharedState.currentState();
|
|
@@ -141,12 +142,12 @@ var statusPlugin = exports.statusPlugin = function statusPlugin(_ref) {
|
|
|
141
142
|
if (!(api !== null && api !== void 0 && api.annotation)) {
|
|
142
143
|
return true;
|
|
143
144
|
}
|
|
144
|
-
var command = api.annotation.actions.setInlineCommentDraftState(true,
|
|
145
|
+
var command = api.annotation.actions.setInlineCommentDraftState(true, _enums.INPUT_METHOD.TOOLBAR);
|
|
145
146
|
api === null || api === void 0 || (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 || (_api$analytics4 = _api$analytics4.actions) === null || _api$analytics4 === void 0 || _api$analytics4.fireAnalyticsEvent({
|
|
146
|
-
action:
|
|
147
|
-
actionSubject:
|
|
148
|
-
actionSubjectId:
|
|
149
|
-
eventType:
|
|
147
|
+
action: _enums.ACTION.CLICKED,
|
|
148
|
+
actionSubject: _enums.ACTION_SUBJECT.BUTTON,
|
|
149
|
+
actionSubjectId: _enums.ACTION_SUBJECT_ID.CREATE_INLINE_COMMENT_FROM_HIGHLIGHT_ACTIONS_MENU,
|
|
150
|
+
eventType: _enums.EVENT_TYPE.UI,
|
|
150
151
|
attributes: {
|
|
151
152
|
source: 'highlightActionsMenu',
|
|
152
153
|
pageMode: 'edit',
|
|
@@ -155,7 +156,7 @@ var statusPlugin = exports.statusPlugin = function statusPlugin(_ref) {
|
|
|
155
156
|
});
|
|
156
157
|
return command(stateFromClickEvent, dispatch);
|
|
157
158
|
};
|
|
158
|
-
var createCommentMessage = intl.formatMessage(
|
|
159
|
+
var createCommentMessage = intl.formatMessage(_annotation.annotationMessages.createComment);
|
|
159
160
|
var commentItems = showAnnotation ? [{
|
|
160
161
|
type: 'button',
|
|
161
162
|
title: createCommentMessage,
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.ContentComponent = ContentComponent;
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var
|
|
11
|
+
var _useSharedPluginState2 = require("@atlaskit/editor-common/useSharedPluginState");
|
|
12
12
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
13
13
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
14
14
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
@@ -26,7 +26,7 @@ function ContentComponent(_ref) {
|
|
|
26
26
|
popupsScrollableElement = _ref.popupsScrollableElement,
|
|
27
27
|
editorView = _ref.editorView,
|
|
28
28
|
domAtPos = _ref.domAtPos;
|
|
29
|
-
var _useSharedPluginState = (0,
|
|
29
|
+
var _useSharedPluginState = (0, _useSharedPluginState2.useSharedPluginState)(api, ['status']),
|
|
30
30
|
statusState = _useSharedPluginState.statusState;
|
|
31
31
|
var _ref2 = statusState !== null && statusState !== void 0 ? statusState : {},
|
|
32
32
|
showStatusPickerAt = _ref2.showStatusPickerAt;
|
|
@@ -8,10 +8,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.StatusQuickInsertMenuItem = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactIntl = require("react-intl");
|
|
11
|
-
var
|
|
12
|
-
var
|
|
11
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
12
|
+
var _insertBlock = require("@atlaskit/editor-common/messages/insert-block");
|
|
13
13
|
var _menuItem = require("@atlaskit/editor-common/quick-insert/menu-item");
|
|
14
|
-
var
|
|
14
|
+
var _messages = require("@atlaskit/editor-common/quick-insert/messages");
|
|
15
15
|
var _lozenge = _interopRequireDefault(require("@atlaskit/icon-lab/core/lozenge"));
|
|
16
16
|
var _actions = require("../../pm-plugins/actions");
|
|
17
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -24,7 +24,7 @@ var StatusQuickInsertMenuItem = exports.StatusQuickInsertMenuItem = function Sta
|
|
|
24
24
|
return previewImageUrls ? {
|
|
25
25
|
image: previewImageUrls,
|
|
26
26
|
attribution: {
|
|
27
|
-
name: formatMessage(
|
|
27
|
+
name: formatMessage(_messages.messages.previewAttributionAtlassian)
|
|
28
28
|
}
|
|
29
29
|
} : undefined;
|
|
30
30
|
}, [formatMessage, previewImageUrls]);
|
|
@@ -32,17 +32,17 @@ var StatusQuickInsertMenuItem = exports.StatusQuickInsertMenuItem = function Sta
|
|
|
32
32
|
var _insertStatus, _api$analytics;
|
|
33
33
|
var insert = _ref2.insert;
|
|
34
34
|
var tr = insert(undefined);
|
|
35
|
-
return (_insertStatus = (0, _actions.insertStatus)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions)(
|
|
35
|
+
return (_insertStatus = (0, _actions.insertStatus)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions)(_enums.INPUT_METHOD.QUICK_INSERT)({
|
|
36
36
|
tr: tr
|
|
37
37
|
})) !== null && _insertStatus !== void 0 ? _insertStatus : tr;
|
|
38
38
|
}, [api]);
|
|
39
39
|
return /*#__PURE__*/_react.default.createElement(_menuItem.QuickInsertMenuItem, {
|
|
40
|
-
description: formatMessage(
|
|
40
|
+
description: formatMessage(_insertBlock.toolbarInsertBlockMessages.statusDescription),
|
|
41
41
|
iconBefore: /*#__PURE__*/_react.default.createElement(_lozenge.default, {
|
|
42
42
|
label: ""
|
|
43
43
|
}),
|
|
44
44
|
onSelect: onSelect,
|
|
45
45
|
preview: preview,
|
|
46
|
-
title: formatMessage(
|
|
46
|
+
title: formatMessage(_insertBlock.toolbarInsertBlockMessages.status)
|
|
47
47
|
});
|
|
48
48
|
};
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.getStatusQuickInsertComponents = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var _insertBlock = require("@atlaskit/editor-common/messages/insert-block");
|
|
10
10
|
var _createQuickInsertMatcher = require("@atlaskit/editor-common/quick-insert/create-quick-insert-matcher");
|
|
11
11
|
var _keys = require("@atlaskit/editor-common/quick-insert/keys");
|
|
12
12
|
var _rank = require("@atlaskit/editor-common/quick-insert/rank");
|
|
@@ -28,9 +28,9 @@ var getStatusQuickInsertComponents = exports.getStatusQuickInsertComponents = fu
|
|
|
28
28
|
match: (0, _createQuickInsertMatcher.createQuickInsertMatcher)(function (_ref2) {
|
|
29
29
|
var formatMessage = _ref2.formatMessage;
|
|
30
30
|
return {
|
|
31
|
-
description: formatMessage(
|
|
31
|
+
description: formatMessage(_insertBlock.toolbarInsertBlockMessages.statusDescription),
|
|
32
32
|
keywords: ['lozenge'],
|
|
33
|
-
title: formatMessage(
|
|
33
|
+
title: formatMessage(_insertBlock.toolbarInsertBlockMessages.status)
|
|
34
34
|
};
|
|
35
35
|
}),
|
|
36
36
|
component: function component() {
|
|
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.createStatusBlockMenuItem = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntl = require("react-intl");
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
10
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
11
|
+
var _insertBlock = require("@atlaskit/editor-common/messages/insert-block");
|
|
12
|
+
var _toolbarDropdownItem = require("@atlaskit/editor-toolbar/toolbar-dropdown-item");
|
|
13
13
|
var _lozenge = _interopRequireDefault(require("@atlaskit/icon-lab/core/lozenge"));
|
|
14
14
|
var _pluginKey = require("../pm-plugins/plugin-key");
|
|
15
15
|
var _createStatusNode = require("../utils/createStatusNode");
|
|
@@ -38,13 +38,13 @@ var StatusBlockMenuItem = function StatusBlockMenuItem(_ref) {
|
|
|
38
38
|
return null;
|
|
39
39
|
}
|
|
40
40
|
api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || (_api$analytics = _api$analytics.actions) === null || _api$analytics === void 0 || _api$analytics.attachAnalyticsEvent({
|
|
41
|
-
action:
|
|
42
|
-
actionSubject:
|
|
43
|
-
actionSubjectId:
|
|
41
|
+
action: _enums.ACTION.INSERTED,
|
|
42
|
+
actionSubject: _enums.ACTION_SUBJECT.DOCUMENT,
|
|
43
|
+
actionSubjectId: _enums.ACTION_SUBJECT_ID.STATUS,
|
|
44
44
|
attributes: {
|
|
45
|
-
inputMethod:
|
|
45
|
+
inputMethod: _enums.INPUT_METHOD.BLOCK_MENU
|
|
46
46
|
},
|
|
47
|
-
eventType:
|
|
47
|
+
eventType: _enums.EVENT_TYPE.TRACK
|
|
48
48
|
})(nextTr);
|
|
49
49
|
return nextTr.setMeta(_pluginKey.pluginKey, {
|
|
50
50
|
focusStatusInput: true,
|
|
@@ -53,13 +53,13 @@ var StatusBlockMenuItem = function StatusBlockMenuItem(_ref) {
|
|
|
53
53
|
});
|
|
54
54
|
});
|
|
55
55
|
};
|
|
56
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItem.ToolbarDropdownItem, {
|
|
57
57
|
onClick: handleClick,
|
|
58
58
|
elemBefore: /*#__PURE__*/_react.default.createElement(_lozenge.default, {
|
|
59
59
|
label: "",
|
|
60
60
|
size: "small"
|
|
61
61
|
})
|
|
62
|
-
}, formatMessage(
|
|
62
|
+
}, formatMessage(_insertBlock.toolbarInsertBlockMessages.status));
|
|
63
63
|
};
|
|
64
64
|
var createStatusBlockMenuItem = exports.createStatusBlockMenuItem = function createStatusBlockMenuItem(api) {
|
|
65
65
|
return function () {
|
|
@@ -16,11 +16,12 @@ var _react2 = require("@emotion/react");
|
|
|
16
16
|
var _reactIntl = require("react-intl");
|
|
17
17
|
var _withAnalyticsEvents = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsEvents"));
|
|
18
18
|
var _browserApis = require("@atlaskit/browser-apis");
|
|
19
|
-
var
|
|
20
|
-
var
|
|
19
|
+
var _status = require("@atlaskit/editor-common/messages/status");
|
|
20
|
+
var _Popup = _interopRequireDefault(require("@atlaskit/editor-common/Popup"));
|
|
21
21
|
var _uiReact = require("@atlaskit/editor-common/ui-react");
|
|
22
|
-
var
|
|
23
|
-
var
|
|
22
|
+
var _withReactEditorViewOuterListeners = _interopRequireDefault(require("@atlaskit/editor-common/ui-react/with-react-editor-view-outer-listeners"));
|
|
23
|
+
var _UserIntentPopupWrapper = require("@atlaskit/editor-common/UserIntentPopupWrapper");
|
|
24
|
+
var _constants = require("@atlaskit/editor-shared-styles/constants");
|
|
24
25
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
25
26
|
var _unsafeExpValNoExposure = require("@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure");
|
|
26
27
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
@@ -34,7 +35,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
34
35
|
* @jsxRuntime classic
|
|
35
36
|
* @jsx jsx
|
|
36
37
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
37
|
-
var PopupWithListeners = (0,
|
|
38
|
+
var PopupWithListeners = (0, _withReactEditorViewOuterListeners.default)(_Popup.default);
|
|
38
39
|
var InputMethod = exports.InputMethod = /*#__PURE__*/function (InputMethod) {
|
|
39
40
|
InputMethod["blur"] = "blur";
|
|
40
41
|
InputMethod["escKey"] = "escKey";
|
|
@@ -72,37 +73,27 @@ var pickerContainerStylesTeam26 = (0, _react2.css)({
|
|
|
72
73
|
}
|
|
73
74
|
});
|
|
74
75
|
|
|
75
|
-
//
|
|
76
|
-
// `paddingBottom: 0` into `pickerContainerStyles`/`pickerContainerStylesTeam26`. The
|
|
77
|
-
// scrollable suggestions area already supplies its own trailing padding once actually
|
|
76
|
+
// The scrollable suggestions area already supplies its own trailing padding once actually
|
|
78
77
|
// scrolled to the end, so the outer wrapper's own bottom padding is only ever extra
|
|
79
78
|
// whitespace below the (fixed-height) scroll box, most visible right under the half-cut
|
|
80
79
|
// row when unscrolled.
|
|
81
80
|
var pickerContainerNoBottomPaddingStyles = (0, _react2.css)({
|
|
82
81
|
paddingBottom: 0
|
|
83
82
|
});
|
|
84
|
-
|
|
85
|
-
// Remove when cleaning up `platform_editor_status_popup_suggestions_patch_3`: merge into
|
|
86
|
-
// `suggestedStatusesContainerStyles`. Matches the list's own top padding (`space.100`) so the
|
|
87
|
-
// gap above the first suggestion and the gap below the last (once scrolled to the true end)
|
|
88
|
-
// are the same size.
|
|
89
|
-
var suggestedStatusesContainerAlignedBottomPaddingStyles = (0, _react2.css)({
|
|
90
|
-
paddingBottom: "var(--ds-space-100, 8px)"
|
|
91
|
-
});
|
|
92
83
|
var suggestedStatusesContainerStyles = (0, _react2.css)({
|
|
93
84
|
display: 'flex',
|
|
94
85
|
flexDirection: 'column',
|
|
95
86
|
gap: "var(--ds-space-050, 4px)",
|
|
96
87
|
margin: 0,
|
|
97
|
-
padding
|
|
88
|
+
// Bottom padding matches the list's own top padding (`space.100`) so the gap above the first
|
|
89
|
+
// suggestion and the gap below the last (once scrolled to the true end) are the same size.
|
|
90
|
+
padding: "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-150, 12px)", " ", "var(--ds-space-100, 8px)"),
|
|
98
91
|
paddingLeft: "var(--ds-space-100, 8px)"
|
|
99
92
|
});
|
|
100
93
|
|
|
101
94
|
// Fixed input plus capped scrolling color controls and suggestions. The ten-color picker is
|
|
102
95
|
// taller because it carries a second swatch row.
|
|
103
96
|
var STATUS_PICKER_FIT_HEIGHT = 236;
|
|
104
|
-
// Remove when cleaning up `platform_editor_status_popup_suggestions_patch_3`.
|
|
105
|
-
var STATUS_PICKER_FIT_HEIGHT_OLD = 288;
|
|
106
97
|
var STATUS_PICKER_TEN_COLOR_FIT_HEIGHT = 268;
|
|
107
98
|
// ColorPalette: swatches per row * 32px slot + 16px inline margin.
|
|
108
99
|
var STATUS_PICKER_CONTENT_WIDTH = 208; // 6 * 32 + 16
|
|
@@ -459,7 +450,7 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
|
|
|
459
450
|
var isSuggestionsEnabled = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_status_popup_suggestions');
|
|
460
451
|
var isUpdateStatusColorsEnabled = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_update_status_colors') || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_update_status_colors_jira');
|
|
461
452
|
var suggestedStatusList = suggestedStatuses !== null && suggestedStatuses !== void 0 && suggestedStatuses.length && isSuggestionsEnabled ? (0, _react2.jsx)("div", {
|
|
462
|
-
css:
|
|
453
|
+
css: suggestedStatusesContainerStyles,
|
|
463
454
|
"data-suggested-status-list": true
|
|
464
455
|
}, suggestedStatuses.map(function (suggestedStatus, index) {
|
|
465
456
|
return (0, _react2.jsx)("div", {
|
|
@@ -491,11 +482,11 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
|
|
|
491
482
|
palette: isUpdateStatusColorsEnabled ? 'extended' : 'default',
|
|
492
483
|
scrollableContent: suggestedStatusList
|
|
493
484
|
});
|
|
494
|
-
return (0, _react2.jsx)(
|
|
485
|
+
return (0, _react2.jsx)(_UserIntentPopupWrapper.UserIntentPopupWrapper, {
|
|
495
486
|
api: api,
|
|
496
487
|
userIntent: "statusPickerOpen"
|
|
497
488
|
}, (0, _react2.jsx)("div", {
|
|
498
|
-
css: [(0, _fg.fg)('platform-dst-lozenge-tag-badge-visual-uplifts') ? pickerContainerStylesTeam26 : pickerContainerStyles, isSuggestionsEnabled && isUpdateStatusColorsEnabled ? statusPickerWidthStyles : undefined, isSuggestionsEnabled && !isUpdateStatusColorsEnabled ? statusPickerWidthStylesOld : undefined, isSuggestionsEnabled && !!suggestedStatusList
|
|
489
|
+
css: [(0, _fg.fg)('platform-dst-lozenge-tag-badge-visual-uplifts') ? pickerContainerStylesTeam26 : pickerContainerStyles, isSuggestionsEnabled && isUpdateStatusColorsEnabled ? statusPickerWidthStyles : undefined, isSuggestionsEnabled && !isUpdateStatusColorsEnabled ? statusPickerWidthStylesOld : undefined, isSuggestionsEnabled && !!suggestedStatusList ? pickerContainerNoBottomPaddingStyles : undefined],
|
|
499
490
|
role: "none",
|
|
500
491
|
ref: this.setRef(setOutsideClickTargetRef),
|
|
501
492
|
onClick: this.handlePopupClick,
|
|
@@ -515,16 +506,16 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
|
|
|
515
506
|
if (!(editorView !== null && editorView !== void 0 && editorView.editable)) {
|
|
516
507
|
return null;
|
|
517
508
|
}
|
|
518
|
-
var fitHeight = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_update_status_colors') || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_update_status_colors_jira') ? STATUS_PICKER_TEN_COLOR_FIT_HEIGHT :
|
|
509
|
+
var fitHeight = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_update_status_colors') || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_update_status_colors_jira') ? STATUS_PICKER_TEN_COLOR_FIT_HEIGHT : STATUS_PICKER_FIT_HEIGHT;
|
|
519
510
|
return target && (0, _react2.jsx)(PopupWithListeners, {
|
|
520
|
-
ariaLabel: intl.formatMessage(
|
|
511
|
+
ariaLabel: intl.formatMessage(_status.messages.statusEditorLabel),
|
|
521
512
|
target: target
|
|
522
513
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
523
514
|
,
|
|
524
515
|
offset: [0, 8],
|
|
525
516
|
handleClickOutside: this.handleClickOutside,
|
|
526
517
|
handleEscapeKeydown: this.handleEscapeKeydown,
|
|
527
|
-
zIndex:
|
|
518
|
+
zIndex: _constants.akEditorFloatingDialogZIndex,
|
|
528
519
|
fitHeight: (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_status_popup_suggestions') ? fitHeight : 40,
|
|
529
520
|
mountTo: mountTo,
|
|
530
521
|
boundariesElement: boundariesElement,
|
|
@@ -533,7 +524,7 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
|
|
|
533
524
|
}, (0, _react2.jsx)(_visuallyHidden.default, {
|
|
534
525
|
"aria-atomic": true,
|
|
535
526
|
role: "alert"
|
|
536
|
-
}, intl.formatMessage(
|
|
527
|
+
}, intl.formatMessage(_status.messages.statusPickerOpenedAlert)), (0, _react2.jsx)(_uiReact.OutsideClickTargetRefContext.Consumer, null, this.renderWithSetOutsideClickTargetRef.bind(this)));
|
|
537
528
|
}
|
|
538
529
|
}, {
|
|
539
530
|
key: "fireSuggestedStatusClickedAnalytics",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import {
|
|
2
|
+
import { messages } from '@atlaskit/editor-common/messages/status';
|
|
3
3
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
5
|
import { normalizeStatusColorAttr } from '../utils/normalizeStatusColor';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
2
|
-
import { convertToInlineCss } from '@atlaskit/editor-common/
|
|
3
|
-
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
|
|
2
|
+
import { convertToInlineCss } from '@atlaskit/editor-common/css-helper';
|
|
3
|
+
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace/whitespace';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
5
|
import { normalizeStatusColorAttr } from '../utils/normalizeStatusColor';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { uuid } from '@atlaskit/adf-schema/uuid';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
|
+
import { getAnnotationMarksForPos } from '@atlaskit/editor-common/utils/annotation';
|
|
4
|
+
import { withAnalytics } from '@atlaskit/editor-common/withAnalytics';
|
|
5
5
|
// oxlint-disable-next-line import/no-duplicates
|
|
6
6
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
7
7
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { status } from '@atlaskit/adf-schema/status';
|
|
3
|
-
import { ACTION_SUBJECT_ID, ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import {
|
|
5
|
-
import { TRANSFORM_STRUCTURE_STATUS_MENU_ITEM } from '@atlaskit/editor-common/block-menu/key';
|
|
3
|
+
import { ACTION_SUBJECT_ID, ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { IconStatus } from '@atlaskit/editor-common/assets';
|
|
5
|
+
import { TRANSFORM_STRUCTURE_STATUS_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION } from '@atlaskit/editor-common/block-menu/key';
|
|
6
|
+
import { TRANSFORM_STRUCTURE_MENU_SECTION_RANK } from '@atlaskit/editor-common/block-menu/rank';
|
|
6
7
|
import { addInlineComment, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
7
|
-
import { annotationMessages
|
|
8
|
-
import {
|
|
9
|
-
import { calculateToolbarPositionAboveSelection } from '@atlaskit/editor-common/utils';
|
|
8
|
+
import { annotationMessages } from '@atlaskit/editor-common/messages/annotation';
|
|
9
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
10
|
+
import { calculateToolbarPositionAboveSelection } from '@atlaskit/editor-common/utils/calculate-toolbar-position';
|
|
10
11
|
import CommentIcon from '@atlaskit/icon/core/comment';
|
|
11
12
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
12
13
|
import { commitStatusPicker, insertStatus, removeStatus, updateStatusWithAnalytics } from './pm-plugins/actions';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from 'react';
|
|
2
|
-
import { useSharedPluginState } from '@atlaskit/editor-common/
|
|
2
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/useSharedPluginState';
|
|
3
3
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
4
4
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
3
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
5
5
|
import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
6
6
|
import { messages as quickInsertMessages } from '@atlaskit/editor-common/quick-insert/messages';
|
|
7
7
|
import LozengeIcon from '@atlaskit/icon-lab/core/lozenge';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
2
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
3
3
|
import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
|
|
4
4
|
import { STATUS_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
|
|
5
5
|
import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
|
|
5
|
-
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages/insert-block';
|
|
5
|
+
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar/toolbar-dropdown-item';
|
|
6
6
|
import LozengeIcon from '@atlaskit/icon-lab/core/lozenge';
|
|
7
7
|
import { pluginKey } from '../pm-plugins/plugin-key';
|
|
8
8
|
import { createStatusNode } from '../utils/createStatusNode';
|
|
@@ -11,11 +11,12 @@ import { css, jsx } from '@emotion/react';
|
|
|
11
11
|
import { injectIntl } from 'react-intl';
|
|
12
12
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
13
13
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import { OutsideClickTargetRefContext
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
14
|
+
import { messages } from '@atlaskit/editor-common/messages/status';
|
|
15
|
+
import Popup from '@atlaskit/editor-common/Popup';
|
|
16
|
+
import { OutsideClickTargetRefContext } from '@atlaskit/editor-common/ui-react';
|
|
17
|
+
import withOuterListeners from '@atlaskit/editor-common/ui-react/with-react-editor-view-outer-listeners';
|
|
18
|
+
import { UserIntentPopupWrapper } from '@atlaskit/editor-common/UserIntentPopupWrapper';
|
|
19
|
+
import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles/constants';
|
|
19
20
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
20
21
|
import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
|
|
21
22
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -62,37 +63,27 @@ const pickerContainerStylesTeam26 = css({
|
|
|
62
63
|
}
|
|
63
64
|
});
|
|
64
65
|
|
|
65
|
-
//
|
|
66
|
-
// `paddingBottom: 0` into `pickerContainerStyles`/`pickerContainerStylesTeam26`. The
|
|
67
|
-
// scrollable suggestions area already supplies its own trailing padding once actually
|
|
66
|
+
// The scrollable suggestions area already supplies its own trailing padding once actually
|
|
68
67
|
// scrolled to the end, so the outer wrapper's own bottom padding is only ever extra
|
|
69
68
|
// whitespace below the (fixed-height) scroll box, most visible right under the half-cut
|
|
70
69
|
// row when unscrolled.
|
|
71
70
|
const pickerContainerNoBottomPaddingStyles = css({
|
|
72
71
|
paddingBottom: 0
|
|
73
72
|
});
|
|
74
|
-
|
|
75
|
-
// Remove when cleaning up `platform_editor_status_popup_suggestions_patch_3`: merge into
|
|
76
|
-
// `suggestedStatusesContainerStyles`. Matches the list's own top padding (`space.100`) so the
|
|
77
|
-
// gap above the first suggestion and the gap below the last (once scrolled to the true end)
|
|
78
|
-
// are the same size.
|
|
79
|
-
const suggestedStatusesContainerAlignedBottomPaddingStyles = css({
|
|
80
|
-
paddingBottom: "var(--ds-space-100, 8px)"
|
|
81
|
-
});
|
|
82
73
|
const suggestedStatusesContainerStyles = css({
|
|
83
74
|
display: 'flex',
|
|
84
75
|
flexDirection: 'column',
|
|
85
76
|
gap: "var(--ds-space-050, 4px)",
|
|
86
77
|
margin: 0,
|
|
87
|
-
padding
|
|
78
|
+
// Bottom padding matches the list's own top padding (`space.100`) so the gap above the first
|
|
79
|
+
// suggestion and the gap below the last (once scrolled to the true end) are the same size.
|
|
80
|
+
padding: `${"var(--ds-space-100, 8px)"} ${"var(--ds-space-150, 12px)"} ${"var(--ds-space-100, 8px)"}`,
|
|
88
81
|
paddingLeft: "var(--ds-space-100, 8px)"
|
|
89
82
|
});
|
|
90
83
|
|
|
91
84
|
// Fixed input plus capped scrolling color controls and suggestions. The ten-color picker is
|
|
92
85
|
// taller because it carries a second swatch row.
|
|
93
86
|
const STATUS_PICKER_FIT_HEIGHT = 236;
|
|
94
|
-
// Remove when cleaning up `platform_editor_status_popup_suggestions_patch_3`.
|
|
95
|
-
const STATUS_PICKER_FIT_HEIGHT_OLD = 288;
|
|
96
87
|
const STATUS_PICKER_TEN_COLOR_FIT_HEIGHT = 268;
|
|
97
88
|
// ColorPalette: swatches per row * 32px slot + 16px inline margin.
|
|
98
89
|
const STATUS_PICKER_CONTENT_WIDTH = 208; // 6 * 32 + 16
|
|
@@ -433,7 +424,7 @@ class StatusPickerWithIntl extends React.Component {
|
|
|
433
424
|
const isSuggestionsEnabled = isExperimentEnabled('platform_editor_status_popup_suggestions');
|
|
434
425
|
const isUpdateStatusColorsEnabled = isExperimentEnabled('platform_editor_update_status_colors') || isExperimentEnabled('platform_editor_update_status_colors_jira');
|
|
435
426
|
const suggestedStatusList = suggestedStatuses !== null && suggestedStatuses !== void 0 && suggestedStatuses.length && isSuggestionsEnabled ? jsx("div", {
|
|
436
|
-
css:
|
|
427
|
+
css: suggestedStatusesContainerStyles,
|
|
437
428
|
"data-suggested-status-list": true
|
|
438
429
|
}, suggestedStatuses.map((suggestedStatus, index) => jsx("div", {
|
|
439
430
|
css: suggestedStatusButtonWrapperStyles,
|
|
@@ -465,7 +456,7 @@ class StatusPickerWithIntl extends React.Component {
|
|
|
465
456
|
api: api,
|
|
466
457
|
userIntent: "statusPickerOpen"
|
|
467
458
|
}, jsx("div", {
|
|
468
|
-
css: [fg('platform-dst-lozenge-tag-badge-visual-uplifts') ? pickerContainerStylesTeam26 : pickerContainerStyles, isSuggestionsEnabled && isUpdateStatusColorsEnabled ? statusPickerWidthStyles : undefined, isSuggestionsEnabled && !isUpdateStatusColorsEnabled ? statusPickerWidthStylesOld : undefined, isSuggestionsEnabled && !!suggestedStatusList
|
|
459
|
+
css: [fg('platform-dst-lozenge-tag-badge-visual-uplifts') ? pickerContainerStylesTeam26 : pickerContainerStyles, isSuggestionsEnabled && isUpdateStatusColorsEnabled ? statusPickerWidthStyles : undefined, isSuggestionsEnabled && !isUpdateStatusColorsEnabled ? statusPickerWidthStylesOld : undefined, isSuggestionsEnabled && !!suggestedStatusList ? pickerContainerNoBottomPaddingStyles : undefined],
|
|
469
460
|
role: "none",
|
|
470
461
|
ref: this.setRef(setOutsideClickTargetRef),
|
|
471
462
|
onClick: this.handlePopupClick,
|
|
@@ -484,7 +475,7 @@ class StatusPickerWithIntl extends React.Component {
|
|
|
484
475
|
if (!(editorView !== null && editorView !== void 0 && editorView.editable)) {
|
|
485
476
|
return null;
|
|
486
477
|
}
|
|
487
|
-
const fitHeight = isExperimentEnabled('platform_editor_update_status_colors') || isExperimentEnabled('platform_editor_update_status_colors_jira') ? STATUS_PICKER_TEN_COLOR_FIT_HEIGHT :
|
|
478
|
+
const fitHeight = isExperimentEnabled('platform_editor_update_status_colors') || isExperimentEnabled('platform_editor_update_status_colors_jira') ? STATUS_PICKER_TEN_COLOR_FIT_HEIGHT : STATUS_PICKER_FIT_HEIGHT;
|
|
488
479
|
return target && jsx(PopupWithListeners, {
|
|
489
480
|
ariaLabel: intl.formatMessage(messages.statusEditorLabel),
|
|
490
481
|
target: target
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
import {
|
|
4
|
+
import { messages } from '@atlaskit/editor-common/messages/status';
|
|
5
5
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
7
|
import { normalizeStatusColorAttr } from '../utils/normalizeStatusColor';
|
|
@@ -2,8 +2,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
5
|
-
import { convertToInlineCss } from '@atlaskit/editor-common/
|
|
6
|
-
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
|
|
5
|
+
import { convertToInlineCss } from '@atlaskit/editor-common/css-helper';
|
|
6
|
+
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace/whitespace';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
8
|
import { normalizeStatusColorAttr } from '../utils/normalizeStatusColor';
|
|
9
9
|
|
|
@@ -2,9 +2,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import { uuid } from '@atlaskit/adf-schema/uuid';
|
|
5
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
6
|
+
import { getAnnotationMarksForPos } from '@atlaskit/editor-common/utils/annotation';
|
|
7
|
+
import { withAnalytics } from '@atlaskit/editor-common/withAnalytics';
|
|
8
8
|
// oxlint-disable-next-line import/no-duplicates
|
|
9
9
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
10
10
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
package/dist/esm/statusPlugin.js
CHANGED
|
@@ -3,13 +3,14 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { status } from '@atlaskit/adf-schema/status';
|
|
6
|
-
import { ACTION_SUBJECT_ID, ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
7
|
-
import {
|
|
8
|
-
import { TRANSFORM_STRUCTURE_STATUS_MENU_ITEM } from '@atlaskit/editor-common/block-menu/key';
|
|
6
|
+
import { ACTION_SUBJECT_ID, ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
7
|
+
import { IconStatus } from '@atlaskit/editor-common/assets';
|
|
8
|
+
import { TRANSFORM_STRUCTURE_STATUS_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION } from '@atlaskit/editor-common/block-menu/key';
|
|
9
|
+
import { TRANSFORM_STRUCTURE_MENU_SECTION_RANK } from '@atlaskit/editor-common/block-menu/rank';
|
|
9
10
|
import { addInlineComment, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
10
|
-
import { annotationMessages
|
|
11
|
-
import {
|
|
12
|
-
import { calculateToolbarPositionAboveSelection } from '@atlaskit/editor-common/utils';
|
|
11
|
+
import { annotationMessages } from '@atlaskit/editor-common/messages/annotation';
|
|
12
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
13
|
+
import { calculateToolbarPositionAboveSelection } from '@atlaskit/editor-common/utils/calculate-toolbar-position';
|
|
13
14
|
import CommentIcon from '@atlaskit/icon/core/comment';
|
|
14
15
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
15
16
|
import { commitStatusPicker, insertStatus, removeStatus, updateStatusWithAnalytics } from './pm-plugins/actions';
|
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import React, { useCallback, useMemo } from 'react';
|
|
5
|
-
import { useSharedPluginState } from '@atlaskit/editor-common/
|
|
5
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/useSharedPluginState';
|
|
6
6
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
7
7
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
3
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
5
5
|
import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
6
6
|
import { messages as quickInsertMessages } from '@atlaskit/editor-common/quick-insert/messages';
|
|
7
7
|
import LozengeIcon from '@atlaskit/icon-lab/core/lozenge';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
2
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
3
3
|
import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
|
|
4
4
|
import { STATUS_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
|
|
5
5
|
import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
|
|
5
|
-
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages/insert-block';
|
|
5
|
+
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar/toolbar-dropdown-item';
|
|
6
6
|
import LozengeIcon from '@atlaskit/icon-lab/core/lozenge';
|
|
7
7
|
import { pluginKey } from '../pm-plugins/plugin-key';
|
|
8
8
|
import { createStatusNode } from '../utils/createStatusNode';
|
|
@@ -18,11 +18,12 @@ import { css, jsx } from '@emotion/react';
|
|
|
18
18
|
import { injectIntl } from 'react-intl';
|
|
19
19
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
20
20
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
21
|
-
import {
|
|
22
|
-
import
|
|
23
|
-
import { OutsideClickTargetRefContext
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
21
|
+
import { messages } from '@atlaskit/editor-common/messages/status';
|
|
22
|
+
import Popup from '@atlaskit/editor-common/Popup';
|
|
23
|
+
import { OutsideClickTargetRefContext } from '@atlaskit/editor-common/ui-react';
|
|
24
|
+
import withOuterListeners from '@atlaskit/editor-common/ui-react/with-react-editor-view-outer-listeners';
|
|
25
|
+
import { UserIntentPopupWrapper } from '@atlaskit/editor-common/UserIntentPopupWrapper';
|
|
26
|
+
import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles/constants';
|
|
26
27
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
27
28
|
import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
|
|
28
29
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -69,37 +70,27 @@ var pickerContainerStylesTeam26 = css({
|
|
|
69
70
|
}
|
|
70
71
|
});
|
|
71
72
|
|
|
72
|
-
//
|
|
73
|
-
// `paddingBottom: 0` into `pickerContainerStyles`/`pickerContainerStylesTeam26`. The
|
|
74
|
-
// scrollable suggestions area already supplies its own trailing padding once actually
|
|
73
|
+
// The scrollable suggestions area already supplies its own trailing padding once actually
|
|
75
74
|
// scrolled to the end, so the outer wrapper's own bottom padding is only ever extra
|
|
76
75
|
// whitespace below the (fixed-height) scroll box, most visible right under the half-cut
|
|
77
76
|
// row when unscrolled.
|
|
78
77
|
var pickerContainerNoBottomPaddingStyles = css({
|
|
79
78
|
paddingBottom: 0
|
|
80
79
|
});
|
|
81
|
-
|
|
82
|
-
// Remove when cleaning up `platform_editor_status_popup_suggestions_patch_3`: merge into
|
|
83
|
-
// `suggestedStatusesContainerStyles`. Matches the list's own top padding (`space.100`) so the
|
|
84
|
-
// gap above the first suggestion and the gap below the last (once scrolled to the true end)
|
|
85
|
-
// are the same size.
|
|
86
|
-
var suggestedStatusesContainerAlignedBottomPaddingStyles = css({
|
|
87
|
-
paddingBottom: "var(--ds-space-100, 8px)"
|
|
88
|
-
});
|
|
89
80
|
var suggestedStatusesContainerStyles = css({
|
|
90
81
|
display: 'flex',
|
|
91
82
|
flexDirection: 'column',
|
|
92
83
|
gap: "var(--ds-space-050, 4px)",
|
|
93
84
|
margin: 0,
|
|
94
|
-
padding
|
|
85
|
+
// Bottom padding matches the list's own top padding (`space.100`) so the gap above the first
|
|
86
|
+
// suggestion and the gap below the last (once scrolled to the true end) are the same size.
|
|
87
|
+
padding: "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-150, 12px)", " ", "var(--ds-space-100, 8px)"),
|
|
95
88
|
paddingLeft: "var(--ds-space-100, 8px)"
|
|
96
89
|
});
|
|
97
90
|
|
|
98
91
|
// Fixed input plus capped scrolling color controls and suggestions. The ten-color picker is
|
|
99
92
|
// taller because it carries a second swatch row.
|
|
100
93
|
var STATUS_PICKER_FIT_HEIGHT = 236;
|
|
101
|
-
// Remove when cleaning up `platform_editor_status_popup_suggestions_patch_3`.
|
|
102
|
-
var STATUS_PICKER_FIT_HEIGHT_OLD = 288;
|
|
103
94
|
var STATUS_PICKER_TEN_COLOR_FIT_HEIGHT = 268;
|
|
104
95
|
// ColorPalette: swatches per row * 32px slot + 16px inline margin.
|
|
105
96
|
var STATUS_PICKER_CONTENT_WIDTH = 208; // 6 * 32 + 16
|
|
@@ -456,7 +447,7 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
|
|
|
456
447
|
var isSuggestionsEnabled = isExperimentEnabled('platform_editor_status_popup_suggestions');
|
|
457
448
|
var isUpdateStatusColorsEnabled = isExperimentEnabled('platform_editor_update_status_colors') || isExperimentEnabled('platform_editor_update_status_colors_jira');
|
|
458
449
|
var suggestedStatusList = suggestedStatuses !== null && suggestedStatuses !== void 0 && suggestedStatuses.length && isSuggestionsEnabled ? jsx("div", {
|
|
459
|
-
css:
|
|
450
|
+
css: suggestedStatusesContainerStyles,
|
|
460
451
|
"data-suggested-status-list": true
|
|
461
452
|
}, suggestedStatuses.map(function (suggestedStatus, index) {
|
|
462
453
|
return jsx("div", {
|
|
@@ -492,7 +483,7 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
|
|
|
492
483
|
api: api,
|
|
493
484
|
userIntent: "statusPickerOpen"
|
|
494
485
|
}, jsx("div", {
|
|
495
|
-
css: [fg('platform-dst-lozenge-tag-badge-visual-uplifts') ? pickerContainerStylesTeam26 : pickerContainerStyles, isSuggestionsEnabled && isUpdateStatusColorsEnabled ? statusPickerWidthStyles : undefined, isSuggestionsEnabled && !isUpdateStatusColorsEnabled ? statusPickerWidthStylesOld : undefined, isSuggestionsEnabled && !!suggestedStatusList
|
|
486
|
+
css: [fg('platform-dst-lozenge-tag-badge-visual-uplifts') ? pickerContainerStylesTeam26 : pickerContainerStyles, isSuggestionsEnabled && isUpdateStatusColorsEnabled ? statusPickerWidthStyles : undefined, isSuggestionsEnabled && !isUpdateStatusColorsEnabled ? statusPickerWidthStylesOld : undefined, isSuggestionsEnabled && !!suggestedStatusList ? pickerContainerNoBottomPaddingStyles : undefined],
|
|
496
487
|
role: "none",
|
|
497
488
|
ref: this.setRef(setOutsideClickTargetRef),
|
|
498
489
|
onClick: this.handlePopupClick,
|
|
@@ -512,7 +503,7 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
|
|
|
512
503
|
if (!(editorView !== null && editorView !== void 0 && editorView.editable)) {
|
|
513
504
|
return null;
|
|
514
505
|
}
|
|
515
|
-
var fitHeight = isExperimentEnabled('platform_editor_update_status_colors') || isExperimentEnabled('platform_editor_update_status_colors_jira') ? STATUS_PICKER_TEN_COLOR_FIT_HEIGHT :
|
|
506
|
+
var fitHeight = isExperimentEnabled('platform_editor_update_status_colors') || isExperimentEnabled('platform_editor_update_status_colors_jira') ? STATUS_PICKER_TEN_COLOR_FIT_HEIGHT : STATUS_PICKER_FIT_HEIGHT;
|
|
516
507
|
return target && jsx(PopupWithListeners, {
|
|
517
508
|
ariaLabel: intl.formatMessage(messages.statusEditorLabel),
|
|
518
509
|
target: target
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { Command, CommandDispatch
|
|
1
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
|
|
2
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
|
+
import type { Command, CommandDispatch } from '@atlaskit/editor-common/types/command';
|
|
4
|
+
import type { EditorCommand } from '@atlaskit/editor-common/types/editor-command';
|
|
5
|
+
import type { TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types/insert-block';
|
|
4
6
|
import { type Mark } from '@atlaskit/editor-prosemirror/model';
|
|
5
7
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
6
8
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types/plugin-factory';
|
|
3
3
|
import type { StatusPluginOptions } from '../types';
|
|
4
4
|
declare const createPlugin: (pmPluginFactoryParams: PMPluginFactoryParams, options?: StatusPluginOptions) => SafePlugin;
|
|
5
5
|
export default createPlugin;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types/command';
|
|
3
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
4
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics/analyticsPluginType';
|
|
4
5
|
import type { BlockControlsPlugin } from '@atlaskit/editor-plugin-block-controls/blockControlsPluginType';
|
|
5
6
|
import type { BlockMenuPlugin } from '@atlaskit/editor-plugin-block-menu/blockMenuPluginType';
|
|
6
|
-
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
7
|
+
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection/selection-plugin-type';
|
|
7
8
|
import type { UiControlRegistryPlugin } from '@atlaskit/editor-plugin-ui-control-registry/ui-control-registry-plugin-type';
|
|
8
9
|
import type { commitStatusPicker, insertStatus, removeStatus, UpdateStatus } from './pm-plugins/actions';
|
|
9
10
|
import type { StatusPluginOptions, StatusState } from './types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
3
|
import type { DomAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { StatusPlugin } from '../statusPluginType';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type QuickInsertMenuItemProps } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
3
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
4
4
|
import type { StatusPlugin } from '../../statusPluginType';
|
|
5
5
|
export declare const StatusQuickInsertMenuItem: ({ api, previewImageUrls, }: {
|
|
6
6
|
api: ExtractInjectionAPI<StatusPlugin> | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
2
2
|
import type { RegisterMenuItem } from '@atlaskit/editor-ui-control-model/types';
|
|
3
3
|
import type { StatusPlugin } from '../../statusPluginType';
|
|
4
4
|
export declare const getStatusQuickInsertComponents: ({ api, }: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
3
|
import type { BlockMenuItemComponentProps } from '@atlaskit/editor-plugin-block-menu/blockMenuPluginType';
|
|
4
4
|
import type { StatusPlugin } from '../statusPluginType';
|
|
5
5
|
export declare const createStatusBlockMenuItem: (api: ExtractInjectionAPI<StatusPlugin> | undefined) => ({ isSuggested }?: BlockMenuItemComponentProps) => React.JSX.Element;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { type WithIntlProps, type WrappedComponentProps } from 'react-intl';
|
|
3
3
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
4
4
|
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
5
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import type { ColorType as Color } from '@atlaskit/status/picker';
|
|
8
8
|
import type { StatusPlugin } from '../statusPluginType';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-status",
|
|
3
|
-
"version": "27.0.
|
|
3
|
+
"version": "27.0.7",
|
|
4
4
|
"description": "Status plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
40
40
|
"@atlaskit/status": "^5.13.0",
|
|
41
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
41
|
+
"@atlaskit/tmp-editor-statsig": "^234.0.0",
|
|
42
42
|
"@atlaskit/tokens": "^20.4.0",
|
|
43
43
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"@emotion/react": "^11.7.1"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@atlaskit/editor-common": "^130.
|
|
48
|
+
"@atlaskit/editor-common": "^130.5.0",
|
|
49
49
|
"react": "^18.2.0 || ^19.2.0",
|
|
50
50
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
51
51
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -63,9 +63,6 @@
|
|
|
63
63
|
},
|
|
64
64
|
"platform-dst-lozenge-tag-badge-visual-uplifts": {
|
|
65
65
|
"type": "boolean"
|
|
66
|
-
},
|
|
67
|
-
"platform_editor_status_popup_suggestions_patch_3": {
|
|
68
|
-
"type": "boolean"
|
|
69
66
|
}
|
|
70
67
|
}
|
|
71
68
|
}
|