@atlaskit/editor-core 189.4.1 → 189.4.3

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 +15 -0
  2. package/dist/cjs/plugins/index.js +0 -7
  3. package/dist/cjs/presets/universal.js +2 -1
  4. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +7 -3
  5. package/dist/cjs/version-wrapper.js +1 -1
  6. package/dist/es2019/plugins/index.js +0 -1
  7. package/dist/es2019/presets/universal.js +2 -1
  8. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +7 -3
  9. package/dist/es2019/version-wrapper.js +1 -1
  10. package/dist/esm/plugins/index.js +0 -1
  11. package/dist/esm/presets/universal.js +2 -1
  12. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +7 -3
  13. package/dist/esm/version-wrapper.js +1 -1
  14. package/dist/types/plugins/index.d.ts +0 -1
  15. package/dist/types-ts4.5/plugins/index.d.ts +0 -1
  16. package/package.json +16 -7
  17. package/dist/cjs/plugins/toolbar-lists-indentation/index.js +0 -91
  18. package/dist/cjs/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +0 -56
  19. package/dist/cjs/plugins/toolbar-lists-indentation/types.js +0 -5
  20. package/dist/cjs/plugins/toolbar-lists-indentation/ui/Toolbar.js +0 -135
  21. package/dist/cjs/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +0 -168
  22. package/dist/cjs/plugins/toolbar-lists-indentation/ui/index.js +0 -63
  23. package/dist/cjs/plugins/toolbar-lists-indentation/ui/onItemActivated.js +0 -53
  24. package/dist/es2019/plugins/toolbar-lists-indentation/index.js +0 -86
  25. package/dist/es2019/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +0 -53
  26. package/dist/es2019/plugins/toolbar-lists-indentation/types.js +0 -1
  27. package/dist/es2019/plugins/toolbar-lists-indentation/ui/Toolbar.js +0 -123
  28. package/dist/es2019/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +0 -158
  29. package/dist/es2019/plugins/toolbar-lists-indentation/ui/index.js +0 -58
  30. package/dist/es2019/plugins/toolbar-lists-indentation/ui/onItemActivated.js +0 -46
  31. package/dist/esm/plugins/toolbar-lists-indentation/index.js +0 -83
  32. package/dist/esm/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +0 -50
  33. package/dist/esm/plugins/toolbar-lists-indentation/types.js +0 -1
  34. package/dist/esm/plugins/toolbar-lists-indentation/ui/Toolbar.js +0 -124
  35. package/dist/esm/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +0 -161
  36. package/dist/esm/plugins/toolbar-lists-indentation/ui/index.js +0 -56
  37. package/dist/esm/plugins/toolbar-lists-indentation/ui/onItemActivated.js +0 -47
  38. package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +0 -33
  39. package/dist/types/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.d.ts +0 -19
  40. package/dist/types/plugins/toolbar-lists-indentation/types.d.ts +0 -20
  41. package/dist/types/plugins/toolbar-lists-indentation/ui/Toolbar.d.ts +0 -4
  42. package/dist/types/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.d.ts +0 -9
  43. package/dist/types/plugins/toolbar-lists-indentation/ui/index.d.ts +0 -26
  44. package/dist/types/plugins/toolbar-lists-indentation/ui/onItemActivated.d.ts +0 -9
  45. package/dist/types-ts4.5/plugins/toolbar-lists-indentation/index.d.ts +0 -33
  46. package/dist/types-ts4.5/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.d.ts +0 -19
  47. package/dist/types-ts4.5/plugins/toolbar-lists-indentation/types.d.ts +0 -20
  48. package/dist/types-ts4.5/plugins/toolbar-lists-indentation/ui/Toolbar.d.ts +0 -4
  49. package/dist/types-ts4.5/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.d.ts +0 -9
  50. package/dist/types-ts4.5/plugins/toolbar-lists-indentation/ui/index.d.ts +0 -26
  51. package/dist/types-ts4.5/plugins/toolbar-lists-indentation/ui/onItemActivated.d.ts +0 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 189.4.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#43825](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43825) [`b21c6c1caa8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b21c6c1caa8) - [ux] [ED-20885] Group layout buttons in mediaSingle floating toolbar into a dropdown
