@atlaskit/smart-card 40.10.5 → 40.10.7
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/analytics.spec.yaml +4 -0
- package/dist/cjs/state/helpers.js +22 -49
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/index.js +16 -10
- package/dist/cjs/view/CardWithUrl/component.js +5 -3
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +2 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/state/helpers.js +22 -49
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/index.js +3 -0
- package/dist/es2019/view/CardWithUrl/component.js +5 -3
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +2 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/state/helpers.js +22 -49
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/index.js +14 -10
- package/dist/esm/view/CardWithUrl/component.js +5 -3
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +2 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/common/analytics/generated/analytics.types.d.ts +2 -1
- package/dist/types-ts4.5/common/analytics/generated/analytics.types.d.ts +2 -1
- package/package.json +4 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 40.10.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`932f1fbaaf201`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/932f1fbaaf201) -
|
|
8
|
+
[ux] NAVX-1327 Adding error icon back for FlexibleCard inline view
|
|
9
|
+
- [`0412437292a6d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0412437292a6d) -
|
|
10
|
+
Switches linking changes for Preview Panel from FG to an experiment.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 40.10.6
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`1d8918dd67a21`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1d8918dd67a21) -
|
|
18
|
+
Update smartLinkClickedSmartLinkClickAnalyticsWorkflowsAttributesType to include clickedAt field
|
|
19
|
+
in yaml file and codegen'd file as well as update component to pass it along as
|
|
20
|
+
Date.now().toString()
|
|
21
|
+
|
|
3
22
|
## 40.10.5
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/analytics.spec.yaml
CHANGED
|
@@ -771,3 +771,7 @@ events:
|
|
|
771
771
|
A null-capable field representing the Confluence content ID, Confluence page ID, or Jira
|
|
772
772
|
issue key. This can be null if it is a value for an unsupported 1P provider (eg,
|
|
773
773
|
Bitbucket, Loom), and will be prefixed by an identifier based on the source product.
|
|
774
|
+
clickedAt:
|
|
775
|
+
required: true
|
|
776
|
+
type: string
|
|
777
|
+
description: The timestamp when the event was clicked
|
|
@@ -50,9 +50,11 @@ var getFirstPartyIdentifier = exports.getFirstPartyIdentifier = function getFirs
|
|
|
50
50
|
var product = getProductFromWindowURL();
|
|
51
51
|
var currentURL = window.location.href;
|
|
52
52
|
if (product === 'confluence') {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
if (currentURL.includes('content.id')) {
|
|
54
|
+
var contentId = extractContentIdFromURL(currentURL);
|
|
55
|
+
if (contentId) {
|
|
56
|
+
return "ConfluenceContentId:".concat(contentId);
|
|
57
|
+
}
|
|
56
58
|
}
|
|
57
59
|
var pageId = extractPageIdFromURL(currentURL);
|
|
58
60
|
if (pageId) {
|
|
@@ -63,9 +65,8 @@ var getFirstPartyIdentifier = exports.getFirstPartyIdentifier = function getFirs
|
|
|
63
65
|
if (issueKey) {
|
|
64
66
|
return "JiraIssueKey:".concat(issueKey);
|
|
65
67
|
}
|
|
66
|
-
} else {
|
|
67
|
-
return undefined;
|
|
68
68
|
}
|
|
69
|
+
return undefined;
|
|
69
70
|
};
|
|
70
71
|
var getObjectName = exports.getObjectName = function getObjectName(details) {
|
|
71
72
|
return (details === null || details === void 0 ? void 0 : details.data) && 'name' in details.data && details.data.name || undefined;
|
|
@@ -125,40 +126,34 @@ var hasAuthScopeOverrides = exports.hasAuthScopeOverrides = function hasAuthScop
|
|
|
125
126
|
// Helper function to extract page ID from standard Confluence page URLs
|
|
126
127
|
var extractPageIdFromURL = function extractPageIdFromURL(url) {
|
|
127
128
|
try {
|
|
128
|
-
var urlObj = new URL(url);
|
|
129
|
-
|
|
130
129
|
// Following this pattern for confluence URL -> /wiki/spaces/{space}/pages/{pageId}/{title}
|
|
131
|
-
var pagesMatch =
|
|
132
|
-
if (pagesMatch && pagesMatch[
|
|
133
|
-
return pagesMatch[
|
|
130
|
+
var pagesMatch = url.match(/(?!pages)(\d+)/);
|
|
131
|
+
if (pagesMatch && pagesMatch[0]) {
|
|
132
|
+
return pagesMatch[0];
|
|
134
133
|
}
|
|
135
134
|
|
|
136
135
|
// Following this pattern for confluence URL -> /wiki/pages/viewpage.action?pageId={pageId}
|
|
137
|
-
var pageIdParam =
|
|
138
|
-
if (pageIdParam) {
|
|
139
|
-
return pageIdParam;
|
|
136
|
+
var pageIdParam = url.match(/(?!pageId=)(\d+)/);
|
|
137
|
+
if (pageIdParam && pageIdParam[0]) {
|
|
138
|
+
return pageIdParam[0];
|
|
140
139
|
}
|
|
141
140
|
|
|
142
141
|
// Following this pattern for confluence URL -> /wiki/display/{space}/{pageId}
|
|
143
|
-
var displayMatch =
|
|
144
|
-
if (displayMatch && displayMatch[
|
|
145
|
-
return displayMatch[
|
|
142
|
+
var displayMatch = url.match(/(?!display\/)(\d+)/);
|
|
143
|
+
if (displayMatch && displayMatch[0]) {
|
|
144
|
+
return displayMatch[0];
|
|
146
145
|
}
|
|
147
146
|
} catch (_unused) {
|
|
148
147
|
return undefined;
|
|
149
148
|
}
|
|
150
149
|
return undefined;
|
|
151
150
|
};
|
|
152
|
-
|
|
153
|
-
// Helper function to extract content ID from app connector URLs
|
|
154
151
|
var extractContentIdFromURL = function extractContentIdFromURL(url) {
|
|
155
152
|
try {
|
|
156
|
-
var
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
if (contentId) {
|
|
161
|
-
return contentId;
|
|
153
|
+
var contentId = url.match(/content\.id=(\d+)/);
|
|
154
|
+
if (contentId && contentId[1]) {
|
|
155
|
+
// contentId[1] contains just the number
|
|
156
|
+
return contentId[1];
|
|
162
157
|
}
|
|
163
158
|
} catch (_unused2) {
|
|
164
159
|
return undefined;
|
|
@@ -167,31 +162,9 @@ var extractContentIdFromURL = function extractContentIdFromURL(url) {
|
|
|
167
162
|
};
|
|
168
163
|
var extractJiraIssueIdFromURL = function extractJiraIssueIdFromURL(url) {
|
|
169
164
|
try {
|
|
170
|
-
var
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
// Example: https://product-fabric.atlassian.net/browse/AI3W-1064
|
|
174
|
-
var browseMatch = urlObj.pathname.match(/\/browse\/([A-Z]+-\d+)/);
|
|
175
|
-
if (browseMatch && browseMatch[1]) {
|
|
176
|
-
return browseMatch[1];
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
// Following this pattern for jira URL -> /jira/browse/{issueKey} (for some installations)
|
|
180
|
-
var jiraBrowseMatch = urlObj.pathname.match(/\/jira\/browse\/([A-Z]+-\d+)/);
|
|
181
|
-
if (jiraBrowseMatch && jiraBrowseMatch[1]) {
|
|
182
|
-
return jiraBrowseMatch[1];
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// Following this pattern for jira URL -> Query parameter ?selectedIssue={issueKey}
|
|
186
|
-
var selectedIssue = urlObj.searchParams.get('selectedIssue');
|
|
187
|
-
if (selectedIssue && /^[A-Z]+-\d+$/.test(selectedIssue)) {
|
|
188
|
-
return selectedIssue;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
// Following this pattern for jira URL -> Query parameter ?issueKey={issueKey}
|
|
192
|
-
var issueKeyParam = urlObj.searchParams.get('issueKey');
|
|
193
|
-
if (issueKeyParam && /^[A-Z]+-\d+$/.test(issueKeyParam)) {
|
|
194
|
-
return issueKeyParam;
|
|
165
|
+
var browseMatch = url.match(/[A-Z0-9]+-\d+/);
|
|
166
|
+
if (browseMatch && browseMatch[0]) {
|
|
167
|
+
return browseMatch[0];
|
|
195
168
|
}
|
|
196
169
|
} catch (_unused3) {
|
|
197
170
|
return undefined;
|
|
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
11
11
|
var context = exports.context = {
|
|
12
12
|
componentName: 'smart-cards',
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "40.10.
|
|
14
|
+
packageVersion: "40.10.6"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -173,6 +173,12 @@ var getLazyIcons = exports.getLazyIcons = function getLazyIcons() {
|
|
|
173
173
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphDefault" */'@atlaskit/icon/core/migration/link'));
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
+
}), _constants.IconType.Error, {
|
|
177
|
+
default: function _default() {
|
|
178
|
+
return Promise.resolve().then(function () {
|
|
179
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphDefault" */'@atlaskit/icon/core/migration/status-error--error'));
|
|
180
|
+
});
|
|
181
|
+
}
|
|
176
182
|
}), _constants.IconType.Archive, {
|
|
177
183
|
default: function _default() {
|
|
178
184
|
return Promise.resolve().then(function () {
|
|
@@ -217,7 +223,7 @@ var getLazyIcons = exports.getLazyIcons = function getLazyIcons() {
|
|
|
217
223
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphGoogleDocs" */'@atlaskit/icon-file-type/glyph/google-doc/24'));
|
|
218
224
|
});
|
|
219
225
|
}
|
|
220
|
-
}), _constants.IconType.GoogleForms, {
|
|
226
|
+
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_ref3, _constants.IconType.GoogleForms, {
|
|
221
227
|
default: function _default() {
|
|
222
228
|
return Promise.resolve().then(function () {
|
|
223
229
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphGoogleForms" */'@atlaskit/icon-file-type/glyph/google-form/16'));
|
|
@@ -228,7 +234,7 @@ var getLazyIcons = exports.getLazyIcons = function getLazyIcons() {
|
|
|
228
234
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphGoogleForms" */'@atlaskit/icon-file-type/glyph/google-form/24'));
|
|
229
235
|
});
|
|
230
236
|
}
|
|
231
|
-
}),
|
|
237
|
+
}), _constants.IconType.GoogleSheets, {
|
|
232
238
|
default: function _default() {
|
|
233
239
|
return Promise.resolve().then(function () {
|
|
234
240
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphGoogleSheets" */'@atlaskit/icon-file-type/glyph/google-sheet/16'));
|
|
@@ -327,7 +333,7 @@ var getLazyIcons = exports.getLazyIcons = function getLazyIcons() {
|
|
|
327
333
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphCommit" */'@atlaskit/icon-object/glyph/commit/24'));
|
|
328
334
|
});
|
|
329
335
|
}
|
|
330
|
-
}), _constants.IconType.PullRequest, {
|
|
336
|
+
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_ref3, _constants.IconType.PullRequest, {
|
|
331
337
|
default: function _default() {
|
|
332
338
|
return Promise.resolve().then(function () {
|
|
333
339
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphPullRequest" */'@atlaskit/icon-object/glyph/pull-request/16'));
|
|
@@ -338,7 +344,7 @@ var getLazyIcons = exports.getLazyIcons = function getLazyIcons() {
|
|
|
338
344
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphPullRequest" */'@atlaskit/icon-object/glyph/pull-request/24'));
|
|
339
345
|
});
|
|
340
346
|
}
|
|
341
|
-
}),
|
|
347
|
+
}), _constants.IconType.Repo, {
|
|
342
348
|
default: function _default() {
|
|
343
349
|
return Promise.resolve().then(function () {
|
|
344
350
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphRepo" */'@atlaskit/icon-object/glyph/code/16'));
|
|
@@ -437,7 +443,7 @@ var getLazyIcons = exports.getLazyIcons = function getLazyIcons() {
|
|
|
437
443
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphSubTask" */'@atlaskit/icon-object/glyph/subtask/24'));
|
|
438
444
|
});
|
|
439
445
|
}
|
|
440
|
-
}), _constants.IconType.Task, {
|
|
446
|
+
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_ref3, _constants.IconType.Task, {
|
|
441
447
|
default: function _default() {
|
|
442
448
|
return Promise.resolve().then(function () {
|
|
443
449
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphTask" */'@atlaskit/icon-object/glyph/task/16'));
|
|
@@ -448,7 +454,7 @@ var getLazyIcons = exports.getLazyIcons = function getLazyIcons() {
|
|
|
448
454
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphTask" */'@atlaskit/icon-object/glyph/task/24'));
|
|
449
455
|
});
|
|
450
456
|
}
|
|
451
|
-
}),
|
|
457
|
+
}), _constants.IconType.LiveDocument, {
|
|
452
458
|
default: function _default() {
|
|
453
459
|
return Promise.resolve().then(function () {
|
|
454
460
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphPageLiveDoc" */'@atlaskit/icon-object/glyph/page-live-doc/16'));
|
|
@@ -517,13 +523,13 @@ var getLazyIcons = exports.getLazyIcons = function getLazyIcons() {
|
|
|
517
523
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphComment" */'@atlaskit/icon/core/migration/thumbs-up--like'));
|
|
518
524
|
});
|
|
519
525
|
}
|
|
520
|
-
}), _constants.IconType.Vote, {
|
|
526
|
+
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_ref3, _constants.IconType.Vote, {
|
|
521
527
|
default: function _default() {
|
|
522
528
|
return Promise.resolve().then(function () {
|
|
523
529
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphComment" */'@atlaskit/icon/core/migration/arrow-up'));
|
|
524
530
|
});
|
|
525
531
|
}
|
|
526
|
-
}),
|
|
532
|
+
}), _constants.IconType.PriorityBlocker, {
|
|
527
533
|
default: function _default() {
|
|
528
534
|
return Promise.resolve().then(function () {
|
|
529
535
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphBlocker" */'@atlaskit/icon-priority/glyph/priority-blocker'));
|
|
@@ -577,13 +583,13 @@ var getLazyIcons = exports.getLazyIcons = function getLazyIcons() {
|
|
|
577
583
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphMinor" */'@atlaskit/icon-priority/glyph/priority-minor'));
|
|
578
584
|
});
|
|
579
585
|
}
|
|
580
|
-
}), _constants.IconType.PriorityTrivial, {
|
|
586
|
+
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_ref3, _constants.IconType.PriorityTrivial, {
|
|
581
587
|
default: function _default() {
|
|
582
588
|
return Promise.resolve().then(function () {
|
|
583
589
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphTrivial" */'@atlaskit/icon-priority/glyph/priority-trivial'));
|
|
584
590
|
});
|
|
585
591
|
}
|
|
586
|
-
}),
|
|
592
|
+
}), _constants.IconType.PriorityUndefined, {
|
|
587
593
|
default: function _default() {
|
|
588
594
|
return Promise.resolve().then(function () {
|
|
589
595
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphUndefined" */'@atlaskit/icon/core/migration/question-circle--question'));
|
|
@@ -9,6 +9,7 @@ exports.CardWithUrlContent = void 0;
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
11
11
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
12
13
|
var _useAnalyticsEvents2 = require("../../common/analytics/generated/use-analytics-events");
|
|
13
14
|
var _constants = require("../../constants");
|
|
14
15
|
var _state = require("../../state");
|
|
@@ -102,10 +103,11 @@ function Component(_ref) {
|
|
|
102
103
|
action: 'clicked',
|
|
103
104
|
actionSubject: 'smartLink',
|
|
104
105
|
actionSubjectId: 'smartlinkClickAnalyticsWorkflows',
|
|
105
|
-
eventType: '
|
|
106
|
+
eventType: 'screen',
|
|
106
107
|
attributes: {
|
|
107
108
|
eventName: 'smartLinkClickAnalyticsThirdPartyWorkflows',
|
|
108
|
-
firstPartyIdentifier: firstPartyIdentifier
|
|
109
|
+
firstPartyIdentifier: firstPartyIdentifier,
|
|
110
|
+
clickedAt: Date.now().toString()
|
|
109
111
|
},
|
|
110
112
|
nonPrivacySafeAttributes: {
|
|
111
113
|
thirdPartyARI: thirdPartyARI
|
|
@@ -120,7 +122,7 @@ function Component(_ref) {
|
|
|
120
122
|
// delegate the click to the preview panel handler
|
|
121
123
|
if (!isModifierKeyPressed && ari && name && openPreviewPanel && isPreviewPanelAvailable !== null && isPreviewPanelAvailable !== void 0 && isPreviewPanelAvailable({
|
|
122
124
|
ari: ari
|
|
123
|
-
}) && !(0,
|
|
125
|
+
}) && !(0, _expValEquals.expValEquals)('platform_editor_preview_panel_linking_exp', 'isEnabled', true)) {
|
|
124
126
|
event.preventDefault();
|
|
125
127
|
event.stopPropagation();
|
|
126
128
|
openPreviewPanel({
|
|
@@ -12,6 +12,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
14
|
var _popup = _interopRequireDefault(require("@atlaskit/popup"));
|
|
15
|
+
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
15
16
|
var _constants = require("../../../constants");
|
|
16
17
|
var _actions = require("../../../state/actions");
|
|
17
18
|
var _renderers = require("../../../state/renderers");
|
|
@@ -215,7 +216,7 @@ var HoverCardComponent = exports.HoverCardComponent = function HoverCardComponen
|
|
|
215
216
|
onClick: onChildClick,
|
|
216
217
|
onContextMenu: onContextMenuClick,
|
|
217
218
|
"data-testid": HOVER_CARD_TRIGGRER_WRAPPER
|
|
218
|
-
}, (0,
|
|
219
|
+
}, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_preview_panel_linking_exp', 'isEnabled', true) ? {
|
|
219
220
|
className: HOVER_CARD_TRIGGRER_WRAPPER
|
|
220
221
|
} : {}, (0, _platformFeatureFlags.fg)('fix_a11y_violation_in_hover_card_trigger') ? {
|
|
221
222
|
role: 'button'
|
|
@@ -19,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
19
19
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
20
20
|
var PACKAGE_DATA = {
|
|
21
21
|
packageName: "@atlaskit/smart-card",
|
|
22
|
-
packageVersion: "40.10.
|
|
22
|
+
packageVersion: "40.10.6",
|
|
23
23
|
componentName: 'linkUrl'
|
|
24
24
|
};
|
|
25
25
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -42,9 +42,11 @@ export const getFirstPartyIdentifier = () => {
|
|
|
42
42
|
const product = getProductFromWindowURL();
|
|
43
43
|
const currentURL = window.location.href;
|
|
44
44
|
if (product === 'confluence') {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
if (currentURL.includes('content.id')) {
|
|
46
|
+
const contentId = extractContentIdFromURL(currentURL);
|
|
47
|
+
if (contentId) {
|
|
48
|
+
return `ConfluenceContentId:${contentId}`;
|
|
49
|
+
}
|
|
48
50
|
}
|
|
49
51
|
const pageId = extractPageIdFromURL(currentURL);
|
|
50
52
|
if (pageId) {
|
|
@@ -55,9 +57,8 @@ export const getFirstPartyIdentifier = () => {
|
|
|
55
57
|
if (issueKey) {
|
|
56
58
|
return `JiraIssueKey:${issueKey}`;
|
|
57
59
|
}
|
|
58
|
-
} else {
|
|
59
|
-
return undefined;
|
|
60
60
|
}
|
|
61
|
+
return undefined;
|
|
61
62
|
};
|
|
62
63
|
export const getObjectName = details => (details === null || details === void 0 ? void 0 : details.data) && 'name' in details.data && details.data.name || undefined;
|
|
63
64
|
export const getObjectIconUrl = details => {
|
|
@@ -109,40 +110,34 @@ export const hasAuthScopeOverrides = details => !!(details !== null && details !
|
|
|
109
110
|
// Helper function to extract page ID from standard Confluence page URLs
|
|
110
111
|
const extractPageIdFromURL = url => {
|
|
111
112
|
try {
|
|
112
|
-
const urlObj = new URL(url);
|
|
113
|
-
|
|
114
113
|
// Following this pattern for confluence URL -> /wiki/spaces/{space}/pages/{pageId}/{title}
|
|
115
|
-
const pagesMatch =
|
|
116
|
-
if (pagesMatch && pagesMatch[
|
|
117
|
-
return pagesMatch[
|
|
114
|
+
const pagesMatch = url.match(/(?!pages)(\d+)/);
|
|
115
|
+
if (pagesMatch && pagesMatch[0]) {
|
|
116
|
+
return pagesMatch[0];
|
|
118
117
|
}
|
|
119
118
|
|
|
120
119
|
// Following this pattern for confluence URL -> /wiki/pages/viewpage.action?pageId={pageId}
|
|
121
|
-
const pageIdParam =
|
|
122
|
-
if (pageIdParam) {
|
|
123
|
-
return pageIdParam;
|
|
120
|
+
const pageIdParam = url.match(/(?!pageId=)(\d+)/);
|
|
121
|
+
if (pageIdParam && pageIdParam[0]) {
|
|
122
|
+
return pageIdParam[0];
|
|
124
123
|
}
|
|
125
124
|
|
|
126
125
|
// Following this pattern for confluence URL -> /wiki/display/{space}/{pageId}
|
|
127
|
-
const displayMatch =
|
|
128
|
-
if (displayMatch && displayMatch[
|
|
129
|
-
return displayMatch[
|
|
126
|
+
const displayMatch = url.match(/(?!display\/)(\d+)/);
|
|
127
|
+
if (displayMatch && displayMatch[0]) {
|
|
128
|
+
return displayMatch[0];
|
|
130
129
|
}
|
|
131
130
|
} catch {
|
|
132
131
|
return undefined;
|
|
133
132
|
}
|
|
134
133
|
return undefined;
|
|
135
134
|
};
|
|
136
|
-
|
|
137
|
-
// Helper function to extract content ID from app connector URLs
|
|
138
135
|
const extractContentIdFromURL = url => {
|
|
139
136
|
try {
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
if (contentId) {
|
|
145
|
-
return contentId;
|
|
137
|
+
const contentId = url.match(/content\.id=(\d+)/);
|
|
138
|
+
if (contentId && contentId[1]) {
|
|
139
|
+
// contentId[1] contains just the number
|
|
140
|
+
return contentId[1];
|
|
146
141
|
}
|
|
147
142
|
} catch {
|
|
148
143
|
return undefined;
|
|
@@ -151,31 +146,9 @@ const extractContentIdFromURL = url => {
|
|
|
151
146
|
};
|
|
152
147
|
const extractJiraIssueIdFromURL = url => {
|
|
153
148
|
try {
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
// Example: https://product-fabric.atlassian.net/browse/AI3W-1064
|
|
158
|
-
const browseMatch = urlObj.pathname.match(/\/browse\/([A-Z]+-\d+)/);
|
|
159
|
-
if (browseMatch && browseMatch[1]) {
|
|
160
|
-
return browseMatch[1];
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// Following this pattern for jira URL -> /jira/browse/{issueKey} (for some installations)
|
|
164
|
-
const jiraBrowseMatch = urlObj.pathname.match(/\/jira\/browse\/([A-Z]+-\d+)/);
|
|
165
|
-
if (jiraBrowseMatch && jiraBrowseMatch[1]) {
|
|
166
|
-
return jiraBrowseMatch[1];
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// Following this pattern for jira URL -> Query parameter ?selectedIssue={issueKey}
|
|
170
|
-
const selectedIssue = urlObj.searchParams.get('selectedIssue');
|
|
171
|
-
if (selectedIssue && /^[A-Z]+-\d+$/.test(selectedIssue)) {
|
|
172
|
-
return selectedIssue;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// Following this pattern for jira URL -> Query parameter ?issueKey={issueKey}
|
|
176
|
-
const issueKeyParam = urlObj.searchParams.get('issueKey');
|
|
177
|
-
if (issueKeyParam && /^[A-Z]+-\d+$/.test(issueKeyParam)) {
|
|
178
|
-
return issueKeyParam;
|
|
149
|
+
const browseMatch = url.match(/[A-Z0-9]+-\d+/);
|
|
150
|
+
if (browseMatch && browseMatch[0]) {
|
|
151
|
+
return browseMatch[0];
|
|
179
152
|
}
|
|
180
153
|
} catch {
|
|
181
154
|
return undefined;
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card",
|
|
5
|
-
packageVersion: "40.10.
|
|
5
|
+
packageVersion: "40.10.6"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -100,6 +100,9 @@ export const getLazyIcons = () => {
|
|
|
100
100
|
[IconType.Default]: {
|
|
101
101
|
default: () => import( /* webpackChunkName: "@atlaskit-internal_glyphDefault" */'@atlaskit/icon/core/migration/link')
|
|
102
102
|
},
|
|
103
|
+
[IconType.Error]: {
|
|
104
|
+
default: () => import( /* webpackChunkName: "@atlaskit-internal_glyphDefault" */'@atlaskit/icon/core/migration/status-error--error')
|
|
105
|
+
},
|
|
103
106
|
[IconType.Archive]: {
|
|
104
107
|
default: () => import( /* webpackChunkName: "@atlaskit-internal_glyphArchive" */'@atlaskit/icon-file-type/glyph/archive/16'),
|
|
105
108
|
large: () => import( /* webpackChunkName: "@atlaskit-internal_glyphArchive" */'@atlaskit/icon-file-type/glyph/archive/24')
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useMemo } from 'react';
|
|
2
2
|
import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/analytics-next';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
5
|
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
5
6
|
import { CardDisplay } from '../../constants';
|
|
6
7
|
import { useSmartLink } from '../../state';
|
|
@@ -95,10 +96,11 @@ function Component({
|
|
|
95
96
|
action: 'clicked',
|
|
96
97
|
actionSubject: 'smartLink',
|
|
97
98
|
actionSubjectId: 'smartlinkClickAnalyticsWorkflows',
|
|
98
|
-
eventType: '
|
|
99
|
+
eventType: 'screen',
|
|
99
100
|
attributes: {
|
|
100
101
|
eventName: 'smartLinkClickAnalyticsThirdPartyWorkflows',
|
|
101
|
-
firstPartyIdentifier: firstPartyIdentifier
|
|
102
|
+
firstPartyIdentifier: firstPartyIdentifier,
|
|
103
|
+
clickedAt: Date.now().toString()
|
|
102
104
|
},
|
|
103
105
|
nonPrivacySafeAttributes: {
|
|
104
106
|
thirdPartyARI: thirdPartyARI
|
|
@@ -113,7 +115,7 @@ function Component({
|
|
|
113
115
|
// delegate the click to the preview panel handler
|
|
114
116
|
if (!isModifierKeyPressed && ari && name && openPreviewPanel && isPreviewPanelAvailable !== null && isPreviewPanelAvailable !== void 0 && isPreviewPanelAvailable({
|
|
115
117
|
ari
|
|
116
|
-
}) && !
|
|
118
|
+
}) && !expValEquals('platform_editor_preview_panel_linking_exp', 'isEnabled', true)) {
|
|
117
119
|
event.preventDefault();
|
|
118
120
|
event.stopPropagation();
|
|
119
121
|
openPreviewPanel({
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { useCallback, useEffect, useRef } from 'react';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
4
|
import Popup from '@atlaskit/popup';
|
|
5
|
+
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
5
6
|
import { ActionName, CardDisplay } from '../../../constants';
|
|
6
7
|
import { useSmartCardActions } from '../../../state/actions';
|
|
7
8
|
import { useSmartLinkRenderers } from '../../../state/renderers';
|
|
@@ -192,7 +193,7 @@ export const HoverCardComponent = ({
|
|
|
192
193
|
onClick: onChildClick,
|
|
193
194
|
onContextMenu: onContextMenuClick,
|
|
194
195
|
"data-testid": HOVER_CARD_TRIGGRER_WRAPPER
|
|
195
|
-
},
|
|
196
|
+
}, expValEqualsNoExposure('platform_editor_preview_panel_linking_exp', 'isEnabled', true) ? {
|
|
196
197
|
className: HOVER_CARD_TRIGGRER_WRAPPER
|
|
197
198
|
} : {}, fg('fix_a11y_violation_in_hover_card_trigger') ? {
|
|
198
199
|
role: 'button'
|
|
@@ -9,7 +9,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
9
9
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
10
10
|
const PACKAGE_DATA = {
|
|
11
11
|
packageName: "@atlaskit/smart-card",
|
|
12
|
-
packageVersion: "40.10.
|
|
12
|
+
packageVersion: "40.10.6",
|
|
13
13
|
componentName: 'linkUrl'
|
|
14
14
|
};
|
|
15
15
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -43,9 +43,11 @@ export var getFirstPartyIdentifier = function getFirstPartyIdentifier() {
|
|
|
43
43
|
var product = getProductFromWindowURL();
|
|
44
44
|
var currentURL = window.location.href;
|
|
45
45
|
if (product === 'confluence') {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
if (currentURL.includes('content.id')) {
|
|
47
|
+
var contentId = extractContentIdFromURL(currentURL);
|
|
48
|
+
if (contentId) {
|
|
49
|
+
return "ConfluenceContentId:".concat(contentId);
|
|
50
|
+
}
|
|
49
51
|
}
|
|
50
52
|
var pageId = extractPageIdFromURL(currentURL);
|
|
51
53
|
if (pageId) {
|
|
@@ -56,9 +58,8 @@ export var getFirstPartyIdentifier = function getFirstPartyIdentifier() {
|
|
|
56
58
|
if (issueKey) {
|
|
57
59
|
return "JiraIssueKey:".concat(issueKey);
|
|
58
60
|
}
|
|
59
|
-
} else {
|
|
60
|
-
return undefined;
|
|
61
61
|
}
|
|
62
|
+
return undefined;
|
|
62
63
|
};
|
|
63
64
|
export var getObjectName = function getObjectName(details) {
|
|
64
65
|
return (details === null || details === void 0 ? void 0 : details.data) && 'name' in details.data && details.data.name || undefined;
|
|
@@ -118,40 +119,34 @@ export var hasAuthScopeOverrides = function hasAuthScopeOverrides(details) {
|
|
|
118
119
|
// Helper function to extract page ID from standard Confluence page URLs
|
|
119
120
|
var extractPageIdFromURL = function extractPageIdFromURL(url) {
|
|
120
121
|
try {
|
|
121
|
-
var urlObj = new URL(url);
|
|
122
|
-
|
|
123
122
|
// Following this pattern for confluence URL -> /wiki/spaces/{space}/pages/{pageId}/{title}
|
|
124
|
-
var pagesMatch =
|
|
125
|
-
if (pagesMatch && pagesMatch[
|
|
126
|
-
return pagesMatch[
|
|
123
|
+
var pagesMatch = url.match(/(?!pages)(\d+)/);
|
|
124
|
+
if (pagesMatch && pagesMatch[0]) {
|
|
125
|
+
return pagesMatch[0];
|
|
127
126
|
}
|
|
128
127
|
|
|
129
128
|
// Following this pattern for confluence URL -> /wiki/pages/viewpage.action?pageId={pageId}
|
|
130
|
-
var pageIdParam =
|
|
131
|
-
if (pageIdParam) {
|
|
132
|
-
return pageIdParam;
|
|
129
|
+
var pageIdParam = url.match(/(?!pageId=)(\d+)/);
|
|
130
|
+
if (pageIdParam && pageIdParam[0]) {
|
|
131
|
+
return pageIdParam[0];
|
|
133
132
|
}
|
|
134
133
|
|
|
135
134
|
// Following this pattern for confluence URL -> /wiki/display/{space}/{pageId}
|
|
136
|
-
var displayMatch =
|
|
137
|
-
if (displayMatch && displayMatch[
|
|
138
|
-
return displayMatch[
|
|
135
|
+
var displayMatch = url.match(/(?!display\/)(\d+)/);
|
|
136
|
+
if (displayMatch && displayMatch[0]) {
|
|
137
|
+
return displayMatch[0];
|
|
139
138
|
}
|
|
140
139
|
} catch (_unused) {
|
|
141
140
|
return undefined;
|
|
142
141
|
}
|
|
143
142
|
return undefined;
|
|
144
143
|
};
|
|
145
|
-
|
|
146
|
-
// Helper function to extract content ID from app connector URLs
|
|
147
144
|
var extractContentIdFromURL = function extractContentIdFromURL(url) {
|
|
148
145
|
try {
|
|
149
|
-
var
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
if (contentId) {
|
|
154
|
-
return contentId;
|
|
146
|
+
var contentId = url.match(/content\.id=(\d+)/);
|
|
147
|
+
if (contentId && contentId[1]) {
|
|
148
|
+
// contentId[1] contains just the number
|
|
149
|
+
return contentId[1];
|
|
155
150
|
}
|
|
156
151
|
} catch (_unused2) {
|
|
157
152
|
return undefined;
|
|
@@ -160,31 +155,9 @@ var extractContentIdFromURL = function extractContentIdFromURL(url) {
|
|
|
160
155
|
};
|
|
161
156
|
var extractJiraIssueIdFromURL = function extractJiraIssueIdFromURL(url) {
|
|
162
157
|
try {
|
|
163
|
-
var
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
// Example: https://product-fabric.atlassian.net/browse/AI3W-1064
|
|
167
|
-
var browseMatch = urlObj.pathname.match(/\/browse\/([A-Z]+-\d+)/);
|
|
168
|
-
if (browseMatch && browseMatch[1]) {
|
|
169
|
-
return browseMatch[1];
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
// Following this pattern for jira URL -> /jira/browse/{issueKey} (for some installations)
|
|
173
|
-
var jiraBrowseMatch = urlObj.pathname.match(/\/jira\/browse\/([A-Z]+-\d+)/);
|
|
174
|
-
if (jiraBrowseMatch && jiraBrowseMatch[1]) {
|
|
175
|
-
return jiraBrowseMatch[1];
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
// Following this pattern for jira URL -> Query parameter ?selectedIssue={issueKey}
|
|
179
|
-
var selectedIssue = urlObj.searchParams.get('selectedIssue');
|
|
180
|
-
if (selectedIssue && /^[A-Z]+-\d+$/.test(selectedIssue)) {
|
|
181
|
-
return selectedIssue;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
// Following this pattern for jira URL -> Query parameter ?issueKey={issueKey}
|
|
185
|
-
var issueKeyParam = urlObj.searchParams.get('issueKey');
|
|
186
|
-
if (issueKeyParam && /^[A-Z]+-\d+$/.test(issueKeyParam)) {
|
|
187
|
-
return issueKeyParam;
|
|
158
|
+
var browseMatch = url.match(/[A-Z0-9]+-\d+/);
|
|
159
|
+
if (browseMatch && browseMatch[0]) {
|
|
160
|
+
return browseMatch[0];
|
|
188
161
|
}
|
|
189
162
|
} catch (_unused3) {
|
|
190
163
|
return undefined;
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "40.10.
|
|
7
|
+
packageVersion: "40.10.6"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -134,6 +134,10 @@ export var getLazyIcons = function getLazyIcons() {
|
|
|
134
134
|
default: function _default() {
|
|
135
135
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphDefault" */'@atlaskit/icon/core/migration/link');
|
|
136
136
|
}
|
|
137
|
+
}), IconType.Error, {
|
|
138
|
+
default: function _default() {
|
|
139
|
+
return import( /* webpackChunkName: "@atlaskit-internal_glyphDefault" */'@atlaskit/icon/core/migration/status-error--error');
|
|
140
|
+
}
|
|
137
141
|
}), IconType.Archive, {
|
|
138
142
|
default: function _default() {
|
|
139
143
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphArchive" */'@atlaskit/icon-file-type/glyph/archive/16');
|
|
@@ -162,14 +166,14 @@ export var getLazyIcons = function getLazyIcons() {
|
|
|
162
166
|
large: function large() {
|
|
163
167
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphGoogleDocs" */'@atlaskit/icon-file-type/glyph/google-doc/24');
|
|
164
168
|
}
|
|
165
|
-
}), IconType.GoogleForms, {
|
|
169
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref3, IconType.GoogleForms, {
|
|
166
170
|
default: function _default() {
|
|
167
171
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphGoogleForms" */'@atlaskit/icon-file-type/glyph/google-form/16');
|
|
168
172
|
},
|
|
169
173
|
large: function large() {
|
|
170
174
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphGoogleForms" */'@atlaskit/icon-file-type/glyph/google-form/24');
|
|
171
175
|
}
|
|
172
|
-
}),
|
|
176
|
+
}), IconType.GoogleSheets, {
|
|
173
177
|
default: function _default() {
|
|
174
178
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphGoogleSheets" */'@atlaskit/icon-file-type/glyph/google-sheet/16');
|
|
175
179
|
},
|
|
@@ -232,14 +236,14 @@ export var getLazyIcons = function getLazyIcons() {
|
|
|
232
236
|
large: function large() {
|
|
233
237
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphCommit" */'@atlaskit/icon-object/glyph/commit/24');
|
|
234
238
|
}
|
|
235
|
-
}), IconType.PullRequest, {
|
|
239
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref3, IconType.PullRequest, {
|
|
236
240
|
default: function _default() {
|
|
237
241
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphPullRequest" */'@atlaskit/icon-object/glyph/pull-request/16');
|
|
238
242
|
},
|
|
239
243
|
large: function large() {
|
|
240
244
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphPullRequest" */'@atlaskit/icon-object/glyph/pull-request/24');
|
|
241
245
|
}
|
|
242
|
-
}),
|
|
246
|
+
}), IconType.Repo, {
|
|
243
247
|
default: function _default() {
|
|
244
248
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphRepo" */'@atlaskit/icon-object/glyph/code/16');
|
|
245
249
|
},
|
|
@@ -302,14 +306,14 @@ export var getLazyIcons = function getLazyIcons() {
|
|
|
302
306
|
large: function large() {
|
|
303
307
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphSubTask" */'@atlaskit/icon-object/glyph/subtask/24');
|
|
304
308
|
}
|
|
305
|
-
}), IconType.Task, {
|
|
309
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref3, IconType.Task, {
|
|
306
310
|
default: function _default() {
|
|
307
311
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphTask" */'@atlaskit/icon-object/glyph/task/16');
|
|
308
312
|
},
|
|
309
313
|
large: function large() {
|
|
310
314
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphTask" */'@atlaskit/icon-object/glyph/task/24');
|
|
311
315
|
}
|
|
312
|
-
}),
|
|
316
|
+
}), IconType.LiveDocument, {
|
|
313
317
|
default: function _default() {
|
|
314
318
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphPageLiveDoc" */'@atlaskit/icon-object/glyph/page-live-doc/16');
|
|
315
319
|
},
|
|
@@ -358,11 +362,11 @@ export var getLazyIcons = function getLazyIcons() {
|
|
|
358
362
|
default: function _default() {
|
|
359
363
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphComment" */'@atlaskit/icon/core/migration/thumbs-up--like');
|
|
360
364
|
}
|
|
361
|
-
}), IconType.Vote, {
|
|
365
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref3, IconType.Vote, {
|
|
362
366
|
default: function _default() {
|
|
363
367
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphComment" */'@atlaskit/icon/core/migration/arrow-up');
|
|
364
368
|
}
|
|
365
|
-
}),
|
|
369
|
+
}), IconType.PriorityBlocker, {
|
|
366
370
|
default: function _default() {
|
|
367
371
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphBlocker" */'@atlaskit/icon-priority/glyph/priority-blocker');
|
|
368
372
|
}
|
|
@@ -398,11 +402,11 @@ export var getLazyIcons = function getLazyIcons() {
|
|
|
398
402
|
default: function _default() {
|
|
399
403
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphMinor" */'@atlaskit/icon-priority/glyph/priority-minor');
|
|
400
404
|
}
|
|
401
|
-
}), IconType.PriorityTrivial, {
|
|
405
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref3, IconType.PriorityTrivial, {
|
|
402
406
|
default: function _default() {
|
|
403
407
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphTrivial" */'@atlaskit/icon-priority/glyph/priority-trivial');
|
|
404
408
|
}
|
|
405
|
-
}),
|
|
409
|
+
}), IconType.PriorityUndefined, {
|
|
406
410
|
default: function _default() {
|
|
407
411
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphUndefined" */'@atlaskit/icon/core/migration/question-circle--question');
|
|
408
412
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useMemo } from 'react';
|
|
2
2
|
import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/analytics-next';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
5
|
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
5
6
|
import { CardDisplay } from '../../constants';
|
|
6
7
|
import { useSmartLink } from '../../state';
|
|
@@ -93,10 +94,11 @@ function Component(_ref) {
|
|
|
93
94
|
action: 'clicked',
|
|
94
95
|
actionSubject: 'smartLink',
|
|
95
96
|
actionSubjectId: 'smartlinkClickAnalyticsWorkflows',
|
|
96
|
-
eventType: '
|
|
97
|
+
eventType: 'screen',
|
|
97
98
|
attributes: {
|
|
98
99
|
eventName: 'smartLinkClickAnalyticsThirdPartyWorkflows',
|
|
99
|
-
firstPartyIdentifier: firstPartyIdentifier
|
|
100
|
+
firstPartyIdentifier: firstPartyIdentifier,
|
|
101
|
+
clickedAt: Date.now().toString()
|
|
100
102
|
},
|
|
101
103
|
nonPrivacySafeAttributes: {
|
|
102
104
|
thirdPartyARI: thirdPartyARI
|
|
@@ -111,7 +113,7 @@ function Component(_ref) {
|
|
|
111
113
|
// delegate the click to the preview panel handler
|
|
112
114
|
if (!isModifierKeyPressed && ari && name && openPreviewPanel && isPreviewPanelAvailable !== null && isPreviewPanelAvailable !== void 0 && isPreviewPanelAvailable({
|
|
113
115
|
ari: ari
|
|
114
|
-
}) && !
|
|
116
|
+
}) && !expValEquals('platform_editor_preview_panel_linking_exp', 'isEnabled', true)) {
|
|
115
117
|
event.preventDefault();
|
|
116
118
|
event.stopPropagation();
|
|
117
119
|
openPreviewPanel({
|
|
@@ -5,6 +5,7 @@ var _excluded = ["aria-haspopup", "aria-expanded"];
|
|
|
5
5
|
import React, { useCallback, useEffect, useRef } from 'react';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import Popup from '@atlaskit/popup';
|
|
8
|
+
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
8
9
|
import { ActionName, CardDisplay } from '../../../constants';
|
|
9
10
|
import { useSmartCardActions } from '../../../state/actions';
|
|
10
11
|
import { useSmartLinkRenderers } from '../../../state/renderers';
|
|
@@ -206,7 +207,7 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
|
206
207
|
onClick: onChildClick,
|
|
207
208
|
onContextMenu: onContextMenuClick,
|
|
208
209
|
"data-testid": HOVER_CARD_TRIGGRER_WRAPPER
|
|
209
|
-
},
|
|
210
|
+
}, expValEqualsNoExposure('platform_editor_preview_panel_linking_exp', 'isEnabled', true) ? {
|
|
210
211
|
className: HOVER_CARD_TRIGGRER_WRAPPER
|
|
211
212
|
} : {}, fg('fix_a11y_violation_in_hover_card_trigger') ? {
|
|
212
213
|
role: 'button'
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
var PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "40.10.
|
|
15
|
+
packageVersion: "40.10.6",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::8ebf07690deae06cee97fcbba4bb8eb0>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataContextType = {
|
|
@@ -234,6 +234,7 @@ export type SmartLinkClickedSmartlinkClickAnalyticsWorkflowsAttributesType = {
|
|
|
234
234
|
thirdPartyARI: string;
|
|
235
235
|
eventName: string;
|
|
236
236
|
firstPartyIdentifier: string | null;
|
|
237
|
+
clickedAt: string;
|
|
237
238
|
};
|
|
238
239
|
export type AnalyticsEventAttributes = {
|
|
239
240
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::8ebf07690deae06cee97fcbba4bb8eb0>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataContextType = {
|
|
@@ -234,6 +234,7 @@ export type SmartLinkClickedSmartlinkClickAnalyticsWorkflowsAttributesType = {
|
|
|
234
234
|
thirdPartyARI: string;
|
|
235
235
|
eventName: string;
|
|
236
236
|
firstPartyIdentifier: string | null;
|
|
237
|
+
clickedAt: string;
|
|
237
238
|
};
|
|
238
239
|
export type AnalyticsEventAttributes = {
|
|
239
240
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "40.10.
|
|
3
|
+
"version": "40.10.7",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@atlaskit/link-client-extension": "^5.0.0",
|
|
53
53
|
"@atlaskit/link-extractors": "^2.4.0",
|
|
54
54
|
"@atlaskit/link-test-helpers": "^8.3.0",
|
|
55
|
-
"@atlaskit/linking-common": "^9.
|
|
55
|
+
"@atlaskit/linking-common": "^9.4.0",
|
|
56
56
|
"@atlaskit/linking-types": "^14.0.0",
|
|
57
57
|
"@atlaskit/logo": "^19.7.0",
|
|
58
58
|
"@atlaskit/lozenge": "^13.0.0",
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
"@atlaskit/textarea": "^8.0.0",
|
|
69
69
|
"@atlaskit/textfield": "^8.0.0",
|
|
70
70
|
"@atlaskit/theme": "^19.0.0",
|
|
71
|
+
"@atlaskit/tmp-editor-statsig": "^11.1.0",
|
|
71
72
|
"@atlaskit/tokens": "^6.0.0",
|
|
72
73
|
"@atlaskit/tooltip": "^20.4.0",
|
|
73
74
|
"@atlaskit/ufo": "^0.4.0",
|
|
@@ -86,7 +87,7 @@
|
|
|
86
87
|
"uuid": "^3.1.0"
|
|
87
88
|
},
|
|
88
89
|
"peerDependencies": {
|
|
89
|
-
"@atlaskit/link-provider": "^3.
|
|
90
|
+
"@atlaskit/link-provider": "^3.6.0",
|
|
90
91
|
"react": "^18.2.0",
|
|
91
92
|
"react-dom": "^18.2.0",
|
|
92
93
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -214,9 +215,6 @@
|
|
|
214
215
|
"platform_renderer_blindspots": {
|
|
215
216
|
"type": "boolean"
|
|
216
217
|
},
|
|
217
|
-
"platform_editor_preview_panel_linking": {
|
|
218
|
-
"type": "boolean"
|
|
219
|
-
},
|
|
220
218
|
"platform-linking-enable-avatar-data-separator": {
|
|
221
219
|
"type": "boolean"
|
|
222
220
|
},
|