@atlaskit/editor-plugin-insert-block 8.3.2 → 8.4.0

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.
@@ -272,166 +272,131 @@ export var getToolbarComponents = function getToolbarComponents(_ref) {
272
272
  });
273
273
  };
274
274
  };
275
- if (fg('platform_editor_toolbar_aifc_ga_blockers')) {
276
- components.push({
275
+ components.push({
276
+ type: INSERT_GROUP.type,
277
+ key: "".concat(INSERT_GROUP.key, "-none"),
278
+ parents: [{
279
+ type: INSERT_BLOCK_SECTION.type,
280
+ key: INSERT_BLOCK_SECTION.key,
281
+ rank: INSERT_BLOCK_SECTION_RANK[INSERT_GROUP.key]
282
+ }],
283
+ component: function component(_ref3) {
284
+ var children = _ref3.children;
285
+ return /*#__PURE__*/React.createElement(Show, {
286
+ below: "sm"
287
+ }, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children));
288
+ }
289
+ });
290
+ components.push({
291
+ type: INSERT_BUTTON.type,
292
+ key: INSERT_BUTTON.key,
293
+ parents: [{
277
294
  type: INSERT_GROUP.type,
278
295
  key: "".concat(INSERT_GROUP.key, "-none"),
279
- parents: [{
280
- type: INSERT_BLOCK_SECTION.type,
281
- key: INSERT_BLOCK_SECTION.key,
282
- rank: INSERT_BLOCK_SECTION_RANK[INSERT_GROUP.key]
283
- }],
284
- component: function component(_ref3) {
285
- var children = _ref3.children;
286
- return /*#__PURE__*/React.createElement(Show, {
287
- below: "sm"
288
- }, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children));
289
- }
290
- });
291
- components.push({
292
- type: INSERT_BUTTON.type,
293
- key: INSERT_BUTTON.key,
294
- parents: [{
295
- type: INSERT_GROUP.type,
296
- key: "".concat(INSERT_GROUP.key, "-none"),
297
- rank: INSERT_GROUP_RANK[INSERT_BUTTON.key]
298
- }],
299
- component: createInsertButtonComponent(null)
300
- });
301
- components.push({
296
+ rank: INSERT_GROUP_RANK[INSERT_BUTTON.key]
297
+ }],
298
+ component: createInsertButtonComponent(null)
299
+ });
300
+ components.push({
301
+ type: INSERT_GROUP.type,
302
+ key: "".concat(INSERT_GROUP.key, "-sm"),
303
+ parents: [{
304
+ type: INSERT_BLOCK_SECTION.type,
305
+ key: INSERT_BLOCK_SECTION.key,
306
+ rank: INSERT_BLOCK_SECTION_RANK[INSERT_GROUP.key]
307
+ }],
308
+ component: function component(_ref4) {
309
+ var children = _ref4.children;
310
+ return /*#__PURE__*/React.createElement(Show, {
311
+ only: "sm"
312
+ }, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children));
313
+ }
314
+ });
315
+ components.push({
316
+ type: INSERT_BUTTON.type,
317
+ key: INSERT_BUTTON.key,
318
+ parents: [{
302
319
  type: INSERT_GROUP.type,
303
320
  key: "".concat(INSERT_GROUP.key, "-sm"),
304
- parents: [{
305
- type: INSERT_BLOCK_SECTION.type,
306
- key: INSERT_BLOCK_SECTION.key,
307
- rank: INSERT_BLOCK_SECTION_RANK[INSERT_GROUP.key]
308
- }],
309
- component: function component(_ref4) {
310
- var children = _ref4.children;
311
- return /*#__PURE__*/React.createElement(Show, {
312
- only: "sm"
313
- }, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children));
314
- }
315
- });
316
- components.push({
317
- type: INSERT_BUTTON.type,
318
- key: INSERT_BUTTON.key,
319
- parents: [{
320
- type: INSERT_GROUP.type,
321
- key: "".concat(INSERT_GROUP.key, "-sm"),
322
- rank: INSERT_GROUP_RANK[INSERT_BUTTON.key]
323
- }],
324
- component: createInsertButtonComponent('sm')
325
- });
326
- components.push({
321
+ rank: INSERT_GROUP_RANK[INSERT_BUTTON.key]
322
+ }],
323
+ component: createInsertButtonComponent('sm')
324
+ });
325
+ components.push({
326
+ type: INSERT_GROUP.type,
327
+ key: "".concat(INSERT_GROUP.key, "-md"),
328
+ parents: [{
329
+ type: INSERT_BLOCK_SECTION.type,
330
+ key: INSERT_BLOCK_SECTION.key,
331
+ rank: INSERT_BLOCK_SECTION_RANK[INSERT_GROUP.key]
332
+ }],
333
+ component: function component(_ref5) {
334
+ var children = _ref5.children;
335
+ return /*#__PURE__*/React.createElement(Show, {
336
+ only: "md"
337
+ }, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children));
338
+ }
339
+ });
340
+ components.push({
341
+ type: INSERT_BUTTON.type,
342
+ key: INSERT_BUTTON.key,
343
+ parents: [{
327
344
  type: INSERT_GROUP.type,
328
345
  key: "".concat(INSERT_GROUP.key, "-md"),
329
- parents: [{
330
- type: INSERT_BLOCK_SECTION.type,
331
- key: INSERT_BLOCK_SECTION.key,
332
- rank: INSERT_BLOCK_SECTION_RANK[INSERT_GROUP.key]
333
- }],
334
- component: function component(_ref5) {
335
- var children = _ref5.children;
336
- return /*#__PURE__*/React.createElement(Show, {
337
- only: "md"
338
- }, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children));
339
- }
340
- });
341
- components.push({
342
- type: INSERT_BUTTON.type,
343
- key: INSERT_BUTTON.key,
344
- parents: [{
345
- type: INSERT_GROUP.type,
346
- key: "".concat(INSERT_GROUP.key, "-md"),
347
- rank: INSERT_GROUP_RANK[INSERT_BUTTON.key]
348
- }],
349
- component: createInsertButtonComponent('md')
350
- });
351
- components.push({
346
+ rank: INSERT_GROUP_RANK[INSERT_BUTTON.key]
347
+ }],
348
+ component: createInsertButtonComponent('md')
349
+ });
350
+ components.push({
351
+ type: INSERT_GROUP.type,
352
+ key: "".concat(INSERT_GROUP.key, "-lg"),
353
+ parents: [{
354
+ type: INSERT_BLOCK_SECTION.type,
355
+ key: INSERT_BLOCK_SECTION.key,
356
+ rank: INSERT_BLOCK_SECTION_RANK[INSERT_GROUP.key]
357
+ }],
358
+ component: function component(_ref6) {
359
+ var children = _ref6.children;
360
+ return /*#__PURE__*/React.createElement(Show, {
361
+ only: "lg"
362
+ }, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children));
363
+ }
364
+ });
365
+ components.push({
366
+ type: INSERT_BUTTON.type,
367
+ key: INSERT_BUTTON.key,
368
+ parents: [{
352
369
  type: INSERT_GROUP.type,
353
370
  key: "".concat(INSERT_GROUP.key, "-lg"),
354
- parents: [{
355
- type: INSERT_BLOCK_SECTION.type,
356
- key: INSERT_BLOCK_SECTION.key,
357
- rank: INSERT_BLOCK_SECTION_RANK[INSERT_GROUP.key]
358
- }],
359
- component: function component(_ref6) {
360
- var children = _ref6.children;
361
- return /*#__PURE__*/React.createElement(Show, {
362
- only: "lg"
363
- }, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children));
364
- }
365
- });
366
- components.push({
367
- type: INSERT_BUTTON.type,
368
- key: INSERT_BUTTON.key,
369
- parents: [{
370
- type: INSERT_GROUP.type,
371
- key: "".concat(INSERT_GROUP.key, "-lg"),
372
- rank: INSERT_GROUP_RANK[INSERT_BUTTON.key]
373
- }],
374
- component: createInsertButtonComponent('lg')
375
- });
376
- components.push({
371
+ rank: INSERT_GROUP_RANK[INSERT_BUTTON.key]
372
+ }],
373
+ component: createInsertButtonComponent('lg')
374
+ });
375
+ components.push({
376
+ type: INSERT_GROUP.type,
377
+ key: "".concat(INSERT_GROUP.key, "-xl"),
378
+ parents: [{
379
+ type: INSERT_BLOCK_SECTION.type,
380
+ key: INSERT_BLOCK_SECTION.key,
381
+ rank: INSERT_BLOCK_SECTION_RANK[INSERT_GROUP.key]
382
+ }],
383
+ component: function component(_ref7) {
384
+ var children = _ref7.children;
385
+ return /*#__PURE__*/React.createElement(Show, {
386
+ only: "xl"
387
+ }, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children));
388
+ }
389
+ });
390
+ components.push({
391
+ type: INSERT_BUTTON.type,
392
+ key: INSERT_BUTTON.key,
393
+ parents: [{
377
394
  type: INSERT_GROUP.type,
378
395
  key: "".concat(INSERT_GROUP.key, "-xl"),
379
- parents: [{
380
- type: INSERT_BLOCK_SECTION.type,
381
- key: INSERT_BLOCK_SECTION.key,
382
- rank: INSERT_BLOCK_SECTION_RANK[INSERT_GROUP.key]
383
- }],
384
- component: function component(_ref7) {
385
- var children = _ref7.children;
386
- return /*#__PURE__*/React.createElement(Show, {
387
- only: "xl"
388
- }, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children));
389
- }
390
- });
391
- components.push({
392
- type: INSERT_BUTTON.type,
393
- key: INSERT_BUTTON.key,
394
- parents: [{
395
- type: INSERT_GROUP.type,
396
- key: "".concat(INSERT_GROUP.key, "-xl"),
397
- rank: INSERT_GROUP_RANK[INSERT_BUTTON.key]
398
- }],
399
- component: createInsertButtonComponent('xl')
400
- });
401
- } else {
402
- components.push({
403
- type: INSERT_GROUP.type,
404
- key: INSERT_GROUP.key,
405
- parents: [{
406
- type: INSERT_BLOCK_SECTION.type,
407
- key: INSERT_BLOCK_SECTION.key,
408
- rank: INSERT_BLOCK_SECTION_RANK[INSERT_GROUP.key]
409
- }]
410
- });
411
- components.push({
412
- type: INSERT_BUTTON.type,
413
- key: INSERT_BUTTON.key,
414
- parents: [{
415
- type: INSERT_GROUP.type,
416
- key: INSERT_GROUP.key,
417
- rank: INSERT_GROUP_RANK[INSERT_BUTTON.key]
418
- }],
419
- component: function component() {
420
- return /*#__PURE__*/React.createElement(InsertButton, {
421
- api: api,
422
- toolbarConfig: config,
423
- showElementBrowserLink: options.showElementBrowserLink,
424
- tableSelectorSupported: options.tableSelectorSupported,
425
- onInsertBlockType: onInsertBlockType,
426
- nativeStatusSupported: options.nativeStatusSupported,
427
- horizontalRuleEnabled: options.horizontalRuleEnabled,
428
- expandEnabled: options.allowExpand,
429
- insertMenuItems: options.insertMenuItems,
430
- numberOfButtons: 7 // TODO: ED-28759 - Default to 7 buttons - Remove this once we have a proper way to do toolbar responsiveness
431
- });
432
- }
433
- });
434
- }
396
+ rank: INSERT_GROUP_RANK[INSERT_BUTTON.key]
397
+ }],
398
+ component: createInsertButtonComponent('xl')
399
+ });
435
400
  }
