@atlaskit/editor-plugin-card 18.0.1 → 18.0.3
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/EditToolbarButton/EditToolbarButtonPresentation.js +1 -0
- package/dist/cjs/ui/toolbar.js +13 -17
- package/dist/es2019/ui/EditToolbarButton/EditToolbarButtonPresentation.js +1 -0
- package/dist/es2019/ui/toolbar.js +13 -17
- package/dist/esm/ui/EditToolbarButton/EditToolbarButtonPresentation.js +1 -0
- package/dist/esm/ui/toolbar.js +13 -17
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 18.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`275679fbe0ea1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/275679fbe0ea1) -
|
|
8
|
+
Add accessible labels to two floating-toolbar buttons that axe flagged
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 18.0.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`3c78f7149e895`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3c78f7149e895) -
|
|
16
|
+
Clean up experiment `cc_integrations_editor_open_link_click_analytics`.
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 18.0.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -76,6 +76,7 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
|
|
|
76
76
|
testId: "edit-link",
|
|
77
77
|
onClick: onEditLink,
|
|
78
78
|
icon: icon,
|
|
79
|
+
ariaLabel: areAnyNewToolbarFlagsEnabled ? intl.formatMessage(_messages.linkToolbarMessages.editLink) : undefined,
|
|
79
80
|
tooltipContent: tooltipContent,
|
|
80
81
|
areAnyNewToolbarFlagsEnabled: areAnyNewToolbarFlagsEnabled
|
|
81
82
|
}, !areAnyNewToolbarFlagsEnabled && (0, _react2.jsx)(_reactIntl.FormattedMessage
|
package/dist/cjs/ui/toolbar.js
CHANGED
|
@@ -29,7 +29,6 @@ var _linkBroken = _interopRequireDefault(require("@atlaskit/icon/core/link-broke
|
|
|
29
29
|
var _linkExternal = _interopRequireDefault(require("@atlaskit/icon/core/link-external"));
|
|
30
30
|
var _settings = _interopRequireDefault(require("@atlaskit/icon/core/settings"));
|
|
31
31
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
32
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
33
32
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
34
33
|
var _doc = require("../pm-plugins/doc");
|
|
35
34
|
var _pluginKey = require("../pm-plugins/plugin-key");
|
|
@@ -82,8 +81,7 @@ var visitCardLinkAnalytics = exports.visitCardLinkAnalytics = function visitCard
|
|
|
82
81
|
var type = state.selection.node.type;
|
|
83
82
|
if (dispatch) {
|
|
84
83
|
var tr = state.tr;
|
|
85
|
-
|
|
86
|
-
editorAnalyticsApi === null || editorAnalyticsApi === void 0 || editorAnalyticsApi.attachAnalyticsEvent((0, _analytics.buildVisitedNonHyperLinkPayload)(type.name, inputMethod, shouldIncludeResolvedAttributes ? resolvedAttributes : undefined))(tr);
|
|
84
|
+
editorAnalyticsApi === null || editorAnalyticsApi === void 0 || editorAnalyticsApi.attachAnalyticsEvent((0, _analytics.buildVisitedNonHyperLinkPayload)(type.name, inputMethod, resolvedAttributes))(tr);
|
|
87
85
|
dispatch(tr);
|
|
88
86
|
}
|
|
89
87
|
return true;
|
|
@@ -96,20 +94,18 @@ var fireOpenLinkToolbarAnalytics = function fireOpenLinkToolbarAnalytics(editorA
|
|
|
96
94
|
if (!linkAnalyticsRecorded) {
|
|
97
95
|
return false;
|
|
98
96
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
});
|
|
112
|
-
}
|
|
97
|
+
editorAnalyticsApi === null || editorAnalyticsApi === void 0 || editorAnalyticsApi.fireAnalyticsEvent({
|
|
98
|
+
action: _analytics.ACTION.CLICKED,
|
|
99
|
+
actionSubject: _analytics.ACTION_SUBJECT.BUTTON,
|
|
100
|
+
actionSubjectId: _analytics.ACTION_SUBJECT_ID.OPEN_LINK,
|
|
101
|
+
attributes: {
|
|
102
|
+
displayCategory: resolvedAttributes.displayCategory,
|
|
103
|
+
extensionKey: resolvedAttributes.extensionKey,
|
|
104
|
+
status: resolvedAttributes.status,
|
|
105
|
+
statusDetails: resolvedAttributes.statusDetails
|
|
106
|
+
},
|
|
107
|
+
eventType: _analytics.EVENT_TYPE.UI
|
|
108
|
+
});
|
|
113
109
|
return true;
|
|
114
110
|
};
|
|
115
111
|
};
|
|
@@ -59,6 +59,7 @@ const EditToolbarButtonPresentation = ({
|
|
|
59
59
|
testId: "edit-link",
|
|
60
60
|
onClick: onEditLink,
|
|
61
61
|
icon: icon,
|
|
62
|
+
ariaLabel: areAnyNewToolbarFlagsEnabled ? intl.formatMessage(linkToolbarMessages.editLink) : undefined,
|
|
62
63
|
tooltipContent: tooltipContent,
|
|
63
64
|
areAnyNewToolbarFlagsEnabled: areAnyNewToolbarFlagsEnabled
|
|
64
65
|
}, !areAnyNewToolbarFlagsEnabled && jsx(FormattedMessage
|
|
@@ -19,7 +19,6 @@ import LinkBrokenIcon from '@atlaskit/icon/core/link-broken';
|
|
|
19
19
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
20
20
|
import CogIcon from '@atlaskit/icon/core/settings';
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
23
22
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
24
23
|
import { changeSelectedCardToText } from '../pm-plugins/doc';
|
|
25
24
|
import { pluginKey } from '../pm-plugins/plugin-key';
|
|
@@ -72,8 +71,7 @@ export const visitCardLinkAnalytics = (editorAnalyticsApi, inputMethod, resolved
|
|
|
72
71
|
const {
|
|
73
72
|
tr
|
|
74
73
|
} = state;
|
|
75
|
-
|
|
76
|
-
editorAnalyticsApi === null || editorAnalyticsApi === void 0 ? void 0 : editorAnalyticsApi.attachAnalyticsEvent(buildVisitedNonHyperLinkPayload(type.name, inputMethod, shouldIncludeResolvedAttributes ? resolvedAttributes : undefined))(tr);
|
|
74
|
+
editorAnalyticsApi === null || editorAnalyticsApi === void 0 ? void 0 : editorAnalyticsApi.attachAnalyticsEvent(buildVisitedNonHyperLinkPayload(type.name, inputMethod, resolvedAttributes))(tr);
|
|
77
75
|
dispatch(tr);
|
|
78
76
|
}
|
|
79
77
|
return true;
|
|
@@ -83,20 +81,18 @@ const fireOpenLinkToolbarAnalytics = (editorAnalyticsApi, inputMethod, resolvedA
|
|
|
83
81
|
if (!linkAnalyticsRecorded) {
|
|
84
82
|
return false;
|
|
85
83
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
});
|
|
99
|
-
}
|
|
84
|
+
editorAnalyticsApi === null || editorAnalyticsApi === void 0 ? void 0 : editorAnalyticsApi.fireAnalyticsEvent({
|
|
85
|
+
action: ACTION.CLICKED,
|
|
86
|
+
actionSubject: ACTION_SUBJECT.BUTTON,
|
|
87
|
+
actionSubjectId: ACTION_SUBJECTID.OPEN_LINK,
|
|
88
|
+
attributes: {
|
|
89
|
+
displayCategory: resolvedAttributes.displayCategory,
|
|
90
|
+
extensionKey: resolvedAttributes.extensionKey,
|
|
91
|
+
status: resolvedAttributes.status,
|
|
92
|
+
statusDetails: resolvedAttributes.statusDetails
|
|
93
|
+
},
|
|
94
|
+
eventType: EVENT_TYPE.UI
|
|
95
|
+
});
|
|
100
96
|
return true;
|
|
101
97
|
};
|
|
102
98
|
export const openLinkSettings = editorAnalyticsApi => (state, dispatch) => {
|
|
@@ -68,6 +68,7 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
|
|
|
68
68
|
testId: "edit-link",
|
|
69
69
|
onClick: onEditLink,
|
|
70
70
|
icon: icon,
|
|
71
|
+
ariaLabel: areAnyNewToolbarFlagsEnabled ? intl.formatMessage(linkToolbarMessages.editLink) : undefined,
|
|
71
72
|
tooltipContent: tooltipContent,
|
|
72
73
|
areAnyNewToolbarFlagsEnabled: areAnyNewToolbarFlagsEnabled
|
|
73
74
|
}, !areAnyNewToolbarFlagsEnabled && jsx(FormattedMessage
|
package/dist/esm/ui/toolbar.js
CHANGED
|
@@ -23,7 +23,6 @@ import LinkBrokenIcon from '@atlaskit/icon/core/link-broken';
|
|
|
23
23
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
24
24
|
import CogIcon from '@atlaskit/icon/core/settings';
|
|
25
25
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
26
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
27
26
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
28
27
|
import { changeSelectedCardToText } from '../pm-plugins/doc';
|
|
29
28
|
import { pluginKey } from '../pm-plugins/plugin-key';
|
|
@@ -73,8 +72,7 @@ export var visitCardLinkAnalytics = function visitCardLinkAnalytics(editorAnalyt
|
|
|
73
72
|
var type = state.selection.node.type;
|
|
74
73
|
if (dispatch) {
|
|
75
74
|
var tr = state.tr;
|
|
76
|
-
|
|
77
|
-
editorAnalyticsApi === null || editorAnalyticsApi === void 0 || editorAnalyticsApi.attachAnalyticsEvent(buildVisitedNonHyperLinkPayload(type.name, inputMethod, shouldIncludeResolvedAttributes ? resolvedAttributes : undefined))(tr);
|
|
75
|
+
editorAnalyticsApi === null || editorAnalyticsApi === void 0 || editorAnalyticsApi.attachAnalyticsEvent(buildVisitedNonHyperLinkPayload(type.name, inputMethod, resolvedAttributes))(tr);
|
|
78
76
|
dispatch(tr);
|
|
79
77
|
}
|
|
80
78
|
return true;
|
|
@@ -87,20 +85,18 @@ var fireOpenLinkToolbarAnalytics = function fireOpenLinkToolbarAnalytics(editorA
|
|
|
87
85
|
if (!linkAnalyticsRecorded) {
|
|
88
86
|
return false;
|
|
89
87
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
});
|
|
103
|
-
}
|
|
88
|
+
editorAnalyticsApi === null || editorAnalyticsApi === void 0 || editorAnalyticsApi.fireAnalyticsEvent({
|
|
89
|
+
action: ACTION.CLICKED,
|
|
90
|
+
actionSubject: ACTION_SUBJECT.BUTTON,
|
|
91
|
+
actionSubjectId: ACTION_SUBJECTID.OPEN_LINK,
|
|
92
|
+
attributes: {
|
|
93
|
+
displayCategory: resolvedAttributes.displayCategory,
|
|
94
|
+
extensionKey: resolvedAttributes.extensionKey,
|
|
95
|
+
status: resolvedAttributes.status,
|
|
96
|
+
statusDetails: resolvedAttributes.statusDetails
|
|
97
|
+
},
|
|
98
|
+
eventType: EVENT_TYPE.UI
|
|
99
|
+
});
|
|
104
100
|
return true;
|
|
105
101
|
};
|
|
106
102
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "18.0.
|
|
3
|
+
"version": "18.0.3",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"atlaskit:src": "src/index.ts",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@atlaskit/adf-schema": "^55.
|
|
24
|
+
"@atlaskit/adf-schema": "^55.2.0",
|
|
25
25
|
"@atlaskit/analytics-next": "^12.0.0",
|
|
26
26
|
"@atlaskit/button": "^24.0.0",
|
|
27
27
|
"@atlaskit/css": "^1.0.0",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"@atlaskit/platform-feature-flags-react": "^1.0.0",
|
|
58
58
|
"@atlaskit/primitives": "^20.0.0",
|
|
59
59
|
"@atlaskit/prosemirror-history": "^1.0.0",
|
|
60
|
-
"@atlaskit/smart-card": "^45.
|
|
61
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
60
|
+
"@atlaskit/smart-card": "^45.1.0",
|
|
61
|
+
"@atlaskit/tmp-editor-statsig": "^107.1.0",
|
|
62
62
|
"@atlaskit/tokens": "^14.0.0",
|
|
63
63
|
"@babel/runtime": "^7.0.0",
|
|
64
64
|
"@emotion/react": "^11.7.1",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"uuid": "^3.1.0"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"@atlaskit/editor-common": "^116.
|
|
71
|
+
"@atlaskit/editor-common": "^116.3.0",
|
|
72
72
|
"@atlaskit/link-provider": "^5.0.0",
|
|
73
73
|
"react": "^18.2.0",
|
|
74
74
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|