@atlaskit/editor-plugin-panel 3.2.1 → 3.2.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-plugin-panel
2
2
 
3
+ ## 3.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 3.2.2
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 3.2.1
4
16
 
5
17
  ### Patch Changes
@@ -66,6 +66,8 @@ var PanelIcon = exports.PanelIcon = function PanelIcon(props) {
66
66
  });
67
67
  };
68
68
  var PanelNodeView = /*#__PURE__*/function () {
69
+ // Ignored via go/ees005
70
+ // eslint-disable-next-line @typescript-eslint/max-params
69
71
  function PanelNodeView(node, view, getPos, pluginOptions, api, nodeViewPortalProviderAPI, providerFactory) {
70
72
  var _this = this;
71
73
  (0, _classCallCheck2.default)(this, PanelNodeView);
@@ -79,8 +81,14 @@ var PanelNodeView = /*#__PURE__*/function () {
79
81
  dom = _DOMSerializer$render.dom,
80
82
  contentDOM = _DOMSerializer$render.contentDOM;
81
83
  this.getPos = getPos;
84
+ // Ignored via go/ees005
85
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
82
86
  this.dom = dom;
87
+ // Ignored via go/ees005
88
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
83
89
  this.contentDOM = contentDOM;
90
+ // Ignored via go/ees005
91
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
84
92
  this.icon = this.dom.querySelector(".".concat(_panel.PanelSharedCssClassName.icon));
85
93
  if (!this.icon) {
86
94
  return;
@@ -126,7 +134,10 @@ var PanelNodeView = /*#__PURE__*/function () {
126
134
  }
127
135
  }]);
128
136
  }();
