@atlaskit/smart-card 32.8.2 → 33.0.0
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/extractors/action/extract-invoke-download-action.js +2 -2
- package/dist/cjs/extractors/common/icon/extractIcon.js +0 -5
- package/dist/cjs/extractors/common/icon/extractIconFromDocument.js +0 -1
- package/dist/cjs/extractors/common/icon/extractIconFromTask.js +0 -11
- package/dist/cjs/extractors/common/icon/prioritiseIcon.js +0 -4
- package/dist/cjs/extractors/flexible/actions/extract-download-action.js +2 -2
- package/dist/cjs/extractors/flexible/actions/extract-preview-action.js +2 -2
- package/dist/cjs/index.js +2 -34
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/test-utils.js +1 -11
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/mocks.js +1 -4
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +1 -7
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +0 -1
- package/dist/cjs/view/InlineCard/styled.js +1 -6
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/action/extract-invoke-download-action.js +1 -1
- package/dist/es2019/extractors/common/icon/extractIcon.js +0 -5
- package/dist/es2019/extractors/common/icon/extractIconFromDocument.js +0 -1
- package/dist/es2019/extractors/common/icon/extractIconFromTask.js +0 -11
- package/dist/es2019/extractors/common/icon/prioritiseIcon.js +0 -4
- package/dist/es2019/extractors/flexible/actions/extract-download-action.js +1 -1
- package/dist/es2019/extractors/flexible/actions/extract-preview-action.js +1 -1
- package/dist/es2019/index.js +0 -20
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/test-utils.js +0 -10
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/mocks.js +0 -3
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +0 -6
- package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +0 -1
- package/dist/es2019/view/InlineCard/styled.js +0 -5
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/action/extract-invoke-download-action.js +1 -1
- package/dist/esm/extractors/common/icon/extractIcon.js +0 -5
- package/dist/esm/extractors/common/icon/extractIconFromDocument.js +0 -1
- package/dist/esm/extractors/common/icon/extractIconFromTask.js +0 -11
- package/dist/esm/extractors/common/icon/prioritiseIcon.js +0 -4
- package/dist/esm/extractors/flexible/actions/extract-download-action.js +1 -1
- package/dist/esm/extractors/flexible/actions/extract-preview-action.js +1 -1
- package/dist/esm/index.js +0 -20
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/test-utils.js +0 -10
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/mocks.js +0 -3
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +0 -6
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +0 -1
- package/dist/esm/view/InlineCard/styled.js +0 -5
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/extractors/common/__mocks__/jsonld.d.ts +0 -8
- package/dist/types/extractors/common/icon/prioritiseIcon.d.ts +0 -9
- package/dist/types/extractors/flexible/utils.d.ts +4 -0
- package/dist/types/index.d.ts +0 -17
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +0 -6
- package/dist/types/utils/analytics/types.d.ts +1 -9
- package/dist/types/utils/test-utils.d.ts +0 -2
- package/dist/types/view/EmbedCard/types.d.ts +1 -7
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/mocks.d.ts +1 -2
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.d.ts +0 -5
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/types.d.ts +0 -16
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/types.d.ts +0 -3
- package/dist/types/view/HoverCard/types.d.ts +0 -2
- package/dist/types/view/InlineCard/styled.d.ts +0 -4
- package/dist/types-ts4.5/extractors/common/__mocks__/jsonld.d.ts +0 -8
- package/dist/types-ts4.5/extractors/common/icon/prioritiseIcon.d.ts +0 -9
- package/dist/types-ts4.5/extractors/flexible/utils.d.ts +4 -0
- package/dist/types-ts4.5/index.d.ts +0 -17
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +0 -6
- package/dist/types-ts4.5/utils/analytics/types.d.ts +1 -9
- package/dist/types-ts4.5/utils/test-utils.d.ts +0 -2
- package/dist/types-ts4.5/view/EmbedCard/types.d.ts +1 -7
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/mocks.d.ts +1 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.d.ts +0 -5
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/types.d.ts +0 -16
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/types.d.ts +0 -3
- package/dist/types-ts4.5/view/HoverCard/types.d.ts +0 -2
- package/dist/types-ts4.5/view/InlineCard/styled.d.ts +0 -4
- package/package.json +1 -1
- package/dist/cjs/extractors/common/byline/extractByline.js +0 -40
- package/dist/cjs/extractors/common/detail/extractAttachmentCount.js +0 -23
- package/dist/cjs/extractors/common/detail/extractCommentCount.js +0 -24
- package/dist/cjs/extractors/common/detail/extractProgrammingLanguage.js +0 -23
- package/dist/cjs/extractors/common/detail/extractSubscriberCount.js +0 -23
- package/dist/cjs/extractors/common/detail/index.js +0 -40
- package/dist/cjs/extractors/common/detail/types.js +0 -1
- package/dist/cjs/state/analytics/types.js +0 -5
- package/dist/es2019/extractors/common/byline/extractByline.js +0 -35
- package/dist/es2019/extractors/common/detail/extractAttachmentCount.js +0 -16
- package/dist/es2019/extractors/common/detail/extractCommentCount.js +0 -17
- package/dist/es2019/extractors/common/detail/extractProgrammingLanguage.js +0 -16
- package/dist/es2019/extractors/common/detail/extractSubscriberCount.js +0 -16
- package/dist/es2019/extractors/common/detail/index.js +0 -5
- package/dist/es2019/extractors/common/detail/types.js +0 -0
- package/dist/es2019/state/analytics/types.js +0 -1
- package/dist/esm/extractors/common/byline/extractByline.js +0 -33
- package/dist/esm/extractors/common/detail/extractAttachmentCount.js +0 -16
- package/dist/esm/extractors/common/detail/extractCommentCount.js +0 -17
- package/dist/esm/extractors/common/detail/extractProgrammingLanguage.js +0 -16
- package/dist/esm/extractors/common/detail/extractSubscriberCount.js +0 -16
- package/dist/esm/extractors/common/detail/index.js +0 -5
- package/dist/esm/extractors/common/detail/types.js +0 -0
- package/dist/esm/state/analytics/types.js +0 -1
- package/dist/types/extractors/common/byline/extractByline.d.ts +0 -3
- package/dist/types/extractors/common/detail/extractAttachmentCount.d.ts +0 -4
- package/dist/types/extractors/common/detail/extractCommentCount.d.ts +0 -4
- package/dist/types/extractors/common/detail/extractProgrammingLanguage.d.ts +0 -4
- package/dist/types/extractors/common/detail/extractSubscriberCount.d.ts +0 -4
- package/dist/types/extractors/common/detail/index.d.ts +0 -9
- package/dist/types/extractors/common/detail/types.d.ts +0 -5
- package/dist/types/state/analytics/types.d.ts +0 -9
- package/dist/types-ts4.5/extractors/common/byline/extractByline.d.ts +0 -3
- package/dist/types-ts4.5/extractors/common/detail/extractAttachmentCount.d.ts +0 -4
- package/dist/types-ts4.5/extractors/common/detail/extractCommentCount.d.ts +0 -4
- package/dist/types-ts4.5/extractors/common/detail/extractProgrammingLanguage.d.ts +0 -4
- package/dist/types-ts4.5/extractors/common/detail/extractSubscriberCount.d.ts +0 -4
- package/dist/types-ts4.5/extractors/common/detail/index.d.ts +0 -9
- package/dist/types-ts4.5/extractors/common/detail/types.d.ts +0 -5
- package/dist/types-ts4.5/state/analytics/types.d.ts +0 -9
- /package/dist/cjs/extractors/common/{detail → download}/extractDownloadUrl.js +0 -0
- /package/dist/es2019/extractors/common/{detail → download}/extractDownloadUrl.js +0 -0
- /package/dist/esm/extractors/common/{detail → download}/extractDownloadUrl.js +0 -0
- /package/dist/types/extractors/common/{detail → download}/extractDownloadUrl.d.ts +0 -0
- /package/dist/types-ts4.5/extractors/common/{detail → download}/extractDownloadUrl.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 33.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#98245](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98245)
|
|
8
|
+
[`82ebe932fc86a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/82ebe932fc86a) -
|
|
9
|
+
Removing the deprecated exports `ResolveResponse`, `Provider`, `SmartCardContext`,
|
|
10
|
+
`ProviderProps`, `CardType`, CardAdf, `InlineCardAdf`, `BlockCardAdf`, `EmbedCardAdf`,
|
|
11
|
+
`DatasourceAdf`, `DatasourceAdfView`, `Client`, `Context`, `CardContext`, and `APIError` from
|
|
12
|
+
smart-card package
|
|
13
|
+
|
|
14
|
+
## 32.8.3
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [#98252](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98252)
|
|
19
|
+
[`8e131e2c56631`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8e131e2c56631) -
|
|
20
|
+
Remove unused code
|
|
21
|
+
|
|
3
22
|
## 32.8.2
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -12,7 +12,7 @@ var _helpers = require("../../state/helpers");
|
|
|
12
12
|
var _utils = require("../../utils");
|
|
13
13
|
var _canShowAction = require("../../utils/actions/can-show-action");
|
|
14
14
|
var _extractActions = require("../common/actions/extractActions");
|
|
15
|
-
var
|
|
15
|
+
var _extractDownloadUrl = require("../common/download/extractDownloadUrl");
|
|
16
16
|
var extractInvokeDownloadAction = exports.extractInvokeDownloadAction = function extractInvokeDownloadAction(_ref) {
|
|
17
17
|
var actionOptions = _ref.actionOptions,
|
|
18
18
|
appearance = _ref.appearance,
|
|
@@ -26,7 +26,7 @@ var extractInvokeDownloadAction = exports.extractInvokeDownloadAction = function
|
|
|
26
26
|
return action['@type'] === 'DownloadAction';
|
|
27
27
|
});
|
|
28
28
|
if (downloadActionExists) {
|
|
29
|
-
var downloadUrl = (0,
|
|
29
|
+
var downloadUrl = (0, _extractDownloadUrl.extractDownloadUrl)(data);
|
|
30
30
|
return {
|
|
31
31
|
actionFn: function () {
|
|
32
32
|
var _actionFn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
@@ -43,7 +43,6 @@ var extractIcon = exports.extractIcon = function extractIcon(jsonLd) {
|
|
|
43
43
|
function typeToIcon(type, opts) {
|
|
44
44
|
switch (type) {
|
|
45
45
|
case 'atlassian:SourceCodeCommit':
|
|
46
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
47
46
|
return /*#__PURE__*/_react.default.createElement(_3.default, {
|
|
48
47
|
label: opts.title || 'commit',
|
|
49
48
|
testId: "commit-icon"
|
|
@@ -56,25 +55,21 @@ function typeToIcon(type, opts) {
|
|
|
56
55
|
color: "currentColor"
|
|
57
56
|
});
|
|
58
57
|
case 'atlassian:SourceCodePullRequest':
|
|
59
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
60
58
|
return /*#__PURE__*/_react.default.createElement(_4.default, {
|
|
61
59
|
label: opts.title || 'pullRequest',
|
|
62
60
|
testId: "pull-request-icon"
|
|
63
61
|
});
|
|
64
62
|
case 'atlassian:SourceCodeReference':
|
|
65
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
66
63
|
return /*#__PURE__*/_react.default.createElement(_.default, {
|
|
67
64
|
label: opts.title || 'reference',
|
|
68
65
|
testId: "branch-icon"
|
|
69
66
|
});
|
|
70
67
|
case 'atlassian:SourceCodeRepository':
|
|
71
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
72
68
|
return /*#__PURE__*/_react.default.createElement(_2.default, {
|
|
73
69
|
label: opts.title || 'repository',
|
|
74
70
|
testId: "repo-icon"
|
|
75
71
|
});
|
|
76
72
|
case 'atlassian:Goal':
|
|
77
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
78
73
|
return /*#__PURE__*/_react.default.createElement(_5.default, {
|
|
79
74
|
label: opts.title || 'goal',
|
|
80
75
|
testId: "task-icon"
|
|
@@ -40,7 +40,6 @@ var documentFileFormatToIcon = function documentFileFormatToIcon(opts) {
|
|
|
40
40
|
var documentTypeToIcon = function documentTypeToIcon(type, opts) {
|
|
41
41
|
switch (type) {
|
|
42
42
|
case 'schema:BlogPosting':
|
|
43
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
44
43
|
return /*#__PURE__*/_react.default.createElement(_5.default, {
|
|
45
44
|
label: opts.title || 'blog',
|
|
46
45
|
testId: "blog-icon"
|
|
@@ -16,7 +16,6 @@ var _7 = _interopRequireDefault(require("@atlaskit/icon-object/glyph/story/16"))
|
|
|
16
16
|
var _8 = _interopRequireDefault(require("@atlaskit/icon-object/glyph/subtask/16"));
|
|
17
17
|
var _9 = _interopRequireDefault(require("@atlaskit/icon-object/glyph/task/16"));
|
|
18
18
|
var _constants = require("../../constants");
|
|
19
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
20
19
|
var TaskIcon = _9.default;
|
|
21
20
|
|
|
22
21
|
/**
|
|
@@ -32,7 +31,6 @@ var extractIconFromTask = exports.extractIconFromTask = function extractIconFrom
|
|
|
32
31
|
var taskType = opts.taskType,
|
|
33
32
|
provider = opts.provider;
|
|
34
33
|
var taskLabel = opts.title || 'task';
|
|
35
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
36
34
|
var defaultIcon = /*#__PURE__*/_react.default.createElement(TaskIcon, {
|
|
37
35
|
label: taskLabel,
|
|
38
36
|
testId: "default-task-icon"
|
|
@@ -42,55 +40,46 @@ var extractIconFromTask = exports.extractIconFromTask = function extractIconFrom
|
|
|
42
40
|
var taskTypeName = taskTypeId.split('#').pop();
|
|
43
41
|
switch (taskTypeName) {
|
|
44
42
|
case _constants.JIRA_TASK:
|
|
45
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
46
43
|
return /*#__PURE__*/_react.default.createElement(_9.default, {
|
|
47
44
|
label: taskLabel,
|
|
48
45
|
testId: "jira-task-icon"
|
|
49
46
|
});
|
|
50
47
|
case _constants.JIRA_SUB_TASK:
|
|
51
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
52
48
|
return /*#__PURE__*/_react.default.createElement(_8.default, {
|
|
53
49
|
label: taskLabel,
|
|
54
50
|
testId: "jira-subtask-icon"
|
|
55
51
|
});
|
|
56
52
|
case _constants.JIRA_STORY:
|
|
57
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
58
53
|
return /*#__PURE__*/_react.default.createElement(_7.default, {
|
|
59
54
|
label: taskLabel,
|
|
60
55
|
testId: "jira-story-icon"
|
|
61
56
|
});
|
|
62
57
|
case _constants.JIRA_BUG:
|
|
63
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
64
58
|
return /*#__PURE__*/_react.default.createElement(_.default, {
|
|
65
59
|
label: taskLabel,
|
|
66
60
|
testId: "jira-bug-icon"
|
|
67
61
|
});
|
|
68
62
|
case _constants.JIRA_EPIC:
|
|
69
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
70
63
|
return /*#__PURE__*/_react.default.createElement(_3.default, {
|
|
71
64
|
label: taskLabel,
|
|
72
65
|
testId: "jira-epic-icon"
|
|
73
66
|
});
|
|
74
67
|
case _constants.JIRA_INCIDENT:
|
|
75
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
76
68
|
return /*#__PURE__*/_react.default.createElement(_4.default, {
|
|
77
69
|
label: taskLabel,
|
|
78
70
|
testId: "jira-incident-icon"
|
|
79
71
|
});
|
|
80
72
|
case _constants.JIRA_SERVICE_REQUEST:
|
|
81
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
82
73
|
return /*#__PURE__*/_react.default.createElement(_5.default, {
|
|
83
74
|
label: taskLabel,
|
|
84
75
|
testId: "jira-service-request-icon"
|
|
85
76
|
});
|
|
86
77
|
case _constants.JIRA_CHANGE:
|
|
87
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
88
78
|
return /*#__PURE__*/_react.default.createElement(_2.default, {
|
|
89
79
|
label: taskLabel,
|
|
90
80
|
testId: "jira-change-icon"
|
|
91
81
|
});
|
|
92
82
|
case _constants.JIRA_PROBLEM:
|
|
93
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
94
83
|
return /*#__PURE__*/_react.default.createElement(_6.default, {
|
|
95
84
|
label: taskLabel,
|
|
96
85
|
testId: "jira-problem-icon"
|
|
@@ -4,10 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.prioritiseIcon = prioritiseIcon;
|
|
7
|
-
/**
|
|
8
|
-
* Represents an icon. Should either contain a label and url, or a an icon type and label.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
7
|
/**
|
|
12
8
|
* Options required to prioritise which icon to show
|
|
13
9
|
*/
|
|
@@ -8,7 +8,7 @@ var _canShowAction = require("../../../utils/actions/can-show-action");
|
|
|
8
8
|
var _types = require("../../../view/Card/types");
|
|
9
9
|
var _extractInvokeDownloadAction = require("../../action/extract-invoke-download-action");
|
|
10
10
|
var _extractActions = require("../../common/actions/extractActions");
|
|
11
|
-
var
|
|
11
|
+
var _extractDownloadUrl = require("../../common/download/extractDownloadUrl");
|
|
12
12
|
/**
|
|
13
13
|
* TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
|
|
14
14
|
* Replaced with extractDownloadClientAction()
|
|
@@ -22,7 +22,7 @@ var extractDownloadAction = exports.extractDownloadAction = function extractDown
|
|
|
22
22
|
});
|
|
23
23
|
if (downloadActionExists) {
|
|
24
24
|
return {
|
|
25
|
-
downloadUrl: (0,
|
|
25
|
+
downloadUrl: (0, _extractDownloadUrl.extractDownloadUrl)(data)
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
return;
|
|
@@ -8,7 +8,7 @@ var _linkExtractors = require("@atlaskit/link-extractors");
|
|
|
8
8
|
var _canShowAction = require("../../../utils/actions/can-show-action");
|
|
9
9
|
var _types = require("../../../view/Card/types");
|
|
10
10
|
var _extractInvokePreviewAction = require("../../action/extract-invoke-preview-action");
|
|
11
|
-
var
|
|
11
|
+
var _extractDownloadUrl = require("../../common/download/extractDownloadUrl");
|
|
12
12
|
var _extractIsSupportTheming = require("../../common/meta/extractIsSupportTheming");
|
|
13
13
|
var _extractIsTrusted = require("../../common/meta/extractIsTrusted");
|
|
14
14
|
var _icon = require("../icon");
|
|
@@ -27,7 +27,7 @@ var extractPreviewAction = exports.extractPreviewAction = function extractPrevie
|
|
|
27
27
|
if (src) {
|
|
28
28
|
var _extractProvider;
|
|
29
29
|
return {
|
|
30
|
-
downloadUrl: (0,
|
|
30
|
+
downloadUrl: (0, _extractDownloadUrl.extractDownloadUrl)(data),
|
|
31
31
|
providerName: (_extractProvider = (0, _linkExtractors.extractProvider)(data)) === null || _extractProvider === void 0 ? void 0 : _extractProvider.text,
|
|
32
32
|
src: src,
|
|
33
33
|
title: (0, _linkExtractors.extractTitle)(data),
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,12 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "APIError", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _linkingCommon.APIError;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
6
|
Object.defineProperty(exports, "ActionName", {
|
|
13
7
|
enumerable: true,
|
|
14
8
|
get: function get() {
|
|
@@ -27,18 +21,6 @@ Object.defineProperty(exports, "CardAction", {
|
|
|
27
21
|
return _types.CardAction;
|
|
28
22
|
}
|
|
29
23
|
});
|
|
30
|
-
Object.defineProperty(exports, "Client", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function get() {
|
|
33
|
-
return _linkProvider.CardClient;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "Context", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function get() {
|
|
39
|
-
return _linkProvider.SmartCardContext;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
24
|
Object.defineProperty(exports, "CustomBlock", {
|
|
43
25
|
enumerable: true,
|
|
44
26
|
get: function get() {
|
|
@@ -93,18 +75,6 @@ Object.defineProperty(exports, "PreviewBlock", {
|
|
|
93
75
|
return _blocks.PreviewBlock;
|
|
94
76
|
}
|
|
95
77
|
});
|
|
96
|
-
Object.defineProperty(exports, "Provider", {
|
|
97
|
-
enumerable: true,
|
|
98
|
-
get: function get() {
|
|
99
|
-
return _state.SmartCardProvider;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
Object.defineProperty(exports, "SmartCardContext", {
|
|
103
|
-
enumerable: true,
|
|
104
|
-
get: function get() {
|
|
105
|
-
return _state.SmartCardContext;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
78
|
Object.defineProperty(exports, "SmartLinkDirection", {
|
|
109
79
|
enumerable: true,
|
|
110
80
|
get: function get() {
|
|
@@ -249,9 +219,6 @@ Object.defineProperty(exports, "useSmartLinkEvents", {
|
|
|
249
219
|
return _useSmartLinkEvents.useSmartLinkEvents;
|
|
250
220
|
}
|
|
251
221
|
});
|
|
252
|
-
var _state = require("./state");
|
|
253
|
-
var _linkingCommon = require("@atlaskit/linking-common");
|
|
254
|
-
var _linkProvider = require("@atlaskit/link-provider");
|
|
255
222
|
var _Card = require("./view/Card");
|
|
256
223
|
var _types = require("./view/Card/types");
|
|
257
224
|
var _EmbedResizeMessageListener = require("./view/EmbedCard/EmbedResizeMessageListener");
|
|
@@ -262,4 +229,5 @@ var _useSmartLinkEvents = require("./view/SmartLinkEvents/useSmartLinkEvents");
|
|
|
262
229
|
var _classNames = require("./classNames");
|
|
263
230
|
var _LazyFallback = require("./view/CardWithUrl/component-lazy/LazyFallback");
|
|
264
231
|
var _constants = require("./constants");
|
|
265
|
-
var _blocks = require("./view/FlexibleCard/components/blocks");
|
|
232
|
+
var _blocks = require("./view/FlexibleCard/components/blocks");
|
|
233
|
+
var _linkProvider = require("@atlaskit/link-provider");
|
|
@@ -15,7 +15,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
15
15
|
var context = exports.context = {
|
|
16
16
|
componentName: 'smart-cards',
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "
|
|
18
|
+
packageVersion: "33.0.0"
|
|
19
19
|
};
|
|
20
20
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -4,11 +4,8 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
|
+
exports.renderHook = void 0;
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _linkProvider = require("@atlaskit/link-provider");
|
|
11
|
-
var _state = require("../state");
|
|
12
9
|
var Hook = function Hook(props) {
|
|
13
10
|
props.callback();
|
|
14
11
|
return null;
|
|
@@ -17,11 +14,4 @@ var renderHook = exports.renderHook = function renderHook(callback) {
|
|
|
17
14
|
return /*#__PURE__*/_react.default.createElement(Hook, {
|
|
18
15
|
callback: callback
|
|
19
16
|
});
|
|
20
|
-
};
|
|
21
|
-
var renderSmartLinkHook = exports.renderSmartLinkHook = function renderSmartLinkHook(callback, providerProps) {
|
|
22
|
-
return /*#__PURE__*/_react.default.createElement(_state.SmartCardProvider, (0, _extends2.default)({
|
|
23
|
-
client: new _linkProvider.CardClient()
|
|
24
|
-
}, providerProps), /*#__PURE__*/_react.default.createElement(Hook, {
|
|
25
|
-
callback: callback
|
|
26
|
-
}), ";");
|
|
27
17
|
};
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.mockTransformedRules = exports.mockRules = exports.mockInvokeUrl = exports.
|
|
7
|
+
exports.mockTransformedRules = exports.mockRules = exports.mockInvokeUrl = exports.mockGetUrl = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _types = require("./types");
|
|
10
10
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -73,8 +73,5 @@ var mockTransformedRules = exports.mockTransformedRules = [_objectSpread(_object
|
|
|
73
73
|
}), _objectSpread(_objectSpread({}, mockRules.data[2]), {}, {
|
|
74
74
|
userInputPrompts: mockRules.data[2].userInputs
|
|
75
75
|
})];
|
|
76
|
-
var mockInvocationResponse = exports.mockInvocationResponse = {
|
|
77
|
-
'TEST-1': 'SUCCESS'
|
|
78
|
-
};
|
|
79
76
|
var mockGetUrl = exports.mockGetUrl = 'https://test-api/get/rules';
|
|
80
77
|
var mockInvokeUrl = exports.mockInvokeUrl = 'https://test-api/invoke';
|
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.renderWithDi = exports.createStubInvokeManuallyTriggeredRule = exports.createGenericComponent = void 0;
|
|
9
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
@@ -54,12 +54,6 @@ var createStubInvokeManuallyTriggeredRule = exports.createStubInvokeManuallyTrig
|
|
|
54
54
|
};
|
|
55
55
|
}();
|
|
56
56
|
};
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Default stubbed invokeManuallyTriggeredRule call. Returns 'SUCCESS' for
|
|
60
|
-
* all objects the rule was called for.
|
|
61
|
-
*/
|
|
62
|
-
var successStubInvokeManuallyTriggeredRule = exports.successStubInvokeManuallyTriggeredRule = createStubInvokeManuallyTriggeredRule('SUCCESS', 2000);
|
|
63
57
|
var Provider = function Provider(_ref2) {
|
|
64
58
|
var children = _ref2.children,
|
|
65
59
|
use = _ref2.use,
|
|
@@ -300,7 +300,6 @@ var AtlaskitIcon = function AtlaskitIcon(_ref3) {
|
|
|
300
300
|
testId: testId
|
|
301
301
|
});
|
|
302
302
|
case _constants.IconType.Blog:
|
|
303
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
304
303
|
return /*#__PURE__*/_react.default.createElement(_2.default, {
|
|
305
304
|
label: label || 'blog',
|
|
306
305
|
testId: testId
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.NoLinkAppearance = exports.
|
|
7
|
+
exports.NoLinkAppearance = exports.LinkAppearance = exports.IconStyledButton = void 0;
|
|
8
8
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
9
|
var _colors = require("@atlaskit/theme/colors");
|
|
10
10
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -46,11 +46,6 @@ var NoLinkAppearance = exports.NoLinkAppearance = _styled.default.span({
|
|
|
46
46
|
marginLeft: "var(--ds-space-050, 4px)"
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
50
|
-
var LowercaseAppearance = exports.LowercaseAppearance = _styled.default.span({
|
|
51
|
-
textTransform: 'lowercase'
|
|
52
|
-
});
|
|
53
|
-
|
|
54
49
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
55
50
|
var LinkAppearance = exports.LinkAppearance = _styled.default.a({
|
|
56
51
|
color: "var(--ds-link, ".concat(_colors.B400, ")"),
|
|
@@ -20,7 +20,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
20
20
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
21
21
|
var PACKAGE_DATA = {
|
|
22
22
|
packageName: "@atlaskit/smart-card",
|
|
23
|
-
packageVersion: "
|
|
23
|
+
packageVersion: "33.0.0",
|
|
24
24
|
componentName: 'linkUrl'
|
|
25
25
|
};
|
|
26
26
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -3,7 +3,7 @@ import { getDefinitionId, getExtensionKey, getResourceType } from '../../state/h
|
|
|
3
3
|
import { downloadUrl as download } from '../../utils';
|
|
4
4
|
import { canShowAction } from '../../utils/actions/can-show-action';
|
|
5
5
|
import { getActionsFromJsonLd } from '../common/actions/extractActions';
|
|
6
|
-
import { extractDownloadUrl } from '../common/
|
|
6
|
+
import { extractDownloadUrl } from '../common/download/extractDownloadUrl';
|
|
7
7
|
export const extractInvokeDownloadAction = ({
|
|
8
8
|
actionOptions,
|
|
9
9
|
appearance,
|
|
@@ -33,7 +33,6 @@ export const extractIcon = (jsonLd, priority = 'type') => {
|
|
|
33
33
|
function typeToIcon(type, opts) {
|
|
34
34
|
switch (type) {
|
|
35
35
|
case 'atlassian:SourceCodeCommit':
|
|
36
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
37
36
|
return /*#__PURE__*/React.createElement(CommitIcon, {
|
|
38
37
|
label: opts.title || 'commit',
|
|
39
38
|
testId: "commit-icon"
|
|
@@ -46,25 +45,21 @@ function typeToIcon(type, opts) {
|
|
|
46
45
|
color: "currentColor"
|
|
47
46
|
});
|
|
48
47
|
case 'atlassian:SourceCodePullRequest':
|
|
49
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
50
48
|
return /*#__PURE__*/React.createElement(PullRequestIcon, {
|
|
51
49
|
label: opts.title || 'pullRequest',
|
|
52
50
|
testId: "pull-request-icon"
|
|
53
51
|
});
|
|
54
52
|
case 'atlassian:SourceCodeReference':
|
|
55
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
56
53
|
return /*#__PURE__*/React.createElement(BranchIcon, {
|
|
57
54
|
label: opts.title || 'reference',
|
|
58
55
|
testId: "branch-icon"
|
|
59
56
|
});
|
|
60
57
|
case 'atlassian:SourceCodeRepository':
|
|
61
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
62
58
|
return /*#__PURE__*/React.createElement(RepoIcon, {
|
|
63
59
|
label: opts.title || 'repository',
|
|
64
60
|
testId: "repo-icon"
|
|
65
61
|
});
|
|
66
62
|
case 'atlassian:Goal':
|
|
67
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
68
63
|
return /*#__PURE__*/React.createElement(TaskIcon, {
|
|
69
64
|
label: opts.title || 'goal',
|
|
70
65
|
testId: "task-icon"
|
|
@@ -33,7 +33,6 @@ const documentFileFormatToIcon = opts => {
|
|
|
33
33
|
const documentTypeToIcon = (type, opts) => {
|
|
34
34
|
switch (type) {
|
|
35
35
|
case 'schema:BlogPosting':
|
|
36
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
37
36
|
return /*#__PURE__*/React.createElement(BlogIcon, {
|
|
38
37
|
label: opts.title || 'blog',
|
|
39
38
|
testId: "blog-icon"
|
|
@@ -9,7 +9,6 @@ import JiraStoryIcon from '@atlaskit/icon-object/glyph/story/16';
|
|
|
9
9
|
import JiraSubTaskIcon from '@atlaskit/icon-object/glyph/subtask/16';
|
|
10
10
|
import JiraTaskIcon from '@atlaskit/icon-object/glyph/task/16';
|
|
11
11
|
import { JIRA_BUG, JIRA_CHANGE, JIRA_CUSTOM_TASK_TYPE, JIRA_EPIC, JIRA_GENERATOR_ID, JIRA_INCIDENT, JIRA_PROBLEM, JIRA_SERVICE_REQUEST, JIRA_STORY, JIRA_SUB_TASK, JIRA_TASK } from '../../constants';
|
|
12
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
13
12
|
const TaskIcon = JiraTaskIcon;
|
|
14
13
|
|
|
15
14
|
/**
|
|
@@ -27,7 +26,6 @@ export const extractIconFromTask = opts => {
|
|
|
27
26
|
provider
|
|
28
27
|
} = opts;
|
|
29
28
|
const taskLabel = opts.title || 'task';
|
|
30
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
31
29
|
const defaultIcon = /*#__PURE__*/React.createElement(TaskIcon, {
|
|
32
30
|
label: taskLabel,
|
|
33
31
|
testId: "default-task-icon"
|
|
@@ -37,55 +35,46 @@ export const extractIconFromTask = opts => {
|
|
|
37
35
|
const taskTypeName = taskTypeId.split('#').pop();
|
|
38
36
|
switch (taskTypeName) {
|
|
39
37
|
case JIRA_TASK:
|
|
40
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
41
38
|
return /*#__PURE__*/React.createElement(JiraTaskIcon, {
|
|
42
39
|
label: taskLabel,
|
|
43
40
|
testId: "jira-task-icon"
|
|
44
41
|
});
|
|
45
42
|
case JIRA_SUB_TASK:
|
|
46
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
47
43
|
return /*#__PURE__*/React.createElement(JiraSubTaskIcon, {
|
|
48
44
|
label: taskLabel,
|
|
49
45
|
testId: "jira-subtask-icon"
|
|
50
46
|
});
|
|
51
47
|
case JIRA_STORY:
|
|
52
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
53
48
|
return /*#__PURE__*/React.createElement(JiraStoryIcon, {
|
|
54
49
|
label: taskLabel,
|
|
55
50
|
testId: "jira-story-icon"
|
|
56
51
|
});
|
|
57
52
|
case JIRA_BUG:
|
|
58
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
59
53
|
return /*#__PURE__*/React.createElement(JiraBugIcon, {
|
|
60
54
|
label: taskLabel,
|
|
61
55
|
testId: "jira-bug-icon"
|
|
62
56
|
});
|
|
63
57
|
case JIRA_EPIC:
|
|
64
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
65
58
|
return /*#__PURE__*/React.createElement(JiraEpicIcon, {
|
|
66
59
|
label: taskLabel,
|
|
67
60
|
testId: "jira-epic-icon"
|
|
68
61
|
});
|
|
69
62
|
case JIRA_INCIDENT:
|
|
70
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
71
63
|
return /*#__PURE__*/React.createElement(JiraIncidentIcon, {
|
|
72
64
|
label: taskLabel,
|
|
73
65
|
testId: "jira-incident-icon"
|
|
74
66
|
});
|
|
75
67
|
case JIRA_SERVICE_REQUEST:
|
|
76
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
77
68
|
return /*#__PURE__*/React.createElement(JiraServiceRequestIcon, {
|
|
78
69
|
label: taskLabel,
|
|
79
70
|
testId: "jira-service-request-icon"
|
|
80
71
|
});
|
|
81
72
|
case JIRA_CHANGE:
|
|
82
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
83
73
|
return /*#__PURE__*/React.createElement(JiraChangeIcon, {
|
|
84
74
|
label: taskLabel,
|
|
85
75
|
testId: "jira-change-icon"
|
|
86
76
|
});
|
|
87
77
|
case JIRA_PROBLEM:
|
|
88
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19493
|
|
89
78
|
return /*#__PURE__*/React.createElement(JiraProblemIcon, {
|
|
90
79
|
label: taskLabel,
|
|
91
80
|
testId: "jira-problem-icon"
|
|
@@ -2,7 +2,7 @@ import { canShowAction } from '../../../utils/actions/can-show-action';
|
|
|
2
2
|
import { CardAction } from '../../../view/Card/types';
|
|
3
3
|
import { extractInvokeDownloadAction } from '../../action/extract-invoke-download-action';
|
|
4
4
|
import { getActionsFromJsonLd } from '../../common/actions/extractActions';
|
|
5
|
-
import { extractDownloadUrl } from '../../common/
|
|
5
|
+
import { extractDownloadUrl } from '../../common/download/extractDownloadUrl';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
|
|
@@ -2,7 +2,7 @@ import { extractLink, extractPreview as extractPreviewData, extractProvider, ext
|
|
|
2
2
|
import { canShowAction } from '../../../utils/actions/can-show-action';
|
|
3
3
|
import { CardAction } from '../../../view/Card/types';
|
|
4
4
|
import { extractInvokePreviewAction } from '../../action/extract-invoke-preview-action';
|
|
5
|
-
import { extractDownloadUrl } from '../../common/
|
|
5
|
+
import { extractDownloadUrl } from '../../common/download/extractDownloadUrl';
|
|
6
6
|
import { extractIsSupportTheming } from '../../common/meta/extractIsSupportTheming';
|
|
7
7
|
import { extractIsTrusted } from '../../common/meta/extractIsTrusted';
|
|
8
8
|
import { extractLinkIcon } from '../icon';
|
package/dist/es2019/index.js
CHANGED
|
@@ -1,25 +1,5 @@
|
|
|
1
|
-
/** @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-15961 Internal documentation for deprecation (no external access)} */
|
|
2
|
-
|
|
3
|
-
/** @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-15961 Internal documentation for deprecation (no external access)} */
|
|
4
|
-
export { SmartCardProvider as Provider, SmartCardContext } from './state';
|
|
5
|
-
|
|
6
|
-
/** @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-15961 Internal documentation for deprecation (no external access)} */
|
|
7
|
-
|
|
8
|
-
/** @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-15961 Internal documentation for deprecation (no external access)} */
|
|
9
|
-
|
|
10
|
-
/** @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-15961 Internal documentation for deprecation (no external access)} */
|
|
11
|
-
export { APIError } from '@atlaskit/linking-common';
|
|
12
|
-
|
|
13
|
-
/** @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-15961 Internal documentation for deprecation (no external access)} */
|
|
14
|
-
export { CardClient as Client } from '@atlaskit/link-provider';
|
|
15
1
|
export { Card } from './view/Card';
|
|
16
2
|
export { CardAction } from './view/Card/types';
|
|
17
|
-
|
|
18
|
-
/** @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-15961 Internal documentation for deprecation (no external access)} */
|
|
19
|
-
export { SmartCardContext as Context } from '@atlaskit/link-provider';
|
|
20
|
-
|
|
21
|
-
/** @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-15961 Internal documentation for deprecation (no external access)} */
|
|
22
|
-
|
|
23
3
|
export { EmbedResizeMessageListener } from './view/EmbedCard/EmbedResizeMessageListener';
|
|
24
4
|
export { ExpandedFrame } from './view/EmbedCard/components/ExpandedFrame';
|
|
25
5
|
export { embedHeaderHeight } from './view/EmbedCard/components/styled';
|
|
@@ -3,7 +3,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
3
3
|
export const context = {
|
|
4
4
|
componentName: 'smart-cards',
|
|
5
5
|
packageName: "@atlaskit/smart-card",
|
|
6
|
-
packageVersion: "
|
|
6
|
+
packageVersion: "33.0.0"
|
|
7
7
|
};
|
|
8
8
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
9
9
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import { CardClient } from '@atlaskit/link-provider';
|
|
4
|
-
import { SmartCardProvider } from '../state';
|
|
5
2
|
const Hook = props => {
|
|
6
3
|
props.callback();
|
|
7
4
|
return null;
|
|
@@ -10,11 +7,4 @@ export const renderHook = callback => {
|
|
|
10
7
|
return /*#__PURE__*/React.createElement(Hook, {
|
|
11
8
|
callback: callback
|
|
12
9
|
});
|
|
13
|
-
};
|
|
14
|
-
export const renderSmartLinkHook = (callback, providerProps) => {
|
|
15
|
-
return /*#__PURE__*/React.createElement(SmartCardProvider, _extends({
|
|
16
|
-
client: new CardClient()
|
|
17
|
-
}, providerProps), /*#__PURE__*/React.createElement(Hook, {
|
|
18
|
-
callback: callback
|
|
19
|
-
}), ";");
|
|
20
10
|
};
|
|
@@ -66,8 +66,5 @@ export const mockTransformedRules = [{
|
|
|
66
66
|
...mockRules.data[2],
|
|
67
67
|
userInputPrompts: mockRules.data[2].userInputs
|
|
68
68
|
}];
|
|
69
|
-
export const mockInvocationResponse = {
|
|
70
|
-
'TEST-1': 'SUCCESS'
|
|
71
|
-
};
|
|
72
69
|
export const mockGetUrl = 'https://test-api/get/rules';
|
|
73
70
|
export const mockInvokeUrl = 'https://test-api/invoke';
|
|
@@ -17,12 +17,6 @@ export const createStubInvokeManuallyTriggeredRule = (stubbedInvocationResultFor
|
|
|
17
17
|
}), {});
|
|
18
18
|
return responseDelay ? new Promise(resolve => setTimeout(resolve, responseDelay)) : Promise.resolve(response);
|
|
19
19
|
};
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Default stubbed invokeManuallyTriggeredRule call. Returns 'SUCCESS' for
|
|
23
|
-
* all objects the rule was called for.
|
|
24
|
-
*/
|
|
25
|
-
export const successStubInvokeManuallyTriggeredRule = createStubInvokeManuallyTriggeredRule('SUCCESS', 2000);
|
|
26
20
|
const Provider = ({
|
|
27
21
|
children,
|
|
28
22
|
use,
|