@atlaskit/editor-plugin-insert-block 3.0.10 → 3.0.12
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-insert-block
|
|
2
2
|
|
|
3
|
+
## 3.0.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#129445](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/129445)
|
|
8
|
+
[`0eb9b03d34eff`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0eb9b03d34eff) -
|
|
9
|
+
Cleans up feature flag that reduces padding in the element browser
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 3.0.11
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 3.0.10
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -18,7 +18,6 @@ var _elementBrowser = require("@atlaskit/editor-common/element-browser");
|
|
|
18
18
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
19
19
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
20
20
|
var _uiReact = require("@atlaskit/editor-common/ui-react");
|
|
21
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
21
|
var _theme = require("@atlaskit/theme");
|
|
23
22
|
var _colors = require("@atlaskit/theme/colors");
|
|
24
23
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
@@ -171,7 +170,7 @@ var InsertMenu = function InsertMenu(_ref) {
|
|
|
171
170
|
return (
|
|
172
171
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
173
172
|
(0, _react2.jsx)("div", {
|
|
174
|
-
css: insertMenuWrapper(height,
|
|
173
|
+
css: insertMenuWrapper(height, isFullPageAppearance)
|
|
175
174
|
}, (0, _react2.jsx)(FlexWrapper, null, (0, _react2.jsx)(_elementBrowser.ElementBrowser, {
|
|
176
175
|
mode: "inline",
|
|
177
176
|
getItems: getItems,
|
|
@@ -183,14 +182,14 @@ var InsertMenu = function InsertMenu(_ref) {
|
|
|
183
182
|
,
|
|
184
183
|
key: quickInsertDropdownItems.length,
|
|
185
184
|
viewMoreItem: viewMoreItem,
|
|
186
|
-
cache:
|
|
185
|
+
cache: cache
|
|
187
186
|
})))
|
|
188
187
|
);
|
|
189
188
|
}
|
|
190
189
|
return (
|
|
191
190
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
192
191
|
(0, _react2.jsx)("div", {
|
|
193
|
-
css: insertMenuWrapper(height,
|
|
192
|
+
css: insertMenuWrapper(height, isFullPageAppearance)
|
|
194
193
|
}, (0, _react2.jsx)(ElementBrowserWrapper, {
|
|
195
194
|
handleClickOutside: toggleVisiblity,
|
|
196
195
|
handleEscapeKeydown: toggleVisiblity,
|
|
@@ -206,7 +205,7 @@ var InsertMenu = function InsertMenu(_ref) {
|
|
|
206
205
|
,
|
|
207
206
|
key: quickInsertDropdownItems.length,
|
|
208
207
|
viewMoreItem: viewMoreItem,
|
|
209
|
-
cache:
|
|
208
|
+
cache: cache
|
|
210
209
|
})))
|
|
211
210
|
);
|
|
212
211
|
};
|
|
@@ -226,16 +225,7 @@ var getSvgIconForItem = function getSvgIconForItem(_ref2) {
|
|
|
226
225
|
label: ""
|
|
227
226
|
}) : undefined;
|
|
228
227
|
};
|
|
229
|
-
var
|
|
230
|
-
var itemCount = _ref3.itemCount;
|
|
231
|
-
// Figure based on visuals to exclude the searchbar, padding/margin, and the ViewMore item.
|
|
232
|
-
var EXTRA_SPACE_EXCLUDING_ELEMENTLIST = 128;
|
|
233
|
-
if (itemCount > 0 && itemCount < 6) {
|
|
234
|
-
return itemCount * 75 + EXTRA_SPACE_EXCLUDING_ELEMENTLIST;
|
|
235
|
-
}
|
|
236
|
-
return 560; // For showing 6 Elements.
|
|
237
|
-
};
|
|
238
|
-
var insertMenuWrapper = function insertMenuWrapper(height, itemCount, isFullPageAppearance) {
|
|
228
|
+
var insertMenuWrapper = function insertMenuWrapper(height, isFullPageAppearance) {
|
|
239
229
|
if (isFullPageAppearance && (0, _experiments.editorExperiment)('insert-menu-in-right-rail', true)) {
|
|
240
230
|
return (0, _react2.css)({
|
|
241
231
|
display: 'flex',
|
|
@@ -254,9 +244,7 @@ var insertMenuWrapper = function insertMenuWrapper(height, itemCount, isFullPage
|
|
|
254
244
|
flexDirection: 'column',
|
|
255
245
|
width: '320px',
|
|
256
246
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
257
|
-
height: "".concat(
|
|
258
|
-
itemCount: itemCount
|
|
259
|
-
}), "px"),
|
|
247
|
+
height: "".concat(height, "px"),
|
|
260
248
|
backgroundColor: "".concat("var(--ds-surface-overlay, ".concat(_colors.N0, ")")),
|
|
261
249
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
262
250
|
borderRadius: "".concat((0, _theme.borderRadius)(), "px"),
|
|
@@ -14,7 +14,6 @@ import { ELEMENT_ITEM_HEIGHT, ElementBrowser } from '@atlaskit/editor-common/ele
|
|
|
14
14
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
15
15
|
import { IconCode, IconDate, IconDecision, IconDivider, IconExpand, IconPanel, IconQuote, IconStatus } from '@atlaskit/editor-common/quick-insert';
|
|
16
16
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
17
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
17
|
// AFP-2532 TODO: Fix automatic suppressions below
|
|
19
18
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
20
19
|
import { borderRadius } from '@atlaskit/theme';
|
|
@@ -147,7 +146,7 @@ const InsertMenu = ({
|
|
|
147
146
|
return (
|
|
148
147
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
149
148
|
jsx("div", {
|
|
150
|
-
css: insertMenuWrapper(height,
|
|
149
|
+
css: insertMenuWrapper(height, isFullPageAppearance)
|
|
151
150
|
}, jsx(FlexWrapper, null, jsx(ElementBrowser, {
|
|
152
151
|
mode: "inline",
|
|
153
152
|
getItems: getItems,
|
|
@@ -159,14 +158,14 @@ const InsertMenu = ({
|
|
|
159
158
|
,
|
|
160
159
|
key: quickInsertDropdownItems.length,
|
|
161
160
|
viewMoreItem: viewMoreItem,
|
|
162
|
-
cache:
|
|
161
|
+
cache: cache
|
|
163
162
|
})))
|
|
164
163
|
);
|
|
165
164
|
}
|
|
166
165
|
return (
|
|
167
166
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
168
167
|
jsx("div", {
|
|
169
|
-
css: insertMenuWrapper(height,
|
|
168
|
+
css: insertMenuWrapper(height, isFullPageAppearance)
|
|
170
169
|
}, jsx(ElementBrowserWrapper, {
|
|
171
170
|
handleClickOutside: toggleVisiblity,
|
|
172
171
|
handleEscapeKeydown: toggleVisiblity,
|
|
@@ -182,7 +181,7 @@ const InsertMenu = ({
|
|
|
182
181
|
,
|
|
183
182
|
key: quickInsertDropdownItems.length,
|
|
184
183
|
viewMoreItem: viewMoreItem,
|
|
185
|
-
cache:
|
|
184
|
+
cache: cache
|
|
186
185
|
})))
|
|
187
186
|
);
|
|
188
187
|
};
|
|
@@ -203,17 +202,7 @@ const getSvgIconForItem = ({
|
|
|
203
202
|
label: ""
|
|
204
203
|
}) : undefined;
|
|
205
204
|
};
|
|
206
|
-
const
|
|
207
|
-
itemCount
|
|
208
|
-
}) => {
|
|
209
|
-
// Figure based on visuals to exclude the searchbar, padding/margin, and the ViewMore item.
|
|
210
|
-
const EXTRA_SPACE_EXCLUDING_ELEMENTLIST = 128;
|
|
211
|
-
if (itemCount > 0 && itemCount < 6) {
|
|
212
|
-
return itemCount * 75 + EXTRA_SPACE_EXCLUDING_ELEMENTLIST;
|
|
213
|
-
}
|
|
214
|
-
return 560; // For showing 6 Elements.
|
|
215
|
-
};
|
|
216
|
-
const insertMenuWrapper = (height, itemCount, isFullPageAppearance) => {
|
|
205
|
+
const insertMenuWrapper = (height, isFullPageAppearance) => {
|
|
217
206
|
if (isFullPageAppearance && editorExperiment('insert-menu-in-right-rail', true)) {
|
|
218
207
|
return css({
|
|
219
208
|
display: 'flex',
|
|
@@ -232,9 +221,7 @@ const insertMenuWrapper = (height, itemCount, isFullPageAppearance) => {
|
|
|
232
221
|
flexDirection: 'column',
|
|
233
222
|
width: '320px',
|
|
234
223
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
235
|
-
height: `${
|
|
236
|
-
itemCount
|
|
237
|
-
})}px`,
|
|
224
|
+
height: `${height}px`,
|
|
238
225
|
backgroundColor: `${`var(--ds-surface-overlay, ${N0})`}`,
|
|
239
226
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
240
227
|
borderRadius: `${borderRadius()}px`,
|
|
@@ -21,7 +21,6 @@ import { ELEMENT_ITEM_HEIGHT, ElementBrowser } from '@atlaskit/editor-common/ele
|
|
|
21
21
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
22
22
|
import { IconCode, IconDate, IconDecision, IconDivider, IconExpand, IconPanel, IconQuote, IconStatus } from '@atlaskit/editor-common/quick-insert';
|
|
23
23
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
24
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
25
24
|
// AFP-2532 TODO: Fix automatic suppressions below
|
|
26
25
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
27
26
|
import { borderRadius } from '@atlaskit/theme';
|
|
@@ -168,7 +167,7 @@ var InsertMenu = function InsertMenu(_ref) {
|
|
|
168
167
|
return (
|
|
169
168
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
170
169
|
jsx("div", {
|
|
171
|
-
css: insertMenuWrapper(height,
|
|
170
|
+
css: insertMenuWrapper(height, isFullPageAppearance)
|
|
172
171
|
}, jsx(FlexWrapper, null, jsx(ElementBrowser, {
|
|
173
172
|
mode: "inline",
|
|
174
173
|
getItems: getItems,
|
|
@@ -180,14 +179,14 @@ var InsertMenu = function InsertMenu(_ref) {
|
|
|
180
179
|
,
|
|
181
180
|
key: quickInsertDropdownItems.length,
|
|
182
181
|
viewMoreItem: viewMoreItem,
|
|
183
|
-
cache:
|
|
182
|
+
cache: cache
|
|
184
183
|
})))
|
|
185
184
|
);
|
|
186
185
|
}
|
|
187
186
|
return (
|
|
188
187
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
189
188
|
jsx("div", {
|
|
190
|
-
css: insertMenuWrapper(height,
|
|
189
|
+
css: insertMenuWrapper(height, isFullPageAppearance)
|
|
191
190
|
}, jsx(ElementBrowserWrapper, {
|
|
192
191
|
handleClickOutside: toggleVisiblity,
|
|
193
192
|
handleEscapeKeydown: toggleVisiblity,
|
|
@@ -203,7 +202,7 @@ var InsertMenu = function InsertMenu(_ref) {
|
|
|
203
202
|
,
|
|
204
203
|
key: quickInsertDropdownItems.length,
|
|
205
204
|
viewMoreItem: viewMoreItem,
|
|
206
|
-
cache:
|
|
205
|
+
cache: cache
|
|
207
206
|
})))
|
|
208
207
|
);
|
|
209
208
|
};
|
|
@@ -223,16 +222,7 @@ var getSvgIconForItem = function getSvgIconForItem(_ref2) {
|
|
|
223
222
|
label: ""
|
|
224
223
|
}) : undefined;
|
|
225
224
|
};
|
|
226
|
-
var
|
|
227
|
-
var itemCount = _ref3.itemCount;
|
|
228
|
-
// Figure based on visuals to exclude the searchbar, padding/margin, and the ViewMore item.
|
|
229
|
-
var EXTRA_SPACE_EXCLUDING_ELEMENTLIST = 128;
|
|
230
|
-
if (itemCount > 0 && itemCount < 6) {
|
|
231
|
-
return itemCount * 75 + EXTRA_SPACE_EXCLUDING_ELEMENTLIST;
|
|
232
|
-
}
|
|
233
|
-
return 560; // For showing 6 Elements.
|
|
234
|
-
};
|
|
235
|
-
var insertMenuWrapper = function insertMenuWrapper(height, itemCount, isFullPageAppearance) {
|
|
225
|
+
var insertMenuWrapper = function insertMenuWrapper(height, isFullPageAppearance) {
|
|
236
226
|
if (isFullPageAppearance && editorExperiment('insert-menu-in-right-rail', true)) {
|
|
237
227
|
return css({
|
|
238
228
|
display: 'flex',
|
|
@@ -251,9 +241,7 @@ var insertMenuWrapper = function insertMenuWrapper(height, itemCount, isFullPage
|
|
|
251
241
|
flexDirection: 'column',
|
|
252
242
|
width: '320px',
|
|
253
243
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
254
|
-
height: "".concat(
|
|
255
|
-
itemCount: itemCount
|
|
256
|
-
}), "px"),
|
|
244
|
+
height: "".concat(height, "px"),
|
|
257
245
|
backgroundColor: "".concat("var(--ds-surface-overlay, ".concat(N0, ")")),
|
|
258
246
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
259
247
|
borderRadius: "".concat(borderRadius(), "px"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-insert-block",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.12",
|
|
4
4
|
"description": "Insert block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,42 +34,42 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/button": "^21.1.0",
|
|
37
|
-
"@atlaskit/editor-common": "^102.
|
|
37
|
+
"@atlaskit/editor-common": "^102.11.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
39
39
|
"@atlaskit/editor-plugin-block-type": "^5.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-code-block": "^4.2.0",
|
|
41
41
|
"@atlaskit/editor-plugin-connectivity": "^2.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-date": "^4.1.0",
|
|
43
43
|
"@atlaskit/editor-plugin-emoji": "^3.2.0",
|
|
44
|
-
"@atlaskit/editor-plugin-expand": "^3.
|
|
44
|
+
"@atlaskit/editor-plugin-expand": "^3.2.0",
|
|
45
45
|
"@atlaskit/editor-plugin-extension": "^5.0.0",
|
|
46
46
|
"@atlaskit/editor-plugin-feature-flags": "^1.3.0",
|
|
47
|
-
"@atlaskit/editor-plugin-hyperlink": "^4.
|
|
47
|
+
"@atlaskit/editor-plugin-hyperlink": "^4.3.0",
|
|
48
48
|
"@atlaskit/editor-plugin-image-upload": "^2.0.0",
|
|
49
|
-
"@atlaskit/editor-plugin-layout": "^2.
|
|
49
|
+
"@atlaskit/editor-plugin-layout": "^2.3.0",
|
|
50
50
|
"@atlaskit/editor-plugin-media": "^2.3.0",
|
|
51
51
|
"@atlaskit/editor-plugin-media-insert": "^6.1.0",
|
|
52
52
|
"@atlaskit/editor-plugin-mentions": "^4.1.0",
|
|
53
53
|
"@atlaskit/editor-plugin-metrics": "^3.4.0",
|
|
54
|
-
"@atlaskit/editor-plugin-panel": "^4.
|
|
54
|
+
"@atlaskit/editor-plugin-panel": "^4.3.0",
|
|
55
55
|
"@atlaskit/editor-plugin-placeholder-text": "^2.1.0",
|
|
56
56
|
"@atlaskit/editor-plugin-primary-toolbar": "^3.0.0",
|
|
57
57
|
"@atlaskit/editor-plugin-quick-insert": "^2.1.0",
|
|
58
58
|
"@atlaskit/editor-plugin-rule": "^2.1.0",
|
|
59
59
|
"@atlaskit/editor-plugin-status": "^3.1.0",
|
|
60
|
-
"@atlaskit/editor-plugin-table": "^10.
|
|
60
|
+
"@atlaskit/editor-plugin-table": "^10.5.0",
|
|
61
61
|
"@atlaskit/editor-plugin-tasks-and-decisions": "^5.0.0",
|
|
62
62
|
"@atlaskit/editor-plugin-type-ahead": "^2.1.0",
|
|
63
63
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
64
64
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
65
|
-
"@atlaskit/emoji": "^
|
|
65
|
+
"@atlaskit/emoji": "^69.0.0",
|
|
66
66
|
"@atlaskit/heading": "^5.1.0",
|
|
67
67
|
"@atlaskit/icon": "^25.0.0",
|
|
68
|
-
"@atlaskit/icon-lab": "^4.
|
|
68
|
+
"@atlaskit/icon-lab": "^4.2.0",
|
|
69
69
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
70
|
-
"@atlaskit/primitives": "^14.
|
|
70
|
+
"@atlaskit/primitives": "^14.2.0",
|
|
71
71
|
"@atlaskit/theme": "^18.0.0",
|
|
72
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
72
|
+
"@atlaskit/tmp-editor-statsig": "^4.1.0",
|
|
73
73
|
"@atlaskit/tokens": "^4.5.0",
|
|
74
74
|
"@atlaskit/tooltip": "^20.0.0",
|
|
75
75
|
"@babel/runtime": "^7.0.0",
|
|
@@ -133,9 +133,6 @@
|
|
|
133
133
|
"platform_editor_toolbar_responsive_fixes": {
|
|
134
134
|
"type": "boolean"
|
|
135
135
|
},
|
|
136
|
-
"platform_editor_reduce_element_browser_padding": {
|
|
137
|
-
"type": "boolean"
|
|
138
|
-
},
|
|
139
136
|
"platform_editor_ease_of_use_metrics": {
|
|
140
137
|
"type": "boolean"
|
|
141
138
|
},
|