@atlaskit/editor-plugin-quick-insert 22.0.10 → 22.0.11

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-plugin-quick-insert
2
2
 
3
+ ## 22.0.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [`9d953d03b62a1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9d953d03b62a1) -
8
+ Order non-template slash-command items under platform_editor_slash_command
9
+ - Updated dependencies
10
+
3
11
  ## 22.0.10
4
12
 
5
13
  ### Patch Changes
@@ -17,7 +17,7 @@ var GUID_ONLY_APP_KEY_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-
17
17
  var isGuidOnlyAppKey = function isGuidOnlyAppKey(appKey) {
18
18
  return GUID_ONLY_APP_KEY_REGEX.test(appKey);
19
19
  };
20
- var sectionCategoryKeys = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _keys.BLOCK_TEMPLATES_SECTION.key, 'blockTemplates'), _keys.DATA_AND_CHARTS_SECTION.key, 'dataAndCharts'), _keys.EMBED_SECTION.key, 'embed'), _keys.MEDIA_SECTION.key, 'media'), _keys.OTHER_SECTION.key, 'other'), _keys.ROVO_SECTION.key, 'rovo'), _keys.STRUCTURE_SECTION.key, 'structure'), _keys.TEXT_FORMATTING_SECTION.key, 'textFormatting');
20
+ var sectionCategoryKeys = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _keys.BLOCK_TEMPLATES_SECTION.key, 'blockTemplates'), _keys.CREATE_SECTION.key, 'create'), _keys.DATA_AND_CHARTS_SECTION.key, 'dataAndCharts'), _keys.EMBED_SECTION.key, 'embed'), _keys.MEDIA_SECTION.key, 'media'), _keys.OTHER_SECTION.key, 'other'), _keys.ROVO_SECTION.key, 'rovo'), _keys.STRUCTURE_SECTION.key, 'structure'), _keys.TEXT_FORMATTING_SECTION.key, 'textFormatting');
21
21
  var legacyCategoryKeys = new Set(['admin', 'ai', 'block-templates', 'communication', 'confluence-content', 'data-and-charts', 'development', 'embed', 'external-content', 'formatting', 'media', 'navigation', 'other', 'reporting', 'skills', 'structure', 'text-formatting', 'visuals']);
22
22
  var isLegacyCategoryKey = function isLegacyCategoryKey(category) {
23
23
  return legacyCategoryKeys.has(category);
@@ -39,6 +39,7 @@ var calculateQuickInsertItemsAttributes = exports.calculateQuickInsertItemsAttri
39
39
  };
40
40
  var emptyCategoryCounts = {
41
41
  blockTemplates: emptyCategoryInformation(),
42
+ create: emptyCategoryInformation(),
42
43
  dataAndCharts: emptyCategoryInformation(),
43
44
  embed: emptyCategoryInformation(),
44
45
  media: emptyCategoryInformation(),
@@ -17,7 +17,7 @@ var _keys = require("@atlaskit/editor-common/quick-insert/keys");
17
17
  var _messages = require("@atlaskit/editor-common/quick-insert/messages");
18
18
  var _text = require("@atlaskit/primitives/compiled/text");
19
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
- var sectionMessages = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _keys.BLOCK_TEMPLATES_SECTION.key, _messages.messages.categoryBlockTemplates), _keys.DATA_AND_CHARTS_SECTION.key, _messages.messages.categoryDataAndCharts), _keys.EMBED_SECTION.key, _messages.messages.categoryEmbed), _keys.MEDIA_SECTION.key, _messages.messages.categoryMedia), _keys.OTHER_SECTION.key, _messages.messages.categoryOther), _keys.ROVO_SECTION.key, _messages.messages.categoryRovo), _keys.STRUCTURE_SECTION.key, _messages.messages.categoryStructure), _keys.TEXT_FORMATTING_SECTION.key, _messages.messages.categoryTextFormatting);
20
+ var sectionMessages = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _keys.BLOCK_TEMPLATES_SECTION.key, _messages.messages.categoryBlockTemplates), _keys.CREATE_SECTION.key, _messages.messages.categoryCreate), _keys.DATA_AND_CHARTS_SECTION.key, _messages.messages.categoryDataAndCharts), _keys.EMBED_SECTION.key, _messages.messages.categoryEmbed), _keys.MEDIA_SECTION.key, _messages.messages.categoryMedia), _keys.OTHER_SECTION.key, _messages.messages.categoryOther), _keys.ROVO_SECTION.key, _messages.messages.categoryRovo), _keys.STRUCTURE_SECTION.key, _messages.messages.categoryStructure), _keys.TEXT_FORMATTING_SECTION.key, _messages.messages.categoryTextFormatting);
21
21
  var categoryGridStyles = null;