8
+
9
+ ## 189.4.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [#43765](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43765) [`58e4cda8826`](https://bitbucket.org/atlassian/atlassian-frontend/commits/58e4cda8826) - ED-21102 Set focus on editor when inserting item by pressing enter from Element browser
14
+ - [#43757](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43757) [`e2719bd82fd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e2719bd82fd) - Fix allowMatchCase editor prop for ComposableEditor.
15
+ - [#43661](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43661) [`ebf781502ed`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ebf781502ed) - Extract toolbar-lists-indentation plugin code from editor-core and move into @atlaskit/editor-plugin-toolbar-lists-indentation.
16
+ - Updated dependencies
17
+
3
18
  ## 189.4.1
4
19
 
5
20
  ### Patch Changes
@@ -106,12 +106,6 @@ Object.defineProperty(exports, "pastePlugin", {
106
106
  return _paste.default;
107
107
  }
108
108
  });
109
- Object.defineProperty(exports, "toolbarListsIndentationPlugin", {
110
- enumerable: true,
111
- get: function get() {
112
- return _toolbarListsIndentation.default;
113
- }
114
- });
115
109
  Object.defineProperty(exports, "undoRedoPlugin", {
116
110
  enumerable: true,
117
111
  get: function get() {
@@ -128,7 +122,6 @@ var _clearMarksOnChangeToEmptyDocument = _interopRequireDefault(require("./clear
128
122
  var _collabEdit = _interopRequireDefault(require("./collab-edit"));
129
123
  var _extension = _interopRequireDefault(require("./extension"));
130
124
  var _jiraIssue = _interopRequireDefault(require("./jira-issue"));
131
- var _toolbarListsIndentation = _interopRequireDefault(require("./toolbar-lists-indentation"));
132
125
  var _paste = _interopRequireDefault(require("./paste"));
133
126
  var _breakout = _interopRequireDefault(require("./breakout"));
134
127
  var _alignment = _interopRequireDefault(require("./alignment"));
@@ -34,6 +34,7 @@ var _editorPluginGrid = require("@atlaskit/editor-plugin-grid");
34
34
  var _editorPluginCard = require("@atlaskit/editor-plugin-card");
35
35
  var _editorPluginLayout = require("@atlaskit/editor-plugin-layout");
36
36
  var _editorPluginTable = require("@atlaskit/editor-plugin-table");
37
+ var _editorPluginToolbarListsIndentation = require("@atlaskit/editor-plugin-toolbar-lists-indentation");
37
38
  var _editorPluginContentInsertion = require("@atlaskit/editor-plugin-content-insertion");
38
39
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
39
40
  var _editorPluginSaveOnEnter = require("@atlaskit/editor-plugin-save-on-enter");
@@ -357,7 +358,7 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
357
358
  return builder.add(plugin);
358
359
  }
359
360
  return builder;
360
- }).add([_plugins.toolbarListsIndentationPlugin, {
361
+ }).add([_editorPluginToolbarListsIndentation.toolbarListsIndentationPlugin, {
361
362
  showIndentationButtons: !!props.showIndentationButtons,
362
363
  allowHeadingAndParagraphIndentation: !!props.allowIndentation
363
364
  }]).add([_editorPluginInsertBlock.insertBlockPlugin, {
@@ -24,7 +24,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
24
24
  /** @jsx jsx */
25
25
 
26
26
  var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(function (props) {
27
- var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _editorAPI$analytics, _editorAPI$analytics2;
27
+ var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _editorAPI$analytics, _editorAPI$featureFla, _editorAPI$featureFla2, _editorAPI$analytics2;
28
28
  var _useState = (0, _react.useState)(false),
29
29
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
30
30
  shouldSplitToolbar = _useState2[0],
@@ -76,8 +76,12 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
76
76
  popupsScrollableElement: props.popupsScrollableElement,
77
77
  editorView: props.editorView,
78
78
  containerElement: props.containerElement,
79
- dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
80
- featureFlags: props.featureFlags,
79
+ dispatchAnalyticsEvent: props.dispatchAnalyticsEvent
80
+ // `allowMatchCase` comes through the preset, but not the feature flags
81
+ // prop with the `ComposableEditor` - grab the FFs from the editor API
82
+ // instead until we clean this up.
83
+ ,
84
+ featureFlags: (_editorAPI$featureFla = editorAPI === null || editorAPI === void 0 || (_editorAPI$featureFla2 = editorAPI.featureFlags) === null || _editorAPI$featureFla2 === void 0 ? void 0 : _editorAPI$featureFla2.sharedState.currentState()) !== null && _editorAPI$featureFla !== void 0 ? _editorAPI$featureFla : props.featureFlags,
81
85
  editorAnalyticsAPI: editorAPI === null || editorAPI === void 0 || (_editorAPI$analytics2 = editorAPI.analytics) === null || _editorAPI$analytics2 === void 0 ? void 0 : _editorAPI$analytics2.actions
82
86
  }) : null, !!props.customPrimaryToolbarComponents && 'after' in props.customPrimaryToolbarComponents ? props.customPrimaryToolbarComponents.after : props.customPrimaryToolbarComponents);
83
87
  (0, _react.useEffect)(function () {
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "189.4.1";
8
+ var version = exports.version = "189.4.3";
@@ -2,7 +2,6 @@ export { default as clearMarksOnChangeToEmptyDocumentPlugin } from './clear-mark
2
2
  export { default as collabEditPlugin } from './collab-edit';
3
3
  export { default as extensionPlugin } from './extension';
4
4
  export { default as jiraIssuePlugin } from './jira-issue';
5
- export { default as toolbarListsIndentationPlugin } from './toolbar-lists-indentation';
6
5
  export { default as pastePlugin } from './paste';
7
6
  export { default as breakoutPlugin } from './breakout';
8
7
  export { default as alignmentPlugin } from './alignment';
@@ -1,4 +1,4 @@
1
- import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, alignmentPlugin, customAutoformatPlugin, feedbackDialogPlugin, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
1
+ import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, jiraIssuePlugin, alignmentPlugin, customAutoformatPlugin, feedbackDialogPlugin, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
2
2
  import { tasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
3
3
  import { panelPlugin } from '@atlaskit/editor-plugin-panel';
4
4
  import { textColorPlugin } from '@atlaskit/editor-plugin-text-color';
@@ -24,6 +24,7 @@ import { gridPlugin } from '@atlaskit/editor-plugin-grid';
24
24
  import { cardPlugin } from '@atlaskit/editor-plugin-card';
25
25
  import { layoutPlugin } from '@atlaskit/editor-plugin-layout';
26
26
  import { tablesPlugin } from '@atlaskit/editor-plugin-table';
27
+ import { toolbarListsIndentationPlugin } from '@atlaskit/editor-plugin-toolbar-lists-indentation';
27
28
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
28
29
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
29
30
  import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
@@ -13,7 +13,7 @@ import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
13
13
  import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
14
14
  import { usePresetContext } from '../../../presets/context';
15
15
  export const EditorToolbar = /*#__PURE__*/React.memo(props => {
16
- var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _editorAPI$analytics, _editorAPI$analytics2;
16
+ var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _editorAPI$analytics, _editorAPI$featureFla, _editorAPI$featureFla2, _editorAPI$analytics2;
17
17
  const [shouldSplitToolbar, setShouldSplitToolbar] = useState(false);
18
18
  const editorAPI = usePresetContext();
19
19
 
@@ -62,8 +62,12 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
62
62
  popupsScrollableElement: props.popupsScrollableElement,
63
63
  editorView: props.editorView,
64
64
  containerElement: props.containerElement,
65
- dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
66
- featureFlags: props.featureFlags,
65
+ dispatchAnalyticsEvent: props.dispatchAnalyticsEvent
66
+ // `allowMatchCase` comes through the preset, but not the feature flags
67
+ // prop with the `ComposableEditor` - grab the FFs from the editor API
68
+ // instead until we clean this up.
69
+ ,
70
+ featureFlags: (_editorAPI$featureFla = editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$featureFla2 = editorAPI.featureFlags) === null || _editorAPI$featureFla2 === void 0 ? void 0 : _editorAPI$featureFla2.sharedState.currentState()) !== null && _editorAPI$featureFla !== void 0 ? _editorAPI$featureFla : props.featureFlags,
67
71
  editorAnalyticsAPI: editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$analytics2 = editorAPI.analytics) === null || _editorAPI$analytics2 === void 0 ? void 0 : _editorAPI$analytics2.actions
68
72
  }) : null, !!props.customPrimaryToolbarComponents && 'after' in props.customPrimaryToolbarComponents ? props.customPrimaryToolbarComponents.after : props.customPrimaryToolbarComponents);
69
73
  useEffect(() => {
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "189.4.1";
2
+ export const version = "189.4.3";
@@ -2,7 +2,6 @@ export { default as clearMarksOnChangeToEmptyDocumentPlugin } from './clear-mark
2
2
  export { default as collabEditPlugin } from './collab-edit';
3
3
  export { default as extensionPlugin } from './extension';
4
4
  export { default as jiraIssuePlugin } from './jira-issue';
5
- export { default as toolbarListsIndentationPlugin } from './toolbar-lists-indentation';
6
5
  export { default as pastePlugin } from './paste';
7
6
  export { default as breakoutPlugin } from './breakout';
8
7
  export { default as alignmentPlugin } from './alignment';
@@ -2,7 +2,7 @@ import _typeof from "@babel/runtime/helpers/typeof";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
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
- import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, alignmentPlugin, customAutoformatPlugin, feedbackDialogPlugin, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
5
+ import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, jiraIssuePlugin, alignmentPlugin, customAutoformatPlugin, feedbackDialogPlugin, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
6
6
  import { tasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
7
7
  import { panelPlugin } from '@atlaskit/editor-plugin-panel';
8
8
  import { textColorPlugin } from '@atlaskit/editor-plugin-text-color';
@@ -28,6 +28,7 @@ import { gridPlugin } from '@atlaskit/editor-plugin-grid';
28
28
  import { cardPlugin } from '@atlaskit/editor-plugin-card';
29
29
  import { layoutPlugin } from '@atlaskit/editor-plugin-layout';
30
30
  import { tablesPlugin } from '@atlaskit/editor-plugin-table';
31
+ import { toolbarListsIndentationPlugin } from '@atlaskit/editor-plugin-toolbar-lists-indentation';
31
32
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
32
33
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
33
34
  import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
@@ -14,7 +14,7 @@ import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
14
14
  import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
15
15
  import { usePresetContext } from '../../../presets/context';
16
16
  export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
17
- var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _editorAPI$analytics, _editorAPI$analytics2;
17
+ var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _editorAPI$analytics, _editorAPI$featureFla, _editorAPI$featureFla2, _editorAPI$analytics2;
18
18
  var _useState = useState(false),
19
19
  _useState2 = _slicedToArray(_useState, 2),
20
20
  shouldSplitToolbar = _useState2[0],
@@ -66,8 +66,12 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
66
66
  popupsScrollableElement: props.popupsScrollableElement,
67
67
  editorView: props.editorView,
68
68
  containerElement: props.containerElement,
69
- dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
70
- featureFlags: props.featureFlags,
69
+ dispatchAnalyticsEvent: props.dispatchAnalyticsEvent
70
+ // `allowMatchCase` comes through the preset, but not the feature flags
71
+ // prop with the `ComposableEditor` - grab the FFs from the editor API
72
+ // instead until we clean this up.
73
+ ,
74
+ featureFlags: (_editorAPI$featureFla = editorAPI === null || editorAPI === void 0 || (_editorAPI$featureFla2 = editorAPI.featureFlags) === null || _editorAPI$featureFla2 === void 0 ? void 0 : _editorAPI$featureFla2.sharedState.currentState()) !== null && _editorAPI$featureFla !== void 0 ? _editorAPI$featureFla : props.featureFlags,
71
75
  editorAnalyticsAPI: editorAPI === null || editorAPI === void 0 || (_editorAPI$analytics2 = editorAPI.analytics) === null || _editorAPI$analytics2 === void 0 ? void 0 : _editorAPI$analytics2.actions
72
76
  }) : null, !!props.customPrimaryToolbarComponents && 'after' in props.customPrimaryToolbarComponents ? props.customPrimaryToolbarComponents.after : props.customPrimaryToolbarComponents);
73
77
  useEffect(function () {
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "189.4.1";
2
+ export var version = "189.4.3";
@@ -2,7 +2,6 @@ export { default as clearMarksOnChangeToEmptyDocumentPlugin } from './clear-mark
2
2
  export { default as collabEditPlugin } from './collab-edit';
3
3
  export { default as extensionPlugin } from './extension';
4
4
  export { default as jiraIssuePlugin } from './jira-issue';
5
- export { default as toolbarListsIndentationPlugin } from './toolbar-lists-indentation';
6
5
  export { default as pastePlugin } from './paste';
7
6
  export { default as breakoutPlugin } from './breakout';
8
7
  export { default as alignmentPlugin } from './alignment';
@@ -2,7 +2,6 @@ export { default as clearMarksOnChangeToEmptyDocumentPlugin } from './clear-mark
2
2
  export { default as collabEditPlugin } from './collab-edit';
3
3
  export { default as extensionPlugin } from './extension';
4
4
  export { default as jiraIssuePlugin } from './jira-issue';
5
- export { default as toolbarListsIndentationPlugin } from './toolbar-lists-indentation';
6
5
  export { default as pastePlugin } from './paste';
7
6
  export { default as breakoutPlugin } from './breakout';
8
7
  export { default as alignmentPlugin } from './alignment';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "189.4.1",
3
+ "version": "189.4.3",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -49,7 +49,7 @@
49
49
  "@atlaskit/avatar-group": "^9.4.0",
50
50
  "@atlaskit/button": "^16.17.0",
51
51
  "@atlaskit/checkbox": "^13.0.0",
52
- "@atlaskit/code": "^15.0.0",
52
+ "@atlaskit/code": "^15.1.0",
53
53
  "@atlaskit/date": "^0.10.0",
54
54
  "@atlaskit/datetime-picker": "^13.0.0",
55
55
  "@atlaskit/editor-common": "^76.23.0",
@@ -104,10 +104,11 @@
104
104
  "@atlaskit/editor-plugin-selection-toolbar": "^0.1.0",
105
105
  "@atlaskit/editor-plugin-status": "^0.2.0",
106
106
  "@atlaskit/editor-plugin-submit-editor": "^0.1.0",
107
- "@atlaskit/editor-plugin-table": "^5.3.0",
107
+ "@atlaskit/editor-plugin-table": "^5.4.0",
108
108
  "@atlaskit/editor-plugin-tasks-and-decisions": "^0.2.0",
109
109
  "@atlaskit/editor-plugin-text-color": "^0.1.0",
110
110
  "@atlaskit/editor-plugin-text-formatting": "^0.4.0",
111
+ "@atlaskit/editor-plugin-toolbar-lists-indentation": "^0.2.0",
111
112
  "@atlaskit/editor-plugin-type-ahead": "^0.7.0",
112
113
  "@atlaskit/editor-plugin-unsupported-content": "^0.2.0",
113
114
  "@atlaskit/editor-plugin-width": "^0.2.0",
@@ -137,7 +138,7 @@
137
138
  "@atlaskit/textfield": "^6.0.0",
138
139
  "@atlaskit/theme": "^12.6.0",
139
140
  "@atlaskit/toggle": "^13.0.0",
140
- "@atlaskit/tokens": "^1.28.0",
141
+ "@atlaskit/tokens": "^1.29.0",
141
142
  "@atlaskit/tooltip": "^18.0.0",
142
143
  "@atlaskit/ufo": "^0.2.0",
143
144
  "@atlaskit/width-detector": "^4.1.0",
@@ -167,7 +168,7 @@
167
168
  "@af/integration-testing": "*",
168
169
  "@af/visual-regression": "*",
169
170
  "@atlaskit/analytics-listeners": "^8.7.0",
170
- "@atlaskit/collab-provider": "9.16.1",
171
+ "@atlaskit/collab-provider": "9.17.0",
171
172
  "@atlaskit/dropdown-menu": "^12.1.0",
172
173
  "@atlaskit/editor-extension-dropbox": "^0.4.0",
173
174
  "@atlaskit/editor-palette": "1.5.2",
@@ -181,7 +182,7 @@
181
182
  "@atlaskit/media-integration-test-helpers": "^3.0.0",
182
183
  "@atlaskit/media-test-helpers": "^33.0.0",
183
184
  "@atlaskit/menu": "^2.1.0",
184
- "@atlaskit/modal-dialog": "^12.8.0",
185
+ "@atlaskit/modal-dialog": "^12.9.0",
185
186
  "@atlaskit/renderer": "^108.17.0",
186
187
  "@atlaskit/synchrony-test-helpers": "^2.3.0",
187
188
  "@atlaskit/util-data-test": "^17.8.0",
@@ -191,7 +192,7 @@
191
192
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
192
193
  "@atlassian/editor-extension-link-create": "^0.8.0",
193
194
  "@atlassian/feature-flags-test-utils": "^0.1.1",
194
- "@atlassian/link-picker-plugins": "^23.2.0",
195
+ "@atlassian/link-picker-plugins": "^24.0.0",
195
196
  "@atlassian/search-provider": "2.4.8",
196
197
  "@atlassian/ufo": "^0.2.0",
197
198
  "@emotion/jest": "^11.8.0",
@@ -259,6 +260,10 @@
259
260
  "type": "boolean",
260
261
  "referenceOnly": "true"
261
262
  },
263
+ "platform.editor.media.grouped-layout": {
264
+ "type": "boolean",
265
+ "referenceOnly": "true"
266
+ },
262
267
  "platform.design-system-team.border-checkbox_nyoiu": {
263
268
  "type": "boolean",
264
269
  "referenceOnly": "true"
@@ -328,6 +333,10 @@
328
333
  },
329
334
  "platform.editor.multi-bodied-extension_0rygg": {
330
335
  "type": "boolean"
336
+ },
337
+ "platform.editor.table.alternative-sticky-header-logic": {
338
+ "type": "boolean",
339
+ "referenceOnly": "true"
331
340
  }
332
341
  }
333
342
  }
@@ -1,91 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.PrimaryToolbarComponent = PrimaryToolbarComponent;
8
- exports.default = void 0;
9
- var _react = _interopRequireDefault(require("react"));
10
- var _hooks = require("@atlaskit/editor-common/hooks");
11
- var _ui = _interopRequireDefault(require("./ui"));
12
- var _types = require("../../ui/Toolbar/types");
13
- var _indentationButtons = require("./pm-plugins/indentation-buttons");
14
- var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref) {
15
- var _api$featureFlags;
16
- var config = _ref.config,
17
- api = _ref.api;
18
- var _ref2 = config !== null && config !== void 0 ? config : {},
19
- _ref2$showIndentation = _ref2.showIndentationButtons,
20
- showIndentationButtons = _ref2$showIndentation === void 0 ? false : _ref2$showIndentation,
21
- _ref2$allowHeadingAnd = _ref2.allowHeadingAndParagraphIndentation,
22
- allowHeadingAndParagraphIndentation = _ref2$allowHeadingAnd === void 0 ? false : _ref2$allowHeadingAnd;
23
- var featureFlags = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
24
- return {
25
- name: 'toolbarListsIndentation',
26
- primaryToolbarComponent: function primaryToolbarComponent(_ref3) {
27
- var editorView = _ref3.editorView,
28
- popupsMountPoint = _ref3.popupsMountPoint,
29
- popupsBoundariesElement = _ref3.popupsBoundariesElement,
30
- popupsScrollableElement = _ref3.popupsScrollableElement,
31
- toolbarSize = _ref3.toolbarSize,
32
- disabled = _ref3.disabled,
33
- isToolbarReducedSpacing = _ref3.isToolbarReducedSpacing;
34
- var isSmall = toolbarSize < _types.ToolbarSize.L;
35
- return /*#__PURE__*/_react.default.createElement(PrimaryToolbarComponent, {
36
- featureFlags: featureFlags,
37
- popupsMountPoint: popupsMountPoint,
38
- popupsBoundariesElement: popupsBoundariesElement,
39
- popupsScrollableElement: popupsScrollableElement,
40
- isSmall: isSmall,
41
- isToolbarReducedSpacing: isToolbarReducedSpacing,
42
- disabled: disabled,
43
- editorView: editorView,
44
- showIndentationButtons: showIndentationButtons,
45
- pluginInjectionApi: api,
46
- allowHeadingAndParagraphIndentation: allowHeadingAndParagraphIndentation
47
- });
48
- }
49
- };
50
- };
51
- function PrimaryToolbarComponent(_ref4) {
52
- var featureFlags = _ref4.featureFlags,
53
- popupsMountPoint = _ref4.popupsMountPoint,
54
- popupsBoundariesElement = _ref4.popupsBoundariesElement,
55
- popupsScrollableElement = _ref4.popupsScrollableElement,
56
- isSmall = _ref4.isSmall,
57
- isToolbarReducedSpacing = _ref4.isToolbarReducedSpacing,
58
- disabled = _ref4.disabled,
59
- editorView = _ref4.editorView,
60
- showIndentationButtons = _ref4.showIndentationButtons,
61
- pluginInjectionApi = _ref4.pluginInjectionApi,
62
- allowHeadingAndParagraphIndentation = _ref4.allowHeadingAndParagraphIndentation;
63
- var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['list', 'indentation', 'taskDecision']),
64
- listState = _useSharedPluginState.listState,
65
- indentationState = _useSharedPluginState.indentationState,
66
- taskDecisionState = _useSharedPluginState.taskDecisionState;
67
- var toolbarListsIndentationState = (0, _indentationButtons.getIndentationButtonsState)(editorView.state, allowHeadingAndParagraphIndentation, taskDecisionState, indentationState, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.actions.isInsideListItem);
68
- if (!listState) {
69
- return null;
70
- }
71
- return /*#__PURE__*/_react.default.createElement(_ui.default, {
72
- featureFlags: featureFlags,
73
- isSmall: isSmall,
74
- isReducedSpacing: isToolbarReducedSpacing,
75
- disabled: disabled,
76
- editorView: editorView,
77
- popupsMountPoint: popupsMountPoint,
78
- popupsBoundariesElement: popupsBoundariesElement,
79
- popupsScrollableElement: popupsScrollableElement,
80
- bulletListActive: listState.bulletListActive,
81
- bulletListDisabled: listState.bulletListDisabled,
82
- orderedListActive: listState.orderedListActive,
83
- orderedListDisabled: listState.orderedListDisabled,
84
- showIndentationButtons: !!showIndentationButtons,
85
- indentDisabled: toolbarListsIndentationState.indentDisabled,
86
- outdentDisabled: toolbarListsIndentationState.outdentDisabled,
87
- indentationStateNode: toolbarListsIndentationState === null || toolbarListsIndentationState === void 0 ? void 0 : toolbarListsIndentationState.node,
88
- pluginInjectionApi: pluginInjectionApi
89
- });
90
- }
91
- var _default = exports.default = toolbarListsIndentationPlugin;
@@ -1,56 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getIndentationButtonsState = getIndentationButtonsState;
7
- var _utils = require("@atlaskit/editor-prosemirror/utils");
8
- var _lists = require("@atlaskit/editor-common/lists");
9
- var _indentation = require("@atlaskit/editor-common/indentation");
10
- function getIndentationButtonsState(editorState, allowHeadingAndParagraphIndentation, taskDecisionState, indentationState, isInsideListItem) {
11
- var _indentationState$isI;
12
- var state = {
13
- indentDisabled: true,
14
- outdentDisabled: true,
15
- node: null
16
- };
17
- var selection = editorState.selection;
18
-
19
- // Handle bullet and numbered lists seperately as they do
20
- // not use the indentation mark.
21
- // Check for lists before paragraphs and headings in case
22
- // the selection is in a list nested in a layout column.
23
- if (isInsideListItem !== null && isInsideListItem !== void 0 && isInsideListItem(editorState.tr)) {
24
- var _getListItemAttribute = (0, _lists.getListItemAttributes)(selection.$head),
25
- indentLevel = _getListItemAttribute.indentLevel,
26
- itemIndex = _getListItemAttribute.itemIndex;
27
- return {
28
- // List indent levels are zero indexed so we need to subtract 1
29
- indentDisabled: itemIndex === 0 || indentLevel >= _indentation.MAX_INDENTATION_LEVEL - 1,
30
- outdentDisabled: false,
31
- node: 'list'
32
- };
33
- }
34
-
35
- // Handle tasks seperately as they do not use the indentation mark
36
- // and have different behaviour for outdent compared to lists
37
- if (taskDecisionState !== null && taskDecisionState !== void 0 && taskDecisionState.isInsideTask) {
38
- return {
39
- indentDisabled: taskDecisionState.indentDisabled,
40
- outdentDisabled: taskDecisionState.outdentDisabled,
41
- node: 'taskList'
42
- };
43
- }
44
- var isTopLevelParagraphOrHeading = selection.$from.depth === 1;
45
- var isInLayoutNode = (0, _utils.hasParentNodeOfType)(editorState.schema.nodes.layoutColumn)(selection) &&
46
- // depth of non-nested paragraphs and headings in layouts will always be 3
47
- selection.$from.depth === 3;
48
- if (allowHeadingAndParagraphIndentation && ((_indentationState$isI = indentationState === null || indentationState === void 0 ? void 0 : indentationState.isIndentationAllowed) !== null && _indentationState$isI !== void 0 ? _indentationState$isI : false) && (isTopLevelParagraphOrHeading || isInLayoutNode) && indentationState) {
49
- return {
50
- indentDisabled: indentationState.indentDisabled,
51
- outdentDisabled: indentationState.outdentDisabled,
52
- node: 'paragraph_heading'
53
- };
54
- }
55
- return state;
56
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
@@ -1,135 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.Toolbar = Toolbar;
9
- var _react = require("@emotion/react");
10
- var _reactIntlNext = require("react-intl-next");
11
- var _bulletList = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/bullet-list"));
12
- var _numberList = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/number-list"));
13
- var _indent = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/indent"));
14
- var _outdent = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/outdent"));
15
- var _keymaps = require("../../../keymaps");
16
- var _ToolbarButton = _interopRequireWildcard(require("../../../ui/ToolbarButton"));
17
- var _messages = require("@atlaskit/editor-common/messages");
18
- var _styles = require("@atlaskit/editor-common/styles");
19
- var _keymaps2 = require("@atlaskit/editor-common/keymaps");
20
- var _react2 = require("react");
21
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
22
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
- /** @jsx jsx */
24
-
25
- function Toolbar(props) {
26
- var _useIntl = (0, _reactIntlNext.useIntl)(),
27
- formatMessage = _useIntl.formatMessage;
28
- var indentButtonRef = (0, _react2.useRef)(null);
29
- var outdentButtonRef = (0, _react2.useRef)(null);
30
- var disabled = props.disabled,
31
- isReducedSpacing = props.isReducedSpacing,
32
- bulletListActive = props.bulletListActive,
33
- bulletListDisabled = props.bulletListDisabled,
34
- orderedListActive = props.orderedListActive,
35
- orderedListDisabled = props.orderedListDisabled,
36
- showIndentationButtons = props.showIndentationButtons,
37
- indentDisabled = props.indentDisabled,
38
- outdentDisabled = props.outdentDisabled,
39
- onItemActivated = props.onItemActivated;
40
- var labelUnorderedList = formatMessage(_messages.listMessages.unorderedList);
41
- var labelOrderedList = formatMessage(_messages.listMessages.orderedList);
42
- var indentMessage = formatMessage(_messages.indentationMessages.indent);
43
- var outdentMessage = formatMessage(_messages.indentationMessages.outdent);
44
- var isIndentButtonFocused = document.activeElement === indentButtonRef.current;
45
- var isOutdentButtonFocused = document.activeElement === outdentButtonRef.current;
46
- var handleOnItemActivated = function handleOnItemActivated(buttonName) {
47
- return function (event) {
48
- return onItemActivated({
49
- editorView: props.editorView,
50
- buttonName: buttonName
51
- });
52
- };
53
- };
54
- (0, _react2.useEffect)(function () {
55
- if (isIndentButtonFocused && indentDisabled && outdentButtonRef.current) {
56
- outdentButtonRef.current.focus();
57
- }
58
- }, [indentButtonRef, indentDisabled, isIndentButtonFocused]);
59
- (0, _react2.useEffect)(function () {
60
- if (isOutdentButtonFocused && outdentDisabled && indentButtonRef.current) {
61
- indentButtonRef.current.focus();
62
- }
63
- }, [outdentButtonRef, outdentDisabled, isOutdentButtonFocused]);
64
- return (0, _react.jsx)("span", {
65
- css: _styles.buttonGroupStyle
66
- }, (0, _react.jsx)(_ToolbarButton.default, {
67
- buttonId: _ToolbarButton.TOOLBAR_BUTTON.BULLET_LIST,
68
- testId: labelUnorderedList,
69
- spacing: isReducedSpacing ? 'none' : 'default',
70
- onClick: handleOnItemActivated('bullet_list'),
71
- selected: bulletListActive,
72
- "aria-pressed": bulletListActive,
73
- "aria-label": (0, _keymaps.tooltip)(_keymaps.toggleBulletList, labelUnorderedList),
74
- "aria-keyshortcuts": (0, _keymaps2.getAriaKeyshortcuts)(_keymaps.toggleBulletList),
75
- disabled: bulletListDisabled || disabled,
76
- title: (0, _react.jsx)(_keymaps.ToolTipContent, {
77
- description: labelUnorderedList,
78
- keymap: _keymaps.toggleBulletList
79
- }),
80
- iconBefore: (0, _react.jsx)(_bulletList.default, {
81
- label: ""
82
- })
83
- }), (0, _react.jsx)(_ToolbarButton.default, {
84
- buttonId: _ToolbarButton.TOOLBAR_BUTTON.ORDERED_LIST,
85
- testId: labelOrderedList,
86
- spacing: isReducedSpacing ? 'none' : 'default',
87
- onClick: handleOnItemActivated('ordered_list'),
88
- selected: orderedListActive,
89
- "aria-pressed": orderedListActive,
90
- "aria-label": (0, _keymaps.tooltip)(_keymaps.toggleOrderedList, labelOrderedList),
91
- "aria-keyshortcuts": (0, _keymaps2.getAriaKeyshortcuts)(_keymaps.toggleOrderedList),
92
- disabled: orderedListDisabled || disabled,
93
- title: (0, _react.jsx)(_keymaps.ToolTipContent, {
94
- description: labelOrderedList,
95
- keymap: _keymaps.toggleOrderedList
96
- }),
97
- iconBefore: (0, _react.jsx)(_numberList.default, {
98
- label: ""
99
- })
100
- }), showIndentationButtons && (0, _react.jsx)(_ToolbarButton.default, {
101
- buttonId: _ToolbarButton.TOOLBAR_BUTTON.OUTDENT,
102
- testId: _ToolbarButton.TOOLBAR_BUTTON.OUTDENT,
103
- ref: outdentButtonRef,
104
- spacing: isReducedSpacing ? 'none' : 'default',
105
- onClick: handleOnItemActivated('outdent'),
106
- iconBefore: (0, _react.jsx)(_outdent.default, {
107
- label: ""
108
- }),
109
- disabled: outdentDisabled || disabled,
110
- "aria-label": (0, _keymaps.tooltip)(_keymaps.outdent, outdentMessage),
111
- "aria-keyshortcuts": (0, _keymaps2.getAriaKeyshortcuts)(_keymaps.outdent),
112
- title: (0, _react.jsx)(_keymaps.ToolTipContent, {
113
- description: outdentMessage,
114
- keymap: _keymaps.outdent
115
- })
116
- }), showIndentationButtons && (0, _react.jsx)(_ToolbarButton.default, {
117
- buttonId: _ToolbarButton.TOOLBAR_BUTTON.INDENT,
118
- testId: _ToolbarButton.TOOLBAR_BUTTON.INDENT,
119
- ref: indentButtonRef,
120
- spacing: isReducedSpacing ? 'none' : 'default',
121
- onClick: handleOnItemActivated('indent'),
122
- iconBefore: (0, _react.jsx)(_indent.default, {
123
- label: ""
124
- }),
125
- disabled: indentDisabled || disabled,
126
- "aria-label": (0, _keymaps.tooltip)(_keymaps.indent, indentMessage),
127
- "aria-keyshortcuts": (0, _keymaps2.getAriaKeyshortcuts)(_keymaps.indent),
128
- title: (0, _react.jsx)(_keymaps.ToolTipContent, {
129
- description: indentMessage,
130
- keymap: _keymaps.indent
131
- })
132
- }), (0, _react.jsx)("span", {
133
- css: _styles.separatorStyles
134
- }));
135
- }