@atlaskit/editor-plugin-toolbar 3.4.11 → 3.4.13
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 +14 -0
- package/dist/cjs/pm-plugins/experiences/selection-toolbar-open-experience.js +2 -1
- package/dist/cjs/ui/toolbar-components.js +36 -5
- package/dist/es2019/pm-plugins/experiences/selection-toolbar-open-experience.js +2 -1
- package/dist/es2019/ui/toolbar-components.js +35 -2
- package/dist/esm/pm-plugins/experiences/selection-toolbar-open-experience.js +2 -1
- package/dist/esm/ui/toolbar-components.js +37 -6
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-toolbar
|
|
2
2
|
|
|
3
|
+
## 3.4.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 3.4.12
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`34ebbcd3440c2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/34ebbcd3440c2) -
|
|
14
|
+
NO-ISSUE Split by action subject id for experience tracking
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 3.4.11
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -41,7 +41,8 @@ var getSelectionToolbarOpenExperiencePlugin = exports.getSelectionToolbarOpenExp
|
|
|
41
41
|
}
|
|
42
42
|
return targetEl;
|
|
43
43
|
};
|
|
44
|
-
var experience = new _experiences.Experience('
|
|
44
|
+
var experience = new _experiences.Experience('toolbar-open', {
|
|
45
|
+
actionSubjectId: 'selection-toolbar',
|
|
45
46
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
46
47
|
checks: [new _experiences.ExperienceCheckTimeout({
|
|
47
48
|
durationMs: 1000,
|
|
@@ -224,7 +224,17 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
224
224
|
type: 'toolbar',
|
|
225
225
|
key: _toolbar.TOOLBARS.PRIMARY_TOOLBAR,
|
|
226
226
|
rank: _toolbar.TOOLBAR_RANK[_toolbar.PIN_SECTION.key]
|
|
227
|
-
}]
|
|
227
|
+
}],
|
|
228
|
+
component: (0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_undo_redo_confluence') ? function (_ref0) {
|
|
229
|
+
var children = _ref0.children,
|
|
230
|
+
parents = _ref0.parents;
|
|
231
|
+
return /*#__PURE__*/_react.default.createElement(_Section.Section, {
|
|
232
|
+
testId: "pin-section",
|
|
233
|
+
parents: parents,
|
|
234
|
+
api: api,
|
|
235
|
+
showSeparatorInFullPagePrimaryToolbar: true
|
|
236
|
+
}, children);
|
|
237
|
+
} : undefined
|
|
228
238
|
}]);
|
|
229
239
|
if ((0, _expValEquals.expValEquals)('platform_editor_toolbar_migrate_loom', 'isEnabled', true)) {
|
|
230
240
|
components.push({
|
|
@@ -235,8 +245,8 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
235
245
|
key: _toolbar.TOOLBARS.PRIMARY_TOOLBAR,
|
|
236
246
|
rank: _toolbar.TOOLBAR_RANK[_toolbar.OVERFLOW_SECTION_PRIMARY_TOOLBAR.key]
|
|
237
247
|
}],
|
|
238
|
-
component: function component(
|
|
239
|
-
var children =
|
|
248
|
+
component: function component(_ref1) {
|
|
249
|
+
var children = _ref1.children;
|
|
240
250
|
return /*#__PURE__*/_react.default.createElement(_OverflowSection.OverflowSection, null, children);
|
|
241
251
|
}
|
|
242
252
|
}, {
|
|
@@ -255,8 +265,8 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
255
265
|
key: _toolbar.OVERFLOW_GROUP_PRIMARY_TOOLBAR.key,
|
|
256
266
|
rank: _toolbar.OVERFLOW_GROUP_PRIMARY_TOOLBAR_RANK[_toolbar.OVERFLOW_MENU_PRIMARY_TOOLBAR.key]
|
|
257
267
|
}],
|
|
258
|
-
component: function component(
|
|
259
|
-
var children =
|
|
268
|
+
component: function component(_ref10) {
|
|
269
|
+
var children = _ref10.children;
|
|
260
270
|
return /*#__PURE__*/_react.default.createElement(_OverflowMenu.OverflowMenu, null, children);
|
|
261
271
|
}
|
|
262
272
|
});
|
|
@@ -278,5 +288,26 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
278
288
|
components.unshift.apply(components, (0, _toConsumableArray2.default)(getInlineTextToolbarComponents()));
|
|
279
289
|
components.unshift.apply(components, (0, _toConsumableArray2.default)(getPrimaryToolbarComponents(breakpointPreset)));
|
|
280
290
|
}
|
|
291
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_undo_redo_confluence')) {
|
|
292
|
+
components.push({
|
|
293
|
+
type: _toolbar.TRACK_CHANGES_SECTION.type,
|
|
294
|
+
key: _toolbar.TRACK_CHANGES_SECTION.key,
|
|
295
|
+
parents: [{
|
|
296
|
+
type: 'toolbar',
|
|
297
|
+
key: _toolbar.TOOLBARS.PRIMARY_TOOLBAR,
|
|
298
|
+
rank: _toolbar.TOOLBAR_RANK[_toolbar.TRACK_CHANGES_SECTION.key]
|
|
299
|
+
}],
|
|
300
|
+
component: function component(_ref11) {
|
|
301
|
+
var children = _ref11.children,
|
|
302
|
+
parents = _ref11.parents;
|
|
303
|
+
return /*#__PURE__*/_react.default.createElement(_Section.Section, {
|
|
304
|
+
testId: "track-changes-section",
|
|
305
|
+
parents: parents,
|
|
306
|
+
api: api,
|
|
307
|
+
showSeparatorInFullPagePrimaryToolbar: true
|
|
308
|
+
}, children);
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
}
|
|
281
312
|
return components;
|
|
282
313
|
};
|
|
@@ -34,7 +34,8 @@ export const getSelectionToolbarOpenExperiencePlugin = ({
|
|
|
34
34
|
}
|
|
35
35
|
return targetEl;
|
|
36
36
|
};
|
|
37
|
-
const experience = new Experience('
|
|
37
|
+
const experience = new Experience('toolbar-open', {
|
|
38
|
+
actionSubjectId: 'selection-toolbar',
|
|
38
39
|
dispatchAnalyticsEvent,
|
|
39
40
|
checks: [new ExperienceCheckTimeout({
|
|
40
41
|
durationMs: 1000,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { INSERT_BLOCK_SECTION, LINKING_SECTION, OVERFLOW_GROUP, OVERFLOW_GROUP_PRIMARY_TOOLBAR, OVERFLOW_GROUP_PRIMARY_TOOLBAR_RANK, OVERFLOW_GROUP_RANK, OVERFLOW_MENU, OVERFLOW_MENU_PRIMARY_TOOLBAR, OVERFLOW_SECTION, OVERFLOW_SECTION_PRIMARY_TOOLBAR, OVERFLOW_SECTION_PRIMARY_TOOLBAR_RANK, OVERFLOW_SECTION_RANK, PIN_SECTION, TEXT_COLLAPSED_GROUP, TEXT_SECTION, TEXT_SECTION_PRIMARY_TOOLBAR, TEXT_SECTION_COLLAPSED, TEXT_COLLAPSED_MENU, TOOLBAR_RANK, TOOLBARS } from '@atlaskit/editor-common/toolbar';
|
|
3
|
+
import { INSERT_BLOCK_SECTION, LINKING_SECTION, OVERFLOW_GROUP, OVERFLOW_GROUP_PRIMARY_TOOLBAR, OVERFLOW_GROUP_PRIMARY_TOOLBAR_RANK, OVERFLOW_GROUP_RANK, OVERFLOW_MENU, OVERFLOW_MENU_PRIMARY_TOOLBAR, OVERFLOW_SECTION, OVERFLOW_SECTION_PRIMARY_TOOLBAR, OVERFLOW_SECTION_PRIMARY_TOOLBAR_RANK, OVERFLOW_SECTION_RANK, PIN_SECTION, TEXT_COLLAPSED_GROUP, TEXT_SECTION, TEXT_SECTION_PRIMARY_TOOLBAR, TEXT_SECTION_COLLAPSED, TEXT_COLLAPSED_MENU, TOOLBAR_RANK, TOOLBARS, TRACK_CHANGES_SECTION } from '@atlaskit/editor-common/toolbar';
|
|
4
4
|
import { PrimaryToolbar as PrimaryToolbarBase, Show, Toolbar } from '@atlaskit/editor-toolbar';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -217,7 +217,18 @@ export const getToolbarComponents = (contextualFormattingEnabled, api, disableSe
|
|
|
217
217
|
type: 'toolbar',
|
|
218
218
|
key: TOOLBARS.PRIMARY_TOOLBAR,
|
|
219
219
|
rank: TOOLBAR_RANK[PIN_SECTION.key]
|
|
220
|
-
}]
|
|
220
|
+
}],
|
|
221
|
+
component: fg('platform_editor_toolbar_aifc_undo_redo_confluence') ? ({
|
|
222
|
+
children,
|
|
223
|
+
parents
|
|
224
|
+
}) => {
|
|
225
|
+
return /*#__PURE__*/React.createElement(Section, {
|
|
226
|
+
testId: "pin-section",
|
|
227
|
+
parents: parents,
|
|
228
|
+
api: api,
|
|
229
|
+
showSeparatorInFullPagePrimaryToolbar: true
|
|
230
|
+
}, children);
|
|
231
|
+
} : undefined
|
|
221
232
|
}];
|
|
222
233
|
if (expValEquals('platform_editor_toolbar_migrate_loom', 'isEnabled', true)) {
|
|
223
234
|
components.push({
|
|
@@ -273,5 +284,27 @@ export const getToolbarComponents = (contextualFormattingEnabled, api, disableSe
|
|
|
273
284
|
components.unshift(...getInlineTextToolbarComponents());
|
|
274
285
|
components.unshift(...getPrimaryToolbarComponents(breakpointPreset));
|
|
275
286
|
}
|
|
287
|
+
if (fg('platform_editor_toolbar_aifc_undo_redo_confluence')) {
|
|
288
|
+
components.push({
|
|
289
|
+
type: TRACK_CHANGES_SECTION.type,
|
|
290
|
+
key: TRACK_CHANGES_SECTION.key,
|
|
291
|
+
parents: [{
|
|
292
|
+
type: 'toolbar',
|
|
293
|
+
key: TOOLBARS.PRIMARY_TOOLBAR,
|
|
294
|
+
rank: TOOLBAR_RANK[TRACK_CHANGES_SECTION.key]
|
|
295
|
+
}],
|
|
296
|
+
component: ({
|
|
297
|
+
children,
|
|
298
|
+
parents
|
|
299
|
+
}) => {
|
|
300
|
+
return /*#__PURE__*/React.createElement(Section, {
|
|
301
|
+
testId: "track-changes-section",
|
|
302
|
+
parents: parents,
|
|
303
|
+
api: api,
|
|
304
|
+
showSeparatorInFullPagePrimaryToolbar: true
|
|
305
|
+
}, children);
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
}
|
|
276
309
|
return components;
|
|
277
310
|
};
|
|
@@ -34,7 +34,8 @@ export var getSelectionToolbarOpenExperiencePlugin = function getSelectionToolba
|
|
|
34
34
|
}
|
|
35
35
|
return targetEl;
|
|
36
36
|
};
|
|
37
|
-
var experience = new Experience('
|
|
37
|
+
var experience = new Experience('toolbar-open', {
|
|
38
|
+
actionSubjectId: 'selection-toolbar',
|
|
38
39
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
39
40
|
checks: [new ExperienceCheckTimeout({
|
|
40
41
|
durationMs: 1000,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { INSERT_BLOCK_SECTION, LINKING_SECTION, OVERFLOW_GROUP, OVERFLOW_GROUP_PRIMARY_TOOLBAR, OVERFLOW_GROUP_PRIMARY_TOOLBAR_RANK, OVERFLOW_GROUP_RANK, OVERFLOW_MENU, OVERFLOW_MENU_PRIMARY_TOOLBAR, OVERFLOW_SECTION, OVERFLOW_SECTION_PRIMARY_TOOLBAR, OVERFLOW_SECTION_PRIMARY_TOOLBAR_RANK, OVERFLOW_SECTION_RANK, PIN_SECTION, TEXT_COLLAPSED_GROUP, TEXT_SECTION, TEXT_SECTION_PRIMARY_TOOLBAR, TEXT_SECTION_COLLAPSED, TEXT_COLLAPSED_MENU, TOOLBAR_RANK, TOOLBARS } from '@atlaskit/editor-common/toolbar';
|
|
4
|
+
import { INSERT_BLOCK_SECTION, LINKING_SECTION, OVERFLOW_GROUP, OVERFLOW_GROUP_PRIMARY_TOOLBAR, OVERFLOW_GROUP_PRIMARY_TOOLBAR_RANK, OVERFLOW_GROUP_RANK, OVERFLOW_MENU, OVERFLOW_MENU_PRIMARY_TOOLBAR, OVERFLOW_SECTION, OVERFLOW_SECTION_PRIMARY_TOOLBAR, OVERFLOW_SECTION_PRIMARY_TOOLBAR_RANK, OVERFLOW_SECTION_RANK, PIN_SECTION, TEXT_COLLAPSED_GROUP, TEXT_SECTION, TEXT_SECTION_PRIMARY_TOOLBAR, TEXT_SECTION_COLLAPSED, TEXT_COLLAPSED_MENU, TOOLBAR_RANK, TOOLBARS, TRACK_CHANGES_SECTION } from '@atlaskit/editor-common/toolbar';
|
|
5
5
|
import { PrimaryToolbar as PrimaryToolbarBase, Show, Toolbar } from '@atlaskit/editor-toolbar';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -217,7 +217,17 @@ export var getToolbarComponents = function getToolbarComponents(contextualFormat
|
|
|
217
217
|
type: 'toolbar',
|
|
218
218
|
key: TOOLBARS.PRIMARY_TOOLBAR,
|
|
219
219
|
rank: TOOLBAR_RANK[PIN_SECTION.key]
|
|
220
|
-
}]
|
|
220
|
+
}],
|
|
221
|
+
component: fg('platform_editor_toolbar_aifc_undo_redo_confluence') ? function (_ref0) {
|
|
222
|
+
var children = _ref0.children,
|
|
223
|
+
parents = _ref0.parents;
|
|
224
|
+
return /*#__PURE__*/React.createElement(Section, {
|
|
225
|
+
testId: "pin-section",
|
|
226
|
+
parents: parents,
|
|
227
|
+
api: api,
|
|
228
|
+
showSeparatorInFullPagePrimaryToolbar: true
|
|
229
|
+
}, children);
|
|
230
|
+
} : undefined
|
|
221
231
|
}]);
|
|
222
232
|
if (expValEquals('platform_editor_toolbar_migrate_loom', 'isEnabled', true)) {
|
|
223
233
|
components.push({
|
|
@@ -228,8 +238,8 @@ export var getToolbarComponents = function getToolbarComponents(contextualFormat
|
|
|
228
238
|
key: TOOLBARS.PRIMARY_TOOLBAR,
|
|
229
239
|
rank: TOOLBAR_RANK[OVERFLOW_SECTION_PRIMARY_TOOLBAR.key]
|
|
230
240
|
}],
|
|
231
|
-
component: function component(
|
|
232
|
-
var children =
|
|
241
|
+
component: function component(_ref1) {
|
|
242
|
+
var children = _ref1.children;
|
|
233
243
|
return /*#__PURE__*/React.createElement(OverflowSection, null, children);
|
|
234
244
|
}
|
|
235
245
|
}, {
|
|
@@ -248,8 +258,8 @@ export var getToolbarComponents = function getToolbarComponents(contextualFormat
|
|
|
248
258
|
key: OVERFLOW_GROUP_PRIMARY_TOOLBAR.key,
|
|
249
259
|
rank: OVERFLOW_GROUP_PRIMARY_TOOLBAR_RANK[OVERFLOW_MENU_PRIMARY_TOOLBAR.key]
|
|
250
260
|
}],
|
|
251
|
-
component: function component(
|
|
252
|
-
var children =
|
|
261
|
+
component: function component(_ref10) {
|
|
262
|
+
var children = _ref10.children;
|
|
253
263
|
return /*#__PURE__*/React.createElement(OverflowMenu, null, children);
|
|
254
264
|
}
|
|
255
265
|
});
|
|
@@ -271,5 +281,26 @@ export var getToolbarComponents = function getToolbarComponents(contextualFormat
|
|
|
271
281
|
components.unshift.apply(components, _toConsumableArray(getInlineTextToolbarComponents()));
|
|
272
282
|
components.unshift.apply(components, _toConsumableArray(getPrimaryToolbarComponents(breakpointPreset)));
|
|
273
283
|
}
|
|
284
|
+
if (fg('platform_editor_toolbar_aifc_undo_redo_confluence')) {
|
|
285
|
+
components.push({
|
|
286
|
+
type: TRACK_CHANGES_SECTION.type,
|
|
287
|
+
key: TRACK_CHANGES_SECTION.key,
|
|
288
|
+
parents: [{
|
|
289
|
+
type: 'toolbar',
|
|
290
|
+
key: TOOLBARS.PRIMARY_TOOLBAR,
|
|
291
|
+
rank: TOOLBAR_RANK[TRACK_CHANGES_SECTION.key]
|
|
292
|
+
}],
|
|
293
|
+
component: function component(_ref11) {
|
|
294
|
+
var children = _ref11.children,
|
|
295
|
+
parents = _ref11.parents;
|
|
296
|
+
return /*#__PURE__*/React.createElement(Section, {
|
|
297
|
+
testId: "track-changes-section",
|
|
298
|
+
parents: parents,
|
|
299
|
+
api: api,
|
|
300
|
+
showSeparatorInFullPagePrimaryToolbar: true
|
|
301
|
+
}, children);
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
}
|
|
274
305
|
return components;
|
|
275
306
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-toolbar",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.13",
|
|
4
4
|
"description": "Toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
43
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
43
|
+
"@atlaskit/tmp-editor-statsig": "^14.0.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"bind-event-listener": "^3.0.0",
|
|
46
46
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@atlaskit/editor-common": "^110.
|
|
49
|
+
"@atlaskit/editor-common": "^110.36.0",
|
|
50
50
|
"react": "^18.2.0"
|
|
51
51
|
},
|
|
52
52
|
"platform-feature-flags": {
|
|
@@ -61,6 +61,9 @@
|
|
|
61
61
|
},
|
|
62
62
|
"platform_editor_toolbar_aifc_responsive_improve": {
|
|
63
63
|
"type": "boolean"
|
|
64
|
+
},
|
|
65
|
+
"platform_editor_toolbar_aifc_undo_redo_confluence": {
|
|
66
|
+
"type": "boolean"
|
|
64
67
|
}
|
|
65
68
|
},
|
|
66
69
|
"techstack": {
|