@atlaskit/editor-plugin-insert-block 4.3.8 → 5.0.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 +16 -0
- package/dist/cjs/ui/ToolbarInsertBlock/index.js +1 -1
- package/dist/cjs/ui/toolbar-components.js +44 -6
- package/dist/es2019/ui/ToolbarInsertBlock/index.js +4 -4
- package/dist/es2019/ui/toolbar-components.js +38 -6
- package/dist/esm/ui/ToolbarInsertBlock/index.js +1 -1
- package/dist/esm/ui/toolbar-components.js +44 -6
- package/package.json +31 -31
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-insert-block
|
|
2
2
|
|
|
3
|
+
## 5.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3b5b4a919aaaf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3b5b4a919aaaf) -
|
|
8
|
+
Internal changes to how border radius is applied.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 4.3.9
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`51f3f2db61f6e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/51f3f2db61f6e) -
|
|
16
|
+
Update toolbar config across plugins
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 4.3.8
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -74,7 +74,7 @@ var tableButtonWrapper = exports.tableButtonWrapper = function tableButtonWrappe
|
|
|
74
74
|
var isTableSelectorOpen = _ref.isTableSelectorOpen,
|
|
75
75
|
isButtonDisabled = _ref.isButtonDisabled;
|
|
76
76
|
return (// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation due to mixins
|
|
77
|
-
(0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\tdisplay: flex;\n\t\t", "\n\t\t", "\n\n .table-toolbar-btn {\n\t\t\tborder-top-right-radius: ", ";\n\t\t\tborder-bottom-right-radius: ", ";\n\t\t\tmargin-right: ", ";\n\t\t\tpadding: ", ";\n\t\t\t& > span {\n\t\t\t\tmin-width: 16px;\n\t\t\t\tmargin: ", ";\n\t\t\t}\n\t\t}\n\t\t.table-selector-toolbar-btn {\n\t\t\tpadding: ", ";\n\t\t\t& > span {\n\t\t\t\tmargin: ", ";\n\t\t\t\twidth: 16px !important;\n\t\t\t\tdisplay: flex;\n\t\t\t\tjustify-content: center;\n\t\t\t}\n\n\t\t\tborder-top-left-radius: ", " !important;\n\t\t\tborder-bottom-left-radius: ", " !important;\n\t\t}\n\t"])), !isTableSelectorOpen && !isButtonDisabled && getHoverStyles('.table-selector-toolbar-btn'), !isTableSelectorOpen && !isButtonDisabled && getHoverStyles('.table-toolbar-btn'), "var(--ds-
|
|
77
|
+
(0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\tdisplay: flex;\n\t\t", "\n\t\t", "\n\n .table-toolbar-btn {\n\t\t\tborder-top-right-radius: ", ";\n\t\t\tborder-bottom-right-radius: ", ";\n\t\t\tmargin-right: ", ";\n\t\t\tpadding: ", ";\n\t\t\t& > span {\n\t\t\t\tmin-width: 16px;\n\t\t\t\tmargin: ", ";\n\t\t\t}\n\t\t}\n\t\t.table-selector-toolbar-btn {\n\t\t\tpadding: ", ";\n\t\t\t& > span {\n\t\t\t\tmargin: ", ";\n\t\t\t\twidth: 16px !important;\n\t\t\t\tdisplay: flex;\n\t\t\t\tjustify-content: center;\n\t\t\t}\n\n\t\t\tborder-top-left-radius: ", " !important;\n\t\t\tborder-bottom-left-radius: ", " !important;\n\t\t}\n\t"])), !isTableSelectorOpen && !isButtonDisabled && getHoverStyles('.table-selector-toolbar-btn'), !isTableSelectorOpen && !isButtonDisabled && getHoverStyles('.table-toolbar-btn'), "var(--ds-radius-large, 0px)", "var(--ds-radius-large, 0px)", "var(--ds-space-025, 1px)", "var(--ds-space-0, 0px)", "var(--ds-space-0, 0px)", "var(--ds-space-0, 0px)", "var(--ds-space-0, 0px)", "var(--ds-radius-large, 0px)", "var(--ds-radius-large, 0px)")
|
|
78
78
|
);
|
|
79
79
|
};
|
|
80
80
|
|
|
@@ -8,6 +8,8 @@ exports.getToolbarComponents = void 0;
|
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
11
|
+
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
12
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
11
13
|
var _EmojiButton = require("./toolbar-components/EmojiButton");
|
|
12
14
|
var _ImageButton = require("./toolbar-components/ImageButton");
|
|
13
15
|
var _InsertButton = require("./toolbar-components/InsertButton");
|
|
@@ -62,7 +64,13 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
62
64
|
type: _toolbar.INSERT_BLOCK_SECTION.type,
|
|
63
65
|
key: _toolbar.INSERT_BLOCK_SECTION.key,
|
|
64
66
|
rank: _toolbar.INSERT_BLOCK_SECTION_RANK[_toolbar.TASK_LIST_GROUP.key]
|
|
65
|
-
}]
|
|
67
|
+
}],
|
|
68
|
+
component: (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? function (_ref2) {
|
|
69
|
+
var children = _ref2.children;
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement(_editorToolbar.Show, {
|
|
71
|
+
above: "lg"
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButtonGroup, null, children));
|
|
73
|
+
} : undefined
|
|
66
74
|
}, {
|
|
67
75
|
type: _toolbar.TASK_LIST_BUTTON.type,
|
|
68
76
|
key: _toolbar.TASK_LIST_BUTTON.key,
|
|
@@ -83,7 +91,13 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
83
91
|
type: _toolbar.INSERT_BLOCK_SECTION.type,
|
|
84
92
|
key: _toolbar.INSERT_BLOCK_SECTION.key,
|
|
85
93
|
rank: _toolbar.INSERT_BLOCK_SECTION_RANK[_toolbar.MEDIA_GROUP.key]
|
|
86
|
-
}]
|
|
94
|
+
}],
|
|
95
|
+
component: (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? function (_ref3) {
|
|
96
|
+
var children = _ref3.children;
|
|
97
|
+
return /*#__PURE__*/_react.default.createElement(_editorToolbar.Show, {
|
|
98
|
+
above: "lg"
|
|
99
|
+
}, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButtonGroup, null, children));
|
|
100
|
+
} : undefined
|
|
87
101
|
}, {
|
|
88
102
|
type: _toolbar.MEDIA_BUTTON.type,
|
|
89
103
|
key: _toolbar.MEDIA_BUTTON.key,
|
|
@@ -106,7 +120,13 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
106
120
|
type: _toolbar.INSERT_BLOCK_SECTION.type,
|
|
107
121
|
key: _toolbar.INSERT_BLOCK_SECTION.key,
|
|
108
122
|
rank: _toolbar.INSERT_BLOCK_SECTION_RANK[_toolbar.MENTION_GROUP.key]
|
|
109
|
-
}]
|
|
123
|
+
}],
|
|
124
|
+
component: (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? function (_ref4) {
|
|
125
|
+
var children = _ref4.children;
|
|
126
|
+
return /*#__PURE__*/_react.default.createElement(_editorToolbar.Show, {
|
|
127
|
+
above: "lg"
|
|
128
|
+
}, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButtonGroup, null, children));
|
|
129
|
+
} : undefined
|
|
110
130
|
}, {
|
|
111
131
|
type: _toolbar.MENTION_BUTTON.type,
|
|
112
132
|
key: _toolbar.MENTION_BUTTON.key,
|
|
@@ -127,7 +147,13 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
127
147
|
type: _toolbar.INSERT_BLOCK_SECTION.type,
|
|
128
148
|
key: _toolbar.INSERT_BLOCK_SECTION.key,
|
|
129
149
|
rank: _toolbar.INSERT_BLOCK_SECTION_RANK[_toolbar.EMOJI_GROUP.key]
|
|
130
|
-
}]
|
|
150
|
+
}],
|
|
151
|
+
component: (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? function (_ref5) {
|
|
152
|
+
var children = _ref5.children;
|
|
153
|
+
return /*#__PURE__*/_react.default.createElement(_editorToolbar.Show, {
|
|
154
|
+
above: "lg"
|
|
155
|
+
}, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButtonGroup, null, children));
|
|
156
|
+
} : undefined
|
|
131
157
|
}, {
|
|
132
158
|
type: _toolbar.EMOJI_BUTTON.type,
|
|
133
159
|
key: _toolbar.EMOJI_BUTTON.key,
|
|
@@ -148,7 +174,13 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
148
174
|
type: _toolbar.INSERT_BLOCK_SECTION.type,
|
|
149
175
|
key: _toolbar.INSERT_BLOCK_SECTION.key,
|
|
150
176
|
rank: _toolbar.INSERT_BLOCK_SECTION_RANK[_toolbar.LAYOUT_GROUP.key]
|
|
151
|
-
}]
|
|
177
|
+
}],
|
|
178
|
+
component: (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? function (_ref6) {
|
|
179
|
+
var children = _ref6.children;
|
|
180
|
+
return /*#__PURE__*/_react.default.createElement(_editorToolbar.Show, {
|
|
181
|
+
above: "lg"
|
|
182
|
+
}, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButtonGroup, null, children));
|
|
183
|
+
} : undefined
|
|
152
184
|
}, {
|
|
153
185
|
type: _toolbar.LAYOUT_BUTTON.type,
|
|
154
186
|
key: _toolbar.LAYOUT_BUTTON.key,
|
|
@@ -169,7 +201,13 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
169
201
|
type: _toolbar.INSERT_BLOCK_SECTION.type,
|
|
170
202
|
key: _toolbar.INSERT_BLOCK_SECTION.key,
|
|
171
203
|
rank: _toolbar.INSERT_BLOCK_SECTION_RANK[_toolbar.TABLE_GROUP.key]
|
|
172
|
-
}]
|
|
204
|
+
}],
|
|
205
|
+
component: (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? function (_ref7) {
|
|
206
|
+
var children = _ref7.children;
|
|
207
|
+
return /*#__PURE__*/_react.default.createElement(_editorToolbar.Show, {
|
|
208
|
+
above: "md"
|
|
209
|
+
}, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButtonGroup, null, children));
|
|
210
|
+
} : undefined
|
|
173
211
|
}, {
|
|
174
212
|
type: _toolbar.TABLE_BUTTON.type,
|
|
175
213
|
key: _toolbar.TABLE_BUTTON.key,
|
|
@@ -62,8 +62,8 @@ css`
|
|
|
62
62
|
${!isTableSelectorOpen && !isButtonDisabled && getHoverStyles('.table-toolbar-btn')}
|
|
63
63
|
|
|
64
64
|
.table-toolbar-btn {
|
|
65
|
-
border-top-right-radius: ${"var(--ds-
|
|
66
|
-
border-bottom-right-radius: ${"var(--ds-
|
|
65
|
+
border-top-right-radius: ${"var(--ds-radius-large, 0px)"};
|
|
66
|
+
border-bottom-right-radius: ${"var(--ds-radius-large, 0px)"};
|
|
67
67
|
margin-right: ${"var(--ds-space-025, 1px)"};
|
|
68
68
|
padding: ${"var(--ds-space-0, 0px)"};
|
|
69
69
|
& > span {
|
|
@@ -80,8 +80,8 @@ css`
|
|
|
80
80
|
justify-content: center;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
border-top-left-radius: ${"var(--ds-
|
|
84
|
-
border-bottom-left-radius: ${"var(--ds-
|
|
83
|
+
border-top-left-radius: ${"var(--ds-radius-large, 0px)"} !important;
|
|
84
|
+
border-bottom-left-radius: ${"var(--ds-radius-large, 0px)"} !important;
|
|
85
85
|
}
|
|
86
86
|
`;
|
|
87
87
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { INSERT_BLOCK_SECTION, TASK_LIST_GROUP, MEDIA_GROUP, INSERT_BLOCK_SECTION_RANK, TASK_LIST_BUTTON, TASK_LIST_GROUP_RANK, MEDIA_BUTTON, MENTION_GROUP, MEDIA_GROUP_RANK, MENTION_BUTTON, MENTION_GROUP_RANK, EMOJI_GROUP, EMOJI_BUTTON, EMOJI_GROUP_RANK, LAYOUT_GROUP, LAYOUT_BUTTON, LAYOUT_GROUP_RANK, TABLE_GROUP_RANK, TABLE_BUTTON, TABLE_GROUP, TABLE_SIZE_PICKER, INSERT_GROUP, INSERT_BUTTON, INSERT_GROUP_RANK } from '@atlaskit/editor-common/toolbar';
|
|
3
|
+
import { Show, ToolbarButtonGroup } from '@atlaskit/editor-toolbar';
|
|
4
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
5
|
import { EmojiButton } from './toolbar-components/EmojiButton';
|
|
4
6
|
import { ImageButton } from './toolbar-components/ImageButton';
|
|
5
7
|
import { InsertButton } from './toolbar-components/InsertButton';
|
|
@@ -53,7 +55,12 @@ export const getToolbarComponents = ({
|
|
|
53
55
|
type: INSERT_BLOCK_SECTION.type,
|
|
54
56
|
key: INSERT_BLOCK_SECTION.key,
|
|
55
57
|
rank: INSERT_BLOCK_SECTION_RANK[TASK_LIST_GROUP.key]
|
|
56
|
-
}]
|
|
58
|
+
}],
|
|
59
|
+
component: expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? ({
|
|
60
|
+
children
|
|
61
|
+
}) => /*#__PURE__*/React.createElement(Show, {
|
|
62
|
+
above: "lg"
|
|
63
|
+
}, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children)) : undefined
|
|
57
64
|
}, {
|
|
58
65
|
type: TASK_LIST_BUTTON.type,
|
|
59
66
|
key: TASK_LIST_BUTTON.key,
|
|
@@ -72,7 +79,12 @@ export const getToolbarComponents = ({
|
|
|
72
79
|
type: INSERT_BLOCK_SECTION.type,
|
|
73
80
|
key: INSERT_BLOCK_SECTION.key,
|
|
74
81
|
rank: INSERT_BLOCK_SECTION_RANK[MEDIA_GROUP.key]
|
|
75
|
-
}]
|
|
82
|
+
}],
|
|
83
|
+
component: expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? ({
|
|
84
|
+
children
|
|
85
|
+
}) => /*#__PURE__*/React.createElement(Show, {
|
|
86
|
+
above: "lg"
|
|
87
|
+
}, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children)) : undefined
|
|
76
88
|
}, {
|
|
77
89
|
type: MEDIA_BUTTON.type,
|
|
78
90
|
key: MEDIA_BUTTON.key,
|
|
@@ -93,7 +105,12 @@ export const getToolbarComponents = ({
|
|
|
93
105
|
type: INSERT_BLOCK_SECTION.type,
|
|
94
106
|
key: INSERT_BLOCK_SECTION.key,
|
|
95
107
|
rank: INSERT_BLOCK_SECTION_RANK[MENTION_GROUP.key]
|
|
96
|
-
}]
|
|
108
|
+
}],
|
|
109
|
+
component: expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? ({
|
|
110
|
+
children
|
|
111
|
+
}) => /*#__PURE__*/React.createElement(Show, {
|
|
112
|
+
above: "lg"
|
|
113
|
+
}, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children)) : undefined
|
|
97
114
|
}, {
|
|
98
115
|
type: MENTION_BUTTON.type,
|
|
99
116
|
key: MENTION_BUTTON.key,
|
|
@@ -112,7 +129,12 @@ export const getToolbarComponents = ({
|
|
|
112
129
|
type: INSERT_BLOCK_SECTION.type,
|
|
113
130
|
key: INSERT_BLOCK_SECTION.key,
|
|
114
131
|
rank: INSERT_BLOCK_SECTION_RANK[EMOJI_GROUP.key]
|
|
115
|
-
}]
|
|
132
|
+
}],
|
|
133
|
+
component: expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? ({
|
|
134
|
+
children
|
|
135
|
+
}) => /*#__PURE__*/React.createElement(Show, {
|
|
136
|
+
above: "lg"
|
|
137
|
+
}, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children)) : undefined
|
|
116
138
|
}, {
|
|
117
139
|
type: EMOJI_BUTTON.type,
|
|
118
140
|
key: EMOJI_BUTTON.key,
|
|
@@ -131,7 +153,12 @@ export const getToolbarComponents = ({
|
|
|
131
153
|
type: INSERT_BLOCK_SECTION.type,
|
|
132
154
|
key: INSERT_BLOCK_SECTION.key,
|
|
133
155
|
rank: INSERT_BLOCK_SECTION_RANK[LAYOUT_GROUP.key]
|
|
134
|
-
}]
|
|
156
|
+
}],
|
|
157
|
+
component: expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? ({
|
|
158
|
+
children
|
|
159
|
+
}) => /*#__PURE__*/React.createElement(Show, {
|
|
160
|
+
above: "lg"
|
|
161
|
+
}, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children)) : undefined
|
|
135
162
|
}, {
|
|
136
163
|
type: LAYOUT_BUTTON.type,
|
|
137
164
|
key: LAYOUT_BUTTON.key,
|
|
@@ -150,7 +177,12 @@ export const getToolbarComponents = ({
|
|
|
150
177
|
type: INSERT_BLOCK_SECTION.type,
|
|
151
178
|
key: INSERT_BLOCK_SECTION.key,
|
|
152
179
|
rank: INSERT_BLOCK_SECTION_RANK[TABLE_GROUP.key]
|
|
153
|
-
}]
|
|
180
|
+
}],
|
|
181
|
+
component: expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? ({
|
|
182
|
+
children
|
|
183
|
+
}) => /*#__PURE__*/React.createElement(Show, {
|
|
184
|
+
above: "md"
|
|
185
|
+
}, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children)) : undefined
|
|
154
186
|
}, {
|
|
155
187
|
type: TABLE_BUTTON.type,
|
|
156
188
|
key: TABLE_BUTTON.key,
|
|
@@ -68,7 +68,7 @@ export var tableButtonWrapper = function tableButtonWrapper(_ref) {
|
|
|
68
68
|
var isTableSelectorOpen = _ref.isTableSelectorOpen,
|
|
69
69
|
isButtonDisabled = _ref.isButtonDisabled;
|
|
70
70
|
return (// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation due to mixins
|
|
71
|
-
css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\tdisplay: flex;\n\t\t", "\n\t\t", "\n\n .table-toolbar-btn {\n\t\t\tborder-top-right-radius: ", ";\n\t\t\tborder-bottom-right-radius: ", ";\n\t\t\tmargin-right: ", ";\n\t\t\tpadding: ", ";\n\t\t\t& > span {\n\t\t\t\tmin-width: 16px;\n\t\t\t\tmargin: ", ";\n\t\t\t}\n\t\t}\n\t\t.table-selector-toolbar-btn {\n\t\t\tpadding: ", ";\n\t\t\t& > span {\n\t\t\t\tmargin: ", ";\n\t\t\t\twidth: 16px !important;\n\t\t\t\tdisplay: flex;\n\t\t\t\tjustify-content: center;\n\t\t\t}\n\n\t\t\tborder-top-left-radius: ", " !important;\n\t\t\tborder-bottom-left-radius: ", " !important;\n\t\t}\n\t"])), !isTableSelectorOpen && !isButtonDisabled && getHoverStyles('.table-selector-toolbar-btn'), !isTableSelectorOpen && !isButtonDisabled && getHoverStyles('.table-toolbar-btn'), "var(--ds-
|
|
71
|
+
css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\tdisplay: flex;\n\t\t", "\n\t\t", "\n\n .table-toolbar-btn {\n\t\t\tborder-top-right-radius: ", ";\n\t\t\tborder-bottom-right-radius: ", ";\n\t\t\tmargin-right: ", ";\n\t\t\tpadding: ", ";\n\t\t\t& > span {\n\t\t\t\tmin-width: 16px;\n\t\t\t\tmargin: ", ";\n\t\t\t}\n\t\t}\n\t\t.table-selector-toolbar-btn {\n\t\t\tpadding: ", ";\n\t\t\t& > span {\n\t\t\t\tmargin: ", ";\n\t\t\t\twidth: 16px !important;\n\t\t\t\tdisplay: flex;\n\t\t\t\tjustify-content: center;\n\t\t\t}\n\n\t\t\tborder-top-left-radius: ", " !important;\n\t\t\tborder-bottom-left-radius: ", " !important;\n\t\t}\n\t"])), !isTableSelectorOpen && !isButtonDisabled && getHoverStyles('.table-selector-toolbar-btn'), !isTableSelectorOpen && !isButtonDisabled && getHoverStyles('.table-toolbar-btn'), "var(--ds-radius-large, 0px)", "var(--ds-radius-large, 0px)", "var(--ds-space-025, 1px)", "var(--ds-space-0, 0px)", "var(--ds-space-0, 0px)", "var(--ds-space-0, 0px)", "var(--ds-space-0, 0px)", "var(--ds-radius-large, 0px)", "var(--ds-radius-large, 0px)")
|
|
72
72
|
);
|
|
73
73
|
};
|
|
74
74
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { INSERT_BLOCK_SECTION, TASK_LIST_GROUP, MEDIA_GROUP, INSERT_BLOCK_SECTION_RANK, TASK_LIST_BUTTON, TASK_LIST_GROUP_RANK, MEDIA_BUTTON, MENTION_GROUP, MEDIA_GROUP_RANK, MENTION_BUTTON, MENTION_GROUP_RANK, EMOJI_GROUP, EMOJI_BUTTON, EMOJI_GROUP_RANK, LAYOUT_GROUP, LAYOUT_BUTTON, LAYOUT_GROUP_RANK, TABLE_GROUP_RANK, TABLE_BUTTON, TABLE_GROUP, TABLE_SIZE_PICKER, INSERT_GROUP, INSERT_BUTTON, INSERT_GROUP_RANK } from '@atlaskit/editor-common/toolbar';
|
|
4
|
+
import { Show, ToolbarButtonGroup } from '@atlaskit/editor-toolbar';
|
|
5
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
6
|
import { EmojiButton } from './toolbar-components/EmojiButton';
|
|
5
7
|
import { ImageButton } from './toolbar-components/ImageButton';
|
|
6
8
|
import { InsertButton } from './toolbar-components/InsertButton';
|
|
@@ -55,7 +57,13 @@ export var getToolbarComponents = function getToolbarComponents(_ref) {
|
|
|
55
57
|
type: INSERT_BLOCK_SECTION.type,
|
|
56
58
|
key: INSERT_BLOCK_SECTION.key,
|
|
57
59
|
rank: INSERT_BLOCK_SECTION_RANK[TASK_LIST_GROUP.key]
|
|
58
|
-
}]
|
|
60
|
+
}],
|
|
61
|
+
component: expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? function (_ref2) {
|
|
62
|
+
var children = _ref2.children;
|
|
63
|
+
return /*#__PURE__*/React.createElement(Show, {
|
|
64
|
+
above: "lg"
|
|
65
|
+
}, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children));
|
|
66
|
+
} : undefined
|
|
59
67
|
}, {
|
|
60
68
|
type: TASK_LIST_BUTTON.type,
|
|
61
69
|
key: TASK_LIST_BUTTON.key,
|
|
@@ -76,7 +84,13 @@ export var getToolbarComponents = function getToolbarComponents(_ref) {
|
|
|
76
84
|
type: INSERT_BLOCK_SECTION.type,
|
|
77
85
|
key: INSERT_BLOCK_SECTION.key,
|
|
78
86
|
rank: INSERT_BLOCK_SECTION_RANK[MEDIA_GROUP.key]
|
|
79
|
-
}]
|
|
87
|
+
}],
|
|
88
|
+
component: expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? function (_ref3) {
|
|
89
|
+
var children = _ref3.children;
|
|
90
|
+
return /*#__PURE__*/React.createElement(Show, {
|
|
91
|
+
above: "lg"
|
|
92
|
+
}, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children));
|
|
93
|
+
} : undefined
|
|
80
94
|
}, {
|
|
81
95
|
type: MEDIA_BUTTON.type,
|
|
82
96
|
key: MEDIA_BUTTON.key,
|
|
@@ -99,7 +113,13 @@ export var getToolbarComponents = function getToolbarComponents(_ref) {
|
|
|
99
113
|
type: INSERT_BLOCK_SECTION.type,
|
|
100
114
|
key: INSERT_BLOCK_SECTION.key,
|
|
101
115
|
rank: INSERT_BLOCK_SECTION_RANK[MENTION_GROUP.key]
|
|
102
|
-
}]
|
|
116
|
+
}],
|
|
117
|
+
component: expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? function (_ref4) {
|
|
118
|
+
var children = _ref4.children;
|
|
119
|
+
return /*#__PURE__*/React.createElement(Show, {
|
|
120
|
+
above: "lg"
|
|
121
|
+
}, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children));
|
|
122
|
+
} : undefined
|
|
103
123
|
}, {
|
|
104
124
|
type: MENTION_BUTTON.type,
|
|
105
125
|
key: MENTION_BUTTON.key,
|
|
@@ -120,7 +140,13 @@ export var getToolbarComponents = function getToolbarComponents(_ref) {
|
|
|
120
140
|
type: INSERT_BLOCK_SECTION.type,
|
|
121
141
|
key: INSERT_BLOCK_SECTION.key,
|
|
122
142
|
rank: INSERT_BLOCK_SECTION_RANK[EMOJI_GROUP.key]
|
|
123
|
-
}]
|
|
143
|
+
}],
|
|
144
|
+
component: expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? function (_ref5) {
|
|
145
|
+
var children = _ref5.children;
|
|
146
|
+
return /*#__PURE__*/React.createElement(Show, {
|
|
147
|
+
above: "lg"
|
|
148
|
+
}, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children));
|
|
149
|
+
} : undefined
|
|
124
150
|
}, {
|
|
125
151
|
type: EMOJI_BUTTON.type,
|
|
126
152
|
key: EMOJI_BUTTON.key,
|
|
@@ -141,7 +167,13 @@ export var getToolbarComponents = function getToolbarComponents(_ref) {
|
|
|
141
167
|
type: INSERT_BLOCK_SECTION.type,
|
|
142
168
|
key: INSERT_BLOCK_SECTION.key,
|
|
143
169
|
rank: INSERT_BLOCK_SECTION_RANK[LAYOUT_GROUP.key]
|
|
144
|
-
}]
|
|
170
|
+
}],
|
|
171
|
+
component: expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? function (_ref6) {
|
|
172
|
+
var children = _ref6.children;
|
|
173
|
+
return /*#__PURE__*/React.createElement(Show, {
|
|
174
|
+
above: "lg"
|
|
175
|
+
}, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children));
|
|
176
|
+
} : undefined
|
|
145
177
|
}, {
|
|
146
178
|
type: LAYOUT_BUTTON.type,
|
|
147
179
|
key: LAYOUT_BUTTON.key,
|
|
@@ -162,7 +194,13 @@ export var getToolbarComponents = function getToolbarComponents(_ref) {
|
|
|
162
194
|
type: INSERT_BLOCK_SECTION.type,
|
|
163
195
|
key: INSERT_BLOCK_SECTION.key,
|
|
164
196
|
rank: INSERT_BLOCK_SECTION_RANK[TABLE_GROUP.key]
|
|
165
|
-
}]
|
|
197
|
+
}],
|
|
198
|
+
component: expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? function (_ref7) {
|
|
199
|
+
var children = _ref7.children;
|
|
200
|
+
return /*#__PURE__*/React.createElement(Show, {
|
|
201
|
+
above: "md"
|
|
202
|
+
}, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children));
|
|
203
|
+
} : undefined
|
|
166
204
|
}, {
|
|
167
205
|
type: TABLE_BUTTON.type,
|
|
168
206
|
key: TABLE_BUTTON.key,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-insert-block",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Insert block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,36 +30,36 @@
|
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@atlaskit/button": "^23.4.0",
|
|
33
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
34
|
-
"@atlaskit/editor-plugin-block-type": "^
|
|
35
|
-
"@atlaskit/editor-plugin-code-block": "^
|
|
36
|
-
"@atlaskit/editor-plugin-connectivity": "^
|
|
37
|
-
"@atlaskit/editor-plugin-date": "^
|
|
38
|
-
"@atlaskit/editor-plugin-emoji": "^
|
|
39
|
-
"@atlaskit/editor-plugin-expand": "^
|
|
40
|
-
"@atlaskit/editor-plugin-extension": "^
|
|
41
|
-
"@atlaskit/editor-plugin-feature-flags": "^
|
|
42
|
-
"@atlaskit/editor-plugin-hyperlink": "^
|
|
43
|
-
"@atlaskit/editor-plugin-image-upload": "^
|
|
44
|
-
"@atlaskit/editor-plugin-layout": "^
|
|
45
|
-
"@atlaskit/editor-plugin-media": "^
|
|
46
|
-
"@atlaskit/editor-plugin-media-insert": "^
|
|
47
|
-
"@atlaskit/editor-plugin-mentions": "^
|
|
48
|
-
"@atlaskit/editor-plugin-metrics": "^
|
|
49
|
-
"@atlaskit/editor-plugin-panel": "^
|
|
50
|
-
"@atlaskit/editor-plugin-placeholder-text": "^
|
|
51
|
-
"@atlaskit/editor-plugin-primary-toolbar": "^
|
|
52
|
-
"@atlaskit/editor-plugin-quick-insert": "^
|
|
53
|
-
"@atlaskit/editor-plugin-rule": "^
|
|
54
|
-
"@atlaskit/editor-plugin-status": "^
|
|
55
|
-
"@atlaskit/editor-plugin-table": "^
|
|
56
|
-
"@atlaskit/editor-plugin-tasks-and-decisions": "^
|
|
57
|
-
"@atlaskit/editor-plugin-toolbar": "^0.
|
|
58
|
-
"@atlaskit/editor-plugin-type-ahead": "^
|
|
33
|
+
"@atlaskit/editor-plugin-analytics": "^4.0.0",
|
|
34
|
+
"@atlaskit/editor-plugin-block-type": "^7.0.0",
|
|
35
|
+
"@atlaskit/editor-plugin-code-block": "^6.0.0",
|
|
36
|
+
"@atlaskit/editor-plugin-connectivity": "^4.0.0",
|
|
37
|
+
"@atlaskit/editor-plugin-date": "^6.0.0",
|
|
38
|
+
"@atlaskit/editor-plugin-emoji": "^5.0.0",
|
|
39
|
+
"@atlaskit/editor-plugin-expand": "^5.0.0",
|
|
40
|
+
"@atlaskit/editor-plugin-extension": "^7.0.0",
|
|
41
|
+
"@atlaskit/editor-plugin-feature-flags": "^3.0.0",
|
|
42
|
+
"@atlaskit/editor-plugin-hyperlink": "^6.0.0",
|
|
43
|
+
"@atlaskit/editor-plugin-image-upload": "^4.0.0",
|
|
44
|
+
"@atlaskit/editor-plugin-layout": "^4.0.0",
|
|
45
|
+
"@atlaskit/editor-plugin-media": "^6.0.0",
|
|
46
|
+
"@atlaskit/editor-plugin-media-insert": "^10.0.0",
|
|
47
|
+
"@atlaskit/editor-plugin-mentions": "^6.0.0",
|
|
48
|
+
"@atlaskit/editor-plugin-metrics": "^5.0.0",
|
|
49
|
+
"@atlaskit/editor-plugin-panel": "^6.0.0",
|
|
50
|
+
"@atlaskit/editor-plugin-placeholder-text": "^4.0.0",
|
|
51
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^5.0.0",
|
|
52
|
+
"@atlaskit/editor-plugin-quick-insert": "^4.0.0",
|
|
53
|
+
"@atlaskit/editor-plugin-rule": "^4.0.0",
|
|
54
|
+
"@atlaskit/editor-plugin-status": "^5.0.0",
|
|
55
|
+
"@atlaskit/editor-plugin-table": "^13.0.0",
|
|
56
|
+
"@atlaskit/editor-plugin-tasks-and-decisions": "^7.0.0",
|
|
57
|
+
"@atlaskit/editor-plugin-toolbar": "^1.0.0",
|
|
58
|
+
"@atlaskit/editor-plugin-type-ahead": "^4.0.0",
|
|
59
59
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
60
60
|
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
61
|
-
"@atlaskit/editor-toolbar": "^0.
|
|
62
|
-
"@atlaskit/editor-toolbar-model": "^0.
|
|
61
|
+
"@atlaskit/editor-toolbar": "^0.6.0",
|
|
62
|
+
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
63
63
|
"@atlaskit/emoji": "^69.5.0",
|
|
64
64
|
"@atlaskit/heading": "^5.2.0",
|
|
65
65
|
"@atlaskit/icon": "^28.1.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
68
68
|
"@atlaskit/primitives": "^14.12.0",
|
|
69
69
|
"@atlaskit/theme": "^20.0.0",
|
|
70
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
70
|
+
"@atlaskit/tmp-editor-statsig": "^12.0.0",
|
|
71
71
|
"@atlaskit/tokens": "^6.1.0",
|
|
72
72
|
"@atlaskit/tooltip": "^20.4.0",
|
|
73
73
|
"@babel/runtime": "^7.0.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"react-virtualized": "^9.8.0"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
|
-
"@atlaskit/editor-common": "^
|
|
81
|
+
"@atlaskit/editor-common": "^108.0.0",
|
|
82
82
|
"react": "^18.2.0",
|
|
83
83
|
"react-dom": "^18.2.0",
|
|
84
84
|
"react-intl-next": "npm:react-intl@^5.18.1"
|