@atlaskit/editor-plugin-status 19.0.11 → 20.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-status
|
|
2
2
|
|
|
3
|
+
## 20.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 19.0.12
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`01c0f8f495971`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/01c0f8f495971) -
|
|
14
|
+
Fix status suggestion popup showing duplicate entries when a legacy named color and its
|
|
15
|
+
equivalent-hue hex value (introduced by platform_editor_update_status_colors, e.g. green/#D3F1A7
|
|
16
|
+
or yellow/#FCE4A6) both appear in the document; suggestions now dedupe by resolved lozenge
|
|
17
|
+
appearance instead of the raw color attribute.
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 19.0.11
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -7,16 +7,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.getSuggestedStatuses = exports.MAX_SUGGESTED_STATUSES_OLD = exports.MAX_SUGGESTED_STATUSES = void 0;
|
|
8
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _statusColors = require("@atlaskit/status/status-colors");
|
|
10
11
|
var _excluded = ["distance"];
|
|
11
12
|
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; }
|
|
12
13
|
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; }
|
|
13
14
|
var MAX_SUGGESTED_STATUSES = exports.MAX_SUGGESTED_STATUSES = 20;
|
|
14
15
|
// Remove when cleaning up `platform_editor_status_popup_suggestions_patch_1`.
|
|
15
16
|
var MAX_SUGGESTED_STATUSES_OLD = exports.MAX_SUGGESTED_STATUSES_OLD = 7;
|
|
17
|
+
|
|
18
|
+
// `color` may be a legacy name or a hex value that render the same hue (e.g. `green` and
|
|
19
|
+
// `#D3F1A7` both resolve to `accent-lime`), so the key is built from the resolved appearance
|
|
20
|
+
// rather than the raw attribute value — otherwise both variants would surface as suggestions.
|
|
16
21
|
var getStatusKey = function getStatusKey(_ref) {
|
|
17
22
|
var color = _ref.color,
|
|
18
23
|
text = _ref.text;
|
|
19
|
-
return "".concat(color, ":").concat(text.trim().toLowerCase());
|
|
24
|
+
return "".concat((0, _statusColors.getLozengeAppearance)(color), ":").concat(text.trim().toLowerCase());
|
|
20
25
|
};
|
|
21
26
|
var getDisplayText = function getDisplayText(status, shouldUppercaseText) {
|
|
22
27
|
return shouldUppercaseText && status.style !== 'mixedCase' ? status.text.toUpperCase() : status.text;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
import { getLozengeAppearance } from '@atlaskit/status/status-colors';
|
|
1
2
|
export const MAX_SUGGESTED_STATUSES = 20;
|
|
2
3
|
// Remove when cleaning up `platform_editor_status_popup_suggestions_patch_1`.
|
|
3
4
|
export const MAX_SUGGESTED_STATUSES_OLD = 7;
|
|
5
|
+
|
|
6
|
+
// `color` may be a legacy name or a hex value that render the same hue (e.g. `green` and
|
|
7
|
+
// `#D3F1A7` both resolve to `accent-lime`), so the key is built from the resolved appearance
|
|
8
|
+
// rather than the raw attribute value — otherwise both variants would surface as suggestions.
|
|
4
9
|
const getStatusKey = ({
|
|
5
10
|
color,
|
|
6
11
|
text
|
|
7
|
-
}) => `${color}:${text.trim().toLowerCase()}`;
|
|
12
|
+
}) => `${getLozengeAppearance(color)}:${text.trim().toLowerCase()}`;
|
|
8
13
|
const getDisplayText = (status, shouldUppercaseText) => shouldUppercaseText && status.style !== 'mixedCase' ? status.text.toUpperCase() : status.text;
|
|
9
14
|
export const getSuggestedStatuses = ({
|
|
10
15
|
currentPos,
|
|
@@ -3,13 +3,18 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
var _excluded = ["distance"];
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
6
|
+
import { getLozengeAppearance } from '@atlaskit/status/status-colors';
|
|
6
7
|
export var MAX_SUGGESTED_STATUSES = 20;
|
|
7
8
|
// Remove when cleaning up `platform_editor_status_popup_suggestions_patch_1`.
|
|
8
9
|
export var MAX_SUGGESTED_STATUSES_OLD = 7;
|
|
10
|
+
|
|
11
|
+
// `color` may be a legacy name or a hex value that render the same hue (e.g. `green` and
|
|
12
|
+
// `#D3F1A7` both resolve to `accent-lime`), so the key is built from the resolved appearance
|
|
13
|
+
// rather than the raw attribute value — otherwise both variants would surface as suggestions.
|
|
9
14
|
var getStatusKey = function getStatusKey(_ref) {
|
|
10
15
|
var color = _ref.color,
|
|
11
16
|
text = _ref.text;
|
|
12
|
-
return "".concat(color, ":").concat(text.trim().toLowerCase());
|
|
17
|
+
return "".concat(getLozengeAppearance(color), ":").concat(text.trim().toLowerCase());
|
|
13
18
|
};
|
|
14
19
|
var getDisplayText = function getDisplayText(status, shouldUppercaseText) {
|
|
15
20
|
return shouldUppercaseText && status.style !== 'mixedCase' ? status.text.toUpperCase() : status.text;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-status",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0",
|
|
4
4
|
"description": "Status plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"@atlaskit/adf-schema": "^57.5.0",
|
|
25
25
|
"@atlaskit/analytics-next": "^12.5.0",
|
|
26
26
|
"@atlaskit/browser-apis": "^1.2.0",
|
|
27
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
28
|
-
"@atlaskit/editor-plugin-block-controls": "^
|
|
29
|
-
"@atlaskit/editor-plugin-block-menu": "^
|
|
30
|
-
"@atlaskit/editor-plugin-selection": "^
|
|
31
|
-
"@atlaskit/editor-plugin-ui-control-registry": "^
|
|
32
|
-
"@atlaskit/editor-prosemirror": "^
|
|
27
|
+
"@atlaskit/editor-plugin-analytics": "^19.0.0",
|
|
28
|
+
"@atlaskit/editor-plugin-block-controls": "^20.0.0",
|
|
29
|
+
"@atlaskit/editor-plugin-block-menu": "^18.0.0",
|
|
30
|
+
"@atlaskit/editor-plugin-selection": "^19.0.0",
|
|
31
|
+
"@atlaskit/editor-plugin-ui-control-registry": "^13.0.0",
|
|
32
|
+
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
33
33
|
"@atlaskit/editor-shared-styles": "^4.3.0",
|
|
34
34
|
"@atlaskit/editor-toolbar": "^2.6.0",
|
|
35
35
|
"@atlaskit/editor-ui-control-model": "^2.9.0",
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
"@atlaskit/icon-lab": "^7.9.0",
|
|
38
38
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
40
|
-
"@atlaskit/status": "^5.
|
|
40
|
+
"@atlaskit/status": "^5.12.0",
|
|
41
41
|
"@atlaskit/tmp-editor-statsig": "^199.0.0",
|
|
42
|
-
"@atlaskit/tokens": "^18.
|
|
42
|
+
"@atlaskit/tokens": "^18.2.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": "^
|
|
48
|
+
"@atlaskit/editor-common": "^123.0.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"
|