@atlaskit/editor-plugin-date 16.0.5 → 16.0.6

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-date
2
2
 
3
+ ## 16.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`3a4c286fdb8c1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3a4c286fdb8c1) -
8
+ Add registry-backed Quick Insert search matching under the existing
9
+ `platform_editor_slash_command` experiment. Make native, provider, and extension registered Quick
10
+ Insert items searchable.
11
+ - Updated dependencies
12
+
3
13
  ## 16.0.5
4
14
 
5
15
  ### Patch Changes
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.getDateQuickInsertComponents = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
+ var _messages = require("@atlaskit/editor-common/messages");
10
+ var _createQuickInsertMatcher = require("@atlaskit/editor-common/quick-insert/create-quick-insert-matcher");
9
11
  var _keys = require("@atlaskit/editor-common/quick-insert/keys");
10
12
  var _rank = require("@atlaskit/editor-common/quick-insert/rank");
11
13
  var _DateQuickInsertMenuItem = require("./DateQuickInsertMenuItem");
@@ -19,6 +21,15 @@ var getDateQuickInsertComponents = exports.getDateQuickInsertComponents = functi
19
21
  type: _keys.STRUCTURE_SECTION.type,
20
22
  rank: _rank.STRUCTURE_SECTION_RANK[_keys.DATE_MENU_ITEM.key]
21
23
  }],
24
+ match: (0, _createQuickInsertMatcher.createQuickInsertMatcher)(function (_ref2) {
25
+ var formatMessage = _ref2.formatMessage;
26
+ return {
27
+ description: formatMessage(_messages.toolbarInsertBlockMessages.dateDescription),
28
+ keywords: ['calendar', 'day', 'time', 'today', '/'],
29
+ shortcut: '//',
30
+ title: formatMessage(_messages.toolbarInsertBlockMessages.date)
31
+ };
32
+ }),
22
33
  component: function component() {
23
34
  return /*#__PURE__*/_react.default.createElement(_DateQuickInsertMenuItem.DateQuickInsertMenuItem, {
24
35
  api: api
@@ -1,4 +1,6 @@
1
1
  import React from 'react';
2
+ import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
3
+ import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
2
4
  import { DATE_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
3
5
  import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
4
6
  import { DateQuickInsertMenuItem } from './DateQuickInsertMenuItem';
@@ -12,6 +14,14 @@ export const getDateQuickInsertComponents = ({
12
14
  type: STRUCTURE_SECTION.type,
13
15
  rank: STRUCTURE_SECTION_RANK[DATE_MENU_ITEM.key]
14
16
  }],
17
+ match: createQuickInsertMatcher(({
18
+ formatMessage
19
+ }) => ({
20
+ description: formatMessage(messages.dateDescription),
21
+ keywords: ['calendar', 'day', 'time', 'today', '/'],
22
+ shortcut: '//',
23
+ title: formatMessage(messages.date)
24
+ })),
15
25
  component: () => /*#__PURE__*/React.createElement(DateQuickInsertMenuItem, {
16
26
  api: api
17
27
  })
@@ -1,4 +1,6 @@
1
1
  import React from 'react';
2
+ import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
3
+ import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
2
4
  import { DATE_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
3
5
  import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
4
6
  import { DateQuickInsertMenuItem } from './DateQuickInsertMenuItem';
@@ -12,6 +14,15 @@ export var getDateQuickInsertComponents = function getDateQuickInsertComponents(
12
14
  type: STRUCTURE_SECTION.type,
13
15
  rank: STRUCTURE_SECTION_RANK[DATE_MENU_ITEM.key]
14
16
  }],
17
+ match: createQuickInsertMatcher(function (_ref2) {
18
+ var formatMessage = _ref2.formatMessage;
19
+ return {
20
+ description: formatMessage(messages.dateDescription),
21
+ keywords: ['calendar', 'day', 'time', 'today', '/'],
22
+ shortcut: '//',
23
+ title: formatMessage(messages.date)
24
+ };
25
+ }),
15
26
  component: function component() {
16
27
  return /*#__PURE__*/React.createElement(DateQuickInsertMenuItem, {
17
28
  api: api
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-date",
3
- "version": "16.0.5",
3
+ "version": "16.0.6",
4
4
  "description": "Date plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -28,10 +28,10 @@
28
28
  "@atlaskit/editor-plugin-annotation": "^14.0.0",
29
29
  "@atlaskit/editor-plugin-editor-disabled": "^14.0.0",
30
30
  "@atlaskit/editor-plugin-editor-viewmode": "^16.0.0",
31
- "@atlaskit/editor-plugin-ui-control-registry": "^8.0.0",
31
+ "@atlaskit/editor-plugin-ui-control-registry": "^8.1.0",
32
32
  "@atlaskit/editor-prosemirror": "^8.0.0",
33
33
  "@atlaskit/editor-shared-styles": "^4.0.0",
34
- "@atlaskit/editor-ui-control-model": "^2.4.0",
34
+ "@atlaskit/editor-ui-control-model": "^2.6.0",
35
35
  "@atlaskit/form": "^17.0.0",
36
36
  "@atlaskit/icon": "^37.3.0",
37
37
  "@atlaskit/locale": "^5.0.0",
@@ -53,7 +53,7 @@
53
53
  "react-intl": "^7.0.0"
54
54
  },
55
55
  "peerDependencies": {
56
- "@atlaskit/editor-common": "^118.4.0",
56
+ "@atlaskit/editor-common": "^118.10.0",
57
57
  "react": "^18.2.0 || ^19.2.0",
58
58
  "react-dom": "^18.2.0 || ^19.2.0",
59
59
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"