@atlaskit/smart-card 32.7.5 → 32.7.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 +16 -0
- package/dist/cjs/extractors/flexible/actions/index.js +5 -7
- package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +9 -6
- package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/types.js +4 -5
- package/dist/cjs/state/hooks/use-ai-summary/index.js +18 -4
- package/dist/cjs/utils/analytics/analytics.js +4 -6
- package/dist/cjs/utils/mocks.js +5 -7
- package/dist/cjs/view/BlockCard/views/styled.js +1 -1
- package/dist/cjs/view/Card/index.js +5 -7
- package/dist/cjs/view/EmbedCard/EmbedResizeMessageListener.js +7 -10
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +10 -12
- package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +61 -61
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/utils.js +34 -34
- package/dist/cjs/view/FlexibleCard/components/utils.js +5 -5
- package/dist/cjs/view/HoverCard/styled.js +1 -1
- package/dist/cjs/view/InlineCard/ErroredView/index.js +8 -11
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +10 -13
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +7 -10
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +5 -7
- package/dist/cjs/view/InlineCard/ResolvingView/index.js +5 -7
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/LinkView/index.js +5 -7
- package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/index.js +6 -1
- package/dist/es2019/state/hooks/use-ai-summary/index.js +13 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/styled.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +3 -3
- package/dist/es2019/view/FlexibleCard/components/utils.js +3 -3
- package/dist/es2019/view/HoverCard/styled.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/flexible/actions/index.js +5 -7
- package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +9 -6
- package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/types.js +4 -5
- package/dist/esm/state/hooks/use-ai-summary/index.js +18 -4
- package/dist/esm/utils/analytics/analytics.js +4 -6
- package/dist/esm/utils/mocks.js +5 -7
- package/dist/esm/view/BlockCard/views/styled.js +1 -1
- package/dist/esm/view/Card/index.js +5 -7
- package/dist/esm/view/EmbedCard/EmbedResizeMessageListener.js +7 -10
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +10 -12
- package/dist/esm/view/FlexibleCard/components/blocks/utils.js +1 -1
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +61 -61
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/utils.js +34 -34
- package/dist/esm/view/FlexibleCard/components/utils.js +5 -5
- package/dist/esm/view/HoverCard/styled.js +1 -1
- package/dist/esm/view/InlineCard/ErroredView/index.js +8 -11
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +10 -13
- package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +7 -10
- package/dist/esm/view/InlineCard/ResolvedView/index.js +5 -7
- package/dist/esm/view/InlineCard/ResolvingView/index.js +5 -7
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/LinkView/index.js +5 -7
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/index.d.ts +1 -0
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +2 -0
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/index.d.ts +1 -0
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +2 -0
- package/package.json +4 -1
|
@@ -16,106 +16,106 @@ import Link from './link';
|
|
|
16
16
|
import Lozenge from './lozenge';
|
|
17
17
|
import Media from './media';
|
|
18
18
|
import Text from './text';
|
|
19
|
-
var elementMappings = (_elementMappings = {}, _defineProperty(_elementMappings, ElementName.AttachmentCount, {
|
|
19
|
+
var elementMappings = (_elementMappings = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_elementMappings, ElementName.AttachmentCount, {
|
|
20
20
|
component: Badge,
|
|
21
21
|
props: {
|
|
22
22
|
icon: IconType.Attachment
|
|
23
23
|
}
|
|
24
|
-
}),
|
|
24
|
+
}), ElementName.AuthorGroup, {
|
|
25
25
|
component: AvatarGroup
|
|
26
|
-
}),
|
|
26
|
+
}), ElementName.ChecklistProgress, {
|
|
27
27
|
component: Badge,
|
|
28
28
|
props: {
|
|
29
29
|
icon: IconType.CheckItem
|
|
30
30
|
}
|
|
31
|
-
}),
|
|
31
|
+
}), ElementName.CollaboratorGroup, {
|
|
32
32
|
component: AvatarGroup
|
|
33
|
-
}),
|
|
33
|
+
}), ElementName.CommentCount, {
|
|
34
34
|
component: Badge,
|
|
35
35
|
props: {
|
|
36
36
|
icon: IconType.Comment
|
|
37
37
|
}
|
|
38
|
-
}),
|
|
38
|
+
}), ElementName.ViewCount, {
|
|
39
39
|
component: Badge,
|
|
40
40
|
props: {
|
|
41
41
|
icon: IconType.View
|
|
42
42
|
}
|
|
43
|
-
}),
|
|
43
|
+
}), ElementName.ReactCount, {
|
|
44
44
|
component: Badge,
|
|
45
45
|
props: {
|
|
46
46
|
icon: IconType.React
|
|
47
47
|
}
|
|
48
|
-
}),
|
|
48
|
+
}), ElementName.VoteCount, {
|
|
49
49
|
component: Badge,
|
|
50
50
|
props: {
|
|
51
51
|
icon: IconType.Vote
|
|
52
52
|
}
|
|
53
|
-
}),
|
|
53
|
+
}), ElementName.CreatedBy, {
|
|
54
54
|
component: Text
|
|
55
|
-
}),
|
|
55
|
+
}), ElementName.OwnedBy, {
|
|
56
56
|
component: Text
|
|
57
|
-
}), _defineProperty(_elementMappings, ElementName.AssignedTo, {
|
|
57
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_elementMappings, ElementName.AssignedTo, {
|
|
58
58
|
component: Text
|
|
59
|
-
}),
|
|
59
|
+
}), ElementName.AssignedToGroup, {
|
|
60
60
|
component: AvatarGroup
|
|
61
|
-
}),
|
|
61
|
+
}), ElementName.OwnedByGroup, {
|
|
62
62
|
component: AvatarGroup
|
|
63
|
-
}),
|
|
63
|
+
}), ElementName.CreatedOn, {
|
|
64
64
|
component: DateTime
|
|
65
|
-
}),
|
|
65
|
+
}), ElementName.DueOn, {
|
|
66
66
|
component: Lozenge
|
|
67
|
-
}),
|
|
67
|
+
}), ElementName.LatestCommit, {
|
|
68
68
|
component: Badge,
|
|
69
69
|
props: {
|
|
70
70
|
icon: IconType.Commit
|
|
71
71
|
}
|
|
72
|
-
}),
|
|
72
|
+
}), ElementName.LinkIcon, {
|
|
73
73
|
component: Icon
|
|
74
|
-
}),
|
|
74
|
+
}), ElementName.ModifiedBy, {
|
|
75
75
|
component: Text
|
|
76
|
-
}),
|
|
76
|
+
}), ElementName.ModifiedOn, {
|
|
77
77
|
component: DateTime
|
|
78
|
-
}),
|
|
78
|
+
}), ElementName.Preview, {
|
|
79
79
|
component: Media
|
|
80
|
-
}), _defineProperty(_elementMappings, ElementName.Priority, {
|
|
80
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_elementMappings, ElementName.Priority, {
|
|
81
81
|
component: Badge
|
|
82
|
-
}),
|
|
82
|
+
}), ElementName.ProgrammingLanguage, {
|
|
83
83
|
component: Badge,
|
|
84
84
|
props: {
|
|
85
85
|
icon: IconType.ProgrammingLanguage
|
|
86
86
|
}
|
|
87
|
-
}),
|
|
87
|
+
}), ElementName.Provider, {
|
|
88
88
|
component: Badge
|
|
89
|
-
}),
|
|
89
|
+
}), ElementName.ReadTime, {
|
|
90
90
|
component: Text
|
|
91
|
-
}),
|
|
91
|
+
}), ElementName.SentOn, {
|
|
92
92
|
component: DateTime
|
|
93
|
-
}),
|
|
93
|
+
}), ElementName.SourceBranch, {
|
|
94
94
|
component: Text
|
|
95
|
-
}),
|
|
95
|
+
}), ElementName.State, {
|
|
96
96
|
component: Lozenge
|
|
97
|
-
}),
|
|
97
|
+
}), ElementName.SubscriberCount, {
|
|
98
98
|
component: Badge,
|
|
99
99
|
props: {
|
|
100
100
|
icon: IconType.Subscriber
|
|
101
101
|
}
|
|
102
|
-
}),
|
|
102
|
+
}), ElementName.SubTasksProgress, {
|
|
103
103
|
component: Badge,
|
|
104
104
|
props: {
|
|
105
105
|
icon: IconType.SubTasksProgress
|
|
106
106
|
}
|
|
107
|
-
}),
|
|
107
|
+
}), ElementName.StoryPoints, {
|
|
108
108
|
component: AtlaskitBadge
|
|
109
|
-
}), _defineProperty(_elementMappings, ElementName.TargetBranch, {
|
|
109
|
+
}), _defineProperty(_defineProperty(_defineProperty(_elementMappings, ElementName.TargetBranch, {
|
|
110
110
|
component: Text
|
|
111
|
-
}),
|
|
111
|
+
}), ElementName.Title, {
|
|
112
112
|
component: Link
|
|
113
|
-
}),
|
|
113
|
+
}), ElementName.Location, {
|
|
114
114
|
component: Link,
|
|
115
115
|
props: {
|
|
116
116
|
theme: SmartLinkInternalTheme.Grey
|
|
117
117
|
}
|
|
118
|
-
})
|
|
118
|
+
}));
|
|
119
119
|
var getContextKey = function getContextKey(name) {
|
|
120
120
|
// Attempt to predict context prop name in advance to reduce the amount of
|
|
121
121
|
// code run during runtime
|
|
@@ -3,7 +3,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
4
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
5
|
var _excluded = ["linkIcon"];
|
|
6
|
-
var
|
|
6
|
+
var _templateObject;
|
|
7
7
|
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; }
|
|
8
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
9
|
import React from 'react';
|
|
@@ -15,7 +15,7 @@ import Loadable from 'react-loadable';
|
|
|
15
15
|
import { SmartLinkSize } from '../../../constants';
|
|
16
16
|
import { openEmbedModal } from '../../EmbedModal/utils';
|
|
17
17
|
import Icon from './elements/icon';
|
|
18
|
-
export var sizeToButtonSpacing = (
|
|
18
|
+
export var sizeToButtonSpacing = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, SmartLinkSize.Small, 'none'), SmartLinkSize.Medium, 'compact'), SmartLinkSize.Large, 'compact'), SmartLinkSize.XLarge, 'default');
|
|
19
19
|
export var getFormattedMessage = function getFormattedMessage(message) {
|
|
20
20
|
if (message) {
|
|
21
21
|
var descriptor = message.descriptor,
|
|
@@ -93,7 +93,7 @@ export var getLinkSizeStyles = function getLinkSizeStyles(size) {
|
|
|
93
93
|
case SmartLinkSize.XLarge:
|
|
94
94
|
return css({
|
|
95
95
|
fontSize: '1.25rem',
|
|
96
|
-
fontWeight: 400,
|
|
96
|
+
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
97
97
|
letterSpacing: '-0.008em',
|
|
98
98
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
99
99
|
lineHeight: getLinkLineHeight(size)
|
|
@@ -102,7 +102,7 @@ export var getLinkSizeStyles = function getLinkSizeStyles(size) {
|
|
|
102
102
|
case SmartLinkSize.Medium:
|
|
103
103
|
return css({
|
|
104
104
|
fontSize: '0.875rem',
|
|
105
|
-
fontWeight: 400,
|
|
105
|
+
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
106
106
|
letterSpacing: '-0.003em',
|
|
107
107
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
108
108
|
lineHeight: getLinkLineHeight(size)
|
|
@@ -111,7 +111,7 @@ export var getLinkSizeStyles = function getLinkSizeStyles(size) {
|
|
|
111
111
|
default:
|
|
112
112
|
return css({
|
|
113
113
|
fontSize: '0.75rem',
|
|
114
|
-
fontWeight: 400,
|
|
114
|
+
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
115
115
|
letterSpacing: '0em',
|
|
116
116
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
117
117
|
lineHeight: getLinkLineHeight(size)
|
|
@@ -32,7 +32,7 @@ export var separatorCss = css({
|
|
|
32
32
|
export var HoverCardContainer = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tbackground: none;\n\tborder-width: 0;\n\tbox-sizing: border-box;\n\twidth: ", "rem;\n\n\t.", " {\n\t\tdisplay: none;\n\t}\n"])), NEW_CARD_WIDTH_REM, loadingPlaceholderClassName);
|
|
33
33
|
|
|
34
34
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
35
|
-
export var titleBlockCss = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\tgap: ", ";\n\n\t", "\n\n\t// title and subtitle element group\n [data-smart-element-group] {\n\t\t// gap between title and subtitle\n\t\tgap: 0.06rem;\n\t\tdisplay: flex;\n\t\t/* subtitle element group */\n\t\t> [data-smart-element-group] {\n\t\t\t> span {\n\t\t\t\tmargin-right: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t[data-smart-element='Title'] {\n\t\tfont-weight:
|
|
35
|
+
export var titleBlockCss = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\tgap: ", ";\n\n\t", "\n\n\t// title and subtitle element group\n [data-smart-element-group] {\n\t\t// gap between title and subtitle\n\t\tgap: 0.06rem;\n\t\tdisplay: flex;\n\t\t/* subtitle element group */\n\t\t> [data-smart-element-group] {\n\t\t\t> span {\n\t\t\t\tmargin-right: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t[data-smart-element='Title'] {\n\t\tfont-weight: ", ";\n\t}\n"])), blockGap, separatorCss, elementGap, "var(--ds-font-weight-semibold, 600)");
|
|
36
36
|
export var getTransitionStyles = function getTransitionStyles(snippetHeight) {
|
|
37
37
|
return css({
|
|
38
38
|
transition: 'height 300ms ease-in-out',
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
import React from 'react';
|
|
11
10
|
import { FormattedMessage } from 'react-intl-next';
|
|
@@ -20,17 +19,15 @@ import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
|
20
19
|
import { IconStyledButton } from '../styled';
|
|
21
20
|
import withFrameStyleControl from '../utils/withFrameStyleControl';
|
|
22
21
|
export var InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
|
|
23
|
-
_inherits(InlineCardErroredView, _React$Component);
|
|
24
|
-
var _super = _createSuper(InlineCardErroredView);
|
|
25
22
|
function InlineCardErroredView() {
|
|
26
23
|
var _this;
|
|
27
24
|
_classCallCheck(this, InlineCardErroredView);
|
|
28
25
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
29
26
|
args[_key] = arguments[_key];
|
|
30
27
|
}
|
|
31
|
-
_this =
|
|
32
|
-
_defineProperty(
|
|
33
|
-
_defineProperty(
|
|
28
|
+
_this = _callSuper(this, InlineCardErroredView, [].concat(args));
|
|
29
|
+
_defineProperty(_this, "frameRef", /*#__PURE__*/React.createRef());
|
|
30
|
+
_defineProperty(_this, "handleRetry", function (event) {
|
|
34
31
|
var onRetry = _this.props.onRetry;
|
|
35
32
|
if (onRetry) {
|
|
36
33
|
event.preventDefault();
|
|
@@ -38,7 +35,7 @@ export var InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
|
|
|
38
35
|
onRetry();
|
|
39
36
|
}
|
|
40
37
|
});
|
|
41
|
-
_defineProperty(
|
|
38
|
+
_defineProperty(_this, "renderActionButton", function () {
|
|
42
39
|
var onRetry = _this.props.onRetry;
|
|
43
40
|
var ActionButton = withFrameStyleControl(Button, _this.frameRef);
|
|
44
41
|
return onRetry && /*#__PURE__*/React.createElement(ActionButton, {
|
|
@@ -50,7 +47,8 @@ export var InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
|
|
|
50
47
|
});
|
|
51
48
|
return _this;
|
|
52
49
|
}
|
|
53
|
-
|
|
50
|
+
_inherits(InlineCardErroredView, _React$Component);
|
|
51
|
+
return _createClass(InlineCardErroredView, [{
|
|
54
52
|
key: "render",
|
|
55
53
|
value: function render() {
|
|
56
54
|
var _this$props = this.props,
|
|
@@ -87,5 +85,4 @@ export var InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
|
|
|
87
85
|
return content;
|
|
88
86
|
}
|
|
89
87
|
}]);
|
|
90
|
-
return InlineCardErroredView;
|
|
91
88
|
}(React.Component);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
function
|
|
8
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
10
|
import React from 'react';
|
|
12
11
|
import { FormattedMessage } from 'react-intl-next';
|
|
@@ -29,8 +28,6 @@ var FallbackForbiddenIcon = /*#__PURE__*/React.createElement(AKIconWrapper, null
|
|
|
29
28
|
testId: "forbidden-view-fallback-icon"
|
|
30
29
|
}));
|
|
31
30
|
export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
|
|
32
|
-
_inherits(InlineCardForbiddenView, _React$Component);
|
|
33
|
-
var _super = _createSuper(InlineCardForbiddenView);
|
|
34
31
|
function InlineCardForbiddenView() {
|
|
35
32
|
var _this$props;
|
|
36
33
|
var _this;
|
|
@@ -38,12 +35,12 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
|
|
|
38
35
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
39
36
|
args[_key] = arguments[_key];
|
|
40
37
|
}
|
|
41
|
-
_this =
|
|
42
|
-
_defineProperty(
|
|
43
|
-
_defineProperty(
|
|
38
|
+
_this = _callSuper(this, InlineCardForbiddenView, [].concat(args));
|
|
39
|
+
_defineProperty(_this, "frameRef", /*#__PURE__*/React.createRef());
|
|
40
|
+
_defineProperty(_this, "state", {
|
|
44
41
|
hasRequestAccessContextMessage: !!((_this$props = _this.props) !== null && _this$props !== void 0 && (_this$props = _this$props.requestAccessContext) !== null && _this$props !== void 0 && _this$props.callToActionMessageKey)
|
|
45
42
|
});
|
|
46
|
-
_defineProperty(
|
|
43
|
+
_defineProperty(_this, "handleRetry", function (event) {
|
|
47
44
|
var onAuthorise = _this.props.onAuthorise;
|
|
48
45
|
event.preventDefault();
|
|
49
46
|
event.stopPropagation();
|
|
@@ -54,7 +51,7 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
|
|
|
54
51
|
(_this$props2 = _this.props) === null || _this$props2 === void 0 || (_this$props2 = _this$props2.requestAccessContext) === null || _this$props2 === void 0 || (_this$props2 = _this$props2.action) === null || _this$props2 === void 0 || _this$props2.promise();
|
|
55
52
|
}
|
|
56
53
|
});
|
|
57
|
-
_defineProperty(
|
|
54
|
+
_defineProperty(_this, "renderForbiddenAccessMessage", function () {
|
|
58
55
|
var _this$props3;
|
|
59
56
|
if ((_this$props3 = _this.props) !== null && _this$props3 !== void 0 && (_this$props3 = _this$props3.requestAccessContext) !== null && _this$props3 !== void 0 && _this$props3.callToActionMessageKey) {
|
|
60
57
|
var callToActionMessageKey = _this.props.requestAccessContext.callToActionMessageKey;
|
|
@@ -68,7 +65,7 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
|
|
|
68
65
|
return /*#__PURE__*/React.createElement(React.Fragment, null, formattedMessage);
|
|
69
66
|
}));
|
|
70
67
|
});
|
|
71
|
-
_defineProperty(
|
|
68
|
+
_defineProperty(_this, "renderActionButton", function () {
|
|
72
69
|
var _this$props$requestAc;
|
|
73
70
|
var onAuthorise = _this.props.onAuthorise;
|
|
74
71
|
var ActionButton = withFrameStyleControl(Button, _this.frameRef);
|
|
@@ -98,7 +95,8 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
|
|
|
98
95
|
});
|
|
99
96
|
return _this;
|
|
100
97
|
}
|
|
101
|
-
|
|
98
|
+
_inherits(InlineCardForbiddenView, _React$Component);
|
|
99
|
+
return _createClass(InlineCardForbiddenView, [{
|
|
102
100
|
key: "render",
|
|
103
101
|
value: function render() {
|
|
104
102
|
var _this$props4 = this.props,
|
|
@@ -129,5 +127,4 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
|
|
|
129
127
|
return content;
|
|
130
128
|
}
|
|
131
129
|
}]);
|
|
132
|
-
return InlineCardForbiddenView;
|
|
133
130
|
}(React.Component);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
import React from 'react';
|
|
11
10
|
import ImageLoader from 'react-render-image';
|
|
@@ -14,16 +13,14 @@ import { Icon, Shimmer } from '../Icon';
|
|
|
14
13
|
import { LinkAppearance, NoLinkAppearance } from '../styled';
|
|
15
14
|
import { EmojiWrapper, IconEmptyWrapper, IconPositionWrapper, IconTitleWrapper, IconWrapper, TitleWrapper, TitleWrapperClassName } from './styled';
|
|
16
15
|
export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
17
|
-
_inherits(IconAndTitleLayout, _React$Component);
|
|
18
|
-
var _super = _createSuper(IconAndTitleLayout);
|
|
19
16
|
function IconAndTitleLayout() {
|
|
20
17
|
var _this;
|
|
21
18
|
_classCallCheck(this, IconAndTitleLayout);
|
|
22
19
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23
20
|
args[_key] = arguments[_key];
|
|
24
21
|
}
|
|
25
|
-
_this =
|
|
26
|
-
_defineProperty(
|
|
22
|
+
_this = _callSuper(this, IconAndTitleLayout, [].concat(args));
|
|
23
|
+
_defineProperty(_this, "handleClick", function (event) {
|
|
27
24
|
var onClick = _this.props.onClick;
|
|
28
25
|
if (onClick) {
|
|
29
26
|
event.preventDefault();
|
|
@@ -31,7 +28,7 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
31
28
|
onClick(event);
|
|
32
29
|
}
|
|
33
30
|
});
|
|
34
|
-
_defineProperty(
|
|
31
|
+
_defineProperty(_this, "handleKeyPress", function (event) {
|
|
35
32
|
var onClick = _this.props.onClick;
|
|
36
33
|
if (event.key !== ' ' && event.key !== 'Enter') {
|
|
37
34
|
return;
|
|
@@ -44,7 +41,8 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
44
41
|
});
|
|
45
42
|
return _this;
|
|
46
43
|
}
|
|
47
|
-
|
|
44
|
+
_inherits(IconAndTitleLayout, _React$Component);
|
|
45
|
+
return _createClass(IconAndTitleLayout, [{
|
|
48
46
|
key: "renderAtlaskitIcon",
|
|
49
47
|
value: function renderAtlaskitIcon() {
|
|
50
48
|
var _this$props = this.props,
|
|
@@ -151,7 +149,6 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
151
149
|
);
|
|
152
150
|
}
|
|
153
151
|
}]);
|
|
154
|
-
return IconAndTitleLayout;
|
|
155
152
|
}(React.Component);
|
|
156
153
|
_defineProperty(IconAndTitleLayout, "defaultProps", {
|
|
157
154
|
rightSideSpacer: true
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import Lozenge from '@atlaskit/lozenge';
|
|
@@ -12,13 +12,12 @@ import { Frame } from '../Frame';
|
|
|
12
12
|
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
13
13
|
import { LozengeWrapper } from '../IconAndTitleLayout/styled';
|
|
14
14
|
export var InlineCardResolvedView = /*#__PURE__*/function (_React$Component) {
|
|
15
|
-
_inherits(InlineCardResolvedView, _React$Component);
|
|
16
|
-
var _super = _createSuper(InlineCardResolvedView);
|
|
17
15
|
function InlineCardResolvedView() {
|
|
18
16
|
_classCallCheck(this, InlineCardResolvedView);
|
|
19
|
-
return
|
|
17
|
+
return _callSuper(this, InlineCardResolvedView, arguments);
|
|
20
18
|
}
|
|
21
|
-
|
|
19
|
+
_inherits(InlineCardResolvedView, _React$Component);
|
|
20
|
+
return _createClass(InlineCardResolvedView, [{
|
|
22
21
|
key: "renderLozenge",
|
|
23
22
|
value: function renderLozenge() {
|
|
24
23
|
var lozenge = this.props.lozenge;
|
|
@@ -80,5 +79,4 @@ export var InlineCardResolvedView = /*#__PURE__*/function (_React$Component) {
|
|
|
80
79
|
return inlineCardResolvedView;
|
|
81
80
|
}
|
|
82
81
|
}]);
|
|
83
|
-
return InlineCardResolvedView;
|
|
84
82
|
}(React.Component);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import Spinner from '@atlaskit/spinner';
|
|
@@ -12,13 +12,12 @@ import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
|
12
12
|
import { IconTitleWrapper, RightIconPositionWrapper } from '../IconAndTitleLayout/styled';
|
|
13
13
|
import { SpinnerWrapper } from './styled';
|
|
14
14
|
export var InlineCardResolvingView = /*#__PURE__*/function (_React$Component) {
|
|
15
|
-
_inherits(InlineCardResolvingView, _React$Component);
|
|
16
|
-
var _super = _createSuper(InlineCardResolvingView);
|
|
17
15
|
function InlineCardResolvingView() {
|
|
18
16
|
_classCallCheck(this, InlineCardResolvingView);
|
|
19
|
-
return
|
|
17
|
+
return _callSuper(this, InlineCardResolvingView, arguments);
|
|
20
18
|
}
|
|
21
|
-
|
|
19
|
+
_inherits(InlineCardResolvingView, _React$Component);
|
|
20
|
+
return _createClass(InlineCardResolvingView, [{
|
|
22
21
|
key: "render",
|
|
23
22
|
value: function render() {
|
|
24
23
|
var _this$props = this.props,
|
|
@@ -61,5 +60,4 @@ export var InlineCardResolvingView = /*#__PURE__*/function (_React$Component) {
|
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
62
|
}]);
|
|
64
|
-
return InlineCardResolvingView;
|
|
65
63
|
}(React.Component);
|
|
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
13
13
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
14
14
|
var PACKAGE_DATA = {
|
|
15
15
|
packageName: "@atlaskit/smart-card",
|
|
16
|
-
packageVersion: "32.7.
|
|
16
|
+
packageVersion: "32.7.7",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
-
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { Frame } from '../InlineCard/Frame';
|
|
11
11
|
export var CardLinkView = /*#__PURE__*/function (_React$PureComponent) {
|
|
12
|
-
_inherits(CardLinkView, _React$PureComponent);
|
|
13
|
-
var _super = _createSuper(CardLinkView);
|
|
14
12
|
function CardLinkView() {
|
|
15
13
|
_classCallCheck(this, CardLinkView);
|
|
16
|
-
return
|
|
14
|
+
return _callSuper(this, CardLinkView, arguments);
|
|
17
15
|
}
|
|
18
|
-
|
|
16
|
+
_inherits(CardLinkView, _React$PureComponent);
|
|
17
|
+
return _createClass(CardLinkView, [{
|
|
19
18
|
key: "render",
|
|
20
19
|
value: function render() {
|
|
21
20
|
return /*#__PURE__*/React.createElement(Frame, _extends({
|
|
@@ -23,5 +22,4 @@ export var CardLinkView = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
23
22
|
}, this.props), this.props.placeholder || this.props.link);
|
|
24
23
|
}
|
|
25
24
|
}]);
|
|
26
|
-
return CardLinkView;
|
|
27
25
|
}(React.PureComponent);
|
|
@@ -18,6 +18,7 @@ export type AISummaryServiceProps = {
|
|
|
18
18
|
*/
|
|
19
19
|
ari?: string;
|
|
20
20
|
envKey?: EnvironmentsKeys;
|
|
21
|
+
locale?: string;
|
|
21
22
|
url: string;
|
|
22
23
|
};
|
|
23
24
|
export type AISummaryServiceConfig = {
|
|
@@ -38,6 +39,7 @@ export type AgentInputContext = {
|
|
|
38
39
|
content_ari?: string;
|
|
39
40
|
prompt_id: PromptId;
|
|
40
41
|
summary_output_mimetype?: SummaryOutputMimeType;
|
|
42
|
+
locale?: string;
|
|
41
43
|
};
|
|
42
44
|
export type PromptId = 'smart_links';
|
|
43
45
|
export type SummaryOutputMimeType = 'text/adf' | 'text/markdown' | 'text/json';
|
|
@@ -18,6 +18,7 @@ export type AISummaryServiceProps = {
|
|
|
18
18
|
*/
|
|
19
19
|
ari?: string;
|
|
20
20
|
envKey?: EnvironmentsKeys;
|
|
21
|
+
locale?: string;
|
|
21
22
|
url: string;
|
|
22
23
|
};
|
|
23
24
|
export type AISummaryServiceConfig = {
|
|
@@ -38,6 +39,7 @@ export type AgentInputContext = {
|
|
|
38
39
|
content_ari?: string;
|
|
39
40
|
prompt_id: PromptId;
|
|
40
41
|
summary_output_mimetype?: SummaryOutputMimeType;
|
|
42
|
+
locale?: string;
|
|
41
43
|
};
|
|
42
44
|
export type PromptId = 'smart_links';
|
|
43
45
|
export type SummaryOutputMimeType = 'text/adf' | 'text/markdown' | 'text/json';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "32.7.
|
|
3
|
+
"version": "32.7.7",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -182,6 +182,9 @@
|
|
|
182
182
|
},
|
|
183
183
|
"platform_editor_hyperlink_underline": {
|
|
184
184
|
"type": "boolean"
|
|
185
|
+
},
|
|
186
|
+
"send_locale_to_summarize_in_assistance-service": {
|
|
187
|
+
"type": "boolean"
|
|
185
188
|
}
|
|
186
189
|
}
|
|
187
190
|
}
|