@atlaskit/editor-plugin-paste-options-toolbar 0.3.7 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/editor-plugin-paste-options-toolbar
2
2
 
3
+ ## 0.3.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#71136](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/71136) [`c803fea1e6a4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c803fea1e6a4) - Move all plugin translations to editor-common
8
+ - Updated dependencies
9
+
3
10
  ## 0.3.7
4
11
 
5
12
  ### Patch Changes
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.isToolbarVisible = exports.getToolbarMenuConfig = exports.buildToolbar = void 0;
8
+ var _messages = require("@atlaskit/editor-common/messages");
8
9
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
9
10
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
11
  var _commands = require("./commands");
11
- var _messages = require("./messages");
12
12
  var _constants = require("./pm-plugins/constants");
13
13
  var _types = require("./types");
14
14
  var _pasteIcon = _interopRequireDefault(require("./ui/paste-icon"));
@@ -40,18 +40,18 @@ var isToolbarVisible = exports.isToolbarVisible = function isToolbarVisible(stat
40
40
  var getToolbarMenuConfig = exports.getToolbarMenuConfig = function getToolbarMenuConfig(pluginState, intl, editorAnalyticsAPI) {
41
41
  var options = [{
42
42
  id: 'editor.paste.richText',
43
- title: intl.formatMessage(_messages.messages.richText),
43
+ title: intl.formatMessage(_messages.pasteOptionsToolbarMessages.richText),
44
44
  selected: pluginState.selectedOption === _types.ToolbarDropdownOption.RichText,
45
45
  hidden: pluginState.isPlainText,
46
46
  onClick: (0, _commands.changeToRichTextWithAnalytics)(editorAnalyticsAPI)()
47
47
  }, {
48
48
  id: 'editor.paste.markdown',
49
- title: intl.formatMessage(_messages.messages.markdown),
49
+ title: intl.formatMessage(_messages.pasteOptionsToolbarMessages.markdown),
50
50
  selected: pluginState.selectedOption === _types.ToolbarDropdownOption.Markdown,
51
51
  onClick: (0, _commands.changeToMarkdownWithAnalytics)(editorAnalyticsAPI, pluginState.plaintext.length)()
52
52
  }, {
53
53
  id: 'editor.paste.plainText',
54
- title: intl.formatMessage(_messages.messages.plainText),
54
+ title: intl.formatMessage(_messages.pasteOptionsToolbarMessages.plainText),
55
55
  selected: pluginState.selectedOption === _types.ToolbarDropdownOption.PlainText,
56
56
  onClick: (0, _commands.changeToPlainTextWithAnalytics)(editorAnalyticsAPI, pluginState.plaintext.length)()
57
57
  }];
@@ -60,7 +60,7 @@ var getToolbarMenuConfig = exports.getToolbarMenuConfig = function getToolbarMen
60
60
  icon: _pasteIcon.default,
61
61
  type: 'dropdown',
62
62
  testId: _constants.PASTE_OPTIONS_TEST_ID,
63
- title: intl.formatMessage(_messages.messages.pasteOptions),
63
+ title: intl.formatMessage(_messages.pasteOptionsToolbarMessages.pasteOptions),
64
64
  options: options,
65
65
  onToggle: onToggleHandler
66
66
  };
@@ -74,7 +74,7 @@ var buildToolbar = exports.buildToolbar = function buildToolbar(state, intl, edi
74
74
  var pluginState = _types.pasteOptionsPluginKey.getState(state);
75
75
  var menu = getToolbarMenuConfig(pluginState, intl, editorAnalyticsAPI);
76
76
  return {
77
- title: intl.formatMessage(_messages.messages.pasteOptions),
77
+ title: intl.formatMessage(_messages.pasteOptionsToolbarMessages.pasteOptions),
78
78
  nodeType: validNodes,
79
79
  zIndex: _editorSharedStyles.akEditorFloatingPanelZIndex,
80
80
  className: _constants.PASTE_TOOLBAR_CLASS,
@@ -86,7 +86,7 @@ var buildToolbar = exports.buildToolbar = function buildToolbar(state, intl, edi
86
86
  var onPositionCalculated = function onPositionCalculated(editorView, nextPos) {
87
87
  var from = editorView.state.selection.from;
88
88
  var fromCoords = editorView.coordsAtPos(from);
89
- var toolbar = document.querySelector("div[aria-label=\"".concat(_messages.messages.pasteOptions.defaultMessage, "\"]"));
89
+ var toolbar = document.querySelector("div[aria-label=\"".concat(_messages.pasteOptionsToolbarMessages.pasteOptions.defaultMessage, "\"]"));
90
90
  var offsetParent = (toolbar === null || toolbar === void 0 ? void 0 : toolbar.offsetParent) || editorView.dom;
91
91
  var offsetParentRect = offsetParent === null || offsetParent === void 0 ? void 0 : offsetParent.getBoundingClientRect();
92
92
  var offsetTop = (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.top) || 0;
@@ -1,7 +1,7 @@
1
+ import { pasteOptionsToolbarMessages as messages } from '@atlaskit/editor-common/messages';
1
2
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
2
3
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
4
  import { changeToMarkdownWithAnalytics, changeToPlainTextWithAnalytics, changeToRichTextWithAnalytics, dropdownClickHandler } from './commands';
4
- import { messages } from './messages';
5
5
  import { PASTE_OPTIONS_TEST_ID, PASTE_TOOLBAR_CLASS, PASTE_TOOLBAR_ITEM_CLASS } from './pm-plugins/constants';
6
6
  import { pasteOptionsPluginKey, ToolbarDropdownOption } from './types';
7
7
  import EditorPasteIcon from './ui/paste-icon';
@@ -1,7 +1,7 @@
1
+ import { pasteOptionsToolbarMessages as messages } from '@atlaskit/editor-common/messages';
1
2
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
2
3
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
4
  import { changeToMarkdownWithAnalytics, changeToPlainTextWithAnalytics, changeToRichTextWithAnalytics, dropdownClickHandler } from './commands';
4
- import { messages } from './messages';
5
5
  import { PASTE_OPTIONS_TEST_ID, PASTE_TOOLBAR_CLASS, PASTE_TOOLBAR_ITEM_CLASS } from './pm-plugins/constants';
6
6
  import { pasteOptionsPluginKey, ToolbarDropdownOption } from './types';
7
7
  import EditorPasteIcon from './ui/paste-icon';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-paste-options-toolbar",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "Paste options toolbar for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,7 +34,7 @@
34
34
  "./styles": "./src/styles.ts"
35
35
  },
36
36
  "dependencies": {
37
- "@atlaskit/editor-common": "^77.1.0",
37
+ "@atlaskit/editor-common": "^77.3.0",
38
38
  "@atlaskit/editor-markdown-transformer": "^5.3.0",
39
39
  "@atlaskit/editor-plugin-analytics": "^0.4.0",
40
40
  "@atlaskit/editor-plugin-paste": "^0.2.0",
@@ -1,29 +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
- pasteOptions: {
10
- id: 'fabric.editor.pasteOptions',
11
- defaultMessage: 'Paste options floating controls',
12
- description: 'Opens a menu with additional paste options'
13
- },
14
- plainText: {
15
- id: 'fabric.editor.plainText',
16
- defaultMessage: 'Use plain text',
17
- description: 'Converts pasted text into plain text'
18
- },
19
- markdown: {
20
- id: 'fabric.editor.useMarkdown',
21
- defaultMessage: 'Use Markdown',
22
- description: 'Converts pasted text into Markdown'
23
- },
24
- richText: {
25
- id: 'fabric.editor.richText',
26
- defaultMessage: 'Use rich text',
27
- description: 'Converts pasted text into Rich text'
28
- }
29
- });
@@ -1,23 +0,0 @@
1
- import { defineMessages } from 'react-intl-next';
2
- export const messages = defineMessages({
3
- pasteOptions: {
4
- id: 'fabric.editor.pasteOptions',
5
- defaultMessage: 'Paste options floating controls',
6
- description: 'Opens a menu with additional paste options'
7
- },
8
- plainText: {
9
- id: 'fabric.editor.plainText',
10
- defaultMessage: 'Use plain text',
11
- description: 'Converts pasted text into plain text'
12
- },
13
- markdown: {
14
- id: 'fabric.editor.useMarkdown',
15
- defaultMessage: 'Use Markdown',
16
- description: 'Converts pasted text into Markdown'
17
- },
18
- richText: {
19
- id: 'fabric.editor.richText',
20
- defaultMessage: 'Use rich text',
21
- description: 'Converts pasted text into Rich text'
22
- }
23
- });
@@ -1,23 +0,0 @@
1
- import { defineMessages } from 'react-intl-next';
2
- export var messages = defineMessages({
3
- pasteOptions: {
4
- id: 'fabric.editor.pasteOptions',
5
- defaultMessage: 'Paste options floating controls',
6
- description: 'Opens a menu with additional paste options'
7
- },
8
- plainText: {
9
- id: 'fabric.editor.plainText',
10
- defaultMessage: 'Use plain text',
11
- description: 'Converts pasted text into plain text'
12
- },
13
- markdown: {
14
- id: 'fabric.editor.useMarkdown',
15
- defaultMessage: 'Use Markdown',
16
- description: 'Converts pasted text into Markdown'
17
- },
18
- richText: {
19
- id: 'fabric.editor.richText',
20
- defaultMessage: 'Use rich text',
21
- description: 'Converts pasted text into Rich text'
22
- }
23
- });
@@ -1,22 +0,0 @@
1
- export declare const messages: {
2
- pasteOptions: {
3
- id: string;
4
- defaultMessage: string;
5
- description: string;
6
- };
7
- plainText: {
8
- id: string;
9
- defaultMessage: string;
10
- description: string;
11
- };
12
- markdown: {
13
- id: string;
14
- defaultMessage: string;
15
- description: string;
16
- };
17
- richText: {
18
- id: string;
19
- defaultMessage: string;
20
- description: string;
21
- };
22
- };
@@ -1,22 +0,0 @@
1
- export declare const messages: {
2
- pasteOptions: {
3
- id: string;
4
- defaultMessage: string;
5
- description: string;
6
- };
7
- plainText: {
8
- id: string;
9
- defaultMessage: string;
10
- description: string;
11
- };
12
- markdown: {
13
- id: string;
14
- defaultMessage: string;
15
- description: string;
16
- };
17
- richText: {
18
- id: string;
19
- defaultMessage: string;
20
- description: string;
21
- };
22
- };