@atlaskit/editor-plugin-date 20.0.10 → 21.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,20 @@
1
1
  # @atlaskit/editor-plugin-date
2
2
 
3
+ ## 21.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 20.0.11
10
+
11
+ ### Patch Changes
12
+
13
+ - [`88fb7a8d4013a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/88fb7a8d4013a) -
14
+ [ux] Add optional light and dark preview URLs to slash-command menu items and pass theme-aware
15
+ previews to supported commands when the `platform_editor_slash_command` experiment is enabled.
16
+ - Updated dependencies
17
+
3
18
  ## 20.0.10
4
19
 
5
20
  ### Patch Changes
@@ -15,7 +15,8 @@ var _calendar = _interopRequireDefault(require("@atlaskit/icon/core/calendar"));
15
15
  var _actions = require("../../pm-plugins/actions");
16
16
  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); }
17
17
  var DateQuickInsertMenuItem = exports.DateQuickInsertMenuItem = function DateQuickInsertMenuItem(_ref) {
18
- var api = _ref.api;
18
+ var api = _ref.api,
19
+ previewImageUrls = _ref.previewImageUrls;
19
20
  var _useIntl = (0, _reactIntl.useIntl)(),
20
21
  formatMessage = _useIntl.formatMessage;
21
22
  var onSelect = (0, _react.useCallback)(function (_ref2) {
@@ -39,6 +40,7 @@ var DateQuickInsertMenuItem = exports.DateQuickInsertMenuItem = function DateQui
39
40
  label: ""
40
41
  }),
41
42
  onSelect: onSelect,
43
+ previewImageUrls: previewImageUrls,
42
44
  shortcut: "//",
43
45
  title: formatMessage(_messages.toolbarInsertBlockMessages.date)
44
46
  });
@@ -11,6 +11,10 @@ var _createQuickInsertMatcher = require("@atlaskit/editor-common/quick-insert/cr
11
11
  var _keys = require("@atlaskit/editor-common/quick-insert/keys");
12
12
  var _rank = require("@atlaskit/editor-common/quick-insert/rank");
13
13
  var _DateQuickInsertMenuItem = require("./DateQuickInsertMenuItem");
14
+ var previewImageUrls = {
15
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/sme6e06rf6210v8e46a8ak5mqeww0666.png',
16
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/24247c44u75a5hq2xv203x2k526olp03.png'
17
+ };
14
18
  var getDateQuickInsertComponents = exports.getDateQuickInsertComponents = function getDateQuickInsertComponents(_ref) {
15
19
  var api = _ref.api;
16
20
  return [{
@@ -32,7 +36,8 @@ var getDateQuickInsertComponents = exports.getDateQuickInsertComponents = functi
32
36
  }),
33
37
  component: function component() {
34
38
  return /*#__PURE__*/_react.default.createElement(_DateQuickInsertMenuItem.DateQuickInsertMenuItem, {
35
- api: api
39
+ api: api,
40
+ previewImageUrls: previewImageUrls
36
41
  });
37
42
  }
38
43
  }];
@@ -6,7 +6,8 @@ import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-i
6
6
  import CalendarIcon from '@atlaskit/icon/core/calendar';
7
7
  import { createDateAtTransaction } from '../../pm-plugins/actions';
8
8
  export const DateQuickInsertMenuItem = ({
9
- api
9
+ api,
10
+ previewImageUrls
10
11
  }) => {
11
12
  const {
12
13
  formatMessage
@@ -33,6 +34,7 @@ export const DateQuickInsertMenuItem = ({
33
34
  label: ""
34
35
  }),
35
36
  onSelect: onSelect,
37
+ previewImageUrls: previewImageUrls,
36
38
  shortcut: "//",
37
39
  title: formatMessage(messages.date)
38
40
  });
@@ -4,6 +4,10 @@ import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/c
4
4
  import { DATE_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
5
5
  import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
6
6
  import { DateQuickInsertMenuItem } from './DateQuickInsertMenuItem';
7
+ const previewImageUrls = {
8
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/sme6e06rf6210v8e46a8ak5mqeww0666.png',
9
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/24247c44u75a5hq2xv203x2k526olp03.png'
10
+ };
7
11
  export const getDateQuickInsertComponents = ({
8
12
  api
9
13
  }) => [{
@@ -23,6 +27,7 @@ export const getDateQuickInsertComponents = ({
23
27
  title: formatMessage(messages.date)
24
28
  })),
25
29
  component: () => /*#__PURE__*/React.createElement(DateQuickInsertMenuItem, {
26
- api: api
30
+ api: api,
31
+ previewImageUrls: previewImageUrls
27
32
  })
28
33
  }];
@@ -6,7 +6,8 @@ import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-i
6
6
  import CalendarIcon from '@atlaskit/icon/core/calendar';
7
7
  import { createDateAtTransaction } from '../../pm-plugins/actions';
8
8
  export var DateQuickInsertMenuItem = function DateQuickInsertMenuItem(_ref) {
9
- var api = _ref.api;
9
+ var api = _ref.api,
10
+ previewImageUrls = _ref.previewImageUrls;
10
11
  var _useIntl = useIntl(),
11
12
  formatMessage = _useIntl.formatMessage;
12
13
  var onSelect = useCallback(function (_ref2) {
@@ -30,6 +31,7 @@ export var DateQuickInsertMenuItem = function DateQuickInsertMenuItem(_ref) {
30
31
  label: ""
31
32
  }),
32
33
  onSelect: onSelect,
34
+ previewImageUrls: previewImageUrls,
33
35
  shortcut: "//",
34
36
  title: formatMessage(messages.date)
35
37
  });
@@ -4,6 +4,10 @@ import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/c
4
4
  import { DATE_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
5
5
  import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
6
6
  import { DateQuickInsertMenuItem } from './DateQuickInsertMenuItem';
7
+ var previewImageUrls = {
8
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/sme6e06rf6210v8e46a8ak5mqeww0666.png',
9
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/24247c44u75a5hq2xv203x2k526olp03.png'
10
+ };
7
11
  export var getDateQuickInsertComponents = function getDateQuickInsertComponents(_ref) {
8
12
  var api = _ref.api;
9
13
  return [{
@@ -25,7 +29,8 @@ export var getDateQuickInsertComponents = function getDateQuickInsertComponents(
25
29
  }),
26
30
  component: function component() {
27
31
  return /*#__PURE__*/React.createElement(DateQuickInsertMenuItem, {
28
- api: api
32
+ api: api,
33
+ previewImageUrls: previewImageUrls
29
34
  });
30
35
  }
31
36
  }];
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
+ import { type QuickInsertMenuItemProps } from '@atlaskit/editor-common/quick-insert/menu-item';
2
3
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
4
  import type { DatePlugin } from '../../datePluginType';
4
- export declare const DateQuickInsertMenuItem: ({ api, }: {
5
+ export declare const DateQuickInsertMenuItem: ({ api, previewImageUrls, }: {
5
6
  api: ExtractInjectionAPI<DatePlugin> | undefined;
7
+ previewImageUrls?: QuickInsertMenuItemProps['previewImageUrls'];
6
8
  }) => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-date",
3
- "version": "20.0.10",
3
+ "version": "21.0.0",
4
4
  "description": "Date plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -24,12 +24,12 @@
24
24
  "@atlaskit/adf-schema": "^57.5.0",
25
25
  "@atlaskit/calendar": "^19.3.0",
26
26
  "@atlaskit/css": "^1.1.0",
27
- "@atlaskit/editor-plugin-analytics": "^18.0.0",
28
- "@atlaskit/editor-plugin-annotation": "^18.0.0",
29
- "@atlaskit/editor-plugin-editor-disabled": "^18.0.0",
30
- "@atlaskit/editor-plugin-editor-viewmode": "^20.0.0",
31
- "@atlaskit/editor-plugin-ui-control-registry": "^12.0.0",
32
- "@atlaskit/editor-prosemirror": "^8.0.0",
27
+ "@atlaskit/editor-plugin-analytics": "^19.0.0",
28
+ "@atlaskit/editor-plugin-annotation": "^19.0.0",
29
+ "@atlaskit/editor-plugin-editor-disabled": "^19.0.0",
30
+ "@atlaskit/editor-plugin-editor-viewmode": "^21.0.0",
31
+ "@atlaskit/editor-plugin-ui-control-registry": "^13.0.0",
32
+ "@atlaskit/editor-prosemirror": "^9.0.0",
33
33
  "@atlaskit/editor-shared-styles": "^4.3.0",
34
34
  "@atlaskit/editor-ui-control-model": "^2.9.0",
35
35
  "@atlaskit/form": "^17.2.0",
@@ -38,8 +38,8 @@
38
38
  "@atlaskit/platform-feature-experiments": "^0.3.0",
39
39
  "@atlaskit/platform-feature-flags": "^2.2.0",
40
40
  "@atlaskit/textfield": "^10.2.0",
41
- "@atlaskit/tmp-editor-statsig": "^198.0.0",
42
- "@atlaskit/tokens": "^17.0.0",
41
+ "@atlaskit/tmp-editor-statsig": "^199.0.0",
42
+ "@atlaskit/tokens": "^18.2.0",
43
43
  "@atlaskit/visually-hidden": "^4.4.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "bind-event-listener": "^3.0.0",
@@ -53,7 +53,7 @@
53
53
  "react-intl": "^7.0.0"
54
54
  },
55
55
  "peerDependencies": {
56
- "@atlaskit/editor-common": "^122.10.0",
56
+ "@atlaskit/editor-common": "^123.0.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"