@atlaskit/editor-core 188.7.3 → 188.7.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.
Files changed (51) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/messages.js +1 -2
  3. package/dist/cjs/plugins/date/actions.js +8 -114
  4. package/dist/cjs/plugins/date/commands.js +118 -0
  5. package/dist/cjs/plugins/date/plugin.js +13 -7
  6. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +34 -33
  7. package/dist/cjs/plugins/status/index.js +3 -3
  8. package/dist/cjs/plugins/status/nodeviews/status.js +4 -3
  9. package/dist/cjs/ui/ContentStyles/index.js +2 -2
  10. package/dist/cjs/version-wrapper.js +1 -1
  11. package/dist/es2019/messages.js +1 -2
  12. package/dist/es2019/plugins/date/actions.js +3 -109
  13. package/dist/es2019/plugins/date/commands.js +113 -0
  14. package/dist/es2019/plugins/date/plugin.js +14 -8
  15. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +5 -3
  16. package/dist/es2019/plugins/status/index.js +1 -1
  17. package/dist/es2019/plugins/status/nodeviews/status.js +3 -2
  18. package/dist/es2019/ui/ContentStyles/index.js +1 -1
  19. package/dist/es2019/version-wrapper.js +1 -1
  20. package/dist/esm/messages.js +1 -2
  21. package/dist/esm/plugins/date/actions.js +8 -114
  22. package/dist/esm/plugins/date/commands.js +112 -0
  23. package/dist/esm/plugins/date/plugin.js +14 -8
  24. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +34 -33
  25. package/dist/esm/plugins/status/index.js +1 -1
  26. package/dist/esm/plugins/status/nodeviews/status.js +3 -2
  27. package/dist/esm/ui/ContentStyles/index.js +1 -1
  28. package/dist/esm/version-wrapper.js +1 -1
  29. package/dist/types/messages.d.ts +1 -2
  30. package/dist/types/plugins/date/actions.d.ts +4 -10
  31. package/dist/types/plugins/date/commands.d.ts +20 -0
  32. package/dist/types/plugins/date/types.d.ts +4 -4
  33. package/dist/types/plugins/status/analytics.d.ts +1 -1
  34. package/dist/types/plugins/status/nodeviews/status.d.ts +2 -1
  35. package/dist/types-ts4.5/messages.d.ts +1 -2
  36. package/dist/types-ts4.5/plugins/date/actions.d.ts +4 -10
  37. package/dist/types-ts4.5/plugins/date/commands.d.ts +22 -0
  38. package/dist/types-ts4.5/plugins/date/types.d.ts +4 -4
  39. package/dist/types-ts4.5/plugins/status/analytics.d.ts +1 -1
  40. package/dist/types-ts4.5/plugins/status/nodeviews/status.d.ts +2 -1
  41. package/package.json +3 -3
  42. package/dist/cjs/plugins/status/nodeviews/messages.js +0 -24
  43. package/dist/es2019/plugins/status/nodeviews/messages.js +0 -18
  44. package/dist/esm/plugins/status/nodeviews/messages.js +0 -18
  45. package/dist/types/plugins/status/nodeviews/messages.d.ts +0 -17
  46. package/dist/types-ts4.5/plugins/status/nodeviews/messages.d.ts +0 -17
  47. /package/dist/cjs/{plugins/status/styles.js → ui/ContentStyles/status.js} +0 -0
  48. /package/dist/es2019/{plugins/status/styles.js → ui/ContentStyles/status.js} +0 -0
  49. /package/dist/esm/{plugins/status/styles.js → ui/ContentStyles/status.js} +0 -0
  50. /package/dist/types/{plugins/status/styles.d.ts → ui/ContentStyles/status.d.ts} +0 -0
  51. /package/dist/types-ts4.5/{plugins/status/styles.d.ts → ui/ContentStyles/status.d.ts} +0 -0
@@ -2,7 +2,8 @@ import React from 'react';
2
2
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
3
3
  import Loadable from 'react-loadable';
4
4
  import { date } from '@atlaskit/adf-schema';
