@atlaskit/editor-plugin-status 1.2.3 → 1.3.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,27 @@
1
1
  # @atlaskit/editor-plugin-status
2
2
 
3
+ ## 1.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#114156](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/114156)
8
+ [`bc6a63af2d1d0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bc6a63af2d1d0) -
9
+ Bump adf-schema to 37.0.0 and adf-schema-json to 1.16.0
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 1.2.4
16
+
17
+ ### Patch Changes
18
+
19
+ - [#110390](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110390)
20
+ [`bead123202369`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bead123202369) -
21
+ [ux] [ED-23642] Reordering the typeahead so that date, status, code block & info panel are above
22
+ the fold (in the top 5 results)
23
+ - Updated dependencies
24
+
3
25
  ## 1.2.3
4
26
 
5
27
  ### Patch Changes
@@ -12,6 +12,8 @@ var _messages = require("@atlaskit/editor-common/messages");
12
12
  var _element = require("@atlaskit/status/element");
13
13
  /** @jsx jsx */
14
14
 
15
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
16
+
15
17
  var styledStatusStyles = (0, _react2.css)({
16
18
  opacity: 1
17
19
  });
@@ -79,12 +79,13 @@ var decorateWithPluginOptions = function decorateWithPluginOptions(plugin, optio
79
79
  }
80
80
  plugin.pluginsOptions = {
81
81
  quickInsert: function quickInsert(_ref3) {
82
+ var _options$getEditorFea;
82
83
  var formatMessage = _ref3.formatMessage;
83
84
  return [{
84
85
  id: 'status',
85
86
  title: formatMessage(_messages.toolbarInsertBlockMessages.status),
86
87
  description: formatMessage(_messages.toolbarInsertBlockMessages.statusDescription),
87
- priority: 700,
88
+ priority: options !== null && options !== void 0 && (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 300 : 700,
88
89
  keywords: ['lozenge'],
89
90
  icon: function icon() {
90
91
  return /*#__PURE__*/_react.default.createElement(_quickInsert.IconStatus, null);
@@ -24,7 +24,7 @@ var _constants = require("@atlaskit/theme/constants");
24
24
  var _actions = require("../actions");
25
25
  var _analytics = require("../analytics");
26
26
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
27
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
27
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
28
28
  var PopupWithListeners = (0, _uiReact.withReactEditorViewOuterListeners)(_ui.Popup);
29
29
  var InputMethod = exports.InputMethod = /*#__PURE__*/function (InputMethod) {
30
30
  InputMethod["blur"] = "blur";
@@ -40,12 +40,14 @@ var closingMethods = exports.closingMethods = /*#__PURE__*/function (closingMeth
40
40
  var pickerContainerStyles = (0, _react2.css)({
41
41
  background: "var(--ds-surface-overlay, ".concat(_colors.N0, ")"),
42
42
  padding: "var(--ds-space-100, 8px)".concat(" 0"),
43
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
43
44
  borderRadius: "".concat((0, _constants.borderRadius)(), "px"),
44
45
  boxShadow: "var(--ds-shadow-overlay, 0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25))",
46
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
45
47
  ':focus': {
46
48
  outline: 'none'
47
49
  },
48
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
50
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
49
51
  input: {
50
52
  textTransform: 'uppercase'
51
53
  }
@@ -1,5 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
+
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
5
  import { css, jsx } from '@emotion/react';
4
6
  import { injectIntl } from 'react-intl-next';
5
7
  import { statusMessages as messages } from '@atlaskit/editor-common/messages';
@@ -73,28 +73,31 @@ const decorateWithPluginOptions = (plugin, options, api) => {
73
73
  plugin.pluginsOptions = {
74
74
  quickInsert: ({
75
75
  formatMessage
76
- }) => [{
77
- id: 'status',
78
- title: formatMessage(messages.status),
79
- description: formatMessage(messages.statusDescription),
80
- priority: 700,
81
- keywords: ['lozenge'],
82
- icon: () => /*#__PURE__*/React.createElement(IconStatus, null),
83
- action(insert, state) {
84
- var _api$analytics2;
85
- const tr = createStatus(state);
86
- api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions.attachAnalyticsEvent({
87
- action: ACTION.INSERTED,
88
- actionSubject: ACTION_SUBJECT.DOCUMENT,
89
- actionSubjectId: ACTION_SUBJECT_ID.STATUS,
90
- attributes: {
91
- inputMethod: INPUT_METHOD.QUICK_INSERT
92
- },
93
- eventType: EVENT_TYPE.TRACK
94
- })(tr);
95
- return tr;
96
- }
97
- }]
76
+ }) => {
77
+ var _options$getEditorFea;
78
+ return [{
79
+ id: 'status',
80
+ title: formatMessage(messages.status),
81
+ description: formatMessage(messages.statusDescription),
82
+ priority: options !== null && options !== void 0 && (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 300 : 700,
83
+ keywords: ['lozenge'],
84
+ icon: () => /*#__PURE__*/React.createElement(IconStatus, null),
85
+ action(insert, state) {
86
+ var _api$analytics2;
87
+ const tr = createStatus(state);
88
+ api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions.attachAnalyticsEvent({
89
+ action: ACTION.INSERTED,
90
+ actionSubject: ACTION_SUBJECT.DOCUMENT,
91
+ actionSubjectId: ACTION_SUBJECT_ID.STATUS,
92
+ attributes: {
93
+ inputMethod: INPUT_METHOD.QUICK_INSERT
94
+ },
95
+ eventType: EVENT_TYPE.TRACK
96
+ })(tr);
97
+ return tr;
98
+ }
99
+ }];
100
+ }
98
101
  };
99
102
  return plugin;
100
103
  };
@@ -2,6 +2,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  /** @jsx jsx */
3
3
 
4
4
  import React from 'react';
5
+
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
7
  import { css, jsx } from '@emotion/react';
6
8
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
7
9
  import { Popup } from '@atlaskit/editor-common/ui';
@@ -27,12 +29,14 @@ export let closingMethods = /*#__PURE__*/function (closingMethods) {
27
29
  const pickerContainerStyles = css({
28
30
  background: `var(--ds-surface-overlay, ${N0})`,
29
31
  padding: `${"var(--ds-space-100, 8px)"} 0`,
32
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
30
33
  borderRadius: `${borderRadius()}px`,
31
34
  boxShadow: "var(--ds-shadow-overlay, 0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25))",
35
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
32
36
  ':focus': {
33
37
  outline: 'none'
34
38
  },
35
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
39
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
36
40
  input: {
37
41
  textTransform: 'uppercase'
38
42
  }
@@ -1,5 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
+
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
5
  import { css, jsx } from '@emotion/react';
4
6
  import { injectIntl } from 'react-intl-next';
5
7
  import { statusMessages as messages } from '@atlaskit/editor-common/messages';
@@ -72,12 +72,13 @@ var decorateWithPluginOptions = function decorateWithPluginOptions(plugin, optio
72
72
  }
73
73
  plugin.pluginsOptions = {
74
74
  quickInsert: function quickInsert(_ref3) {
75
+ var _options$getEditorFea;
75
76
  var formatMessage = _ref3.formatMessage;
76
77
  return [{
77
78
  id: 'status',
78
79
  title: formatMessage(messages.status),
79
80
  description: formatMessage(messages.statusDescription),
80
- priority: 700,
81
+ priority: options !== null && options !== void 0 && (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 300 : 700,
81
82
  keywords: ['lozenge'],
82
83
  icon: function icon() {
83
84
  return /*#__PURE__*/React.createElement(IconStatus, null);
@@ -10,6 +10,8 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
10
10
  /** @jsx jsx */
11
11
 
12
12
  import React from 'react';
13
+
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
13
15
  import { css, jsx } from '@emotion/react';
14
16
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
15
17
  import { Popup } from '@atlaskit/editor-common/ui';
@@ -35,12 +37,14 @@ export var closingMethods = /*#__PURE__*/function (closingMethods) {
35
37
  var pickerContainerStyles = css({
36
38
  background: "var(--ds-surface-overlay, ".concat(N0, ")"),
37
39
  padding: "var(--ds-space-100, 8px)".concat(" 0"),
40
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
38
41
  borderRadius: "".concat(borderRadius(), "px"),
39
42
  boxShadow: "var(--ds-shadow-overlay, 0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25))",
43
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
40
44
  ':focus': {
41
45
  outline: 'none'
42
46
  },
43
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
47
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
44
48
  input: {
45
49
  textTransform: 'uppercase'
46
50
  }
@@ -1,3 +1,4 @@
1
+ import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
1
2
  import type { Color as ColorType } from '@atlaskit/status/element';
2
3
  import type { closingMethods } from './ui/statusPicker';
3
4
  export type StatusType = {
@@ -13,6 +14,7 @@ export type StatusState = {
13
14
  export interface StatusPluginOptions {
14
15
  menuDisabled: boolean;
15
16
  allowZeroWidthSpaceAfter?: boolean;
17
+ getEditorFeatureFlags?: GetEditorFeatureFlags;
16
18
  }
17
19
  export type ClosingPayload = {
18
20
  closingMethod: closingMethods;
@@ -1,3 +1,4 @@
1
+ import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
1
2
  import type { Color as ColorType } from '@atlaskit/status/element';
2
3
  import type { closingMethods } from './ui/statusPicker';
3
4
  export type StatusType = {
@@ -13,6 +14,7 @@ export type StatusState = {
13
14
  export interface StatusPluginOptions {
14
15
  menuDisabled: boolean;
15
16
  allowZeroWidthSpaceAfter?: boolean;
17
+ getEditorFeatureFlags?: GetEditorFeatureFlags;
16
18
  }
17
19
  export type ClosingPayload = {
18
20
  closingMethod: closingMethods;
package/package.json CHANGED
@@ -1,94 +1,94 @@
1
1
  {
2
- "name": "@atlaskit/editor-plugin-status",
3
- "version": "1.2.3",
4
- "description": "Status plugin for @atlaskit/editor-core",
5
- "author": "Atlassian Pty Ltd",
6
- "license": "Apache-2.0",
7
- "publishConfig": {
8
- "registry": "https://registry.npmjs.org/"
9
- },
10
- "atlassian": {
11
- "team": "Editor: Scarlet",
12
- "singleton": true,
13
- "inPublicMirror": false,
14
- "releaseModel": "continuous",
15
- "runReact18": false
16
- },
17
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
18
- "main": "dist/cjs/index.js",
19
- "module": "dist/esm/index.js",
20
- "module:es2019": "dist/es2019/index.js",
21
- "types": "dist/types/index.d.ts",
22
- "typesVersions": {
23
- ">=4.5 <4.9": {
24
- "*": [
25
- "dist/types-ts4.5/*",
26
- "dist/types-ts4.5/index.d.ts"
27
- ]
28
- }
29
- },
30
- "sideEffects": false,
31
- "atlaskit:src": "src/index.ts",
32
- "af:exports": {
33
- ".": "./src/index.ts"
34
- },
35
- "dependencies": {
36
- "@atlaskit/adf-schema": "^36.10.7",
37
- "@atlaskit/analytics-next": "^9.3.0",
38
- "@atlaskit/editor-common": "^82.0.0",
39
- "@atlaskit/editor-plugin-analytics": "^1.2.0",
40
- "@atlaskit/editor-prosemirror": "4.0.1",
41
- "@atlaskit/editor-shared-styles": "^2.12.0",
42
- "@atlaskit/status": "^1.4.0",
43
- "@atlaskit/theme": "^12.8.0",
44
- "@atlaskit/tokens": "^1.49.0",
45
- "@babel/runtime": "^7.0.0",
46
- "@emotion/react": "^11.7.1"
47
- },
48
- "peerDependencies": {
49
- "react": "^16.8.0",
50
- "react-intl-next": "npm:react-intl@^5.18.1"
51
- },
52
- "devDependencies": {
53
- "@af/visual-regression": "*",
54
- "@atlaskit/ssr": "*",
55
- "@atlaskit/visual-regression": "*",
56
- "@testing-library/react": "^12.1.5",
57
- "raf-stub": "^2.0.1",
58
- "react-dom": "^16.8.0",
59
- "typescript": "~5.4.2"
60
- },
61
- "techstack": {
62
- "@atlassian/frontend": {
63
- "import-structure": [
64
- "atlassian-conventions"
65
- ],
66
- "circular-dependencies": [
67
- "file-and-folder-level"
68
- ]
69
- },
70
- "@repo/internal": {
71
- "dom-events": "use-bind-event-listener",
72
- "analytics": [
73
- "analytics-next"
74
- ],
75
- "design-tokens": [
76
- "color"
77
- ],
78
- "theming": [
79
- "react-context"
80
- ],
81
- "ui-components": [
82
- "lite-mode"
83
- ],
84
- "deprecation": "no-deprecated-imports",
85
- "styling": [
86
- "emotion",
87
- "emotion"
88
- ],
89
- "imports": [
90
- "import-no-extraneous-disable-for-examples-and-docs"
91
- ]
92
- }
93
- }
94
- }
2
+ "name": "@atlaskit/editor-plugin-status",
3
+ "version": "1.3.0",
4
+ "description": "Status plugin for @atlaskit/editor-core",
5
+ "author": "Atlassian Pty Ltd",
6
+ "license": "Apache-2.0",
7
+ "publishConfig": {
8
+ "registry": "https://registry.npmjs.org/"
9
+ },
10
+ "atlassian": {
11
+ "team": "Editor: Scarlet",
12
+ "singleton": true,
13
+ "inPublicMirror": false,
14
+ "releaseModel": "continuous",
15
+ "runReact18": false
16
+ },
17
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
18
+ "main": "dist/cjs/index.js",
19
+ "module": "dist/esm/index.js",
20
+ "module:es2019": "dist/es2019/index.js",
21
+ "types": "dist/types/index.d.ts",
22
+ "typesVersions": {
23
+ ">=4.5 <4.9": {
24
+ "*": [
25
+ "dist/types-ts4.5/*",
26
+ "dist/types-ts4.5/index.d.ts"
27
+ ]
28
+ }
29
+ },
30
+ "sideEffects": false,
31
+ "atlaskit:src": "src/index.ts",
32
+ "af:exports": {
33
+ ".": "./src/index.ts"
34
+ },
35
+ "dependencies": {
36
+ "@atlaskit/adf-schema": "^37.0.0",
37
+ "@atlaskit/analytics-next": "^9.3.0",
38
+ "@atlaskit/editor-common": "^82.12.0",
39
+ "@atlaskit/editor-plugin-analytics": "^1.3.0",
40
+ "@atlaskit/editor-prosemirror": "4.0.1",
41
+ "@atlaskit/editor-shared-styles": "^2.12.0",
42
+ "@atlaskit/status": "^1.4.0",
43
+ "@atlaskit/theme": "^12.11.0",
44
+ "@atlaskit/tokens": "^1.53.0",
45
+ "@babel/runtime": "^7.0.0",
46
+ "@emotion/react": "^11.7.1"
47
+ },
48
+ "peerDependencies": {
49
+ "react": "^16.8.0",
50
+ "react-intl-next": "npm:react-intl@^5.18.1"
51
+ },
52
+ "devDependencies": {
53
+ "@af/visual-regression": "*",
54
+ "@atlaskit/ssr": "*",
55
+ "@atlaskit/visual-regression": "*",
56
+ "@testing-library/react": "^12.1.5",
57
+ "raf-stub": "^2.0.1",
58
+ "react-dom": "^16.8.0",
59
+ "typescript": "~5.4.2"
60
+ },
61
+ "techstack": {
62
+ "@atlassian/frontend": {
63
+ "import-structure": [
64
+ "atlassian-conventions"
65
+ ],
66
+ "circular-dependencies": [
67
+ "file-and-folder-level"
68
+ ]
69
+ },
70
+ "@repo/internal": {
71
+ "dom-events": "use-bind-event-listener",
72
+ "analytics": [
73
+ "analytics-next"
74
+ ],
75
+ "design-tokens": [
76
+ "color"
77
+ ],
78
+ "theming": [
79
+ "react-context"
80
+ ],
81
+ "ui-components": [
82
+ "lite-mode"
83
+ ],
84
+ "deprecation": "no-deprecated-imports",
85
+ "styling": [
86
+ "emotion",
87
+ "emotion"
88
+ ],
89
+ "imports": [
90
+ "import-no-extraneous-disable-for-examples-and-docs"
91
+ ]
92
+ }
93
+ }
94
+ }