22
22
  var RegistryElementBrowserCategories = exports.RegistryElementBrowserCategories = function RegistryElementBrowserCategories(_ref) {
23
23
  var section = _ref.section,
@@ -31,6 +31,9 @@ var categories = [{
31
31
  }, {
32
32
  message: _messages.messages.categoryMedia,
33
33
  section: _keys.MEDIA_SECTION
34
+ }, {
35
+ message: _messages.messages.categoryCreate,
36
+ section: _keys.CREATE_SECTION
34
37
  }, {
35
38
  message: _messages.messages.categoryEmbed,
36
39
  section: _keys.EMBED_SECTION
@@ -1,11 +1,12 @@
1
1
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
2
2
  import { getQuickInsertMenuItemParents } from '@atlaskit/editor-common/quick-insert/get-menu-item-parents';
3
- import { BLOCK_TEMPLATES_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, ROVO_SECTION, STRUCTURE_SECTION, TEXT_FORMATTING_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
3
+ import { BLOCK_TEMPLATES_SECTION, CREATE_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, ROVO_SECTION, STRUCTURE_SECTION, TEXT_FORMATTING_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
4
4
  export const QUICK_INSERT_ITEMS_ANALYTICS_DELAY_MS = 10_000;
5
5
  const GUID_ONLY_APP_KEY_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu;
6
6
  const isGuidOnlyAppKey = appKey => GUID_ONLY_APP_KEY_REGEX.test(appKey);
7
7
  const sectionCategoryKeys = {
8
8
  [BLOCK_TEMPLATES_SECTION.key]: 'blockTemplates',
9
+ [CREATE_SECTION.key]: 'create',
9
10
  [DATA_AND_CHARTS_SECTION.key]: 'dataAndCharts',
10
11
  [EMBED_SECTION.key]: 'embed',
11
12
  [MEDIA_SECTION.key]: 'media',
@@ -32,6 +33,7 @@ export const calculateQuickInsertItemsAttributes = ({
32
33
  });
33
34
  const emptyCategoryCounts = {
34
35
  blockTemplates: emptyCategoryInformation(),
36
+ create: emptyCategoryInformation(),
35
37
  dataAndCharts: emptyCategoryInformation(),
36
38
  embed: emptyCategoryInformation(),
37
39
  media: emptyCategoryInformation(),
@@ -4,11 +4,12 @@ import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback } from 'react';
5
5
  import { useIntl } from 'react-intl';
6
6
  import Button from '@atlaskit/button/default/button';
7
- import { BLOCK_TEMPLATES_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, ROVO_SECTION, STRUCTURE_SECTION, TEXT_FORMATTING_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
7
+ import { BLOCK_TEMPLATES_SECTION, CREATE_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, ROVO_SECTION, STRUCTURE_SECTION, TEXT_FORMATTING_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
8
8
  import { messages } from '@atlaskit/editor-common/quick-insert/messages';
9
9
  import { Text } from '@atlaskit/primitives/compiled/text';
10
10
  const sectionMessages = {
11
11
  [BLOCK_TEMPLATES_SECTION.key]: messages.categoryBlockTemplates,
12
+ [CREATE_SECTION.key]: messages.categoryCreate,
12
13
  [DATA_AND_CHARTS_SECTION.key]: messages.categoryDataAndCharts,
13
14
  [EMBED_SECTION.key]: messages.categoryEmbed,
14
15
  [MEDIA_SECTION.key]: messages.categoryMedia,
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { useIntl } from 'react-intl';
3
- import { BLOCK_TEMPLATES_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, MENU, OTHER_SECTION, RECOMMENDED_SECTION, ROVO_SECTION, STRUCTURE_SECTION, TEXT_FORMATTING_SECTION, VIEW_ALL_ELEMENTS_MENU_ITEM } from '@atlaskit/editor-common/quick-insert/keys';
3
+ import { BLOCK_TEMPLATES_SECTION, CREATE_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, MENU, OTHER_SECTION, RECOMMENDED_SECTION, ROVO_SECTION, STRUCTURE_SECTION, TEXT_FORMATTING_SECTION, VIEW_ALL_ELEMENTS_MENU_ITEM } from '@atlaskit/editor-common/quick-insert/keys';
4
4
  import { QuickInsertMenuRoot } from '@atlaskit/editor-common/quick-insert/menu-root';
5
5
  import { QuickInsertMenuSection } from '@atlaskit/editor-common/quick-insert/menu-section';
6
6
  import { messages } from '@atlaskit/editor-common/quick-insert/messages';
@@ -20,6 +20,9 @@ const categories = [{
20
20
  }, {
21
21
  message: messages.categoryMedia,
22
22
  section: MEDIA_SECTION
23
+ }, {
24
+ message: messages.categoryCreate,
25
+ section: CREATE_SECTION
23
26
  }, {
24
27
  message: messages.categoryEmbed,
25
28
  section: EMBED_SECTION
@@ -4,13 +4,13 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
4
4
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
5
5
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
6
6
  import { getQuickInsertMenuItemParents } from '@atlaskit/editor-common/quick-insert/get-menu-item-parents';
7
- import { BLOCK_TEMPLATES_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, ROVO_SECTION, STRUCTURE_SECTION, TEXT_FORMATTING_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
7
+ import { BLOCK_TEMPLATES_SECTION, CREATE_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, ROVO_SECTION, STRUCTURE_SECTION, TEXT_FORMATTING_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
8
8
  export var QUICK_INSERT_ITEMS_ANALYTICS_DELAY_MS = 10000;
9
9
  var GUID_ONLY_APP_KEY_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
10
10
  var isGuidOnlyAppKey = function isGuidOnlyAppKey(appKey) {
11
11
  return GUID_ONLY_APP_KEY_REGEX.test(appKey);
12
12
  };
13
- var sectionCategoryKeys = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, BLOCK_TEMPLATES_SECTION.key, 'blockTemplates'), DATA_AND_CHARTS_SECTION.key, 'dataAndCharts'), EMBED_SECTION.key, 'embed'), MEDIA_SECTION.key, 'media'), OTHER_SECTION.key, 'other'), ROVO_SECTION.key, 'rovo'), STRUCTURE_SECTION.key, 'structure'), TEXT_FORMATTING_SECTION.key, 'textFormatting');
13
+ var sectionCategoryKeys = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, BLOCK_TEMPLATES_SECTION.key, 'blockTemplates'), CREATE_SECTION.key, 'create'), DATA_AND_CHARTS_SECTION.key, 'dataAndCharts'), EMBED_SECTION.key, 'embed'), MEDIA_SECTION.key, 'media'), OTHER_SECTION.key, 'other'), ROVO_SECTION.key, 'rovo'), STRUCTURE_SECTION.key, 'structure'), TEXT_FORMATTING_SECTION.key, 'textFormatting');
14
14
  var legacyCategoryKeys = new Set(['admin', 'ai', 'block-templates', 'communication', 'confluence-content', 'data-and-charts', 'development', 'embed', 'external-content', 'formatting', 'media', 'navigation', 'other', 'reporting', 'skills', 'structure', 'text-formatting', 'visuals']);
