@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.
- package/CHANGELOG.md +21 -0
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +24 -96
- package/dist/cjs/ui/toolbar-components.js +115 -150
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +18 -83
- package/dist/es2019/ui/toolbar-components.js +110 -143
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +23 -95
- package/dist/esm/ui/toolbar-components.js +115 -150
- package/dist/types/ui/ElementBrowser/InsertMenu.d.ts +1 -1
- package/dist/types-ts4.5/ui/ElementBrowser/InsertMenu.d.ts +1 -1
- package/package.json +3 -12
|
@@ -272,166 +272,131 @@ export var getToolbarComponents = function getToolbarComponents(_ref) {
|
|
|
272
272
|
});
|
|
273
273
|
};
|
|
274
274
|
};
|
|
275
|
-
|
|
276
|
-
|
|
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
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
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
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
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
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
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
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
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
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
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
|
|
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
|
|
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
|
+
"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.
|
|
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": "^
|
|
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
|
},
|