@atlaskit/editor-plugin-date 2.4.10 → 2.4.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/{plugin.js → datePlugin.js} +2 -2
  3. package/dist/cjs/index.js +2 -2
  4. package/dist/cjs/nodeviews/date.js +2 -2
  5. package/dist/cjs/{actions.js → pm-plugins/actions.js} +2 -2
  6. package/dist/cjs/{commands.js → pm-plugins/commands.js} +2 -2
  7. package/dist/cjs/pm-plugins/keymap.js +1 -1
  8. package/dist/cjs/types/index.js +5 -0
  9. package/dist/cjs/ui/DatePicker/date-picker-input.js +2 -2
  10. package/dist/cjs/ui/DatePicker/index.js +1 -4
  11. package/dist/es2019/{plugin.js → datePlugin.js} +2 -2
  12. package/dist/es2019/index.js +1 -1
  13. package/dist/es2019/nodeviews/date.js +2 -2
  14. package/dist/es2019/{actions.js → pm-plugins/actions.js} +2 -2
  15. package/dist/es2019/{commands.js → pm-plugins/commands.js} +2 -2
  16. package/dist/es2019/pm-plugins/keymap.js +1 -1
  17. package/dist/es2019/ui/DatePicker/date-picker-input.js +2 -2
  18. package/dist/es2019/ui/DatePicker/index.js +1 -4
  19. package/dist/esm/{plugin.js → datePlugin.js} +2 -2
  20. package/dist/esm/datePluginType.js +1 -0
  21. package/dist/esm/index.js +1 -1
  22. package/dist/esm/nodeviews/date.js +2 -2
  23. package/dist/esm/{actions.js → pm-plugins/actions.js} +2 -2
  24. package/dist/esm/{commands.js → pm-plugins/commands.js} +2 -2
  25. package/dist/esm/pm-plugins/keymap.js +1 -1
  26. package/dist/esm/types/index.js +1 -0
  27. package/dist/esm/ui/DatePicker/date-picker-input.js +2 -2
  28. package/dist/esm/ui/DatePicker/index.js +1 -4
  29. package/dist/types/{plugin.d.ts → datePlugin.d.ts} +1 -1
  30. package/dist/types/datePluginType.d.ts +13 -0
  31. package/dist/types/index.d.ts +3 -2
  32. package/dist/types/{actions.d.ts → pm-plugins/actions.d.ts} +4 -4
  33. package/dist/types/{commands.d.ts → pm-plugins/commands.d.ts} +1 -1
  34. package/dist/types/{utils → ui/DatePicker/utils}/formatParse.d.ts +1 -1
  35. package/dist/types/{utils → ui/DatePicker/utils}/internal.d.ts +1 -1
  36. package/dist/types-ts4.5/{plugin.d.ts → datePlugin.d.ts} +1 -1
  37. package/dist/types-ts4.5/datePluginType.d.ts +16 -0
  38. package/dist/types-ts4.5/index.d.ts +3 -2
  39. package/dist/types-ts4.5/{actions.d.ts → pm-plugins/actions.d.ts} +4 -4
  40. package/dist/types-ts4.5/{commands.d.ts → pm-plugins/commands.d.ts} +1 -1
  41. package/dist/types-ts4.5/{utils → ui/DatePicker/utils}/formatParse.d.ts +1 -1
  42. package/dist/types-ts4.5/{utils → ui/DatePicker/utils}/internal.d.ts +1 -1
  43. package/package.json +4 -1
  44. /package/dist/cjs/{types.js → datePluginType.js} +0 -0
  45. /package/dist/cjs/{utils → ui/DatePicker/utils}/formatParse.js +0 -0
  46. /package/dist/cjs/{utils → ui/DatePicker/utils}/internal.js +0 -0
  47. /package/dist/es2019/{types.js → datePluginType.js} +0 -0
  48. /package/dist/{esm/types.js → es2019/types/index.js} +0 -0
  49. /package/dist/es2019/{utils → ui/DatePicker/utils}/formatParse.js +0 -0
  50. /package/dist/es2019/{utils → ui/DatePicker/utils}/internal.js +0 -0
  51. /package/dist/esm/{utils → ui/DatePicker/utils}/formatParse.js +0 -0
  52. /package/dist/esm/{utils → ui/DatePicker/utils}/internal.js +0 -0
  53. /package/dist/types/{types.d.ts → types/index.d.ts} +0 -0
  54. /package/dist/types-ts4.5/{types.d.ts → types/index.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-date
2
2
 
3
+ ## 2.4.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [#169354](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/169354)
8
+ [`a083b7233a98e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a083b7233a98e) -
9
+ ED-25809: refactors plugins to meet folder standards
10
+
3
11
  ## 2.4.10
4
12
 
5
13
  ### Patch Changes
@@ -15,8 +15,8 @@ var _messages = require("@atlaskit/editor-common/messages");
15
15
  var _quickInsert = require("@atlaskit/editor-common/quick-insert");
16
16
  var _styles = require("@atlaskit/editor-common/styles");
17
17
  var _utils = require("@atlaskit/editor-prosemirror/utils");
18
- var _actions = require("./actions");
19
- var _commands = require("./commands");
18
+ var _actions = require("./pm-plugins/actions");
19
+ var _commands = require("./pm-plugins/commands");
20
20
  var _keymap = _interopRequireDefault(require("./pm-plugins/keymap"));
21
21
  var _main = _interopRequireDefault(require("./pm-plugins/main"));
22
22
  var _pluginKey = require("./pm-plugins/plugin-key");
package/dist/cjs/index.js CHANGED
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  Object.defineProperty(exports, "datePlugin", {
8
8
  enumerable: true,
9
9
  get: function get() {
10
- return _plugin.default;
10
+ return _datePlugin.default;
11
11
  }
12
12
  });
13
- var _plugin = _interopRequireDefault(require("./plugin"));
13
+ var _datePlugin = _interopRequireDefault(require("./datePlugin"));
@@ -10,7 +10,7 @@ var _reactIntlNext = require("react-intl-next");
10
10
  var _date = require("@atlaskit/date");
11
11
  var _styles = require("@atlaskit/editor-common/styles");
12
12
  var _utils = require("@atlaskit/editor-common/utils");
13
- var _actions = require("../actions");
13
+ var _actions = require("../pm-plugins/actions");
14
14
  function DateNodeView(props) {
15
15
  var timestamp = props.node.attrs.timestamp,
16
16
  _props$view$state = props.view.state,
@@ -29,7 +29,7 @@ function DateNodeView(props) {
29
29
  var color = withinIncompleteTask && (0, _utils.isPastDate)(timestamp) ? 'red' : undefined;
30
30
  return (
31
31
  /*#__PURE__*/
32
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
32
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions -- Ignored via go/DSP-18766
33
33
  _react.default.createElement("span", {
34
34
  className: _styles.DateSharedCssClassName.DATE_WRAPPER,
35
35
  onClick: handleClick
@@ -10,8 +10,8 @@ var _model = require("@atlaskit/editor-prosemirror/model");
10
10
  var _state = require("@atlaskit/editor-prosemirror/state");
11
11
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
12
12
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
- var _pluginKey = require("./pm-plugins/plugin-key");
14
- var _internal = require("./utils/internal");
13
+ var _internal = require("../ui/DatePicker/utils/internal");
14
+ var _pluginKey = require("./plugin-key");
15
15
  var createDate = exports.createDate = function createDate(isQuickInsertAction) {
16
16
  return function (state) {
17
17
  var tr = state.tr;
@@ -9,8 +9,8 @@ var _utils = require("@atlaskit/editor-common/utils");
9
9
  var _model = require("@atlaskit/editor-prosemirror/model");
10
10
  var _state = require("@atlaskit/editor-prosemirror/state");
11
11
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
12
- var _pluginKey = require("./pm-plugins/plugin-key");
13
- var _internal = require("./utils/internal");
12
+ var _internal = require("../ui/DatePicker/utils/internal");
13
+ var _pluginKey = require("./plugin-key");
14
14
  /** Delete the date and close the datepicker */
15
15
  var deleteDateCommand = exports.deleteDateCommand = function deleteDateCommand(pluginInjectionApi) {
16
16
  return function (_ref) {
@@ -7,7 +7,7 @@ exports.default = void 0;
7
7
  exports.keymapPlugin = keymapPlugin;
8
8
  var _keymaps = require("@atlaskit/editor-common/keymaps");
9
9
  var _state = require("@atlaskit/editor-prosemirror/state");
10
- var _actions = require("../actions");
10
+ var _actions = require("./actions");
11
11
  var _main = require("./main");
12
12
  function keymapPlugin() {
13
13
  var list = {};
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -19,8 +19,8 @@ var _analytics = require("@atlaskit/editor-common/analytics");
19
19
  var _messages = require("@atlaskit/editor-common/messages");
20
20
  var _form = require("@atlaskit/form");
21
21
  var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
22
- var _formatParse = require("../../utils/formatParse");
23
- var _internal = require("../../utils/internal");
22
+ var _formatParse = require("./utils/formatParse");
23
+ var _internal = require("./utils/internal");
24
24
  function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
25
25
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
26
26
  * @jsxRuntime classic
@@ -156,10 +156,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
156
156
  onSubmitDate: _this2.handleKeyboardSubmitDate,
157
157
  onEmptySubmit: _this2.handleEmptySubmitDate,
158
158
  locale: intl.locale,
159
- dispatchAnalyticsEvent: dispatchAnalyticsEvent
160
- // Passthrough prop here
161
- // eslint-disable-next-line jsx-a11y/no-autofocus
162
- ,
159
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
163
160
  autoFocus: autoFocus,
164
161
  autoSelectAll: isNew
165
162
  }), (0, _react2.jsx)(_calendar.default, {
@@ -7,8 +7,8 @@ import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/
7
7
  import { IconDate } from '@atlaskit/editor-common/quick-insert';
8
8
  import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
9
9
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
10
- import { closeDatePicker, closeDatePickerWithAnalytics, createDate } from './actions';
11
- import { deleteDateCommand, insertDateCommand } from './commands';
10
+ import { closeDatePicker, closeDatePickerWithAnalytics, createDate } from './pm-plugins/actions';
11
+ import { deleteDateCommand, insertDateCommand } from './pm-plugins/commands';
12
12
  import keymap from './pm-plugins/keymap';
13
13
  import createDatePlugin from './pm-plugins/main';
14
14
  import { pluginKey as datePluginKey } from './pm-plugins/plugin-key';
@@ -1 +1 @@
1
- export { default as datePlugin } from './plugin';
1
+ export { default as datePlugin } from './datePlugin';
@@ -3,7 +3,7 @@ import { useIntl } from 'react-intl-next';
3
3
  import { Date } from '@atlaskit/date';
4
4
  import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
5
5
  import { isPastDate, timestampToString, timestampToTaskContext } from '@atlaskit/editor-common/utils';
6
- import { setDatePickerAt } from '../actions';
6
+ import { setDatePickerAt } from '../pm-plugins/actions';
7
7
  export function DateNodeView(props) {
8
8
  const {
9
9
  node: {
@@ -31,7 +31,7 @@ export function DateNodeView(props) {
31
31
  const color = withinIncompleteTask && isPastDate(timestamp) ? 'red' : undefined;
32
32
  return (
33
33
  /*#__PURE__*/
34
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
34
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions -- Ignored via go/DSP-18766
35
35
  React.createElement("span", {
36
36
  className: DateSharedCssClassName.DATE_WRAPPER,
37
37
  onClick: handleClick
@@ -4,8 +4,8 @@ import { Fragment } from '@atlaskit/editor-prosemirror/model';
4
4
  import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { canInsert } from '@atlaskit/editor-prosemirror/utils';
6
6
  import { fg } from '@atlaskit/platform-feature-flags';
7
- import { pluginKey } from './pm-plugins/plugin-key';
8
- import { isToday } from './utils/internal';
7
+ import { isToday } from '../ui/DatePicker/utils/internal';
8
+ import { pluginKey } from './plugin-key';
9
9
  export const createDate = isQuickInsertAction => state => {
10
10
  const tr = state.tr;
11
11
  const annotationMarksForPos = fg('editor_inline_comments_paste_insert_nodes') ? getAnnotationMarksForPos(tr.selection.$head) : undefined;
@@ -3,8 +3,8 @@ import { todayTimestampInUTC } from '@atlaskit/editor-common/utils';
3
3
  import { Fragment } from '@atlaskit/editor-prosemirror/model';
4
4
  import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { canInsert } from '@atlaskit/editor-prosemirror/utils';
6
- import { pluginKey } from './pm-plugins/plugin-key';
7
- import { isToday } from './utils/internal';
6
+ import { isToday } from '../ui/DatePicker/utils/internal';
7
+ import { pluginKey } from './plugin-key';
8
8
  /** Delete the date and close the datepicker */
9
9
  export const deleteDateCommand = pluginInjectionApi => ({
10
10
  tr
@@ -1,6 +1,6 @@
1
1
  import { bindKeymapWithCommand, enter, keymap, tab } from '@atlaskit/editor-common/keymaps';
2
2
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
3
- import { closeDatePicker, focusDateInput, openDatePicker } from '../actions';
3
+ import { closeDatePicker, focusDateInput, openDatePicker } from './actions';
4
4
  import { getPluginState } from './main';
5
5
  export function keymapPlugin() {
6
6
  const list = {};
@@ -11,8 +11,8 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit
11
11
  import { dateMessages as messages } from '@atlaskit/editor-common/messages';
12
12
  import { ErrorMessage } from '@atlaskit/form';
13
13
  import TextField from '@atlaskit/textfield';
14
- import { formatDateType, parseDateType } from '../../utils/formatParse';
15
- import { adjustDate, findDateSegmentByPosition, isDatePossiblyValid } from '../../utils/internal';
14
+ import { formatDateType, parseDateType } from './utils/formatParse';
15
+ import { adjustDate, findDateSegmentByPosition, isDatePossiblyValid } from './utils/internal';
16
16
 
17
17
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
18
18
  const dateTextFieldWrapper = css({
@@ -142,10 +142,7 @@ class DatePicker extends React.Component {
142
142
  onSubmitDate: this.handleKeyboardSubmitDate,
143
143
  onEmptySubmit: this.handleEmptySubmitDate,
144
144
  locale: intl.locale,
145
- dispatchAnalyticsEvent: dispatchAnalyticsEvent
146
- // Passthrough prop here
147
- // eslint-disable-next-line jsx-a11y/no-autofocus
148
- ,
145
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
149
146
  autoFocus: autoFocus,
150
147
  autoSelectAll: isNew
151
148
  }), jsx(Calendar, {
@@ -7,8 +7,8 @@ import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/
7
7
  import { IconDate } from '@atlaskit/editor-common/quick-insert';
8
8
  import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
9
9
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
10
- import { closeDatePicker as _closeDatePicker, closeDatePickerWithAnalytics as _closeDatePickerWithAnalytics, createDate } from './actions';
11
- import { deleteDateCommand, insertDateCommand } from './commands';
10
+ import { closeDatePicker as _closeDatePicker, closeDatePickerWithAnalytics as _closeDatePickerWithAnalytics, createDate } from './pm-plugins/actions';
11
+ import { deleteDateCommand, insertDateCommand } from './pm-plugins/commands';
12
12
  import keymap from './pm-plugins/keymap';
13
13
  import createDatePlugin from './pm-plugins/main';
14
14
  import { pluginKey as datePluginKey } from './pm-plugins/plugin-key';
@@ -0,0 +1 @@
1
+ export {};
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- export { default as datePlugin } from './plugin';
1
+ export { default as datePlugin } from './datePlugin';
@@ -3,7 +3,7 @@ import { useIntl } from 'react-intl-next';
3
3
  import { Date } from '@atlaskit/date';
4
4
  import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
5
5
  import { isPastDate, timestampToString, timestampToTaskContext } from '@atlaskit/editor-common/utils';
6
- import { setDatePickerAt } from '../actions';
6
+ import { setDatePickerAt } from '../pm-plugins/actions';
7
7
  export function DateNodeView(props) {
8
8
  var timestamp = props.node.attrs.timestamp,
9
9
  _props$view$state = props.view.state,
@@ -22,7 +22,7 @@ export function DateNodeView(props) {
22
22
  var color = withinIncompleteTask && isPastDate(timestamp) ? 'red' : undefined;
23
23
  return (
24
24
  /*#__PURE__*/
25
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions -- Ignored via go/DSP-18766
26
26
  React.createElement("span", {
27
27
  className: DateSharedCssClassName.DATE_WRAPPER,
28
28
  onClick: handleClick
@@ -4,8 +4,8 @@ import { Fragment } from '@atlaskit/editor-prosemirror/model';
4
4
  import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { canInsert } from '@atlaskit/editor-prosemirror/utils';
6
6
  import { fg } from '@atlaskit/platform-feature-flags';
7
- import { pluginKey } from './pm-plugins/plugin-key';
8
- import { isToday } from './utils/internal';
7
+ import { isToday } from '../ui/DatePicker/utils/internal';
8
+ import { pluginKey } from './plugin-key';
9
9
  export var createDate = function createDate(isQuickInsertAction) {
10
10
  return function (state) {
11
11
  var tr = state.tr;
@@ -3,8 +3,8 @@ import { todayTimestampInUTC } from '@atlaskit/editor-common/utils';
3
3
  import { Fragment } from '@atlaskit/editor-prosemirror/model';
4
4
  import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { canInsert } from '@atlaskit/editor-prosemirror/utils';
6
- import { pluginKey } from './pm-plugins/plugin-key';
7
- import { isToday } from './utils/internal';
6
+ import { isToday } from '../ui/DatePicker/utils/internal';
7
+ import { pluginKey } from './plugin-key';
8
8
  /** Delete the date and close the datepicker */
9
9
  export var deleteDateCommand = function deleteDateCommand(pluginInjectionApi) {
10
10
  return function (_ref) {
@@ -1,6 +1,6 @@
1
1
  import { bindKeymapWithCommand, enter, keymap, tab } from '@atlaskit/editor-common/keymaps';
2
2
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
3
- import { closeDatePicker, focusDateInput, openDatePicker } from '../actions';
3
+ import { closeDatePicker, focusDateInput, openDatePicker } from './actions';
4
4
  import { getPluginState } from './main';
5
5
  export function keymapPlugin() {
6
6
  var list = {};
@@ -0,0 +1 @@
1
+ export {};
@@ -19,8 +19,8 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit
19
19
  import { dateMessages as messages } from '@atlaskit/editor-common/messages';
20
20
  import { ErrorMessage } from '@atlaskit/form';
21
21
  import TextField from '@atlaskit/textfield';
22
- import { formatDateType, parseDateType } from '../../utils/formatParse';
23
- import { adjustDate, findDateSegmentByPosition, isDatePossiblyValid } from '../../utils/internal';
22
+ import { formatDateType, parseDateType } from './utils/formatParse';
23
+ import { adjustDate, findDateSegmentByPosition, isDatePossiblyValid } from './utils/internal';
24
24
 
25
25
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
26
26
  var dateTextFieldWrapper = css({
@@ -153,10 +153,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
153
153
  onSubmitDate: _this2.handleKeyboardSubmitDate,
154
154
  onEmptySubmit: _this2.handleEmptySubmitDate,
155
155
  locale: intl.locale,
156
- dispatchAnalyticsEvent: dispatchAnalyticsEvent
157
- // Passthrough prop here
158
- // eslint-disable-next-line jsx-a11y/no-autofocus
159
- ,
156
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
160
157
  autoFocus: autoFocus,
161
158
  autoSelectAll: isNew
162
159
  }), jsx(Calendar, {
@@ -1,3 +1,3 @@
1
- import type { DatePlugin } from './types';
1
+ import type { DatePlugin } from './datePluginType';
2
2
  declare const datePlugin: DatePlugin;
3
3
  export default datePlugin;
@@ -0,0 +1,13 @@
1
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
+ import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
+ import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
4
+ import type { DatePluginConfig, DatePluginSharedState, DeleteDate, InsertDate } from './types';
5
+ export type DatePlugin = NextEditorPlugin<'date', {
6
+ pluginConfiguration: DatePluginConfig | undefined;
7
+ dependencies: [typeof analyticsPlugin, EditorDisabledPlugin];
8
+ sharedState: DatePluginSharedState;
9
+ commands: {
10
+ insertDate: InsertDate;
11
+ deleteDate: DeleteDate;
12
+ };
13
+ }>;
@@ -1,2 +1,3 @@
1
- export { default as datePlugin } from './plugin';
2
- export type { DatePlugin, DatePluginSharedState, DatePluginConfig, DateType, InsertDate, } from './types';
1
+ export { default as datePlugin } from './datePlugin';
2
+ export type { DatePlugin } from './datePluginType';
3
+ export type { DatePluginSharedState, DatePluginConfig, DateType, InsertDate } from './types';
@@ -1,6 +1,6 @@
1
1
  import type { Command, CommandDispatch, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
2
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
3
- import type { DatePlugin, DateType } from './types';
3
+ import type { DatePlugin, DateType } from '../types';
4
4
  export declare const createDate: (isQuickInsertAction?: boolean) => (state: EditorState) => Transaction;
5
5
  /** Focus input */
6
6
  export declare const focusDateInput: () => (state: EditorState, dispatch: CommandDispatch | undefined) => boolean;
@@ -9,7 +9,7 @@ export declare const closeDatePicker: () => Command;
9
9
  export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi, }: {
10
10
  date?: DateType | undefined;
11
11
  pluginInjectionApi?: import("@atlaskit/editor-common/types").EditorInjectionAPI<"date", {
12
- pluginConfiguration: import("./types").DatePluginConfig | undefined;
12
+ pluginConfiguration: import("../types").DatePluginConfig | undefined;
13
13
  dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
14
14
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
15
15
  sharedState: {
@@ -25,9 +25,9 @@ export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi,
25
25
  }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorDisabled", {
26
26
  sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
27
27
  }, undefined>];
28
- sharedState: import("./types").DatePluginSharedState;
28
+ sharedState: import("../types").DatePluginSharedState;
29
29
  commands: {
30
- insertDate: import("./types").InsertDate;
30
+ insertDate: import("../types").InsertDate;
31
31
  deleteDate: import("@atlaskit/editor-common/types").EditorCommand;
32
32
  };
33
33
  }> | undefined;
@@ -1,5 +1,5 @@
1
1
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { DatePlugin, DeleteDate, InsertDate } from './types';
2
+ import type { DatePlugin, DeleteDate, InsertDate } from '../types';
3
3
  type DeleteDateCommand = (pluginInjectionApi: ExtractInjectionAPI<DatePlugin> | undefined) => DeleteDate;
4
4
  /** Delete the date and close the datepicker */
5
5
  export declare const deleteDateCommand: DeleteDateCommand;
@@ -1,4 +1,4 @@
1
- import type { DateType } from '../types';
1
+ import type { DateType } from '../../../types';
2
2
  /**
3
3
  * Attempt to parse a string representing a date in a particular locale to a date object
4
4
  * @param dateString The string representing the date in the given locale, eg '02/12/2000'
@@ -1,4 +1,4 @@
1
- import type { DateSegment, DateType } from '../types';
1
+ import type { DateSegment, DateType } from '../../../types';
2
2
  /**
3
3
  * Inconclusively check if a date string is valid - a value of false means it is definitely
4
4
  * invalid, a value of true means it might be valid.
@@ -1,3 +1,3 @@
1
- import type { DatePlugin } from './types';
1
+ import type { DatePlugin } from './datePluginType';
2
2
  declare const datePlugin: DatePlugin;
3
3
  export default datePlugin;
@@ -0,0 +1,16 @@
1
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
+ import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
+ import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
4
+ import type { DatePluginConfig, DatePluginSharedState, DeleteDate, InsertDate } from './types';
5
+ export type DatePlugin = NextEditorPlugin<'date', {
6
+ pluginConfiguration: DatePluginConfig | undefined;
7
+ dependencies: [
8
+ typeof analyticsPlugin,
9
+ EditorDisabledPlugin
10
+ ];
11
+ sharedState: DatePluginSharedState;
12
+ commands: {
13
+ insertDate: InsertDate;
14
+ deleteDate: DeleteDate;
15
+ };
16
+ }>;
@@ -1,2 +1,3 @@
1
- export { default as datePlugin } from './plugin';
2
- export type { DatePlugin, DatePluginSharedState, DatePluginConfig, DateType, InsertDate, } from './types';
1
+ export { default as datePlugin } from './datePlugin';
2
+ export type { DatePlugin } from './datePluginType';
3
+ export type { DatePluginSharedState, DatePluginConfig, DateType, InsertDate } from './types';
@@ -1,6 +1,6 @@
1
1
  import type { Command, CommandDispatch, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
2
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
3
- import type { DatePlugin, DateType } from './types';
3
+ import type { DatePlugin, DateType } from '../types';
4
4
  export declare const createDate: (isQuickInsertAction?: boolean) => (state: EditorState) => Transaction;
5
5
  /** Focus input */
6
6
  export declare const focusDateInput: () => (state: EditorState, dispatch: CommandDispatch | undefined) => boolean;
@@ -9,7 +9,7 @@ export declare const closeDatePicker: () => Command;
9
9
  export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi, }: {
10
10
  date?: DateType | undefined;
11
11
  pluginInjectionApi?: import("@atlaskit/editor-common/types").EditorInjectionAPI<"date", {
12
- pluginConfiguration: import("./types").DatePluginConfig | undefined;
12
+ pluginConfiguration: import("../types").DatePluginConfig | undefined;
13
13
  dependencies: [
14
14
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
15
15
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
@@ -30,9 +30,9 @@ export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi,
30
30
  sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
31
31
  }, undefined>
32
32
  ];
33
- sharedState: import("./types").DatePluginSharedState;
33
+ sharedState: import("../types").DatePluginSharedState;
34
34
  commands: {
35
- insertDate: import("./types").InsertDate;
35
+ insertDate: import("../types").InsertDate;
36
36
  deleteDate: import("@atlaskit/editor-common/types").EditorCommand;
37
37
  };
38
38
  }> | undefined;
@@ -1,5 +1,5 @@
1
1
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { DatePlugin, DeleteDate, InsertDate } from './types';
2
+ import type { DatePlugin, DeleteDate, InsertDate } from '../types';
3
3
  type DeleteDateCommand = (pluginInjectionApi: ExtractInjectionAPI<DatePlugin> | undefined) => DeleteDate;
4
4
  /** Delete the date and close the datepicker */
5
5
  export declare const deleteDateCommand: DeleteDateCommand;
@@ -1,4 +1,4 @@
1
- import type { DateType } from '../types';
1
+ import type { DateType } from '../../../types';
2
2
  /**
3
3
  * Attempt to parse a string representing a date in a particular locale to a date object
4
4
  * @param dateString The string representing the date in the given locale, eg '02/12/2000'
@@ -1,4 +1,4 @@
1
- import type { DateSegment, DateType } from '../types';
1
+ import type { DateSegment, DateType } from '../../../types';
2
2
  /**
3
3
  * Inconclusively check if a date string is valid - a value of false means it is definitely
4
4
  * invalid, a value of true means it might be valid.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-date",
3
- "version": "2.4.10",
3
+ "version": "2.4.11",
4
4
  "description": "Date plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -71,6 +71,9 @@
71
71
  },
72
72
  "techstack": {
73
73
  "@atlassian/frontend": {
74
+ "code-structure": [
75
+ "editor-plugin"
76
+ ],
74
77
  "import-structure": [
75
78
  "atlassian-conventions"
76
79
  ],
File without changes
File without changes
File without changes
File without changes