@atlaskit/editor-plugin-panel 8.1.5 → 8.1.7

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,20 @@
1
1
  # @atlaskit/editor-plugin-panel
2
2
 
3
+ ## 8.1.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 8.1.6
10
+
11
+ ### Patch Changes
12
+
13
+ - [`0d661119b4293`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0d661119b4293) -
14
+ Clean up platform_editor_insertion experiment by shipping control variant. Remove modern TypeAhead
15
+ components and experiment infrastructure while preserving all existing functionality.
16
+ - Updated dependencies
17
+
3
18
  ## 8.1.5
4
19
 
5
20
  ### Patch Changes
@@ -18,6 +18,8 @@ var _model = require("@atlaskit/editor-prosemirror/model");
18
18
  var _consts = require("@atlaskit/editor-shared-styles/consts");
19
19
  var _lightbulbEditorHint = _interopRequireDefault(require("@atlaskit/icon/core/migration/lightbulb--editor-hint"));
20
20
  var _utils = require("../pm-plugins/utils/utils");
21
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
22
+
21
23
  /* eslint-disable @atlaskit/editor/no-re-export */
22
24
  // Mapping export
23
25
  var panelIcons = exports.panelIcons = {
@@ -74,6 +76,7 @@ var PanelNodeView = /*#__PURE__*/function () {
74
76
  this.pluginOptions = pluginOptions;
75
77
  this.view = view;
76
78
  this.node = node;
79
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
77
80
  this.key = (0, _v.default)();
78
81
  var _DOMSerializer$render = _model.DOMSerializer.renderSpec(document, (0, _utils.panelAttrsToDom)(node.attrs, pluginOptions.allowCustomPanel || false)),
79
82
  dom = _DOMSerializer$render.dom,
@@ -110,152 +110,129 @@ var panelPlugin = function panelPlugin(_ref) {
110
110
  pluginsOptions: {
111
111
  quickInsert: function quickInsert(_ref3) {
112
112
  var formatMessage = _ref3.formatMessage;
113
- if ((0, _experiments.editorExperiment)('platform_editor_insertion', 'variant1')) {
114
- return [{
115
- id: 'infopanel',
116
- title: formatMessage(_messages.blockTypeMessages.infoPanel),
117
- keywords: ['panel'],
118
- description: formatMessage(_messages.blockTypeMessages.infoPanelDescription),
119
- priority: 800,
120
- icon: function icon() {
121
- return /*#__PURE__*/_react.default.createElement(_quickInsert.IconPanel, null);
122
- },
123
- action: function action(typeAheadInsert, state) {
124
- return createPanelAction({
125
- state: state,
126
- attributes: {
127
- panelType: _adfSchema.PanelType.INFO
128
- },
129
- api: api,
130
- typeAheadInsert: typeAheadInsert
131
- });
132
- }
133
- }];
134
- } else {
135
- var quickInsertOptions = [{
136
- id: 'infopanel',
137
- title: formatMessage(_messages.blockTypeMessages.infoPanel),
138
- keywords: ['panel'],
139
- description: formatMessage(_messages.blockTypeMessages.infoPanelDescription),
140
- priority: 800,
141
- icon: function icon() {
142
- return /*#__PURE__*/_react.default.createElement(_quickInsert.IconPanel, null);
143
- },
144
- action: function action(typeAheadInsert, state) {
145
- return createPanelAction({
146
- state: state,
147
- attributes: {
148
- panelType: _adfSchema.PanelType.INFO
149
- },
150
- api: api,
151
- typeAheadInsert: typeAheadInsert
152
- });
153
- }
154
- }, {
155
- id: 'notepanel',
156
- title: formatMessage(_messages.blockTypeMessages.notePanel),
157
- description: formatMessage(_messages.blockTypeMessages.notePanelDescription),
158
- priority: 1000,
159
- icon: function icon() {
160
- return /*#__PURE__*/_react.default.createElement(_quickInsert.IconPanelNote, null);
161
- },
162
- action: function action(typeAheadInsert, state) {
163
- return createPanelAction({
164
- state: state,
165
- attributes: {
166
- panelType: _adfSchema.PanelType.NOTE
167
- },
168
- api: api,
169
- typeAheadInsert: typeAheadInsert
170
- });
171
- }
172
- }, {
173
- id: 'successpanel',
174
- title: formatMessage(_messages.blockTypeMessages.successPanel),
175
- description: formatMessage(_messages.blockTypeMessages.successPanelDescription),
176
- keywords: ['tip'],
177
- priority: 1000,
178
- icon: function icon() {
179
- return /*#__PURE__*/_react.default.createElement(_quickInsert.IconPanelSuccess, null);
180
- },
181
- action: function action(typeAheadInsert, state) {
182
- return createPanelAction({
183
- state: state,
184
- attributes: {
185
- panelType: _adfSchema.PanelType.SUCCESS
186
- },
187
- api: api,
188
- typeAheadInsert: typeAheadInsert
189
- });
190
- }
191
- }, {
192
- id: 'warningpanel',
193
- title: formatMessage(_messages.blockTypeMessages.warningPanel),
194
- description: formatMessage(_messages.blockTypeMessages.warningPanelDescription),
195
- priority: 1000,
196
- icon: function icon() {
197
- return /*#__PURE__*/_react.default.createElement(_quickInsert.IconPanelWarning, null);
198
- },
199
- action: function action(typeAheadInsert, state) {
200
- return createPanelAction({
201
- state: state,
202
- attributes: {
203
- panelType: _adfSchema.PanelType.WARNING
204
- },
205
- api: api,
206
- typeAheadInsert: typeAheadInsert
207
- });
208
- }
209
- }, {
210
- id: 'errorpanel',
211
- title: formatMessage(_messages.blockTypeMessages.errorPanel),
212
- description: formatMessage(_messages.blockTypeMessages.errorPanelDescription),
113
+ var quickInsertOptions = [{
114
+ id: 'infopanel',
115
+ title: formatMessage(_messages.blockTypeMessages.infoPanel),
116
+ keywords: ['panel'],
117
+ description: formatMessage(_messages.blockTypeMessages.infoPanelDescription),
118
+ priority: 800,
119
+ icon: function icon() {
120
+ return /*#__PURE__*/_react.default.createElement(_quickInsert.IconPanel, null);
121
+ },
122
+ action: function action(typeAheadInsert, state) {
123
+ return createPanelAction({
124
+ state: state,
125
+ attributes: {
126
+ panelType: _adfSchema.PanelType.INFO
127
+ },
128
+ api: api,
129
+ typeAheadInsert: typeAheadInsert
130
+ });
131
+ }
132
+ }, {
133
+ id: 'notepanel',
134
+ title: formatMessage(_messages.blockTypeMessages.notePanel),
135
+ description: formatMessage(_messages.blockTypeMessages.notePanelDescription),
136
+ priority: 1000,
137
+ icon: function icon() {
138
+ return /*#__PURE__*/_react.default.createElement(_quickInsert.IconPanelNote, null);
139
+ },
140
+ action: function action(typeAheadInsert, state) {
141
+ return createPanelAction({
142
+ state: state,
143
+ attributes: {
144
+ panelType: _adfSchema.PanelType.NOTE
145
+ },
146
+ api: api,
147
+ typeAheadInsert: typeAheadInsert
148
+ });
149
+ }
150
+ }, {
151
+ id: 'successpanel',
152
+ title: formatMessage(_messages.blockTypeMessages.successPanel),
153
+ description: formatMessage(_messages.blockTypeMessages.successPanelDescription),
154
+ keywords: ['tip'],
155
+ priority: 1000,
156
+ icon: function icon() {
157
+ return /*#__PURE__*/_react.default.createElement(_quickInsert.IconPanelSuccess, null);
158
+ },
159
+ action: function action(typeAheadInsert, state) {
160
+ return createPanelAction({
161
+ state: state,
162
+ attributes: {
163
+ panelType: _adfSchema.PanelType.SUCCESS
164
+ },
165
+ api: api,
166
+ typeAheadInsert: typeAheadInsert
167
+ });
168
+ }
169
+ }, {
170
+ id: 'warningpanel',
171
+ title: formatMessage(_messages.blockTypeMessages.warningPanel),
172
+ description: formatMessage(_messages.blockTypeMessages.warningPanelDescription),
173
+ priority: 1000,
174
+ icon: function icon() {
175
+ return /*#__PURE__*/_react.default.createElement(_quickInsert.IconPanelWarning, null);
176
+ },
177
+ action: function action(typeAheadInsert, state) {
178
+ return createPanelAction({
179
+ state: state,
180
+ attributes: {
181
+ panelType: _adfSchema.PanelType.WARNING
182
+ },
183
+ api: api,
184
+ typeAheadInsert: typeAheadInsert
185
+ });
186
+ }
187
+ }, {
188
+ id: 'errorpanel',
189
+ title: formatMessage(_messages.blockTypeMessages.errorPanel),
190
+ description: formatMessage(_messages.blockTypeMessages.errorPanelDescription),
191
+ priority: 1000,
192
+ icon: function icon() {
193
+ return /*#__PURE__*/_react.default.createElement(_quickInsert.IconPanelError, null);
194
+ },
195
+ action: function action(typeAheadInsert, state) {
196
+ return createPanelAction({
197
+ state: state,
198
+ attributes: {
199
+ panelType: _adfSchema.PanelType.ERROR
200
+ },
201
+ api: api,
202
+ typeAheadInsert: typeAheadInsert
203
+ });
204
+ }
205
+ }];
206
+ if (options.allowCustomPanel && options.allowCustomPanelEdit) {
207
+ quickInsertOptions.push({
208
+ id: 'custompanel',
209
+ title: formatMessage(_messages.blockTypeMessages.customPanel),
210
+ description: formatMessage(_messages.blockTypeMessages.customPanelDescription),
213
211
  priority: 1000,
214
212
  icon: function icon() {
215
- return /*#__PURE__*/_react.default.createElement(_quickInsert.IconPanelError, null);
213
+ return /*#__PURE__*/_react.default.createElement(_quickInsert.IconCustomPanel, null);
216
214
  },
217
215
  action: function action(typeAheadInsert, state) {
218
216
  return createPanelAction({
219
217
  state: state,
220
218
  attributes: {
221
- panelType: _adfSchema.PanelType.ERROR
219
+ panelType: _adfSchema.PanelType.CUSTOM,
220
+ panelIcon: ':rainbow:',
221
+ panelIconId: '1f308',
222
+ panelIconText: '🌈',
223
+ // Ignored via go/ees007
224
+ // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
225
+ // TODO: https://product-fabric.atlassian.net/browse/DSP-7268
226
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
227
+ panelColor: _colors.T50
222
228
  },
223
229
  api: api,
224
230
  typeAheadInsert: typeAheadInsert
225
231
  });
226
232
  }
227
- }];
228
- if (options.allowCustomPanel && options.allowCustomPanelEdit) {
229
- quickInsertOptions.push({
230
- id: 'custompanel',
231
- title: formatMessage(_messages.blockTypeMessages.customPanel),
232
- description: formatMessage(_messages.blockTypeMessages.customPanelDescription),
233
- priority: 1000,
234
- icon: function icon() {
235
- return /*#__PURE__*/_react.default.createElement(_quickInsert.IconCustomPanel, null);
236
- },
237
- action: function action(typeAheadInsert, state) {
238
- return createPanelAction({
239
- state: state,
240
- attributes: {
241
- panelType: _adfSchema.PanelType.CUSTOM,
242
- panelIcon: ':rainbow:',
243
- panelIconId: '1f308',
244
- panelIconText: '🌈',
245
- // Ignored via go/ees007
246
- // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
247
- // TODO: https://product-fabric.atlassian.net/browse/DSP-7268
248
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
249
- panelColor: _colors.T50
250
- },
251
- api: api,
252
- typeAheadInsert: typeAheadInsert
253
- });
254
- }
255
- });
256
- }
257
- return quickInsertOptions;
233
+ });
258
234
  }
235
+ return quickInsertOptions;
259
236
  },
260
237
  floatingToolbar: function floatingToolbar(state, intl, providerFactory) {
261
238
  return (0, _toolbar.getToolbarConfig)(state, intl, options, providerFactory, api);
@@ -19,25 +19,25 @@ var panelTitleAndIcon = (0, _defineProperty2.default)((0, _defineProperty2.defau
19
19
  title: _messages.panelMessages.info,
20
20
  icon: (0, _statusInformation.default)({
21
21
  label: 'info-icon',
22
- color: "var(--ds-icon-information, #1D7AFC)"
22
+ color: "var(--ds-icon-information, #357DE8)"
23
23
  })
24
24
  }), _adfSchema.PanelType.NOTE, {
25
25
  title: _messages.panelMessages.note,
26
26
  icon: (0, _statusDiscovery.default)({
27
27
  label: 'note-icon',
28
- color: "var(--ds-icon-discovery, #8270DB)"
28
+ color: "var(--ds-icon-discovery, #AF59E1)"
29
29
  })
30
30
  }), _adfSchema.PanelType.SUCCESS, {
31
31
  title: _messages.panelMessages.success,
32
32
  icon: (0, _statusSuccess.default)({
33
33
  label: 'success-icon',
34
- color: "var(--ds-icon-success, #22A06B)"
34
+ color: "var(--ds-icon-success, #6A9A23)"
35
35
  })
36
36
  }), _adfSchema.PanelType.WARNING, {
37
37
  title: _messages.panelMessages.warning,
38
38
  icon: (0, _statusWarning.default)({
39
39
  label: 'warning-icon',
40
- color: "var(--ds-icon-warning, #E56910)"
40
+ color: "var(--ds-icon-warning, #E06C00)"
41
41
  })
42
42
  }), _adfSchema.PanelType.ERROR, {
43
43
  title: _messages.panelMessages.error,
@@ -1,4 +1,6 @@
1
1
  import React from 'react';
2
+
3
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
2
4
  import uuid from 'uuid/v4';
3
5
  import { PanelType } from '@atlaskit/adf-schema';
4
6
  import { Emoji } from '@atlaskit/editor-common/emoji';
@@ -68,6 +70,7 @@ class PanelNodeView {
68
70
  this.pluginOptions = pluginOptions;
69
71
  this.view = view;
70
72
  this.node = node;
73
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
71
74
  this.key = uuid();
72
75
  const {
73
76
  dom,
@@ -99,138 +99,117 @@ const panelPlugin = ({
99
99
  quickInsert: ({
100
100
  formatMessage
101
101
  }) => {
102
- if (editorExperiment('platform_editor_insertion', 'variant1')) {
103
- return [{
104
- id: 'infopanel',
105
- title: formatMessage(blockTypeMessages.infoPanel),
106
- keywords: ['panel'],
107
- description: formatMessage(blockTypeMessages.infoPanelDescription),
108
- priority: 800,
109
- icon: () => /*#__PURE__*/React.createElement(IconPanel, null),
110
- action(typeAheadInsert, state) {
111
- return createPanelAction({
112
- state,
113
- attributes: {
114
- panelType: PanelType.INFO
115
- },
116
- api,
117
- typeAheadInsert
118
- });
119
- }
120
- }];
121
- } else {
122
- const quickInsertOptions = [{
123
- id: 'infopanel',
124
- title: formatMessage(blockTypeMessages.infoPanel),
125
- keywords: ['panel'],
126
- description: formatMessage(blockTypeMessages.infoPanelDescription),
127
- priority: 800,
128
- icon: () => /*#__PURE__*/React.createElement(IconPanel, null),
129
- action(typeAheadInsert, state) {
130
- return createPanelAction({
131
- state,
132
- attributes: {
133
- panelType: PanelType.INFO
134
- },
135
- api,
136
- typeAheadInsert
137
- });
138
- }
139
- }, {
140
- id: 'notepanel',
141
- title: formatMessage(blockTypeMessages.notePanel),
142
- description: formatMessage(blockTypeMessages.notePanelDescription),
143
- priority: 1000,
144
- icon: () => /*#__PURE__*/React.createElement(IconPanelNote, null),
145
- action(typeAheadInsert, state) {
146
- return createPanelAction({
147
- state,
148
- attributes: {
149
- panelType: PanelType.NOTE
150
- },
151
- api,
152
- typeAheadInsert
153
- });
154
- }
155
- }, {
156
- id: 'successpanel',
157
- title: formatMessage(blockTypeMessages.successPanel),
158
- description: formatMessage(blockTypeMessages.successPanelDescription),
159
- keywords: ['tip'],
160
- priority: 1000,
161
- icon: () => /*#__PURE__*/React.createElement(IconPanelSuccess, null),
162
- action(typeAheadInsert, state) {
163
- return createPanelAction({
164
- state,
165
- attributes: {
166
- panelType: PanelType.SUCCESS
167
- },
168
- api,
169
- typeAheadInsert
170
- });
171
- }
172
- }, {
173
- id: 'warningpanel',
174
- title: formatMessage(blockTypeMessages.warningPanel),
175
- description: formatMessage(blockTypeMessages.warningPanelDescription),
176
- priority: 1000,
177
- icon: () => /*#__PURE__*/React.createElement(IconPanelWarning, null),
178
- action(typeAheadInsert, state) {
179
- return createPanelAction({
180
- state,
181
- attributes: {
182
- panelType: PanelType.WARNING
183
- },
184
- api,
185
- typeAheadInsert
186
- });
187
- }
188
- }, {
189
- id: 'errorpanel',
190
- title: formatMessage(blockTypeMessages.errorPanel),
191
- description: formatMessage(blockTypeMessages.errorPanelDescription),
102
+ const quickInsertOptions = [{
103
+ id: 'infopanel',
104
+ title: formatMessage(blockTypeMessages.infoPanel),
105
+ keywords: ['panel'],
106
+ description: formatMessage(blockTypeMessages.infoPanelDescription),
107
+ priority: 800,
108
+ icon: () => /*#__PURE__*/React.createElement(IconPanel, null),
109
+ action(typeAheadInsert, state) {
110
+ return createPanelAction({
111
+ state,
112
+ attributes: {
113
+ panelType: PanelType.INFO
114
+ },
115
+ api,
116
+ typeAheadInsert
117
+ });
118
+ }
119
+ }, {
120
+ id: 'notepanel',
121
+ title: formatMessage(blockTypeMessages.notePanel),
122
+ description: formatMessage(blockTypeMessages.notePanelDescription),
123
+ priority: 1000,
124
+ icon: () => /*#__PURE__*/React.createElement(IconPanelNote, null),
125
+ action(typeAheadInsert, state) {
126
+ return createPanelAction({
127
+ state,
128
+ attributes: {
129
+ panelType: PanelType.NOTE
130
+ },
131
+ api,
132
+ typeAheadInsert
133
+ });
134
+ }
135
+ }, {
136
+ id: 'successpanel',
137
+ title: formatMessage(blockTypeMessages.successPanel),
138
+ description: formatMessage(blockTypeMessages.successPanelDescription),
139
+ keywords: ['tip'],
140
+ priority: 1000,
141
+ icon: () => /*#__PURE__*/React.createElement(IconPanelSuccess, null),
142
+ action(typeAheadInsert, state) {
143
+ return createPanelAction({
144
+ state,
145
+ attributes: {
146
+ panelType: PanelType.SUCCESS
147
+ },
148
+ api,
149
+ typeAheadInsert
150
+ });
151
+ }
152
+ }, {
153
+ id: 'warningpanel',
154
+ title: formatMessage(blockTypeMessages.warningPanel),
155
+ description: formatMessage(blockTypeMessages.warningPanelDescription),
156
+ priority: 1000,
157
+ icon: () => /*#__PURE__*/React.createElement(IconPanelWarning, null),
158
+ action(typeAheadInsert, state) {
159
+ return createPanelAction({
160
+ state,
161
+ attributes: {
162
+ panelType: PanelType.WARNING
163
+ },
164
+ api,
165
+ typeAheadInsert
166
+ });
167
+ }
168
+ }, {
169
+ id: 'errorpanel',
170
+ title: formatMessage(blockTypeMessages.errorPanel),
171
+ description: formatMessage(blockTypeMessages.errorPanelDescription),
172
+ priority: 1000,
173
+ icon: () => /*#__PURE__*/React.createElement(IconPanelError, null),
174
+ action(typeAheadInsert, state) {
175
+ return createPanelAction({
176
+ state,
177
+ attributes: {
178
+ panelType: PanelType.ERROR
179
+ },
180
+ api,
181
+ typeAheadInsert
182
+ });
183
+ }
184
+ }];
185
+ if (options.allowCustomPanel && options.allowCustomPanelEdit) {
186
+ quickInsertOptions.push({
187
+ id: 'custompanel',
188
+ title: formatMessage(blockTypeMessages.customPanel),
189
+ description: formatMessage(blockTypeMessages.customPanelDescription),
192
190
  priority: 1000,
193
- icon: () => /*#__PURE__*/React.createElement(IconPanelError, null),
191
+ icon: () => /*#__PURE__*/React.createElement(IconCustomPanel, null),
194
192
  action(typeAheadInsert, state) {
195
193
  return createPanelAction({
196
194
  state,
197
195
  attributes: {
198
- panelType: PanelType.ERROR
196
+ panelType: PanelType.CUSTOM,
197
+ panelIcon: ':rainbow:',
198
+ panelIconId: '1f308',
199
+ panelIconText: '🌈',
200
+ // Ignored via go/ees007
201
+ // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
202
+ // TODO: https://product-fabric.atlassian.net/browse/DSP-7268
203
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
204
+ panelColor: T50
199
205
  },
200
206
  api,
201
207
  typeAheadInsert
202
208
  });
203
209
  }
204
- }];
205
- if (options.allowCustomPanel && options.allowCustomPanelEdit) {
206
- quickInsertOptions.push({
207
- id: 'custompanel',
208
- title: formatMessage(blockTypeMessages.customPanel),
209
- description: formatMessage(blockTypeMessages.customPanelDescription),
210
- priority: 1000,
211
- icon: () => /*#__PURE__*/React.createElement(IconCustomPanel, null),
212
- action(typeAheadInsert, state) {
213
- return createPanelAction({
214
- state,
215
- attributes: {
216
- panelType: PanelType.CUSTOM,
217
- panelIcon: ':rainbow:',
218
- panelIconId: '1f308',
219
- panelIconText: '🌈',
220
- // Ignored via go/ees007
221
- // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
222
- // TODO: https://product-fabric.atlassian.net/browse/DSP-7268
223
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
224
- panelColor: T50
225
- },
226
- api,
227
- typeAheadInsert
228
- });
229
- }
230
- });
231
- }
232
- return quickInsertOptions;
210
+ });
233
211
  }
212
+ return quickInsertOptions;
234
213
  },
235
214
  floatingToolbar: (state, intl, providerFactory) => getToolbarConfig(state, intl, options, providerFactory, api)
236
215
  }
@@ -12,28 +12,28 @@ const panelTitleAndIcon = {
12
12
  title: messages.info,
13
13
  icon: StatusInformationIcon({
14
14
  label: 'info-icon',
15
- color: "var(--ds-icon-information, #1D7AFC)"
15
+ color: "var(--ds-icon-information, #357DE8)"
16
16
  })
17
17
  },
18
18
  [PanelType.NOTE]: {
19
19
  title: messages.note,
20
20
  icon: StatusDiscoveryIcon({
21
21
  label: 'note-icon',
22
- color: "var(--ds-icon-discovery, #8270DB)"
22
+ color: "var(--ds-icon-discovery, #AF59E1)"
23
23
  })
24
24
  },
25
25
  [PanelType.SUCCESS]: {
26
26
  title: messages.success,
27
27
  icon: StatusSuccessIcon({
28
28
  label: 'success-icon',
29
- color: "var(--ds-icon-success, #22A06B)"
29
+ color: "var(--ds-icon-success, #6A9A23)"
30
30
  })
31
31
  },
32
32
  [PanelType.WARNING]: {
33
33
  title: messages.warning,
34
34
  icon: StatusWarningIcon({
35
35
  label: 'warning-icon',
36
- color: "var(--ds-icon-warning, #E56910)"
36
+ color: "var(--ds-icon-warning, #E06C00)"
37
37
  })
38
38
  },
39
39
  [PanelType.ERROR]: {
@@ -1,6 +1,8 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import React from 'react';
4
+
5
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
4
6
  import uuid from 'uuid/v4';
5
7
  import { PanelType } from '@atlaskit/adf-schema';
6
8
  import { Emoji } from '@atlaskit/editor-common/emoji';
@@ -68,6 +70,7 @@ var PanelNodeView = /*#__PURE__*/function () {
68
70
  this.pluginOptions = pluginOptions;
69
71
  this.view = view;
70
72
  this.node = node;
73
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
71
74
  this.key = uuid();
72
75
  var _DOMSerializer$render = DOMSerializer.renderSpec(document, panelAttrsToDom(node.attrs, pluginOptions.allowCustomPanel || false)),
73
76
  dom = _DOMSerializer$render.dom,
@@ -103,152 +103,129 @@ var panelPlugin = function panelPlugin(_ref) {
103
103
  pluginsOptions: {
104
104
  quickInsert: function quickInsert(_ref3) {
105
105
  var formatMessage = _ref3.formatMessage;
106
- if (editorExperiment('platform_editor_insertion', 'variant1')) {
107
- return [{
108
- id: 'infopanel',
109
- title: formatMessage(blockTypeMessages.infoPanel),
110
- keywords: ['panel'],
111
- description: formatMessage(blockTypeMessages.infoPanelDescription),
112
- priority: 800,
113
- icon: function icon() {
114
- return /*#__PURE__*/React.createElement(IconPanel, null);
115
- },
116
- action: function action(typeAheadInsert, state) {
117
- return createPanelAction({
118
- state: state,
119
- attributes: {
120
- panelType: PanelType.INFO
121
- },
122
- api: api,
123
- typeAheadInsert: typeAheadInsert
124
- });
125
- }
126
- }];
127
- } else {
128
- var quickInsertOptions = [{
129
- id: 'infopanel',
130
- title: formatMessage(blockTypeMessages.infoPanel),
131
- keywords: ['panel'],
132
- description: formatMessage(blockTypeMessages.infoPanelDescription),
133
- priority: 800,
134
- icon: function icon() {
135
- return /*#__PURE__*/React.createElement(IconPanel, null);
136
- },
137
- action: function action(typeAheadInsert, state) {
138
- return createPanelAction({
139
- state: state,
140
- attributes: {
141
- panelType: PanelType.INFO
142
- },
143
- api: api,
144
- typeAheadInsert: typeAheadInsert
145
- });
146
- }
147
- }, {
148
- id: 'notepanel',
149
- title: formatMessage(blockTypeMessages.notePanel),
150
- description: formatMessage(blockTypeMessages.notePanelDescription),
151
- priority: 1000,
152
- icon: function icon() {
153
- return /*#__PURE__*/React.createElement(IconPanelNote, null);
154
- },
155
- action: function action(typeAheadInsert, state) {
156
- return createPanelAction({
157
- state: state,
158
- attributes: {
159
- panelType: PanelType.NOTE
160
- },
161
- api: api,
162
- typeAheadInsert: typeAheadInsert
163
- });
164
- }
165
- }, {
166
- id: 'successpanel',
167
- title: formatMessage(blockTypeMessages.successPanel),
168
- description: formatMessage(blockTypeMessages.successPanelDescription),
169
- keywords: ['tip'],
170
- priority: 1000,
171
- icon: function icon() {
172
- return /*#__PURE__*/React.createElement(IconPanelSuccess, null);
173
- },
174
- action: function action(typeAheadInsert, state) {
175
- return createPanelAction({
176
- state: state,
177
- attributes: {
178
- panelType: PanelType.SUCCESS
179
- },
180
- api: api,
181
- typeAheadInsert: typeAheadInsert
182
- });
183
- }
184
- }, {
185
- id: 'warningpanel',
186
- title: formatMessage(blockTypeMessages.warningPanel),
187
- description: formatMessage(blockTypeMessages.warningPanelDescription),
188
- priority: 1000,
189
- icon: function icon() {
190
- return /*#__PURE__*/React.createElement(IconPanelWarning, null);
191
- },
192
- action: function action(typeAheadInsert, state) {
193
- return createPanelAction({
194
- state: state,
195
- attributes: {
196
- panelType: PanelType.WARNING
197
- },
198
- api: api,
199
- typeAheadInsert: typeAheadInsert
200
- });
201
- }
202
- }, {
203
- id: 'errorpanel',
204
- title: formatMessage(blockTypeMessages.errorPanel),
205
- description: formatMessage(blockTypeMessages.errorPanelDescription),
106
+ var quickInsertOptions = [{
107
+ id: 'infopanel',
108
+ title: formatMessage(blockTypeMessages.infoPanel),
109
+ keywords: ['panel'],
110
+ description: formatMessage(blockTypeMessages.infoPanelDescription),
111
+ priority: 800,
112
+ icon: function icon() {
113
+ return /*#__PURE__*/React.createElement(IconPanel, null);
114
+ },
115
+ action: function action(typeAheadInsert, state) {
116
+ return createPanelAction({
117
+ state: state,
118
+ attributes: {
119
+ panelType: PanelType.INFO
120
+ },
121
+ api: api,
122
+ typeAheadInsert: typeAheadInsert
123
+ });
124
+ }
125
+ }, {
126
+ id: 'notepanel',
127
+ title: formatMessage(blockTypeMessages.notePanel),
128
+ description: formatMessage(blockTypeMessages.notePanelDescription),
129
+ priority: 1000,
130
+ icon: function icon() {
131
+ return /*#__PURE__*/React.createElement(IconPanelNote, null);
132
+ },
133
+ action: function action(typeAheadInsert, state) {
134
+ return createPanelAction({
135
+ state: state,
136
+ attributes: {
137
+ panelType: PanelType.NOTE
138
+ },
139
+ api: api,
140
+ typeAheadInsert: typeAheadInsert
141
+ });
142
+ }
143
+ }, {
144
+ id: 'successpanel',
145
+ title: formatMessage(blockTypeMessages.successPanel),
146
+ description: formatMessage(blockTypeMessages.successPanelDescription),
147
+ keywords: ['tip'],
148
+ priority: 1000,
149
+ icon: function icon() {
150
+ return /*#__PURE__*/React.createElement(IconPanelSuccess, null);
151
+ },
152
+ action: function action(typeAheadInsert, state) {
153
+ return createPanelAction({
154
+ state: state,
155
+ attributes: {
156
+ panelType: PanelType.SUCCESS
157
+ },
158
+ api: api,
159
+ typeAheadInsert: typeAheadInsert
160
+ });
161
+ }
162
+ }, {
163
+ id: 'warningpanel',
164
+ title: formatMessage(blockTypeMessages.warningPanel),
165
+ description: formatMessage(blockTypeMessages.warningPanelDescription),
166
+ priority: 1000,
167
+ icon: function icon() {
168
+ return /*#__PURE__*/React.createElement(IconPanelWarning, null);
169
+ },
170
+ action: function action(typeAheadInsert, state) {
171
+ return createPanelAction({
172
+ state: state,
173
+ attributes: {
174
+ panelType: PanelType.WARNING
175
+ },
176
+ api: api,
177
+ typeAheadInsert: typeAheadInsert
178
+ });
179
+ }
180
+ }, {
181
+ id: 'errorpanel',
182
+ title: formatMessage(blockTypeMessages.errorPanel),
183
+ description: formatMessage(blockTypeMessages.errorPanelDescription),
184
+ priority: 1000,
185
+ icon: function icon() {
186
+ return /*#__PURE__*/React.createElement(IconPanelError, null);
187
+ },
188
+ action: function action(typeAheadInsert, state) {
189
+ return createPanelAction({
190
+ state: state,
191
+ attributes: {
192
+ panelType: PanelType.ERROR
193
+ },
194
+ api: api,
195
+ typeAheadInsert: typeAheadInsert
196
+ });
197
+ }
198
+ }];
199
+ if (options.allowCustomPanel && options.allowCustomPanelEdit) {
200
+ quickInsertOptions.push({
201
+ id: 'custompanel',
202
+ title: formatMessage(blockTypeMessages.customPanel),
203
+ description: formatMessage(blockTypeMessages.customPanelDescription),
206
204
  priority: 1000,
207
205
  icon: function icon() {
208
- return /*#__PURE__*/React.createElement(IconPanelError, null);
206
+ return /*#__PURE__*/React.createElement(IconCustomPanel, null);
209
207
  },
210
208
  action: function action(typeAheadInsert, state) {
211
209
  return createPanelAction({
212
210
  state: state,
213
211
  attributes: {
214
- panelType: PanelType.ERROR
212
+ panelType: PanelType.CUSTOM,
213
+ panelIcon: ':rainbow:',
214
+ panelIconId: '1f308',
215
+ panelIconText: '🌈',
216
+ // Ignored via go/ees007
217
+ // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
218
+ // TODO: https://product-fabric.atlassian.net/browse/DSP-7268
219
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
220
+ panelColor: T50
215
221
  },
216
222
  api: api,
217
223
  typeAheadInsert: typeAheadInsert
218
224
  });
219
225
  }
220
- }];
221
- if (options.allowCustomPanel && options.allowCustomPanelEdit) {
222
- quickInsertOptions.push({
223
- id: 'custompanel',
224
- title: formatMessage(blockTypeMessages.customPanel),
225
- description: formatMessage(blockTypeMessages.customPanelDescription),
226
- priority: 1000,
227
- icon: function icon() {
228
- return /*#__PURE__*/React.createElement(IconCustomPanel, null);
229
- },
230
- action: function action(typeAheadInsert, state) {
231
- return createPanelAction({
232
- state: state,
233
- attributes: {
234
- panelType: PanelType.CUSTOM,
235
- panelIcon: ':rainbow:',
236
- panelIconId: '1f308',
237
- panelIconText: '🌈',
238
- // Ignored via go/ees007
239
- // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
240
- // TODO: https://product-fabric.atlassian.net/browse/DSP-7268
241
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
242
- panelColor: T50
243
- },
244
- api: api,
245
- typeAheadInsert: typeAheadInsert
246
- });
247
- }
248
- });
249
- }
250
- return quickInsertOptions;
226
+ });
251
227
  }
228
+ return quickInsertOptions;
252
229
  },
253
230
  floatingToolbar: function floatingToolbar(state, intl, providerFactory) {
254
231
  return getToolbarConfig(state, intl, options, providerFactory, api);
@@ -12,25 +12,25 @@ var panelTitleAndIcon = _defineProperty(_defineProperty(_defineProperty(_defineP
12
12
  title: messages.info,
13
13
  icon: StatusInformationIcon({
14
14
  label: 'info-icon',
15
- color: "var(--ds-icon-information, #1D7AFC)"
15
+ color: "var(--ds-icon-information, #357DE8)"
16
16
  })
17
17
  }), PanelType.NOTE, {
18
18
  title: messages.note,
19
19
  icon: StatusDiscoveryIcon({
20
20
  label: 'note-icon',
21
- color: "var(--ds-icon-discovery, #8270DB)"
21
+ color: "var(--ds-icon-discovery, #AF59E1)"
22
22
  })
23
23
  }), PanelType.SUCCESS, {
24
24
  title: messages.success,
25
25
  icon: StatusSuccessIcon({
26
26
  label: 'success-icon',
27
- color: "var(--ds-icon-success, #22A06B)"
27
+ color: "var(--ds-icon-success, #6A9A23)"
28
28
  })
29
29
  }), PanelType.WARNING, {
30
30
  title: messages.warning,
31
31
  icon: StatusWarningIcon({
32
32
  label: 'warning-icon',
33
- color: "var(--ds-icon-warning, #E56910)"
33
+ color: "var(--ds-icon-warning, #E06C00)"
34
34
  })
35
35
  }), PanelType.ERROR, {
36
36
  title: messages.error,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-panel",
3
- "version": "8.1.5",
3
+ "version": "8.1.7",
4
4
  "description": "Panel plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,23 +32,23 @@
32
32
  "@atlaskit/editor-plugin-analytics": "^6.2.0",
33
33
  "@atlaskit/editor-plugin-block-menu": "^5.0.0",
34
34
  "@atlaskit/editor-plugin-decorations": "^6.1.0",
35
- "@atlaskit/editor-plugin-emoji": "^7.5.0",
35
+ "@atlaskit/editor-plugin-emoji": "^7.6.0",
36
36
  "@atlaskit/editor-plugin-selection": "^6.1.0",
37
37
  "@atlaskit/editor-plugin-toolbar": "^3.4.0",
38
38
  "@atlaskit/editor-prosemirror": "7.0.0",
39
- "@atlaskit/editor-shared-styles": "^3.8.0",
39
+ "@atlaskit/editor-shared-styles": "^3.9.0",
40
40
  "@atlaskit/editor-toolbar": "^0.17.0",
41
- "@atlaskit/emoji": "^69.6.0",
42
- "@atlaskit/icon": "^28.5.0",
41
+ "@atlaskit/emoji": "^69.7.0",
42
+ "@atlaskit/icon": "^29.0.0",
43
43
  "@atlaskit/platform-feature-flags": "^1.1.0",
44
44
  "@atlaskit/theme": "^21.0.0",
45
- "@atlaskit/tmp-editor-statsig": "^13.22.0",
46
- "@atlaskit/tokens": "^7.0.0",
45
+ "@atlaskit/tmp-editor-statsig": "^13.35.0",
46
+ "@atlaskit/tokens": "^8.0.0",
47
47
  "@babel/runtime": "^7.0.0",
48
48
  "uuid": "^3.1.0"
49
49
  },
50
50
  "peerDependencies": {
51
- "@atlaskit/editor-common": "^110.19.0",
51
+ "@atlaskit/editor-common": "^110.27.0",
52
52
  "react": "^18.2.0",
53
53
  "react-dom": "^18.2.0",
54
54
  "react-intl-next": "npm:react-intl@^5.18.1"