15
15
  var isLegacyCategoryKey = function isLegacyCategoryKey(category) {
16
16
  return legacyCategoryKeys.has(category);
@@ -32,6 +32,7 @@ export var calculateQuickInsertItemsAttributes = function calculateQuickInsertIt
32
32
  };
33
33
  var emptyCategoryCounts = {
34
34
  blockTemplates: emptyCategoryInformation(),
35
+ create: emptyCategoryInformation(),
35
36
  dataAndCharts: emptyCategoryInformation(),
36
37
  embed: emptyCategoryInformation(),
37
38
  media: emptyCategoryInformation(),
@@ -5,10 +5,10 @@ import { ax, ix } from "@compiled/react/runtime";
5
5
  import React, { useCallback } from 'react';
6
6
  import { useIntl } from 'react-intl';
7
7
  import Button from '@atlaskit/button/default/button';
8
- import { BLOCK_TEMPLATES_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, ROVO_SECTION, STRUCTURE_SECTION, TEXT_FORMATTING_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
8
+ import { BLOCK_TEMPLATES_SECTION, CREATE_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, ROVO_SECTION, STRUCTURE_SECTION, TEXT_FORMATTING_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
9
9
  import { messages } from '@atlaskit/editor-common/quick-insert/messages';
10
10
  import { Text } from '@atlaskit/primitives/compiled/text';
11
- var sectionMessages = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, BLOCK_TEMPLATES_SECTION.key, messages.categoryBlockTemplates), DATA_AND_CHARTS_SECTION.key, messages.categoryDataAndCharts), EMBED_SECTION.key, messages.categoryEmbed), MEDIA_SECTION.key, messages.categoryMedia), OTHER_SECTION.key, messages.categoryOther), ROVO_SECTION.key, messages.categoryRovo), STRUCTURE_SECTION.key, messages.categoryStructure), TEXT_FORMATTING_SECTION.key, messages.categoryTextFormatting);
11
+ var sectionMessages = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, BLOCK_TEMPLATES_SECTION.key, messages.categoryBlockTemplates), CREATE_SECTION.key, messages.categoryCreate), DATA_AND_CHARTS_SECTION.key, messages.categoryDataAndCharts), EMBED_SECTION.key, messages.categoryEmbed), MEDIA_SECTION.key, messages.categoryMedia), OTHER_SECTION.key, messages.categoryOther), ROVO_SECTION.key, messages.categoryRovo), STRUCTURE_SECTION.key, messages.categoryStructure), TEXT_FORMATTING_SECTION.key, messages.categoryTextFormatting);
12
12
  var categoryGridStyles = null;