5
- import { insertDate, closeDatePicker as _closeDatePicker, closeDatePickerWithAnalytics as _closeDatePickerWithAnalytics, createDate, deleteDate } from './actions';
5
+ import { closeDatePicker as _closeDatePicker, closeDatePickerWithAnalytics as _closeDatePickerWithAnalytics, createDate } from './actions';
6
+ import { insertDateCommand, deleteDateCommand } from './commands';
6
7
  import createDatePlugin from './pm-plugins/main';
7
8
  import keymap from './pm-plugins/keymap';
8
9
  import { IconDate } from '@atlaskit/editor-common/quick-insert';
@@ -49,20 +50,25 @@ function ContentComponent(_ref) {
49
50
  isNew: isNew,
50
51
  autoFocus: focusDateInput,
51
52
  onDelete: function onDelete() {
52
- deleteDate()(editorView.state, dispatch);
53
+ dependencyApi === null || dependencyApi === void 0 || dependencyApi.core.actions.execute(deleteDateCommand(dependencyApi));
53
54
  editorView.focus();
54
- return;
55
55
  },
56
56
  onSelect: function onSelect(date, commitMethod) {
57
57
  // Undefined means couldn't parse date, null means invalid (out of bounds) date
58
58
  if (date === undefined || date === null) {
59
59
  return;
60
60
  }
61
- insertDate(date, undefined, commitMethod)(editorView.state, dispatch);
61
+ dependencyApi === null || dependencyApi === void 0 || dependencyApi.core.actions.execute(insertDateCommand(dependencyApi)({
62
+ date: date,
63
+ commitMethod: commitMethod
64
+ }));
62
65
  editorView.focus();
63
66
  },
64
67
  onTextChanged: function onTextChanged(date) {
65
- insertDate(date, undefined, undefined, false)(editorView.state, dispatch);
68
+ dependencyApi === null || dependencyApi === void 0 || dependencyApi.core.actions.execute(insertDateCommand(dependencyApi)({
69
+ date: date,
70
+ enterPressed: false
71
+ }));
66
72
  },
67
73
  closeDatePicker: function closeDatePicker() {
68
74
  _closeDatePicker()(editorView.state, dispatch);
@@ -103,9 +109,9 @@ var datePlugin = function datePlugin(_ref3) {
103
109
  focusDateInput: !!focusDateInput
104
110
  };
105
111
  },
106
- actions: {
107
- insertDate: insertDate,
108
- deleteDate: deleteDate
112
+ commands: {
113
+ insertDate: insertDateCommand(api),
114
+ deleteDate: deleteDateCommand(api)
109
115
  },
110
116
  nodes: function nodes() {
111
117
  return [{
@@ -197,11 +197,12 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
197
197
  })(state, dispatch)) !== null && _pluginInjectionApi$t !== void 0 ? _pluginInjectionApi$t : false;
198
198
  });
199
199
  _defineProperty(_assertThisInitialized(_this), "createDate", function (inputMethod) {
200
- var _pluginInjectionApi$d, _pluginInjectionApi$d2;
201
- var _this$props3 = _this.props,
202
- pluginInjectionApi = _this$props3.pluginInjectionApi,
203
- editorView = _this$props3.editorView;
204
- return (_pluginInjectionApi$d = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$d2 = pluginInjectionApi.date) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.actions.insertDate(undefined, inputMethod)(editorView.state, editorView.dispatch)) !== null && _pluginInjectionApi$d !== void 0 ? _pluginInjectionApi$d : false;
200
+ var _pluginInjectionApi$d;
201
+ var pluginInjectionApi = _this.props.pluginInjectionApi;
202
+ pluginInjectionApi === null || pluginInjectionApi === void 0 || pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$d = pluginInjectionApi.date) === null || _pluginInjectionApi$d === void 0 || (_pluginInjectionApi$d = _pluginInjectionApi$d.commands) === null || _pluginInjectionApi$d === void 0 ? void 0 : _pluginInjectionApi$d.insertDate({
203
+ inputMethod: inputMethod
204
+ }));
205
+ return true;
205
206
  });
206
207
  _defineProperty(_assertThisInitialized(_this), "createPlaceholderText", function () {
207
208
  var editorView = _this.props.editorView;
@@ -215,15 +216,15 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
215
216
  });
