@atlaskit/smart-card 40.10.3 → 40.10.4
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 +8 -0
- package/dist/cjs/extractors/flexible/utils.js +12 -19
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/flexible/utils.js +10 -17
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/flexible/utils.js +12 -19
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 40.10.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`72230d76e232a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/72230d76e232a) -
|
|
8
|
+
NAVX-1308 cleaning up platform-linking-slack-entity-support
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 40.10.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.extractVoteCount = exports.extractViewCount = exports.extractUserAttributes = exports.extractTeamMemberCount = exports.extractTargetBranch = exports.extractSubscriberCount = exports.extractSubTasksProgress = exports.extractStoryPoints = exports.extractSourceBranch = exports.extractSmartLinkSentOn = exports.extractSmartLinkReactCount = exports.extractSmartLinkCommentCount = exports.extractSentOn = exports.extractReadTime = exports.extractReactCount = exports.extractProgrammingLanguage = exports.extractPersonAssignedToAsArray = exports.extractOwnedBy = exports.extractModifiedBy = exports.extractMetaTenantId = exports.extractMetaResourceType = exports.extractMetaObjectId = exports.extractLocation = exports.extractDueOn = exports.extractCreatedBy = exports.extractCommentCount = exports.extractChecklistProgress = exports.extractAttachmentCount = exports.extractAssignedTo = exports.extractAppliedToComponentsCount = void 0;
|
|
8
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
9
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
10
|
var extractLinkName = function extractLinkName(link) {
|
|
12
11
|
if (link && (0, _typeof2.default)(link) === 'object' && link['@type'] === 'Link') {
|
|
13
12
|
return link.name;
|
|
@@ -27,11 +26,9 @@ var extractSmartLinkCommentCount = exports.extractSmartLinkCommentCount = functi
|
|
|
27
26
|
if (!response || !response.data) {
|
|
28
27
|
return undefined;
|
|
29
28
|
}
|
|
30
|
-
if ((0,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return entity && 'commentCount' in entity && typeof entity.commentCount === 'number' ? entity === null || entity === void 0 ? void 0 : entity.commentCount : undefined;
|
|
34
|
-
}
|
|
29
|
+
if ((0, _linkExtractors.isEntityPresent)(response)) {
|
|
30
|
+
var entity = (0, _linkExtractors.extractEntity)(response);
|
|
31
|
+
return entity && 'commentCount' in entity && typeof entity.commentCount === 'number' ? entity === null || entity === void 0 ? void 0 : entity.commentCount : undefined;
|
|
35
32
|
}
|
|
36
33
|
return (response === null || response === void 0 ? void 0 : response.data) && extractCommentCount(response === null || response === void 0 ? void 0 : response.data);
|
|
37
34
|
};
|
|
@@ -55,14 +52,12 @@ var extractSmartLinkReactCount = exports.extractSmartLinkReactCount = function e
|
|
|
55
52
|
if (!response || !response.data) {
|
|
56
53
|
return undefined;
|
|
57
54
|
}
|
|
58
|
-
if ((0,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return
|
|
63
|
-
|
|
64
|
-
}, 0);
|
|
65
|
-
}
|
|
55
|
+
if ((0, _linkExtractors.isEntityPresent)(response)) {
|
|
56
|
+
var entity = (0, _linkExtractors.extractEntity)(response);
|
|
57
|
+
var reactions = entity && 'reactions' in entity && Array.isArray(entity.reactions) ? entity.reactions : undefined;
|
|
58
|
+
return reactions === null || reactions === void 0 ? void 0 : reactions.reduce(function (total, reaction) {
|
|
59
|
+
return total + (reaction === null || reaction === void 0 ? void 0 : reaction.total);
|
|
60
|
+
}, 0);
|
|
66
61
|
}
|
|
67
62
|
return (response === null || response === void 0 ? void 0 : response.data) && extractReactCount(response === null || response === void 0 ? void 0 : response.data);
|
|
68
63
|
};
|
|
@@ -152,11 +147,9 @@ var extractSmartLinkSentOn = exports.extractSmartLinkSentOn = function extractSm
|
|
|
152
147
|
if (!response || !response.data) {
|
|
153
148
|
return undefined;
|
|
154
149
|
}
|
|
155
|
-
if ((0,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
return (_extractEntity = (0, _linkExtractors.extractEntity)(response)) === null || _extractEntity === void 0 ? void 0 : _extractEntity.createdAt;
|
|
159
|
-
}
|
|
150
|
+
if ((0, _linkExtractors.isEntityPresent)(response)) {
|
|
151
|
+
var _extractEntity;
|
|
152
|
+
return (_extractEntity = (0, _linkExtractors.extractEntity)(response)) === null || _extractEntity === void 0 ? void 0 : _extractEntity.createdAt;
|
|
160
153
|
}
|
|
161
154
|
return (response === null || response === void 0 ? void 0 : response.data) && extractSentOn(response === null || response === void 0 ? void 0 : response.data);
|
|
162
155
|
};
|
|
@@ -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.3"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -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.3",
|
|
23
23
|
componentName: 'linkUrl'
|
|
24
24
|
};
|
|
25
25
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { extractEntity, extractPersonAssignedTo, extractPersonCreatedBy, extractPersonOwnedBy, extractPersonUpdatedBy, isEntityPresent } from '@atlaskit/link-extractors';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
const extractLinkName = link => {
|
|
4
3
|
if (link && typeof link === 'object' && link['@type'] === 'Link') {
|
|
5
4
|
return link.name;
|
|
@@ -17,11 +16,9 @@ export const extractSmartLinkCommentCount = response => {
|
|
|
17
16
|
if (!response || !response.data) {
|
|
18
17
|
return undefined;
|
|
19
18
|
}
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return entity && 'commentCount' in entity && typeof entity.commentCount === 'number' ? entity === null || entity === void 0 ? void 0 : entity.commentCount : undefined;
|
|
24
|
-
}
|
|
19
|
+
if (isEntityPresent(response)) {
|
|
20
|
+
const entity = extractEntity(response);
|
|
21
|
+
return entity && 'commentCount' in entity && typeof entity.commentCount === 'number' ? entity === null || entity === void 0 ? void 0 : entity.commentCount : undefined;
|
|
25
22
|
}
|
|
26
23
|
return (response === null || response === void 0 ? void 0 : response.data) && extractCommentCount(response === null || response === void 0 ? void 0 : response.data);
|
|
27
24
|
};
|
|
@@ -37,12 +34,10 @@ export const extractSmartLinkReactCount = response => {
|
|
|
37
34
|
if (!response || !response.data) {
|
|
38
35
|
return undefined;
|
|
39
36
|
}
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return reactions === null || reactions === void 0 ? void 0 : reactions.reduce((total, reaction) => total + (reaction === null || reaction === void 0 ? void 0 : reaction.total), 0);
|
|
45
|
-
}
|
|
37
|
+
if (isEntityPresent(response)) {
|
|
38
|
+
const entity = extractEntity(response);
|
|
39
|
+
const reactions = entity && 'reactions' in entity && Array.isArray(entity.reactions) ? entity.reactions : undefined;
|
|
40
|
+
return reactions === null || reactions === void 0 ? void 0 : reactions.reduce((total, reaction) => total + (reaction === null || reaction === void 0 ? void 0 : reaction.total), 0);
|
|
46
41
|
}
|
|
47
42
|
return (response === null || response === void 0 ? void 0 : response.data) && extractReactCount(response === null || response === void 0 ? void 0 : response.data);
|
|
48
43
|
};
|
|
@@ -121,11 +116,9 @@ export const extractSmartLinkSentOn = response => {
|
|
|
121
116
|
if (!response || !response.data) {
|
|
122
117
|
return undefined;
|
|
123
118
|
}
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
return (_extractEntity = extractEntity(response)) === null || _extractEntity === void 0 ? void 0 : _extractEntity.createdAt;
|
|
128
|
-
}
|
|
119
|
+
if (isEntityPresent(response)) {
|
|
120
|
+
var _extractEntity;
|
|
121
|
+
return (_extractEntity = extractEntity(response)) === null || _extractEntity === void 0 ? void 0 : _extractEntity.createdAt;
|
|
129
122
|
}
|
|
130
123
|
return (response === null || response === void 0 ? void 0 : response.data) && extractSentOn(response === null || response === void 0 ? void 0 : response.data);
|
|
131
124
|
};
|
|
@@ -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.3"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -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.3",
|
|
13
13
|
componentName: 'linkUrl'
|
|
14
14
|
};
|
|
15
15
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
2
|
import { extractEntity, extractPersonAssignedTo, extractPersonCreatedBy, extractPersonOwnedBy, extractPersonUpdatedBy, isEntityPresent } from '@atlaskit/link-extractors';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
var extractLinkName = function extractLinkName(link) {
|
|
5
4
|
if (link && _typeof(link) === 'object' && link['@type'] === 'Link') {
|
|
6
5
|
return link.name;
|
|
@@ -20,11 +19,9 @@ export var extractSmartLinkCommentCount = function extractSmartLinkCommentCount(
|
|
|
20
19
|
if (!response || !response.data) {
|
|
21
20
|
return undefined;
|
|
22
21
|
}
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return entity && 'commentCount' in entity && typeof entity.commentCount === 'number' ? entity === null || entity === void 0 ? void 0 : entity.commentCount : undefined;
|
|
27
|
-
}
|
|
22
|
+
if (isEntityPresent(response)) {
|
|
23
|
+
var entity = extractEntity(response);
|
|
24
|
+
return entity && 'commentCount' in entity && typeof entity.commentCount === 'number' ? entity === null || entity === void 0 ? void 0 : entity.commentCount : undefined;
|
|
28
25
|
}
|
|
29
26
|
return (response === null || response === void 0 ? void 0 : response.data) && extractCommentCount(response === null || response === void 0 ? void 0 : response.data);
|
|
30
27
|
};
|
|
@@ -48,14 +45,12 @@ export var extractSmartLinkReactCount = function extractSmartLinkReactCount(resp
|
|
|
48
45
|
if (!response || !response.data) {
|
|
49
46
|
return undefined;
|
|
50
47
|
}
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return
|
|
56
|
-
|
|
57
|
-
}, 0);
|
|
58
|
-
}
|
|
48
|
+
if (isEntityPresent(response)) {
|
|
49
|
+
var entity = extractEntity(response);
|
|
50
|
+
var reactions = entity && 'reactions' in entity && Array.isArray(entity.reactions) ? entity.reactions : undefined;
|
|
51
|
+
return reactions === null || reactions === void 0 ? void 0 : reactions.reduce(function (total, reaction) {
|
|
52
|
+
return total + (reaction === null || reaction === void 0 ? void 0 : reaction.total);
|
|
53
|
+
}, 0);
|
|
59
54
|
}
|
|
60
55
|
return (response === null || response === void 0 ? void 0 : response.data) && extractReactCount(response === null || response === void 0 ? void 0 : response.data);
|
|
61
56
|
};
|
|
@@ -145,11 +140,9 @@ export var extractSmartLinkSentOn = function extractSmartLinkSentOn(response) {
|
|
|
145
140
|
if (!response || !response.data) {
|
|
146
141
|
return undefined;
|
|
147
142
|
}
|
|
148
|
-
if (
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
return (_extractEntity = extractEntity(response)) === null || _extractEntity === void 0 ? void 0 : _extractEntity.createdAt;
|
|
152
|
-
}
|
|
143
|
+
if (isEntityPresent(response)) {
|
|
144
|
+
var _extractEntity;
|
|
145
|
+
return (_extractEntity = extractEntity(response)) === null || _extractEntity === void 0 ? void 0 : _extractEntity.createdAt;
|
|
153
146
|
}
|
|
154
147
|
return (response === null || response === void 0 ? void 0 : response.data) && extractSentOn(response === null || response === void 0 ? void 0 : response.data);
|
|
155
148
|
};
|
|
@@ -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.3"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -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.3",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
var Anchor = withLinkClickedEvent('a');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "40.10.
|
|
3
|
+
"version": "40.10.4",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/css": "^0.12.0",
|
|
37
37
|
"@atlaskit/dropdown-menu": "^16.3.0",
|
|
38
38
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
39
|
-
"@atlaskit/form": "^12.
|
|
39
|
+
"@atlaskit/form": "^12.1.0",
|
|
40
40
|
"@atlaskit/frontend-utilities": "^3.1.0",
|
|
41
41
|
"@atlaskit/heading": "^5.2.0",
|
|
42
42
|
"@atlaskit/icon": "^27.12.0",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"@af/visual-regression": "workspace:^",
|
|
97
97
|
"@atlaskit/analytics-listeners": "^9.0.0",
|
|
98
98
|
"@atlaskit/css-reset": "^7.3.0",
|
|
99
|
-
"@atlaskit/media-test-helpers": "^
|
|
99
|
+
"@atlaskit/media-test-helpers": "^39.0.0",
|
|
100
100
|
"@atlaskit/react-ufo": "^4.3.0",
|
|
101
101
|
"@atlaskit/ssr": "workspace:^",
|
|
102
102
|
"@atlaskit/visual-regression": "workspace:^",
|
|
@@ -226,9 +226,6 @@
|
|
|
226
226
|
"platform_editor_inline_card_selected_state_fix": {
|
|
227
227
|
"type": "boolean"
|
|
228
228
|
},
|
|
229
|
-
"platform-linking-slack-entity-support": {
|
|
230
|
-
"type": "boolean"
|
|
231
|
-
},
|
|
232
229
|
"navx-1184-fix-smart-link-a11y-interactive-states": {
|
|
233
230
|
"type": "boolean"
|
|
234
231
|
},
|