@atlaskit/editor-core 234.3.2 → 235.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,13 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 235.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - [`7609e9d6f1431`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7609e9d6f1431) -
8
+ Use Block templates item priorities as menu ranks under platform_editor_slash_command
9
+ - Updated dependencies
10
+
3
11
  ## 234.3.2
4
12
 
5
13
  ### Patch Changes
@@ -15,8 +15,6 @@ var _keys = require("@atlaskit/editor-common/quick-insert/keys");
15
15
  var _rank = require("@atlaskit/editor-common/quick-insert/rank");
16
16
  var _ExtensionQuickInsertMenuItem = require("./ExtensionQuickInsertMenuItem");
17
17
  var _QuickInsertSkillMenuItem = require("./QuickInsertSkillMenuItem");
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
- 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; }
20
18
  var structureExtensionItemKeyRanks = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
21
19
  'toc:toc': 600
22
20
  }, _keys.TABS_MENU_ITEM.key, 1900), 'cards:quick-insert', 2000), 'carousel:quick-insert', 2100), 'spotlight:quick-insert', 2200), 'create-from-template:create-from-template', 2700), 'anchor:anchor', 2900), 'smart-button:quick-insert', 3000);
@@ -78,6 +76,9 @@ var createExtensionItemRanker = function createExtensionItemRanker(items) {
78
76
  if (knownRank !== undefined) {
79
77
  return knownRank;
80
78
  }
79
+ if (sectionKey === _keys.BLOCK_TEMPLATES_SECTION.key && item.priority !== undefined) {
80
+ return item.priority;
81
+ }
81
82
  var sectionRank = (_ranksBySection$get = ranksBySection.get(sectionKey)) === null || _ranksBySection$get === void 0 ? void 0 : _ranksBySection$get.get(item);
82
83
  return sectionRank !== null && sectionRank !== void 0 ? sectionRank : _rank.EXTENSION_ITEM_RANK + ((_item$priority = item.priority) !== null && _item$priority !== void 0 ? _item$priority : index);
83
84
  };
@@ -102,14 +103,16 @@ var getExtensionQuickInsertComponents = exports.getExtensionQuickInsertComponent
102
103
  key: item.key,
103
104
  parents: parents.map(function (parent) {
104
105
  var _CREATE_SECTION_RANK$;
105
- return _objectSpread(_objectSpread({}, parent), {}, {
106
+ return {
107
+ key: parent.key,
108
+ type: parent.type,
106
109
  rank: getExtensionItemRank({
107
110
  index: index,
108
111
  knownRank: (_CREATE_SECTION_RANK$ = _rank.CREATE_SECTION_RANK[item.key]) !== null && _CREATE_SECTION_RANK$ !== void 0 ? _CREATE_SECTION_RANK$ : structureRank,
109
112
  item: item,
110
113
  sectionKey: parent.key
111
114
  })
112
- });
115
+ };
113
116
  }),