436
401
  return components;
437
402
  };
@@ -9,6 +9,6 @@ export declare const DEFAULT_HEIGHT = 560;
9
9
  method that can be used to get suggestions -> once all experiments are cleaned up,
10
10
  they should be unified through `pluginInjectionApi?.quickInsert?.actions.getSuggestions`
11
11
  */
12
- export declare const filterForPinWhiteboardsExperiment: (featuredItems: QuickInsertItem[], formatMessage: (msg: MessageDescriptor) => string) => QuickInsertItem[];
12
+ export declare const filterForPinWhiteboards: (featuredItems: QuickInsertItem[], formatMessage: (msg: MessageDescriptor) => string) => QuickInsertItem[];
13
13
  declare const InsertMenu: ({ editorView, dropdownItems, showElementBrowserLink, onInsert, toggleVisiblity, pluginInjectionApi, }: InsertMenuProps) => jsx.JSX.Element;
14
14
  export default InsertMenu;
@@ -9,6 +9,6 @@ export declare const DEFAULT_HEIGHT = 560;
9
9
  method that can be used to get suggestions -> once all experiments are cleaned up,
10
10
  they should be unified through `pluginInjectionApi?.quickInsert?.actions.getSuggestions`
11
11
  */
12
- export declare const filterForPinWhiteboardsExperiment: (featuredItems: QuickInsertItem[], formatMessage: (msg: MessageDescriptor) => string) => QuickInsertItem[];
12
+ export declare const filterForPinWhiteboards: (featuredItems: QuickInsertItem[], formatMessage: (msg: MessageDescriptor) => string) => QuickInsertItem[];
13
13
  declare const InsertMenu: ({ editorView, dropdownItems, showElementBrowserLink, onInsert, toggleVisiblity, pluginInjectionApi, }: InsertMenuProps) => jsx.JSX.Element;
