@atlaskit/editor-plugin-status 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @atlaskit/editor-plugin-status
2
2
 
3
+ ## 1.2.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#110390](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110390)
8
+ [`bead123202369`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bead123202369) -
9
+ [ux] [ED-23642] Reordering the typeahead so that date, status, code block & info panel are above
10
+ the fold (in the top 5 results)
11
+ - Updated dependencies
12
+
3
13
  ## 1.2.3
4
14
 
5
15
  ### Patch Changes
@@ -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);
@@ -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
  }
@@ -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
  };
@@ -27,12 +27,14 @@ export let closingMethods = /*#__PURE__*/function (closingMethods) {
27
27
  const pickerContainerStyles = css({
28
28
  background: `var(--ds-surface-overlay, ${N0})`,
29
29
  padding: `${"var(--ds-space-100, 8px)"} 0`,
30
+ // 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
31
  borderRadius: `${borderRadius()}px`,
31
32
  boxShadow: "var(--ds-shadow-overlay, 0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25))",
33
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
32
34
  ':focus': {
33
35
  outline: 'none'
34
36
  },
35
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
37
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
36
38
  input: {
37
39
  textTransform: 'uppercase'
38
40
  }
@@ -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);
@@ -35,12 +35,14 @@ export var closingMethods = /*#__PURE__*/function (closingMethods) {
35
35
  var pickerContainerStyles = css({
36
36
  background: "var(--ds-surface-overlay, ".concat(N0, ")"),
37
37
  padding: "var(--ds-space-100, 8px)".concat(" 0"),
38
+ // 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
39
  borderRadius: "".concat(borderRadius(), "px"),
39
40
  boxShadow: "var(--ds-shadow-overlay, 0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25))",
41
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
40
42
  ':focus': {
41
43
  outline: 'none'
42
44
  },
43
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
45
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
44
46
  input: {
45
47
  textTransform: 'uppercase'
46
48
  }
@@ -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,74 @@
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.2.4",
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
+ "*": ["dist/types-ts4.5/*", "dist/types-ts4.5/index.d.ts"]
25
+ }
26
+ },
27
+ "sideEffects": false,
28
+ "atlaskit:src": "src/index.ts",
29
+ "af:exports": {
30
+ ".": "./src/index.ts"
31
+ },
32
+ "dependencies": {
33
+ "@atlaskit/adf-schema": "^36.10.7",
34
+ "@atlaskit/analytics-next": "^9.3.0",
35
+ "@atlaskit/editor-common": "^82.6.0",
36
+ "@atlaskit/editor-plugin-analytics": "^1.2.0",
37
+ "@atlaskit/editor-prosemirror": "4.0.1",
38
+ "@atlaskit/editor-shared-styles": "^2.12.0",
39
+ "@atlaskit/status": "^1.4.0",
40
+ "@atlaskit/theme": "^12.9.0",
41
+ "@atlaskit/tokens": "^1.50.0",
42
+ "@babel/runtime": "^7.0.0",
43
+ "@emotion/react": "^11.7.1"
44
+ },
45
+ "peerDependencies": {
46
+ "react": "^16.8.0",
47
+ "react-intl-next": "npm:react-intl@^5.18.1"
48
+ },
49
+ "devDependencies": {
50
+ "@af/visual-regression": "*",
51
+ "@atlaskit/ssr": "*",
52
+ "@atlaskit/visual-regression": "*",
53
+ "@testing-library/react": "^12.1.5",
54
+ "raf-stub": "^2.0.1",
55
+ "react-dom": "^16.8.0",
56
+ "typescript": "~5.4.2"
57
+ },
58
+ "techstack": {
59
+ "@atlassian/frontend": {
60
+ "import-structure": ["atlassian-conventions"],
61
+ "circular-dependencies": ["file-and-folder-level"]
62
+ },
63
+ "@repo/internal": {
64
+ "dom-events": "use-bind-event-listener",
65
+ "analytics": ["analytics-next"],
66
+ "design-tokens": ["color"],
67
+ "theming": ["react-context"],
68
+ "ui-components": ["lite-mode"],
69
+ "deprecation": "no-deprecated-imports",
70
+ "styling": ["emotion", "emotion"],
71
+ "imports": ["import-no-extraneous-disable-for-examples-and-docs"]
72
+ }
73
+ }
74
+ }