@atlaskit/editor-plugin-card 5.4.29 → 5.4.31
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 +19 -0
- package/dist/cjs/nodeviews/inlineCardWithAwareness.js +2 -1
- package/dist/cjs/ui/OpenButtonOverlay/index.js +1 -1
- package/dist/cjs/ui/toolbar.js +8 -0
- package/dist/es2019/nodeviews/inlineCardWithAwareness.js +2 -1
- package/dist/es2019/ui/OpenButtonOverlay/index.js +1 -1
- package/dist/es2019/ui/toolbar.js +8 -0
- package/dist/esm/nodeviews/inlineCardWithAwareness.js +2 -1
- package/dist/esm/ui/OpenButtonOverlay/index.js +1 -1
- package/dist/esm/ui/toolbar.js +8 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 5.4.31
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#153459](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/153459)
|
|
8
|
+
[`56a72b77265db`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/56a72b77265db) -
|
|
9
|
+
[ux] Show smart link open button overlay in chromeless editor
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 5.4.30
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#153256](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/153256)
|
|
17
|
+
[`3644fbe36073d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3644fbe36073d) -
|
|
18
|
+
[ux] When ViewAll dropdown closes via ESC key press or submenus close via ESC or Enter, the focus
|
|
19
|
+
is set on ViewAll button.
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 5.4.29
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -110,7 +110,8 @@ var InlineCardWithAwareness = exports.InlineCardWithAwareness = /*#__PURE__*/(0,
|
|
|
110
110
|
});
|
|
111
111
|
}, [actionOptions, cardContext, getPos, isHovered, node, onClick, onResolve, useAlternativePreloader, view, isPageSSRed]);
|
|
112
112
|
var shouldShowOpenButtonOverlay = (0, _react.useMemo)(function () {
|
|
113
|
-
|
|
113
|
+
var shouldShowOpenButtonOverlayInChomeless = editorAppearance === 'chromeless' && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_8');
|
|
114
|
+
return ((editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'edit' || editorAppearance === 'comment' && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6') || shouldShowOpenButtonOverlayInChomeless) && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1');
|
|
114
115
|
}, [editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode, editorAppearance]);
|
|
115
116
|
var innerCard = shouldShowOpenButtonOverlay ? innerCardWithOpenButtonOverlay : innerCardOriginal;
|
|
116
117
|
var getPosFunction = typeof getPos === 'function' ? getPos : undefined;
|
|
@@ -174,7 +174,7 @@ var OpenButtonOverlay = function OpenButtonOverlay(_ref) {
|
|
|
174
174
|
href: url,
|
|
175
175
|
target: "_blank",
|
|
176
176
|
style: {
|
|
177
|
-
paddingBlock: editorAppearance === 'comment' && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6') ? '1px' : "var(--ds-space-025, 2px)"
|
|
177
|
+
paddingBlock: editorAppearance === 'comment' && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6') || editorAppearance === 'chromeless' && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_8') ? '1px' : "var(--ds-space-025, 2px)"
|
|
178
178
|
},
|
|
179
179
|
onClick: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics') ? handleClick : undefined
|
|
180
180
|
}, (0, _react2.jsx)(_primitives.Box, {
|
package/dist/cjs/ui/toolbar.js
CHANGED
|
@@ -463,11 +463,15 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
|
|
|
463
463
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className)
|
|
464
464
|
};
|
|
465
465
|
};
|
|
466
|
+
// testId is required to show focus on trigger button on ESC key press
|
|
467
|
+
// see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
|
|
468
|
+
var testId = (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_8') ? 'card-overflow-dropdown-trigger' : undefined;
|
|
466
469
|
var overflowMenuConfig = [{
|
|
467
470
|
type: 'separator',
|
|
468
471
|
fullHeight: true
|
|
469
472
|
}, {
|
|
470
473
|
type: 'overflow-dropdown',
|
|
474
|
+
testId: testId,
|
|
471
475
|
options: [_objectSpread({
|
|
472
476
|
title: intl.formatMessage(_messages.default.copyToClipboard),
|
|
473
477
|
onClick: function onClick() {
|
|
@@ -653,12 +657,16 @@ var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl,
|
|
|
653
657
|
onClick: withToolbarMetadata(removeCard(editorAnalyticsApi))
|
|
654
658
|
});
|
|
655
659
|
} else {
|
|
660
|
+
// testId is required to show focus on trigger button on ESC key press
|
|
661
|
+
// see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
|
|
662
|
+
var testId = (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_8') ? 'datasource-overflow-dropdown-trigger' : undefined;
|
|
656
663
|
toolbarItems.push({
|
|
657
664
|
type: 'separator',
|
|
658
665
|
fullHeight: true
|
|
659
666
|
});
|
|
660
667
|
var overflowMenuConfig = [{
|
|
661
668
|
type: 'overflow-dropdown',
|
|
669
|
+
testId: testId,
|
|
662
670
|
options: [{
|
|
663
671
|
title: intl.formatMessage(_messages.default.copyToClipboard),
|
|
664
672
|
onClick: function onClick() {
|
|
@@ -85,7 +85,8 @@ export const InlineCardWithAwareness = /*#__PURE__*/memo(({
|
|
|
85
85
|
isPageSSRed: isPageSSRed
|
|
86
86
|
}), [actionOptions, cardContext, getPos, isHovered, node, onClick, onResolve, useAlternativePreloader, view, isPageSSRed]);
|
|
87
87
|
const shouldShowOpenButtonOverlay = useMemo(() => {
|
|
88
|
-
|
|
88
|
+
const shouldShowOpenButtonOverlayInChomeless = editorAppearance === 'chromeless' && fg('platform_editor_controls_patch_8');
|
|
89
|
+
return ((editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'edit' || editorAppearance === 'comment' && fg('platform_editor_controls_patch_6') || shouldShowOpenButtonOverlayInChomeless) && editorExperiment('platform_editor_controls', 'variant1');
|
|
89
90
|
}, [editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode, editorAppearance]);
|
|
90
91
|
const innerCard = shouldShowOpenButtonOverlay ? innerCardWithOpenButtonOverlay : innerCardOriginal;
|
|
91
92
|
const getPosFunction = typeof getPos === 'function' ? getPos : undefined;
|
|
@@ -150,7 +150,7 @@ const OpenButtonOverlay = ({
|
|
|
150
150
|
href: url,
|
|
151
151
|
target: "_blank",
|
|
152
152
|
style: {
|
|
153
|
-
paddingBlock: editorAppearance === 'comment' && fg('platform_editor_controls_patch_6') ? '1px' : "var(--ds-space-025, 2px)"
|
|
153
|
+
paddingBlock: editorAppearance === 'comment' && fg('platform_editor_controls_patch_6') || editorAppearance === 'chromeless' && fg('platform_editor_controls_patch_8') ? '1px' : "var(--ds-space-025, 2px)"
|
|
154
154
|
},
|
|
155
155
|
onClick: fg('platform_editor_controls_patch_analytics') ? handleClick : undefined
|
|
156
156
|
}, jsx(Box, {
|
|
@@ -455,11 +455,15 @@ const generateToolbarItems = (state, intl, providerFactory, cardOptions, lpLinkP
|
|
|
455
455
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
|
|
456
456
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className)
|
|
457
457
|
});
|
|
458
|
+
// testId is required to show focus on trigger button on ESC key press
|
|
459
|
+
// see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
|
|
460
|
+
const testId = fg('platform_editor_controls_patch_8') ? 'card-overflow-dropdown-trigger' : undefined;
|
|
458
461
|
const overflowMenuConfig = [{
|
|
459
462
|
type: 'separator',
|
|
460
463
|
fullHeight: true
|
|
461
464
|
}, {
|
|
462
465
|
type: 'overflow-dropdown',
|
|
466
|
+
testId,
|
|
463
467
|
options: [{
|
|
464
468
|
title: intl.formatMessage(commonMessages.copyToClipboard),
|
|
465
469
|
onClick: () => {
|
|
@@ -647,12 +651,16 @@ const getDatasourceButtonGroup = (metadata, intl, editorAnalyticsApi, node, hove
|
|
|
647
651
|
onClick: withToolbarMetadata(removeCard(editorAnalyticsApi))
|
|
648
652
|
});
|
|
649
653
|
} else {
|
|
654
|
+
// testId is required to show focus on trigger button on ESC key press
|
|
655
|
+
// see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
|
|
656
|
+
const testId = fg('platform_editor_controls_patch_8') ? 'datasource-overflow-dropdown-trigger' : undefined;
|
|
650
657
|
toolbarItems.push({
|
|
651
658
|
type: 'separator',
|
|
652
659
|
fullHeight: true
|
|
653
660
|
});
|
|
654
661
|
const overflowMenuConfig = [{
|
|
655
662
|
type: 'overflow-dropdown',
|
|
663
|
+
testId,
|
|
656
664
|
options: [{
|
|
657
665
|
title: intl.formatMessage(commonMessages.copyToClipboard),
|
|
658
666
|
onClick: () => {
|
|
@@ -100,7 +100,8 @@ export var InlineCardWithAwareness = /*#__PURE__*/memo(function (_ref) {
|
|
|
100
100
|
});
|
|
101
101
|
}, [actionOptions, cardContext, getPos, isHovered, node, onClick, onResolve, useAlternativePreloader, view, isPageSSRed]);
|
|
102
102
|
var shouldShowOpenButtonOverlay = useMemo(function () {
|
|
103
|
-
|
|
103
|
+
var shouldShowOpenButtonOverlayInChomeless = editorAppearance === 'chromeless' && fg('platform_editor_controls_patch_8');
|
|
104
|
+
return ((editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'edit' || editorAppearance === 'comment' && fg('platform_editor_controls_patch_6') || shouldShowOpenButtonOverlayInChomeless) && editorExperiment('platform_editor_controls', 'variant1');
|
|
104
105
|
}, [editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode, editorAppearance]);
|
|
105
106
|
var innerCard = shouldShowOpenButtonOverlay ? innerCardWithOpenButtonOverlay : innerCardOriginal;
|
|
106
107
|
var getPosFunction = typeof getPos === 'function' ? getPos : undefined;
|
|
@@ -160,7 +160,7 @@ var OpenButtonOverlay = function OpenButtonOverlay(_ref) {
|
|
|
160
160
|
href: url,
|
|
161
161
|
target: "_blank",
|
|
162
162
|
style: {
|
|
163
|
-
paddingBlock: editorAppearance === 'comment' && fg('platform_editor_controls_patch_6') ? '1px' : "var(--ds-space-025, 2px)"
|
|
163
|
+
paddingBlock: editorAppearance === 'comment' && fg('platform_editor_controls_patch_6') || editorAppearance === 'chromeless' && fg('platform_editor_controls_patch_8') ? '1px' : "var(--ds-space-025, 2px)"
|
|
164
164
|
},
|
|
165
165
|
onClick: fg('platform_editor_controls_patch_analytics') ? handleClick : undefined
|
|
166
166
|
}, jsx(Box, {
|
package/dist/esm/ui/toolbar.js
CHANGED
|
@@ -453,11 +453,15 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
|
|
|
453
453
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className)
|
|
454
454
|
};
|
|
455
455
|
};
|
|
456
|
+
// testId is required to show focus on trigger button on ESC key press
|
|
457
|
+
// see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
|
|
458
|
+
var testId = fg('platform_editor_controls_patch_8') ? 'card-overflow-dropdown-trigger' : undefined;
|
|
456
459
|
var overflowMenuConfig = [{
|
|
457
460
|
type: 'separator',
|
|
458
461
|
fullHeight: true
|
|
459
462
|
}, {
|
|
460
463
|
type: 'overflow-dropdown',
|
|
464
|
+
testId: testId,
|
|
461
465
|
options: [_objectSpread({
|
|
462
466
|
title: intl.formatMessage(commonMessages.copyToClipboard),
|
|
463
467
|
onClick: function onClick() {
|
|
@@ -643,12 +647,16 @@ var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl,
|
|
|
643
647
|
onClick: withToolbarMetadata(removeCard(editorAnalyticsApi))
|
|
644
648
|
});
|
|
645
649
|
} else {
|
|
650
|
+
// testId is required to show focus on trigger button on ESC key press
|
|
651
|
+
// see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
|
|
652
|
+
var testId = fg('platform_editor_controls_patch_8') ? 'datasource-overflow-dropdown-trigger' : undefined;
|
|
646
653
|
toolbarItems.push({
|
|
647
654
|
type: 'separator',
|
|
648
655
|
fullHeight: true
|
|
649
656
|
});
|
|
650
657
|
var overflowMenuConfig = [{
|
|
651
658
|
type: 'overflow-dropdown',
|
|
659
|
+
testId: testId,
|
|
652
660
|
options: [{
|
|
653
661
|
title: intl.formatMessage(commonMessages.copyToClipboard),
|
|
654
662
|
onClick: function onClick() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.31",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
38
38
|
"@atlaskit/button": "^23.0.0",
|
|
39
39
|
"@atlaskit/custom-steps": "^0.11.0",
|
|
40
|
-
"@atlaskit/editor-common": "^
|
|
40
|
+
"@atlaskit/editor-common": "^105.0.0",
|
|
41
41
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
42
|
-
"@atlaskit/editor-plugin-base": "^
|
|
42
|
+
"@atlaskit/editor-plugin-base": "^3.0.0",
|
|
43
43
|
"@atlaskit/editor-plugin-connectivity": "^2.0.0",
|
|
44
44
|
"@atlaskit/editor-plugin-decorations": "^2.0.0",
|
|
45
45
|
"@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@atlaskit/icon": "^26.0.0",
|
|
55
55
|
"@atlaskit/link-analytics": "^9.1.0",
|
|
56
56
|
"@atlaskit/link-client-extension": "^4.0.0",
|
|
57
|
-
"@atlaskit/link-datasource": "^4.
|
|
57
|
+
"@atlaskit/link-datasource": "^4.10.0",
|
|
58
58
|
"@atlaskit/linking-common": "^8.1.0",
|
|
59
59
|
"@atlaskit/linking-types": "^9.10.0",
|
|
60
60
|
"@atlaskit/menu": "^5.0.0",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@atlaskit/primitives": "^14.7.0",
|
|
63
63
|
"@atlaskit/smart-card": "^37.1.0",
|
|
64
64
|
"@atlaskit/theme": "^18.0.0",
|
|
65
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
65
|
+
"@atlaskit/tmp-editor-statsig": "^4.20.0",
|
|
66
66
|
"@atlaskit/tokens": "^4.8.0",
|
|
67
67
|
"@babel/runtime": "^7.0.0",
|
|
68
68
|
"@emotion/react": "^11.7.1",
|