@atlaskit/editor-plugin-expand 1.7.3 → 1.7.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-expand
2
2
 
3
+ ## 1.7.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.7.3
4
14
 
5
15
  ### Patch Changes
@@ -62,6 +62,7 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
62
62
  pluginsOptions: {
63
63
  floatingToolbar: (0, _toolbar.getToolbarConfig)(api),
64
64
  quickInsert: function quickInsert(_ref3) {
65
+ var _options$getEditorFea;
65
66
  var formatMessage = _ref3.formatMessage;
66
67
  if (options && options.allowInsertion !== true) {
67
68
  return [];
@@ -71,7 +72,7 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
71
72
  title: formatMessage(_messages.toolbarInsertBlockMessages.expand),
72
73
  description: formatMessage(_messages.toolbarInsertBlockMessages.expandDescription),
73
74
  keywords: ['accordion', 'collapse'],
74
- priority: 600,
75
+ priority: options !== null && options !== void 0 && (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 700 : 600,
75
76
  icon: function icon() {
76
77
  return /*#__PURE__*/_react.default.createElement(_quickInsert.IconExpand, null);
77
78
  },
@@ -100,7 +100,7 @@ var ExpandIconButton = exports.ExpandIconButton = function ExpandIconButton(prop
100
100
  }, props));
101
101
  }
102
102
  return (
103
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
103
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
104
104
  (0, _react2.jsx)("div", {
105
105
  css: _ui.expandLayoutWrapperStyle
106
106
  }, (0, _react2.jsx)(ButtonWithoutTooltip, (0, _extends2.default)({
@@ -55,6 +55,7 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
55
55
  pluginsOptions: {
56
56
  floatingToolbar: (0, _toolbar.getToolbarConfig)(api),
57
57
  quickInsert: function quickInsert(_ref3) {
58
+ var _options$getEditorFea;
58
59
  var formatMessage = _ref3.formatMessage;
59
60
  if (options && options.allowInsertion !== true) {
60
61
  return [];
@@ -64,7 +65,7 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
64
65
  title: formatMessage(_messages.toolbarInsertBlockMessages.expand),
65
66
  description: formatMessage(_messages.toolbarInsertBlockMessages.expandDescription),
66
67
  keywords: ['accordion', 'collapse'],
67
- priority: 600,
68
+ priority: options !== null && options !== void 0 && (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 700 : 600,
68
69
  icon: function icon() {
69
70
  return /*#__PURE__*/_react.default.createElement(_quickInsert.IconExpand, null);
70
71
  },
@@ -79,7 +79,7 @@ var ExpandButton = exports.ExpandButton = function ExpandButton(props) {
79
79
  }, props));
80
80
  }
81
81
  return (
82
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
82
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
83
83
  (0, _react2.jsx)("div", {
84
84
  css: _ui.expandLayoutWrapperStyle
85
85
  }, (0, _react2.jsx)(ButtonWithoutTooltip, (0, _extends2.default)({
@@ -50,6 +50,7 @@ export const expandPlugin = ({
50
50
  quickInsert: ({
51
51
  formatMessage
52
52
  }) => {
53
+ var _options$getEditorFea;
53
54
  if (options && options.allowInsertion !== true) {
54
55
  return [];
55
56
  }
@@ -58,7 +59,7 @@ export const expandPlugin = ({
58
59
  title: formatMessage(messages.expand),
59
60
  description: formatMessage(messages.expandDescription),
60
61
  keywords: ['accordion', 'collapse'],
61
- priority: 600,
62
+ priority: options !== null && options !== void 0 && (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 700 : 600,
62
63
  icon: () => /*#__PURE__*/React.createElement(IconExpand, null),
63
64
  action(insert, state) {
64
65
  var _api$analytics2;
@@ -81,7 +81,7 @@ export const ExpandIconButton = props => {
81
81
  }, props));
82
82
  }
83
83
  return (
84
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
84
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
85
85
  jsx("div", {
86
86
  css: expandLayoutWrapperStyle
87
87
  }, jsx(ButtonWithoutTooltip, _extends({
@@ -49,6 +49,7 @@ export const expandPlugin = ({
49
49
  quickInsert: ({
50
50
  formatMessage
51
51
  }) => {
52
+ var _options$getEditorFea;
52
53
  if (options && options.allowInsertion !== true) {
53
54
  return [];
54
55
  }
@@ -57,7 +58,7 @@ export const expandPlugin = ({
57
58
  title: formatMessage(messages.expand),
58
59
  description: formatMessage(messages.expandDescription),
59
60
  keywords: ['accordion', 'collapse'],
60
- priority: 600,
61
+ priority: options !== null && options !== void 0 && (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 700 : 600,
61
62
  icon: () => /*#__PURE__*/React.createElement(IconExpand, null),
62
63
  action(insert, state) {
63
64
  var _api$analytics2;
@@ -69,7 +69,7 @@ export const ExpandButton = props => {
69
69
  }, props));
70
70
  }
71
71
  return (
72
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
72
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
73
73
  jsx("div", {
74
74
  css: expandLayoutWrapperStyle
75
75
  }, jsx(ButtonWithoutTooltip, _extends({
@@ -49,6 +49,7 @@ export var expandPlugin = function expandPlugin(_ref) {
49
49
  pluginsOptions: {
50
50
  floatingToolbar: getToolbarConfig(api),
51
51
  quickInsert: function quickInsert(_ref3) {
52
+ var _options$getEditorFea;
52
53
  var formatMessage = _ref3.formatMessage;
53
54
  if (options && options.allowInsertion !== true) {
54
55
  return [];
@@ -58,7 +59,7 @@ export var expandPlugin = function expandPlugin(_ref) {
58
59
  title: formatMessage(messages.expand),
59
60
  description: formatMessage(messages.expandDescription),
60
61
  keywords: ['accordion', 'collapse'],
61
- priority: 600,
62
+ priority: options !== null && options !== void 0 && (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 700 : 600,
62
63
  icon: function icon() {
63
64
  return /*#__PURE__*/React.createElement(IconExpand, null);
64
65
  },
@@ -91,7 +91,7 @@ export var ExpandIconButton = function ExpandIconButton(props) {
91
91
  }, props));
92
92
  }
93
93
  return (
94
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
94
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
95
95
  jsx("div", {
96
96
  css: expandLayoutWrapperStyle
97
97
  }, jsx(ButtonWithoutTooltip, _extends({
@@ -48,6 +48,7 @@ export var expandPlugin = function expandPlugin(_ref) {
48
48
  pluginsOptions: {
49
49
  floatingToolbar: getToolbarConfig(api),
50
50
  quickInsert: function quickInsert(_ref3) {
51
+ var _options$getEditorFea;
51
52
  var formatMessage = _ref3.formatMessage;
52
53
  if (options && options.allowInsertion !== true) {
53
54
  return [];
@@ -57,7 +58,7 @@ export var expandPlugin = function expandPlugin(_ref) {
57
58
  title: formatMessage(messages.expand),
58
59
  description: formatMessage(messages.expandDescription),
59
60
  keywords: ['accordion', 'collapse'],
60
- priority: 600,
61
+ priority: options !== null && options !== void 0 && (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 700 : 600,
61
62
  icon: function icon() {
62
63
  return /*#__PURE__*/React.createElement(IconExpand, null);
63
64
  },
@@ -69,7 +69,7 @@ export var ExpandButton = function ExpandButton(props) {
69
69
  }, props));
70
70
  }
71
71
  return (
72
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
72
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
73
73
  jsx("div", {
74
74
  css: expandLayoutWrapperStyle
75
75
  }, jsx(ButtonWithoutTooltip, _extends({
@@ -1,4 +1,4 @@
1
- import type { EditorAppearance, LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
1
+ import type { EditorAppearance, GetEditorFeatureFlags, LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
2
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
4
4
  import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
@@ -33,6 +33,7 @@ export interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
33
33
  * @default false
34
34
  */
35
35
  __livePage?: boolean;
36
+ getEditorFeatureFlags?: GetEditorFeatureFlags;
36
37
  }
37
38
  export type ExpandPlugin = NextEditorPlugin<'expand', {
38
39
  pluginConfiguration: ExpandPluginOptions | undefined;
@@ -1,4 +1,4 @@
1
- import type { EditorAppearance, LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
1
+ import type { EditorAppearance, GetEditorFeatureFlags, LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
2
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
4
4
  import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
@@ -33,6 +33,7 @@ export interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
33
33
  * @default false
34
34
  */
35
35
  __livePage?: boolean;
36
+ getEditorFeatureFlags?: GetEditorFeatureFlags;
36
37
  }
37
38
  export type ExpandPlugin = NextEditorPlugin<'expand', {
38
39
  pluginConfiguration: ExpandPluginOptions | undefined;
package/package.json CHANGED
@@ -1,115 +1,95 @@
1
1
  {
2
- "name": "@atlaskit/editor-plugin-expand",
3
- "version": "1.7.3",
4
- "description": "Expand 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: Jenga",
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/button": "^17.17.0",
38
- "@atlaskit/editor-common": "^82.0.0",
39
- "@atlaskit/editor-plugin-analytics": "^1.2.0",
40
- "@atlaskit/editor-plugin-decorations": "^1.1.0",
41
- "@atlaskit/editor-plugin-editor-disabled": "^1.1.0",
42
- "@atlaskit/editor-plugin-selection": "^1.2.0",
43
- "@atlaskit/editor-plugin-selection-marker": "^1.3.0",
44
- "@atlaskit/editor-prosemirror": "4.0.1",
45
- "@atlaskit/editor-shared-styles": "^2.12.0",
46
- "@atlaskit/editor-tables": "^2.7.0",
47
- "@atlaskit/icon": "^22.3.0",
48
- "@atlaskit/platform-feature-flags": "^0.2.0",
49
- "@atlaskit/tooltip": "^18.4.0",
50
- "@babel/runtime": "^7.0.0",
51
- "@emotion/react": "^11.7.1",
52
- "w3c-keyname": "^2.1.8"
53
- },
54
- "peerDependencies": {
55
- "react": "^16.8.0",
56
- "react-dom": "^16.8.0",
57
- "react-intl-next": "npm:react-intl@^5.18.1"
58
- },
59
- "devDependencies": {
60
- "@atlaskit/analytics-next": "^9.3.0",
61
- "@atlaskit/editor-plugin-content-insertion": "^1.2.0",
62
- "@atlaskit/editor-plugin-guideline": "^1.1.0",
63
- "@atlaskit/editor-plugin-quick-insert": "^1.1.0",
64
- "@atlaskit/editor-plugin-table": "^7.16.0",
65
- "@atlaskit/editor-plugin-type-ahead": "^1.2.0",
66
- "@atlaskit/editor-plugin-width": "^1.1.0",
67
- "@testing-library/react": "^12.1.5",
68
- "react-test-renderer": "^16.8.0",
69
- "typescript": "~5.4.2"
70
- },
71
- "techstack": {
72
- "@atlassian/frontend": {
73
- "import-structure": [
74
- "atlassian-conventions"
75
- ],
76
- "circular-dependencies": [
77
- "file-and-folder-level"
78
- ]
79
- },
80
- "@repo/internal": {
81
- "dom-events": "use-bind-event-listener",
82
- "analytics": [
83
- "analytics-next"
84
- ],
85
- "design-tokens": [
86
- "color"
87
- ],
88
- "theming": [
89
- "react-context"
90
- ],
91
- "ui-components": [
92
- "lite-mode"
93
- ],
94
- "deprecation": "no-deprecated-imports",
95
- "styling": [
96
- "emotion",
97
- "emotion"
98
- ],
99
- "imports": [
100
- "import-no-extraneous-disable-for-examples-and-docs"
101
- ]
102
- }
103
- },
104
- "platform-feature-flags": {
105
- "platform.editor.live-pages-expand-divergence": {
106
- "type": "boolean"
107
- },
108
- "platform.editor.single-player-expand": {
109
- "type": "boolean"
110
- },
111
- "platform.editor.live-view.disable-editing-in-view-mode_fi1rx": {
112
- "type": "boolean"
113
- }
114
- }
115
- }
2
+ "name": "@atlaskit/editor-plugin-expand",
3
+ "version": "1.7.4",
4
+ "description": "Expand 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: Jenga",
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/button": "^17.17.0",
35
+ "@atlaskit/editor-common": "^82.6.0",
36
+ "@atlaskit/editor-plugin-analytics": "^1.2.0",
37
+ "@atlaskit/editor-plugin-decorations": "^1.1.0",
38
+ "@atlaskit/editor-plugin-editor-disabled": "^1.1.0",
39
+ "@atlaskit/editor-plugin-selection": "^1.2.0",
40
+ "@atlaskit/editor-plugin-selection-marker": "^1.3.0",
41
+ "@atlaskit/editor-prosemirror": "4.0.1",
42
+ "@atlaskit/editor-shared-styles": "^2.12.0",
43
+ "@atlaskit/editor-tables": "^2.7.0",
44
+ "@atlaskit/icon": "^22.3.0",
45
+ "@atlaskit/platform-feature-flags": "^0.2.0",
46
+ "@atlaskit/tooltip": "^18.4.0",
47
+ "@babel/runtime": "^7.0.0",
48
+ "@emotion/react": "^11.7.1",
49
+ "w3c-keyname": "^2.1.8"
50
+ },
51
+ "peerDependencies": {
52
+ "react": "^16.8.0",
53
+ "react-dom": "^16.8.0",
54
+ "react-intl-next": "npm:react-intl@^5.18.1"
55
+ },
56
+ "devDependencies": {
57
+ "@atlaskit/analytics-next": "^9.3.0",
58
+ "@atlaskit/editor-plugin-content-insertion": "^1.2.0",
59
+ "@atlaskit/editor-plugin-guideline": "^1.1.0",
60
+ "@atlaskit/editor-plugin-quick-insert": "^1.1.0",
61
+ "@atlaskit/editor-plugin-table": "^7.17.0",
62
+ "@atlaskit/editor-plugin-type-ahead": "^1.2.0",
63
+ "@atlaskit/editor-plugin-width": "^1.1.0",
64
+ "@testing-library/react": "^12.1.5",
65
+ "react-test-renderer": "^16.8.0",
66
+ "typescript": "~5.4.2"
67
+ },
68
+ "techstack": {
69
+ "@atlassian/frontend": {
70
+ "import-structure": ["atlassian-conventions"],
71
+ "circular-dependencies": ["file-and-folder-level"]
72
+ },
73
+ "@repo/internal": {
74
+ "dom-events": "use-bind-event-listener",
75
+ "analytics": ["analytics-next"],
76
+ "design-tokens": ["color"],
77
+ "theming": ["react-context"],
78
+ "ui-components": ["lite-mode"],
79
+ "deprecation": "no-deprecated-imports",
80
+ "styling": ["emotion", "emotion"],
81
+ "imports": ["import-no-extraneous-disable-for-examples-and-docs"]
82
+ }
83
+ },
84
+ "platform-feature-flags": {
85
+ "platform.editor.live-pages-expand-divergence": {
86
+ "type": "boolean"
87
+ },
88
+ "platform.editor.single-player-expand": {
89
+ "type": "boolean"
90
+ },
91
+ "platform.editor.live-view.disable-editing-in-view-mode_fi1rx": {
92
+ "type": "boolean"
93
+ }
94
+ }
95
+ }