14
14
  export default InsertMenu;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-insert-block",
3
- "version": "8.3.2",
3
+ "version": "8.4.0",
4
4
  "description": "Insert block plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/editor-plugin-panel": "^9.0.0",
49
49
  "@atlaskit/editor-plugin-placeholder-text": "^8.0.0",
50
50
  "@atlaskit/editor-plugin-primary-toolbar": "^8.0.0",
51
- "@atlaskit/editor-plugin-quick-insert": "^7.1.0",
51
+ "@atlaskit/editor-plugin-quick-insert": "^7.2.0",
52
52
  "@atlaskit/editor-plugin-rule": "^7.0.0",
53
53
  "@atlaskit/editor-plugin-status": "^8.1.0",
54
54
  "@atlaskit/editor-plugin-table": "^17.3.0",
@@ -64,7 +64,7 @@
64
64
  "@atlaskit/icon-lab": "^5.15.0",
65
65
  "@atlaskit/platform-feature-flags": "^1.1.0",
66
66
  "@atlaskit/theme": "^21.0.0",
67
- "@atlaskit/tmp-editor-statsig": "^20.0.0",
67
+ "@atlaskit/tmp-editor-statsig": "^21.0.0",
68
68
  "@atlaskit/tokens": "^11.0.0",
69
69
  "@babel/runtime": "^7.0.0",
70
70
  "@emotion/react": "^11.7.1",
@@ -120,21 +120,12 @@
120
120
  }
121
121
  },
122
122
  "platform-feature-flags": {
123
- "platform_editor_toolbar_aifc_ga_blockers": {
124
- "type": "boolean"
125
- },
126
123
  "platform_editor_toolbar_responsive_fixes": {
127
124
  "type": "boolean"
128
125
  },
129
126
  "platform_editor_ease_of_use_metrics": {
130
127
  "type": "boolean"
131
128
  },
132
- "confluence-whiteboards-quick-insert-eligible": {
133
- "type": "boolean"
134
- },
135
- "confluence-whiteboards-quick-insert-l10n-eligible": {
136
- "type": "boolean"
137
- },
138
129
  "platform_editor_toolbar_aifc_undo_redo_confluence": {
139
130
  "type": "boolean"
140
131
  },