216
217
  _defineProperty(_assertThisInitialized(_this), "createStatus", function (inputMethod) {
217
218
  var _pluginInjectionApi$s, _pluginInjectionApi$s2;
218
- var _this$props4 = _this.props,
219
- pluginInjectionApi = _this$props4.pluginInjectionApi,
220
- editorView = _this$props4.editorView;
219
+ var _this$props3 = _this.props,
220
+ pluginInjectionApi = _this$props3.pluginInjectionApi,
221
+ editorView = _this$props3.editorView;
221
222
  return (_pluginInjectionApi$s = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$s2 = pluginInjectionApi.status) === null || _pluginInjectionApi$s2 === void 0 || (_pluginInjectionApi$s2 = _pluginInjectionApi$s2.actions) === null || _pluginInjectionApi$s2 === void 0 ? void 0 : _pluginInjectionApi$s2.updateStatus(inputMethod)(editorView.state, editorView.dispatch)) !== null && _pluginInjectionApi$s !== void 0 ? _pluginInjectionApi$s : false;
222
223
  });
223
224
  _defineProperty(_assertThisInitialized(_this), "openMediaPicker", function (inputMethod) {
224
- var _this$props5 = _this.props,
225
- onShowMediaPicker = _this$props5.onShowMediaPicker,
226
- dispatchAnalyticsEvent = _this$props5.dispatchAnalyticsEvent;
225
+ var _this$props4 = _this.props,
226
+ onShowMediaPicker = _this$props4.onShowMediaPicker,
227
+ dispatchAnalyticsEvent = _this$props4.dispatchAnalyticsEvent;
227
228
  if (onShowMediaPicker) {
228
229
  onShowMediaPicker();
229
230
  if (dispatchAnalyticsEvent) {
@@ -251,11 +252,11 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
251
252
  });
252
253
  _defineProperty(_assertThisInitialized(_this), "insertHorizontalRule", function (inputMethod) {
253
254
  var _pluginInjectionApi$r, _pluginInjectionApi$r2;
254
- var _this$props6 = _this.props,
255
- _this$props6$editorVi = _this$props6.editorView,
256
- state = _this$props6$editorVi.state,
257
- dispatch = _this$props6$editorVi.dispatch,
258
- pluginInjectionApi = _this$props6.pluginInjectionApi;
255
+ var _this$props5 = _this.props,
256
+ _this$props5$editorVi = _this$props5.editorView,
257
+ state = _this$props5$editorVi.state,
258
+ dispatch = _this$props5$editorVi.dispatch,
259
+ pluginInjectionApi = _this$props5.pluginInjectionApi;
259
260
  return (_pluginInjectionApi$r = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$r2 = pluginInjectionApi.rule) === null || _pluginInjectionApi$r2 === void 0 ? void 0 : _pluginInjectionApi$r2.actions.insertHorizontalRule(inputMethod)(state, dispatch)) !== null && _pluginInjectionApi$r !== void 0 ? _pluginInjectionApi$r : false;
260
261
  });
261
262
  _defineProperty(_assertThisInitialized(_this), "insertExpand", function () {
@@ -266,9 +267,9 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
266
267
  });
267
268
  _defineProperty(_assertThisInitialized(_this), "insertBlockType", function (itemName) {
268
269
  return function () {
269
- var _this$props7 = _this.props,
270
- editorView = _this$props7.editorView,
271
- onInsertBlockType = _this$props7.onInsertBlockType;
270
+ var _this$props6 = _this.props,
271
+ editorView = _this$props6.editorView,
272
+ onInsertBlockType = _this$props6.onInsertBlockType;
272
273
  var state = editorView.state,
273
274
  dispatch = editorView.dispatch;
274
275
  onInsertBlockType(itemName)(state, dispatch);
@@ -291,11 +292,11 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
291
292
  _defineProperty(_assertThisInitialized(_this), "onItemActivated", function (_ref2) {
292
293
  var item = _ref2.item,
293
294
  inputMethod = _ref2.inputMethod;
294
- var _this$props8 = _this.props,
295
- editorView = _this$props8.editorView,
296
- editorActions = _this$props8.editorActions,
297
- handleImageUpload = _this$props8.handleImageUpload,
298
- expandEnabled = _this$props8.expandEnabled;
295
+ var _this$props7 = _this.props,
296
+ editorView = _this$props7.editorView,
297
+ editorActions = _this$props7.editorActions,
298
+ handleImageUpload = _this$props7.handleImageUpload,
299
+ expandEnabled = _this$props7.expandEnabled;
299
300
 
300
301
  // need to do this before inserting nodes so scrollIntoView works properly
301
302
  if (!editorView.hasFocus()) {
@@ -411,12 +412,12 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
411
412
  key: "renderPopup",
412
413
  value: function renderPopup() {
413
414
  var emojiPickerOpen = this.state.emojiPickerOpen;
414
- var _this$props9 = this.props,
415
- popupsMountPoint = _this$props9.popupsMountPoint,
416
- popupsBoundariesElement = _this$props9.popupsBoundariesElement,
417
- popupsScrollableElement = _this$props9.popupsScrollableElement,
418
- emojiProvider = _this$props9.emojiProvider,
419
- replacePlusMenuWithElementBrowser = _this$props9.replacePlusMenuWithElementBrowser;
415
+ var _this$props8 = this.props,
416
+ popupsMountPoint = _this$props8.popupsMountPoint,
417
+ popupsBoundariesElement = _this$props8.popupsBoundariesElement,
418
+ popupsScrollableElement = _this$props8.popupsScrollableElement,
419
+ emojiProvider = _this$props8.emojiProvider,
420
+ replacePlusMenuWithElementBrowser = _this$props8.replacePlusMenuWithElementBrowser;
420
421
  var dropdownEmoji = this.state.dropdownItems.some(function (_ref4) {
421
422
  var name = _ref4.value.name;
422
423
  return name === 'emoji';
@@ -453,9 +454,9 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
453
454
  buttons = _this$state.buttons,
454
455
  dropdownItems = _this$state.dropdownItems,
455
456
  emojiPickerOpen = _this$state.emojiPickerOpen;
456
- var _this$props10 = this.props,
457
- isDisabled = _this$props10.isDisabled,
458
- isReducedSpacing = _this$props10.isReducedSpacing;
457
+ var _this$props9 = this.props,
458
+ isDisabled = _this$props9.isDisabled,
459
+ isReducedSpacing = _this$props9.isReducedSpacing;
459
460
  if (buttons.length === 0 && dropdownItems.length === 0) {
460
461
  return null;
461
462
  }
@@ -3,7 +3,7 @@ import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
3
3
  import { status } from '@atlaskit/adf-schema';
4
4
  import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
5
5
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
6
- import { messages } from '../insert-block/ui/ToolbarInsertBlock/messages';
6
+ import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
7
7
  import { IconStatus } from '@atlaskit/editor-common/quick-insert';
8
8
  import { updateStatusWithAnalytics, commitStatusPicker, createStatus, updateStatus } from './actions';
9
9
  import { keymapPlugin } from './keymap';
@@ -5,7 +5,7 @@ import React from 'react';
5
5
  import { css, jsx } from '@emotion/react';
6
6
  import { injectIntl } from 'react-intl-next';
7
7
  import { Status } from '@atlaskit/status/element';
8
- import { messages } from './messages';
8
+ import { statusMessages as messages } from '@atlaskit/editor-common/messages';
9
9
  var styledStatus = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n opacity: 1;\n"])));
10
10
  var styledStatusPlaceholder = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n opacity: 0.5;\n"])));
11
11
  var StatusContainerView = function StatusContainerView(props) {
@@ -23,7 +23,8 @@ var StatusContainerView = function StatusContainerView(props) {
23
23
  };
24
24
 
25
25
  return jsx("span", {
26
- css: text ? styledStatus : styledStatusPlaceholder
26
+ css: text ? styledStatus : styledStatusPlaceholder,
27
+ "data-testid": "statusContainerView"
27
28
  }, jsx(Status, {
28
29
  text: statusText,
29
30
  color: color,
@@ -20,7 +20,7 @@ import { expandStyles } from '../../plugins/expand/ui/styles';
20
20
  import { MediaSharedClassNames } from '@atlaskit/editor-common/styles';
21
21
  import { findReplaceStyles } from '../../plugins/find-replace/styles';
22
22
  import { taskDecisionStyles } from '../../plugins/tasks-and-decisions/styles';
23
- import { statusStyles } from '../../plugins/status/styles';
23
+ import { statusStyles } from './status';
24
24
  import { dateStyles } from './date';
25
25
  import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
26
26
  import { linkSharedStyle, codeMarkSharedStyles, ruleSharedStyles } from '@atlaskit/editor-common/styles';
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "0.0.0-development";
2
+ export var version = "188.7.6";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,6 +1,5 @@
1
- import commonMessages, { linkMessages, linkToolbarMessages } from '@atlaskit/editor-common/messages';
1
+ import commonMessages, { linkMessages, linkToolbarMessages, statusMessages } from '@atlaskit/editor-common/messages';
2
2
  import { messages as dateMessages } from './plugins/date/nodeviews/messages';
3
- import { messages as statusMessages } from './plugins/status/nodeviews/messages';
4
3
  export { linkMessages };
5
4
  export { statusMessages };
6
5
  export { dateMessages };
@@ -1,14 +1,9 @@
1
1
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
2
  import type { DatePlugin, DateType } from './types';
3
- import type { TOOLBAR_MENU_TYPE, Command, CommandDispatch, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import type { Command, CommandDispatch, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
5
4
  export declare const createDate: (isQuickInsertAction?: boolean) => (insert: (node: Node | Object | string, opts?: any) => Transaction, state: EditorState) => Transaction;
6
- /** Delete the date and close the datepicker */
7
- export declare const deleteDate: () => Command;
8
5
  /** Focus input */
9
6
  export declare const focusDateInput: () => (state: EditorState, dispatch: CommandDispatch | undefined) => boolean;
10
- type InsertDate = (date?: DateType, inputMethod?: TOOLBAR_MENU_TYPE, commitMethod?: INPUT_METHOD.PICKER | INPUT_METHOD.KEYBOARD, enterPressed?: boolean, pluginInjectionApi?: ExtractInjectionAPI<DatePlugin>) => Command;
11
- export declare const insertDate: InsertDate;
12
7
  export declare const setDatePickerAt: (showDatePickerAt: number | null) => (state: EditorState, dispatch: (tr: Transaction) => void) => boolean;
13
8
  export declare const closeDatePicker: () => Command;
14
9
  export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi, }: {
@@ -30,9 +25,9 @@ export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi,
30
25
  sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
31
26
  }, undefined>];
32
27
  sharedState: import("./types").DatePluginSharedState;
33
- actions: {
34
- insertDate: InsertDate;
35
- deleteDate: () => Command;
28
+ commands: {
29
+ insertDate: import("./commands").InsertDate;
30
+ deleteDate: import("@atlaskit/editor-common/types").EditorCommand;
36
31
  };
37
32
  }, import("./types").DatePluginConfig | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
38
33
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
@@ -50,4 +45,3 @@ export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi,
50
45
  }, undefined>]> | undefined;
51
46
  }) => Command;
52
47
  export declare const openDatePicker: () => Command;
53
- export {};
@@ -0,0 +1,20 @@
1
+ import type { TOOLBAR_MENU_TYPE, PluginInjectionAPIWithDependencies, EditorCommand, OptionalPlugin } from '@atlaskit/editor-common/types';
2
+ import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import type { DatePlugin, DateType } from './types';
4
+ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
+ export type DeleteDate = EditorCommand;
6
+ type DeleteDateCommand = (pluginInjectionApi: PluginInjectionAPIWithDependencies<[DatePlugin]> | undefined) => DeleteDate;
7
+ /** Delete the date and close the datepicker */
8
+ export declare const deleteDateCommand: DeleteDateCommand;
9
+ export type InsertDate = (props: {
10
+ date?: DateType;
11
+ inputMethod?: TOOLBAR_MENU_TYPE;
12
+ commitMethod?: INPUT_METHOD.PICKER | INPUT_METHOD.KEYBOARD;
13
+ enterPressed?: boolean;
14
+ }) => EditorCommand;
15
+ type InsertDateCommand = (pluginInjectionApi: PluginInjectionAPIWithDependencies<[
16
+ OptionalPlugin<AnalyticsPlugin>,
17
+ DatePlugin
18
+ ]> | undefined) => InsertDate;
19
+ export declare const insertDateCommand: InsertDateCommand;
20
+ export {};
@@ -2,7 +2,7 @@ import type { WeekDay } from '@atlaskit/calendar/types';
2
2
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
3
3
  import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
4
4
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
- import type { insertDate, deleteDate } from './actions';
5
+ import type { InsertDate, DeleteDate } from './commands';
6
6
  export type DateType = {
7
7
  year: number;
8
8
  month: number;
@@ -21,8 +21,8 @@ export type DatePlugin = NextEditorPlugin<'date', {
21
21
  pluginConfiguration: DatePluginConfig | undefined;
22
22
  dependencies: [typeof analyticsPlugin, EditorDisabledPlugin];
23
23
  sharedState: DatePluginSharedState;
24
- actions: {
25
- insertDate: typeof insertDate;
26
- deleteDate: typeof deleteDate;
24
+ commands: {
25
+ insertDate: InsertDate;
26
+ deleteDate: DeleteDate;
27
27
  };
28
28
  }>;
@@ -1,4 +1,4 @@
1
- import { AnalyticsEventPayload, CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
1
+ import type { AnalyticsEventPayload, CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
2
  export declare const FABRIC_CHANNEL = "fabric-elements";
3
3
  export declare const createStatusAnalyticsAndFire: (createAnalyticsEvent?: CreateUIAnalyticsEvent) => (payload: AnalyticsEventPayload) => void;
4
4
  export declare const analyticsState: (isNew: boolean | undefined) => "update" | "new";
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
5
  import type { IntlShape } from 'react-intl-next';
5
6
  import type { Color, StatusStyle } from '@atlaskit/status/element';
@@ -21,4 +22,4 @@ export declare const IntlStatusContainerView: React.FC<import("react-intl-next")
21
22
  export type Props = InlineNodeViewComponentProps & {
22
23
  options: StatusPluginOptions | undefined;
23
24
  };
24
- export declare const StatusNodeView: React.FC<Props>;
25
+ export declare const StatusNodeView: (props: Props) => jsx.JSX.Element;
@@ -1,6 +1,5 @@
1
- import commonMessages, { linkMessages, linkToolbarMessages } from '@atlaskit/editor-common/messages';
1
+ import commonMessages, { linkMessages, linkToolbarMessages, statusMessages } from '@atlaskit/editor-common/messages';
2
2
  import { messages as dateMessages } from './plugins/date/nodeviews/messages';
3
- import { messages as statusMessages } from './plugins/status/nodeviews/messages';
4
3
  export { linkMessages };
5
4
  export { statusMessages };
6
5
  export { dateMessages };
@@ -1,14 +1,9 @@
1
1
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
2
  import type { DatePlugin, DateType } from './types';
3
- import type { TOOLBAR_MENU_TYPE, Command, CommandDispatch, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import type { Command, CommandDispatch, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
5
4
  export declare const createDate: (isQuickInsertAction?: boolean) => (insert: (node: Node | Object | string, opts?: any) => Transaction, state: EditorState) => Transaction;
6
- /** Delete the date and close the datepicker */
7
- export declare const deleteDate: () => Command;
8
5
  /** Focus input */
9
6
  export declare const focusDateInput: () => (state: EditorState, dispatch: CommandDispatch | undefined) => boolean;
10
- type InsertDate = (date?: DateType, inputMethod?: TOOLBAR_MENU_TYPE, commitMethod?: INPUT_METHOD.PICKER | INPUT_METHOD.KEYBOARD, enterPressed?: boolean, pluginInjectionApi?: ExtractInjectionAPI<DatePlugin>) => Command;
11
- export declare const insertDate: InsertDate;
12
7
  export declare const setDatePickerAt: (showDatePickerAt: number | null) => (state: EditorState, dispatch: (tr: Transaction) => void) => boolean;
13
8
  export declare const closeDatePicker: () => Command;
14
9
  export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi, }: {
@@ -36,9 +31,9 @@ export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi,
36
31
  }, undefined>
37
32
  ];
38
33
  sharedState: import("./types").DatePluginSharedState;
39
- actions: {
40
- insertDate: InsertDate;
41
- deleteDate: () => Command;
34
+ commands: {
35
+ insertDate: import("./commands").InsertDate;
36
+ deleteDate: import("@atlaskit/editor-common/types").EditorCommand;
42
37
  };
43
38
  }, import("./types").DatePluginConfig | undefined>,
44
39
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
@@ -61,4 +56,3 @@ export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi,
61
56
  ]> | undefined;
62
57
  }) => Command;
63
58
  export declare const openDatePicker: () => Command;
64
- export {};
@@ -0,0 +1,22 @@
1
+ import type { TOOLBAR_MENU_TYPE, PluginInjectionAPIWithDependencies, EditorCommand, OptionalPlugin } from '@atlaskit/editor-common/types';
2
+ import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import type { DatePlugin, DateType } from './types';
4
+ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
+ export type DeleteDate = EditorCommand;
6
+ type DeleteDateCommand = (pluginInjectionApi: PluginInjectionAPIWithDependencies<[
7
+ DatePlugin
8
+ ]> | undefined) => DeleteDate;
9
+ /** Delete the date and close the datepicker */
10
+ export declare const deleteDateCommand: DeleteDateCommand;
11
+ export type InsertDate = (props: {
12
+ date?: DateType;
13
+ inputMethod?: TOOLBAR_MENU_TYPE;
14
+ commitMethod?: INPUT_METHOD.PICKER | INPUT_METHOD.KEYBOARD;
15
+ enterPressed?: boolean;
16
+ }) => EditorCommand;
17
+ type InsertDateCommand = (pluginInjectionApi: PluginInjectionAPIWithDependencies<[
18
+ OptionalPlugin<AnalyticsPlugin>,
19
+ DatePlugin
20
+ ]> | undefined) => InsertDate;
21
+ export declare const insertDateCommand: InsertDateCommand;
22
+ export {};
@@ -2,7 +2,7 @@ import type { WeekDay } from '@atlaskit/calendar/types';
2
2
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
3
3
  import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
4
4
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
- import type { insertDate, deleteDate } from './actions';
5
+ import type { InsertDate, DeleteDate } from './commands';
6
6
  export type DateType = {
7
7
  year: number;
8
8
  month: number;
@@ -24,8 +24,8 @@ export type DatePlugin = NextEditorPlugin<'date', {
24
24
  EditorDisabledPlugin
25
25
  ];
26
26
  sharedState: DatePluginSharedState;
27
- actions: {
28
- insertDate: typeof insertDate;
29
- deleteDate: typeof deleteDate;
27
+ commands: {
28
+ insertDate: InsertDate;
29
+ deleteDate: DeleteDate;
30
30
  };
31
31
  }>;
@@ -1,4 +1,4 @@
1
- import { AnalyticsEventPayload, CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
1
+ import type { AnalyticsEventPayload, CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
2
  export declare const FABRIC_CHANNEL = "fabric-elements";
3
3
  export declare const createStatusAnalyticsAndFire: (createAnalyticsEvent?: CreateUIAnalyticsEvent) => (payload: AnalyticsEventPayload) => void;
4
4
  export declare const analyticsState: (isNew: boolean | undefined) => "update" | "new";
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
5
  import type { IntlShape } from 'react-intl-next';
5
6
  import type { Color, StatusStyle } from '@atlaskit/status/element';
@@ -21,4 +22,4 @@ export declare const IntlStatusContainerView: React.FC<import("react-intl-next")
21
22
  export type Props = InlineNodeViewComponentProps & {
22
23
  options: StatusPluginOptions | undefined;
23
24
  };
24
- export declare const StatusNodeView: React.FC<Props>;
25
+ export declare const StatusNodeView: (props: Props) => jsx.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "188.7.3",
3
+ "version": "188.7.6",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/code": "^14.6.0",
56
56
  "@atlaskit/date": "^0.10.0",
57
57
  "@atlaskit/datetime-picker": "^12.10.0",
58
- "@atlaskit/editor-common": "^76.9.0",
58
+ "@atlaskit/editor-common": "^76.10.0",
59
59
  "@atlaskit/editor-json-transformer": "^8.10.0",
60
60
  "@atlaskit/editor-markdown-transformer": "^5.2.5",
61
61
  "@atlaskit/editor-palette": "1.5.1",
@@ -88,7 +88,7 @@
88
88
  "@atlaskit/editor-plugin-quick-insert": "^0.2.0",
89
89
  "@atlaskit/editor-plugin-rule": "^0.1.0",
90
90
  "@atlaskit/editor-plugin-selection": "^0.1.0",
91
- "@atlaskit/editor-plugin-table": "^5.1.0",
91
+ "@atlaskit/editor-plugin-table": "^5.2.0",
92
92
  "@atlaskit/editor-plugin-text-formatting": "^0.4.0",
93
93
  "@atlaskit/editor-plugin-type-ahead": "^0.5.0",
94
94
  "@atlaskit/editor-plugin-unsupported-content": "^0.2.0",
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.messages = void 0;
7
- var _reactIntlNext = require("react-intl-next");
8
- var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
9
- placeholder: {
10
- id: 'fabric.editor.statusPlaceholder',
11
- defaultMessage: 'Set a status',
12
- description: 'Placeholder description for an empty (new) status item in the editor'
13
- },
14
- editText: {
15
- id: 'fabric.editor.editStatusText',
16
- defaultMessage: 'Edit Status',
17
- description: 'Title for the input that changes the status text'
18
- },
19
- editColor: {
20
- id: 'fabric.editor.editStatusColor',
21
- defaultMessage: 'Edit Status Color',
22
- description: 'Title for the color picker that changes the status color'
23
- }
24
- });
@@ -1,18 +0,0 @@
1
- import { defineMessages } from 'react-intl-next';
2
- export const messages = defineMessages({
3
- placeholder: {
4
- id: 'fabric.editor.statusPlaceholder',
5
- defaultMessage: 'Set a status',
6
- description: 'Placeholder description for an empty (new) status item in the editor'
7
- },
8
- editText: {
9
- id: 'fabric.editor.editStatusText',
10
- defaultMessage: 'Edit Status',
11
- description: 'Title for the input that changes the status text'
12
- },
13
- editColor: {
14
- id: 'fabric.editor.editStatusColor',
15
- defaultMessage: 'Edit Status Color',
16
- description: 'Title for the color picker that changes the status color'
17
- }
18
- });
@@ -1,18 +0,0 @@
1
- import { defineMessages } from 'react-intl-next';
2
- export var messages = defineMessages({
3
- placeholder: {
4
- id: 'fabric.editor.statusPlaceholder',
5
- defaultMessage: 'Set a status',
6
- description: 'Placeholder description for an empty (new) status item in the editor'
7
- },
8
- editText: {
9
- id: 'fabric.editor.editStatusText',
10
- defaultMessage: 'Edit Status',
11
- description: 'Title for the input that changes the status text'
12
- },
13
- editColor: {
14
- id: 'fabric.editor.editStatusColor',
15
- defaultMessage: 'Edit Status Color',
16
- description: 'Title for the color picker that changes the status color'
17
- }
18
- });
@@ -1,17 +0,0 @@
1
- export declare const messages: {
2
- placeholder: {
3
- id: string;
4
- defaultMessage: string;
5
- description: string;
6
- };
7
- editText: {
8
- id: string;
9
- defaultMessage: string;
10
- description: string;
11
- };
12
- editColor: {
13
- id: string;
14
- defaultMessage: string;
15
- description: string;
16
- };
17
- };
@@ -1,17 +0,0 @@
1
- export declare const messages: {
2
- placeholder: {
3
- id: string;
4
- defaultMessage: string;
5
- description: string;
6
- };
7
- editText: {
8
- id: string;
9
- defaultMessage: string;
10
- description: string;
11
- };
12
- editColor: {
13
- id: string;
14
- defaultMessage: string;
15
- description: string;
16
- };
17
- };