129
- var getPanelNodeView = exports.getPanelNodeView = function getPanelNodeView(pluginOptions, api, nodeViewPortalProviderAPI, providerFactory) {
137
+ var getPanelNodeView = exports.getPanelNodeView = function getPanelNodeView(pluginOptions, api, nodeViewPortalProviderAPI, providerFactory
138
+ // Ignored via go/ees005
139
+ // eslint-disable-next-line @typescript-eslint/max-params
140
+ ) {
130
141
  return function (node, view, getPos) {
131
142
  return new PanelNodeView(node, view, getPos, pluginOptions, api, nodeViewPortalProviderAPI, providerFactory);
132
143
  };
@@ -10,7 +10,10 @@ var _selection = require("@atlaskit/editor-common/selection");
10
10
  var _panel2 = require("../nodeviews/panel");
11
11
  var _panelPluginType = require("../panelPluginType");
12
12
  var _utils = require("./utils/utils");
13
- var createPlugin = exports.createPlugin = function createPlugin(dispatch, providerFactory, pluginOptions, api, nodeViewPortalProviderAPI) {
13
+ var createPlugin = exports.createPlugin = function createPlugin(dispatch, providerFactory, pluginOptions, api, nodeViewPortalProviderAPI
14
+ // Ignored via go/ees005
15
+ // eslint-disable-next-line @typescript-eslint/max-params
16
+ ) {
14
17
  var _pluginOptions$useLon = pluginOptions.useLongPressSelection,
15
18
  useLongPressSelection = _pluginOptions$useLon === void 0 ? false : _pluginOptions$useLon;
16
19
  return new _safePlugin.SafePlugin({
@@ -54,7 +54,10 @@ var panelIconMap = exports.panelIconMap = (0, _defineProperty2.default)((0, _def
54
54
  shortName: ':tip:',
55
55
  id: 'atlassian-tip'
56
56
  });
57
- var getToolbarItems = exports.getToolbarItems = function getToolbarItems(formatMessage, panelNodeType, isCustomPanelEnabled, isCustomPanelEditable, providerFactory, hoverDecoration, editorAnalyticsAPI, activePanelType, activePanelColor, activePanelIcon, state) {
57
+ var getToolbarItems = exports.getToolbarItems = function getToolbarItems(formatMessage, panelNodeType, isCustomPanelEnabled, isCustomPanelEditable, providerFactory, hoverDecoration, editorAnalyticsAPI, activePanelType, activePanelColor, activePanelIcon, state
58
+ // Ignored via go/ees005
59
+ // eslint-disable-next-line @typescript-eslint/max-params
60
+ ) {
58
61
  // TODO: ED-14403 investigate why these titles are not getting translated for the tooltips
59
62
  var items = [{
60
63
  id: 'editor.panel.info',
@@ -279,7 +282,10 @@ var getToolbarItems = exports.getToolbarItems = function getToolbarItems(formatM
279
282
  var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(state, intl) {
280
283
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
281
284
  var providerFactory = arguments.length > 3 ? arguments[3] : undefined;
282
- var api = arguments.length > 4 ? arguments[4] : undefined;
285
+ var api
286
+ // Ignored via go/ees005
287
+ // eslint-disable-next-line @typescript-eslint/max-params
288
+ = arguments.length > 4 ? arguments[4] : undefined;
283
289
  var formatMessage = intl.formatMessage;
284
290
  var panelObject = (0, _utils2.findPanel)(state);
285
291
  if (panelObject) {
@@ -47,15 +47,15 @@ export const changePanelType = editorAnalyticsAPI => (panelType, panelOptions =
47
47
  if (panelNode === undefined) {
48
48
  return false;
49
49
  }
50
- let newType = panelType;
51
- let previousType = panelNode.node.attrs.panelType;
50
+ const newType = panelType;
51
+ const previousType = panelNode.node.attrs.panelType;
52
52
  let newTr;
53
53
  if (allowCustomPanel) {
54
- let previousColor = panelNode.node.attrs.panelType === 'custom' ? panelNode.node.attrs.panelColor || 'none' : getPanelTypeBackgroundNoTokens(previousType);
55
- let previousIcon = panelNode.node.attrs.panelIcon;
56
- let previousIconId = panelNode.node.attrs.panelIconId;
57
- let previousIconText = panelNode.node.attrs.panelIconText;
58
- let newPanelOptions = {
54
+ const previousColor = panelNode.node.attrs.panelType === 'custom' ? panelNode.node.attrs.panelColor || 'none' : getPanelTypeBackgroundNoTokens(previousType);
55
+ const previousIcon = panelNode.node.attrs.panelIcon;
56
+ const previousIconId = panelNode.node.attrs.panelIconId;
57
+ const previousIconText = panelNode.node.attrs.panelIconText;
58
+ const newPanelOptions = {
59
59
  color: previousColor,
60
60
  emoji: previousIcon,
61
61
  emojiId: previousIconId,
@@ -62,6 +62,8 @@ export const PanelIcon = props => {
62
62
  });
63
63
  };
64
64
  class PanelNodeView {
65
+ // Ignored via go/ees005
66
+ // eslint-disable-next-line @typescript-eslint/max-params
65
67
  constructor(node, view, getPos, pluginOptions, api, nodeViewPortalProviderAPI, providerFactory) {
66
68
  this.nodeViewPortalProviderAPI = nodeViewPortalProviderAPI;
67
69
  this.providerFactory = providerFactory;
@@ -74,8 +76,14 @@ class PanelNodeView {
74
76
  contentDOM
75
77
  } = DOMSerializer.renderSpec(document, panelAttrsToDom(node.attrs, pluginOptions.allowCustomPanel || false));
76
78
  this.getPos = getPos;
79
+ // Ignored via go/ees005
80
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
77
81
  this.dom = dom;
82
+ // Ignored via go/ees005
83
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
78
84
  this.contentDOM = contentDOM;
85
+ // Ignored via go/ees005
86
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
79
87
  this.icon = this.dom.querySelector(`.${PanelSharedCssClassName.icon}`);
80
88
  if (!this.icon) {
81
89
  return;
@@ -114,6 +122,9 @@ class PanelNodeView {
114
122
  }
115
123
  }
116
124
  }
117
- export const getPanelNodeView = (pluginOptions, api, nodeViewPortalProviderAPI, providerFactory) => (node, view, getPos) => {
125
+ export const getPanelNodeView = (pluginOptions, api, nodeViewPortalProviderAPI, providerFactory
126
+ // Ignored via go/ees005
127
+ // eslint-disable-next-line @typescript-eslint/max-params
128
+ ) => (node, view, getPos) => {
118
129
  return new PanelNodeView(node, view, getPos, pluginOptions, api, nodeViewPortalProviderAPI, providerFactory);
119
130
  };
@@ -43,7 +43,7 @@ const panelPlugin = ({
43
43
  quickInsert: ({
44
44
  formatMessage
45
45
  }) => {
46
- let quickInsertOptions = [{
46
+ const quickInsertOptions = [{
47
47
  id: 'infopanel',
48
48
  title: formatMessage(blockTypeMessages.infoPanel),
49
49
  keywords: ['panel'],
@@ -4,7 +4,10 @@ import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
4
4
  import { getPanelNodeView } from '../nodeviews/panel';
5
5
  import { pluginKey } from '../panelPluginType';
6
6
  import { handleCut } from './utils/utils';
7
- export const createPlugin = (dispatch, providerFactory, pluginOptions, api, nodeViewPortalProviderAPI) => {
7
+ export const createPlugin = (dispatch, providerFactory, pluginOptions, api, nodeViewPortalProviderAPI
8
+ // Ignored via go/ees005
9
+ // eslint-disable-next-line @typescript-eslint/max-params
10
+ ) => {
8
11
  const {
9
12
  useLongPressSelection = false
10
13
  } = pluginOptions;
@@ -48,7 +48,10 @@ export const panelIconMap = {
48
48
  id: 'atlassian-tip'
49
49
  }
50
50
  };
51
- export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabled, isCustomPanelEditable, providerFactory, hoverDecoration, editorAnalyticsAPI, activePanelType, activePanelColor, activePanelIcon, state) => {
51
+ export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabled, isCustomPanelEditable, providerFactory, hoverDecoration, editorAnalyticsAPI, activePanelType, activePanelColor, activePanelIcon, state
52
+ // Ignored via go/ees005
53
+ // eslint-disable-next-line @typescript-eslint/max-params
54
+ ) => {
52
55
  // TODO: ED-14403 investigate why these titles are not getting translated for the tooltips
53
56
  const items = [{
54
57
  id: 'editor.panel.info',
@@ -102,7 +105,7 @@ export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabl
102
105
  if (panelNode === undefined) {
103
106
  return false;
104
107
  }
105
- let previousColor = panelNode.node.attrs.panelType === 'custom' ? panelNode.node.attrs.panelColor || 'none' : getPanelTypeBackgroundNoTokens(panelNode.node.attrs.panelType);
108
+ const previousColor = panelNode.node.attrs.panelType === 'custom' ? panelNode.node.attrs.panelColor || 'none' : getPanelTypeBackgroundNoTokens(panelNode.node.attrs.panelType);
106
109
  const emojiInfo = panelNode.node.attrs.panelType;
107
110
  const panelEmoji = panelIconMap[emojiInfo];
108
111
  const previousEmoji = panelEmoji ? {
@@ -137,7 +140,7 @@ export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabl
137
140
  if (panelNode === undefined) {
138
141
  return false;
139
142
  }
140
- let previousIcon = panelNode.node.attrs.panelIcon || '';
143
+ const previousIcon = panelNode.node.attrs.panelIcon || '';
141
144
  if (previousIcon === emoji.shortName) {
142
145
  changePanelType(editorAnalyticsAPI)(PanelType.CUSTOM, {
143
146
  emoji: emoji.shortName,
@@ -260,7 +263,10 @@ export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabl
260
263
  });
261
264
  return items;
262
265
  };
263
- export const getToolbarConfig = (state, intl, options = {}, providerFactory, api) => {
266
+ export const getToolbarConfig = (state, intl, options = {}, providerFactory, api
267
+ // Ignored via go/ees005
268
+ // eslint-disable-next-line @typescript-eslint/max-params
269
+ ) => {
264
270
  const {
265
271
  formatMessage
266
272
  } = intl;
@@ -60,6 +60,8 @@ export var PanelIcon = function PanelIcon(props) {
60
60
  });
61
61
  };
62
62
  var PanelNodeView = /*#__PURE__*/function () {
63
+ // Ignored via go/ees005
64
+ // eslint-disable-next-line @typescript-eslint/max-params
63
65
  function PanelNodeView(node, view, getPos, pluginOptions, api, nodeViewPortalProviderAPI, providerFactory) {
64
66
  var _this = this;
65
67
  _classCallCheck(this, PanelNodeView);
@@ -73,8 +75,14 @@ var PanelNodeView = /*#__PURE__*/function () {
73
75
  dom = _DOMSerializer$render.dom,
74
76
  contentDOM = _DOMSerializer$render.contentDOM;
75
77
  this.getPos = getPos;
78
+ // Ignored via go/ees005
79
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
76
80
  this.dom = dom;
81
+ // Ignored via go/ees005
82
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
77
83
  this.contentDOM = contentDOM;
84
+ // Ignored via go/ees005
85
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
78
86
  this.icon = this.dom.querySelector(".".concat(PanelSharedCssClassName.icon));
79
87
  if (!this.icon) {
80
88
  return;
@@ -120,7 +128,10 @@ var PanelNodeView = /*#__PURE__*/function () {
120
128
  }
121
129
  }]);
122
130
  }();
123
- export var getPanelNodeView = function getPanelNodeView(pluginOptions, api, nodeViewPortalProviderAPI, providerFactory) {
131
+ export var getPanelNodeView = function getPanelNodeView(pluginOptions, api, nodeViewPortalProviderAPI, providerFactory
132
+ // Ignored via go/ees005
133
+ // eslint-disable-next-line @typescript-eslint/max-params
134
+ ) {
124
135
  return function (node, view, getPos) {
125
136
  return new PanelNodeView(node, view, getPos, pluginOptions, api, nodeViewPortalProviderAPI, providerFactory);
126
137
  };
@@ -4,7 +4,10 @@ import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
4
4
  import { getPanelNodeView } from '../nodeviews/panel';
5
5
  import { pluginKey } from '../panelPluginType';
6
6
  import { handleCut } from './utils/utils';
7
- export var createPlugin = function createPlugin(dispatch, providerFactory, pluginOptions, api, nodeViewPortalProviderAPI) {
7
+ export var createPlugin = function createPlugin(dispatch, providerFactory, pluginOptions, api, nodeViewPortalProviderAPI
8
+ // Ignored via go/ees005
9
+ // eslint-disable-next-line @typescript-eslint/max-params
10
+ ) {
8
11
  var _pluginOptions$useLon = pluginOptions.useLongPressSelection,
9
12
  useLongPressSelection = _pluginOptions$useLon === void 0 ? false : _pluginOptions$useLon;
10
13
  return new SafePlugin({
@@ -44,7 +44,10 @@ export var panelIconMap = _defineProperty(_defineProperty(_defineProperty(_defin
44
44
  shortName: ':tip:',
45
45
  id: 'atlassian-tip'
46
46
  });
47
- export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeType, isCustomPanelEnabled, isCustomPanelEditable, providerFactory, hoverDecoration, editorAnalyticsAPI, activePanelType, activePanelColor, activePanelIcon, state) {
47
+ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeType, isCustomPanelEnabled, isCustomPanelEditable, providerFactory, hoverDecoration, editorAnalyticsAPI, activePanelType, activePanelColor, activePanelIcon, state
48
+ // Ignored via go/ees005
49
+ // eslint-disable-next-line @typescript-eslint/max-params
50
+ ) {
48
51
  // TODO: ED-14403 investigate why these titles are not getting translated for the tooltips
49
52
  var items = [{
50
53
  id: 'editor.panel.info',
@@ -269,7 +272,10 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
269
272
  export var getToolbarConfig = function getToolbarConfig(state, intl) {
270
273
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
271
274
  var providerFactory = arguments.length > 3 ? arguments[3] : undefined;
272
- var api = arguments.length > 4 ? arguments[4] : undefined;
275
+ var api
276
+ // Ignored via go/ees005
277
+ // eslint-disable-next-line @typescript-eslint/max-params
278
+ = arguments.length > 4 ? arguments[4] : undefined;
273
279
  var formatMessage = intl.formatMessage;
274
280
  var panelObject = findPanel(state);
275
281
  if (panelObject) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-panel",
3
- "version": "3.2.1",
3
+ "version": "3.2.3",
4
4
  "description": "Panel plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,18 +32,18 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^46.1.0",
35
- "@atlaskit/editor-common": "^97.0.0",
36
- "@atlaskit/editor-palette": "1.6.3",
35
+ "@atlaskit/editor-common": "^99.0.0",
36
+ "@atlaskit/editor-palette": "1.6.4",
37
37
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
38
38
  "@atlaskit/editor-plugin-decorations": "^1.3.0",
39
39
  "@atlaskit/editor-plugin-emoji": "^2.7.0",
40
40
  "@atlaskit/editor-prosemirror": "6.2.1",
41
41
  "@atlaskit/editor-shared-styles": "^3.2.0",
42
- "@atlaskit/emoji": "^67.11.0",
43
- "@atlaskit/icon": "^23.1.0",
42
+ "@atlaskit/emoji": "^67.12.0",
43
+ "@atlaskit/icon": "^23.3.0",
44
44
  "@atlaskit/platform-feature-flags": "^0.3.0",
45
45
  "@atlaskit/theme": "^14.0.0",
46
- "@atlaskit/tmp-editor-statsig": "^2.29.0",
46
+ "@atlaskit/tmp-editor-statsig": "^2.33.0",
47
47
  "@babel/runtime": "^7.0.0",
48
48
  "uuid": "^3.1.0"
49
49
  },