114
117
  match: (0, _createQuickInsertMatcher.createQuickInsertMatcher)(function () {
115
118
  return {
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
8
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
9
- var version = exports.version = "234.3.1";
9
+ var version = exports.version = "234.3.2";
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
3
3
  import { getQuickInsertMenuItemParents } from '@atlaskit/editor-common/quick-insert/get-menu-item-parents';
4
- import { DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, STRUCTURE_SECTION, TABS_MENU_ITEM } from '@atlaskit/editor-common/quick-insert/keys';
4
+ import { BLOCK_TEMPLATES_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, STRUCTURE_SECTION, TABS_MENU_ITEM } from '@atlaskit/editor-common/quick-insert/keys';
5
5
  import { CREATE_SECTION_RANK, EXTENSION_ITEM_RANK, MEDIA_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
6
6
  import { ExtensionQuickInsertMenuItem } from './ExtensionQuickInsertMenuItem';
7
7
  import { QuickInsertSkillMenuItem } from './QuickInsertSkillMenuItem';
@@ -45,6 +45,9 @@ const createExtensionItemRanker = items => {
45
45
  if (knownRank !== undefined) {
46
46
  return knownRank;
47
47
  }
48
+ if (sectionKey === BLOCK_TEMPLATES_SECTION.key && item.priority !== undefined) {
49
+ return item.priority;
50
+ }
48
51
  const sectionRank = (_ranksBySection$get = ranksBySection.get(sectionKey)) === null || _ranksBySection$get === void 0 ? void 0 : _ranksBySection$get.get(item);
49
52
  return sectionRank !== null && sectionRank !== void 0 ? sectionRank : EXTENSION_ITEM_RANK + ((_item$priority = item.priority) !== null && _item$priority !== void 0 ? _item$priority : index);
50
53
  };
@@ -71,7 +74,8 @@ export const getExtensionQuickInsertComponents = ({
71
74
  parents: parents.map(parent => {
72
75
  var _CREATE_SECTION_RANK$;
73
76
  return {
74
- ...parent,
77
+ key: parent.key,
78
+ type: parent.type,
75
79
  rank: getExtensionItemRank({
76
80
  index,
77
81
  knownRank: (_CREATE_SECTION_RANK$ = CREATE_SECTION_RANK[item.key]) !== null && _CREATE_SECTION_RANK$ !== void 0 ? _CREATE_SECTION_RANK$ : structureRank,
@@ -1,3 +1,3 @@
1
1
  export const name = "@atlaskit/editor-core";
2
2
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
3
- export const version = "234.3.1";
3
+ export const version = "234.3.2";
@@ -1,12 +1,10 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
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
- 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
4
  import React from 'react';
7
5
  import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
8
6
  import { getQuickInsertMenuItemParents } from '@atlaskit/editor-common/quick-insert/get-menu-item-parents';
9
- import { DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, STRUCTURE_SECTION, TABS_MENU_ITEM } from '@atlaskit/editor-common/quick-insert/keys';
7
+ import { BLOCK_TEMPLATES_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, STRUCTURE_SECTION, TABS_MENU_ITEM } from '@atlaskit/editor-common/quick-insert/keys';
10
8
  import { CREATE_SECTION_RANK, EXTENSION_ITEM_RANK, MEDIA_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
11
9
  import { ExtensionQuickInsertMenuItem } from './ExtensionQuickInsertMenuItem';
12
10
  import { QuickInsertSkillMenuItem } from './QuickInsertSkillMenuItem';
@@ -71,6 +69,9 @@ var createExtensionItemRanker = function createExtensionItemRanker(items) {
71
69
  if (knownRank !== undefined) {
72
70
  return knownRank;
73
71
  }
72
+ if (sectionKey === BLOCK_TEMPLATES_SECTION.key && item.priority !== undefined) {
73
+ return item.priority;
74
+ }
74
75
  var sectionRank = (_ranksBySection$get = ranksBySection.get(sectionKey)) === null || _ranksBySection$get === void 0 ? void 0 : _ranksBySection$get.get(item);
75
76
  return sectionRank !== null && sectionRank !== void 0 ? sectionRank : EXTENSION_ITEM_RANK + ((_item$priority = item.priority) !== null && _item$priority !== void 0 ? _item$priority : index);
76
77
  };
@@ -95,14 +96,16 @@ export var getExtensionQuickInsertComponents = function getExtensionQuickInsertC
95
96
  key: item.key,
96
97
  parents: parents.map(function (parent) {
97
98
  var _CREATE_SECTION_RANK$;
98
- return _objectSpread(_objectSpread({}, parent), {}, {
99
+ return {
100
+ key: parent.key,
101
+ type: parent.type,
99
102
  rank: getExtensionItemRank({
100
103
  index: index,
101
104
  knownRank: (_CREATE_SECTION_RANK$ = CREATE_SECTION_RANK[item.key]) !== null && _CREATE_SECTION_RANK$ !== void 0 ? _CREATE_SECTION_RANK$ : structureRank,
102
105
  item: item,
103
106
  sectionKey: parent.key
104
107
  })
105
- });
108
+ };
106
109
  }),
107
110
  match: createQuickInsertMatcher(function () {
108
111
  return {
@@ -1,3 +1,3 @@
1
1
  export var name = "@atlaskit/editor-core";
2
2
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
3
- export var version = "234.3.1";
3
+ export var version = "234.3.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "234.3.2",
3
+ "version": "235.0.0",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@atlaskit/activity-provider": "^3.1.0",
44
- "@atlaskit/adf-schema": "^57.6.0",
44
+ "@atlaskit/adf-schema": "^57.7.0",
45
45
  "@atlaskit/afm-i18n-platform-editor-editor-core": "2.270.0",
46
46
  "@atlaskit/analytics-namespaced-context": "^8.2.0",
47
47
  "@atlaskit/analytics-next": "^12.5.0",
@@ -50,15 +50,15 @@
50
50
  "@atlaskit/button": "^25.4.0",
51
51
  "@atlaskit/css": "^1.1.0",
52
52
  "@atlaskit/editor-json-transformer": "^10.0.0",
53
- "@atlaskit/editor-plugin-block-menu": "^23.0.0",
54
- "@atlaskit/editor-plugin-connectivity": "^24.0.0",
55
- "@atlaskit/editor-plugin-quick-insert": "^24.0.0",
56
- "@atlaskit/editor-plugin-selection-extension": "^27.0.0",
57
- "@atlaskit/editor-plugin-user-preferences": "^22.0.0",
58
- "@atlaskit/editor-plugins": "^16.1.0",
53
+ "@atlaskit/editor-plugin-block-menu": "^24.0.0",
54
+ "@atlaskit/editor-plugin-connectivity": "^25.0.0",
55
+ "@atlaskit/editor-plugin-quick-insert": "^25.0.0",
56
+ "@atlaskit/editor-plugin-selection-extension": "^28.0.0",
57
+ "@atlaskit/editor-plugin-user-preferences": "^23.0.0",
58
+ "@atlaskit/editor-plugins": "^16.2.0",
59
59
  "@atlaskit/editor-prosemirror": "^9.0.0",
60
60
  "@atlaskit/editor-shared-styles": "^4.3.0",
61
- "@atlaskit/editor-ssr-renderer": "^19.0.0",
61
+ "@atlaskit/editor-ssr-renderer": "^20.0.0",
62
62
  "@atlaskit/editor-toolbar": "^2.8.0",
63
63
  "@atlaskit/editor-toolbar-model": "^1.2.0",
64
64
  "@atlaskit/emoji": "^72.5.0",
@@ -75,7 +75,7 @@
75
75
  "@atlaskit/popup": "^9.0.0",
76
76
  "@atlaskit/primitives": "^22.5.0",
77
77
  "@atlaskit/react-compiler-gating": "^0.2.0",
78
- "@atlaskit/react-ufo": "^8.0.0",
78
+ "@atlaskit/react-ufo": "^8.1.0",
79
79
  "@atlaskit/task-decision": "^21.12.0",
80
80
  "@atlaskit/tmp-editor-statsig": "^224.0.0",
81
81
  "@atlaskit/tokens": "^20.3.0",
@@ -96,7 +96,7 @@
96
96
  "uuid": "^11.1.1"
97
97
  },
98
98
  "peerDependencies": {
99
- "@atlaskit/editor-common": "^128.4.0",
99
+ "@atlaskit/editor-common": "^129.0.0",
100
100
  "@atlaskit/link-provider": "^6.0.0",
101
101
  "@atlaskit/media-core": "^39.0.0",
102
102
  "react": "^18.2.0 || ^19.2.0",
@@ -112,37 +112,37 @@
112
112
  "@atlaskit/analytics-gas-types": "^6.2.0",
113
113
  "@atlaskit/analytics-listeners": "^11.4.0",
114
114
  "@atlaskit/code": "^20.0.0",
115
- "@atlaskit/collab-provider": "^33.0.0",
115
+ "@atlaskit/collab-provider": "^34.0.0",
116
116
  "@atlaskit/docs": "^12.3.0",
117
117
  "@atlaskit/drawer": "^14.3.0",
118
- "@atlaskit/editor-plugin-alignment": "^25.0.0",
119
- "@atlaskit/editor-plugin-annotation": "^24.1.0",
120
- "@atlaskit/editor-plugin-base": "^25.1.0",
121
- "@atlaskit/editor-plugin-card": "^30.0.0",
122
- "@atlaskit/editor-plugin-code-block-advanced": "^24.0.0",
123
- "@atlaskit/editor-plugin-collab-edit": "^25.0.0",
124
- "@atlaskit/editor-plugin-content-insertion": "^24.0.0",
125
- "@atlaskit/editor-plugin-editor-viewmode": "^26.0.0",
126
- "@atlaskit/editor-plugin-extension": "^27.0.0",
127
- "@atlaskit/editor-plugin-grid": "^24.0.0",
128
- "@atlaskit/editor-plugin-guideline": "^24.0.0",
129
- "@atlaskit/editor-plugin-highlight": "^24.0.0",
130
- "@atlaskit/editor-plugin-insert-block": "^25.0.0",
131
- "@atlaskit/editor-plugin-layout": "^25.1.0",
132
- "@atlaskit/editor-plugin-limited-mode": "^21.0.0",
133
- "@atlaskit/editor-plugin-list": "^26.0.0",
134
- "@atlaskit/editor-plugin-media": "^26.0.0",
135
- "@atlaskit/editor-plugin-paste": "^25.0.0",
136
- "@atlaskit/editor-plugin-selection-marker": "^24.0.0",
137
- "@atlaskit/editor-plugin-show-diff": "^22.0.0",
138
- "@atlaskit/editor-plugin-synced-block": "^22.0.0",
139
- "@atlaskit/editor-plugin-table": "^36.0.0",
140
- "@atlaskit/editor-plugin-tasks-and-decisions": "^27.0.0",
141
- "@atlaskit/editor-plugin-text-color": "^24.0.0",
142
- "@atlaskit/editor-plugin-toolbar-lists-indentation": "^25.0.0",
143
- "@atlaskit/editor-plugin-track-changes": "^23.0.0",
144
- "@atlaskit/editor-synced-block-provider": "^20.0.0",
145
- "@atlaskit/editor-synced-block-renderer": "^22.0.0",
118
+ "@atlaskit/editor-plugin-alignment": "^26.0.0",
119
+ "@atlaskit/editor-plugin-annotation": "^25.0.0",
120
+ "@atlaskit/editor-plugin-base": "^26.0.0",
121
+ "@atlaskit/editor-plugin-card": "^31.0.0",
122
+ "@atlaskit/editor-plugin-code-block-advanced": "^25.0.0",
123
+ "@atlaskit/editor-plugin-collab-edit": "^26.0.0",
124
+ "@atlaskit/editor-plugin-content-insertion": "^25.0.0",
125
+ "@atlaskit/editor-plugin-editor-viewmode": "^27.0.0",
126
+ "@atlaskit/editor-plugin-extension": "^28.0.0",
127
+ "@atlaskit/editor-plugin-grid": "^25.0.0",
128
+ "@atlaskit/editor-plugin-guideline": "^25.0.0",
129
+ "@atlaskit/editor-plugin-highlight": "^25.0.0",
130
+ "@atlaskit/editor-plugin-insert-block": "^26.0.0",
131
+ "@atlaskit/editor-plugin-layout": "^26.0.0",
132
+ "@atlaskit/editor-plugin-limited-mode": "^22.0.0",
133
+ "@atlaskit/editor-plugin-list": "^27.0.0",
134
+ "@atlaskit/editor-plugin-media": "^27.0.0",
135
+ "@atlaskit/editor-plugin-paste": "^26.0.0",
136
+ "@atlaskit/editor-plugin-selection-marker": "^25.0.0",
137
+ "@atlaskit/editor-plugin-show-diff": "^23.0.0",
138
+ "@atlaskit/editor-plugin-synced-block": "^23.0.0",
139
+ "@atlaskit/editor-plugin-table": "^37.0.0",
140
+ "@atlaskit/editor-plugin-tasks-and-decisions": "^28.0.0",
141
+ "@atlaskit/editor-plugin-text-color": "^25.0.0",
142
+ "@atlaskit/editor-plugin-toolbar-lists-indentation": "^26.0.0",
143
+ "@atlaskit/editor-plugin-track-changes": "^24.0.0",
144
+ "@atlaskit/editor-synced-block-provider": "^21.0.0",
145
+ "@atlaskit/editor-synced-block-renderer": "^23.0.0",
146
146
  "@atlaskit/editor-test-helpers": "workspace:^",
147
147
  "@atlaskit/form": "^18.1.0",
148
148
  "@atlaskit/link-provider": "^6.0.0",
@@ -159,7 +159,7 @@
159
159
  "@atlaskit/portal": "^7.0.0",
160
160
  "@atlaskit/profilecard": "^27.1.0",
161
161
  "@atlaskit/radio": "^10.2.0",
162
- "@atlaskit/renderer": "^147.1.0",
162
+ "@atlaskit/renderer": "^148.0.0",
163
163
  "@atlaskit/section-message": "^10.2.0",
164
164
  "@atlaskit/spinner": "^20.4.0",
165
165
  "@atlaskit/synchrony-test-helpers": "workspace:^",
@@ -170,11 +170,11 @@
170
170
  "@atlassian/a11y-jest-testing": "^0.17.0",
171
171
  "@atlassian/a11y-playwright-testing": "^0.13.0",
172
172
  "@atlassian/adf-schema-json": "^1.35.0",
173
- "@atlassian/editor-rovo-bridge": "^23.0.0",
173
+ "@atlassian/editor-rovo-bridge": "^24.0.0",
174
174
  "@atlassian/experiment-test-utils": "^0.2.0",
175
175
  "@atlassian/feature-flags-test-utils": "^1.3.0",
176
176
  "@atlassian/search-client": "^3.7.0",
177
- "@atlassian/search-provider": "^25.0.0",
177
+ "@atlassian/search-provider": "^26.0.0",
178
178
  "@atlassian/structured-docs-types": "workspace:^",
179
179
  "@atlassian/testing-library": "^0.11.0",
180
180
  "@atlassian/user-profile-card": "^1.43.0",