13
13
  export var RegistryElementBrowserCategories = function RegistryElementBrowserCategories(_ref) {
14
14
  var section = _ref.section,
@@ -4,7 +4,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
4
4
  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; }
5
5
  import React from 'react';
6
6
  import { useIntl } from 'react-intl';
7
- import { BLOCK_TEMPLATES_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, MENU, OTHER_SECTION, RECOMMENDED_SECTION, ROVO_SECTION, STRUCTURE_SECTION, TEXT_FORMATTING_SECTION, VIEW_ALL_ELEMENTS_MENU_ITEM } from '@atlaskit/editor-common/quick-insert/keys';
7
+ import { BLOCK_TEMPLATES_SECTION, CREATE_SECTION, DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, MENU, OTHER_SECTION, RECOMMENDED_SECTION, ROVO_SECTION, STRUCTURE_SECTION, TEXT_FORMATTING_SECTION, VIEW_ALL_ELEMENTS_MENU_ITEM } from '@atlaskit/editor-common/quick-insert/keys';
8
8
  import { QuickInsertMenuRoot } from '@atlaskit/editor-common/quick-insert/menu-root';
9
9
  import { QuickInsertMenuSection } from '@atlaskit/editor-common/quick-insert/menu-section';
10
10
  import { messages } from '@atlaskit/editor-common/quick-insert/messages';
@@ -24,6 +24,9 @@ var categories = [{
24
24
  }, {
25
25
  message: messages.categoryMedia,
26
26
  section: MEDIA_SECTION
27
+ }, {
28
+ message: messages.categoryCreate,
29
+ section: CREATE_SECTION
27
30
  }, {
28
31
  message: messages.categoryEmbed,
29
32
  section: EMBED_SECTION
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-quick-insert",
3
- "version": "22.0.10",
3
+ "version": "22.0.11",
4
4
  "description": "Quick insert plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",