@atlaskit/smart-card 27.6.5 → 27.7.1
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 +21 -0
- package/dist/cjs/extractors/common/icon/extractIcon.js +67 -17
- package/dist/cjs/extractors/common/icon/extractIconFromDocument.js +0 -3
- package/dist/cjs/extractors/common/icon/prioritiseIcon.js +1 -16
- package/dist/cjs/extractors/embed/index.js +0 -1
- package/dist/cjs/extractors/flexible/icon/extract-jsonld-data-icon.js +90 -43
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/components/Action.js +2 -2
- package/dist/cjs/view/BlockCard/components/ActionList.js +12 -8
- package/dist/cjs/view/BlockCard/components/Content.js +10 -6
- package/dist/cjs/view/BlockCard/components/ContentFooter.js +15 -9
- package/dist/cjs/view/BlockCard/components/Frame.js +15 -9
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +8 -7
- package/dist/cjs/view/EmbedCard/views/ErroredView.js +2 -2
- package/dist/cjs/view/EmbedModal/components/link-info/link-info-button/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-analytics.js +8 -9
- package/dist/cjs/view/InlineCard/ErroredView/index.js +2 -2
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +3 -3
- package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +2 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/Byline.js +25 -25
- package/dist/es2019/extractors/common/icon/extractIcon.js +67 -19
- package/dist/es2019/extractors/common/icon/extractIconFromDocument.js +0 -5
- package/dist/es2019/extractors/common/icon/prioritiseIcon.js +0 -9
- package/dist/es2019/extractors/embed/index.js +0 -1
- package/dist/es2019/extractors/flexible/icon/extract-jsonld-data-icon.js +90 -42
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/components/Action.js +1 -1
- package/dist/es2019/view/BlockCard/components/ActionList.js +13 -8
- package/dist/es2019/view/BlockCard/components/Content.js +11 -7
- package/dist/es2019/view/BlockCard/components/ContentFooter.js +16 -10
- package/dist/es2019/view/BlockCard/components/Frame.js +13 -9
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +8 -7
- package/dist/es2019/view/EmbedCard/views/ErroredView.js +1 -1
- package/dist/es2019/view/EmbedModal/components/link-info/link-info-button/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-analytics.js +8 -9
- package/dist/es2019/view/InlineCard/ErroredView/index.js +1 -1
- package/dist/es2019/view/InlineCard/ForbiddenView/index.js +1 -1
- package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/Byline.js +26 -26
- package/dist/esm/extractors/common/icon/extractIcon.js +67 -17
- package/dist/esm/extractors/common/icon/extractIconFromDocument.js +0 -3
- package/dist/esm/extractors/common/icon/prioritiseIcon.js +1 -16
- package/dist/esm/extractors/embed/index.js +0 -1
- package/dist/esm/extractors/flexible/icon/extract-jsonld-data-icon.js +90 -44
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/components/Action.js +1 -1
- package/dist/esm/view/BlockCard/components/ActionList.js +13 -8
- package/dist/esm/view/BlockCard/components/Content.js +11 -7
- package/dist/esm/view/BlockCard/components/ContentFooter.js +16 -10
- package/dist/esm/view/BlockCard/components/Frame.js +13 -10
- package/dist/esm/view/BlockCard/views/ResolvedView.js +8 -7
- package/dist/esm/view/EmbedCard/views/ErroredView.js +1 -1
- package/dist/esm/view/EmbedModal/components/link-info/link-info-button/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-analytics.js +8 -9
- package/dist/esm/view/InlineCard/ErroredView/index.js +1 -1
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +1 -1
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/Byline.js +26 -26
- package/dist/types/extractors/common/icon/prioritiseIcon.d.ts +1 -5
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +8 -1
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-analytics.d.ts +1 -1
- package/dist/types-ts4.5/extractors/common/icon/prioritiseIcon.d.ts +1 -5
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +8 -1
- package/dist/types-ts4.5/utils/index.d.ts +1 -1
- package/dist/types-ts4.5/view/Card/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-analytics.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { gs, mq } from '../../common/utils';
|
|
5
5
|
/**
|
|
6
6
|
* Class name for selecting non-flexible block card content
|
|
@@ -9,20 +9,24 @@ import { gs, mq } from '../../common/utils';
|
|
|
9
9
|
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
10
10
|
*/
|
|
11
11
|
export var blockCardContentClassName = 'block-card-content';
|
|
12
|
+
var baseStyles = css({
|
|
13
|
+
display: 'flex',
|
|
14
|
+
flexDirection: 'column',
|
|
15
|
+
flexGrow: 1
|
|
16
|
+
});
|
|
12
17
|
export var Content = function Content(_ref) {
|
|
13
18
|
var children = _ref.children,
|
|
14
19
|
_ref$isCompact = _ref.isCompact,
|
|
15
20
|
isCompact = _ref$isCompact === void 0 ? false : _ref$isCompact;
|
|
16
21
|
return jsx("div", {
|
|
17
22
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
18
|
-
css:
|
|
23
|
+
css: [baseStyles,
|
|
24
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
25
|
+
mq({
|
|
19
26
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
20
27
|
padding: isCompact ? gs(1) : gs(2),
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
justifyContent: isCompact ? 'unset' : ['unset', 'space-between'],
|
|
24
|
-
flexGrow: 1
|
|
25
|
-
}),
|
|
28
|
+
justifyContent: isCompact ? 'unset' : ['unset', 'space-between']
|
|
29
|
+
})],
|
|
26
30
|
"data-trello-do-not-use-override": "block-card-content"
|
|
27
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
28
32
|
,
|
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { gs, mq } from '../../common/utils';
|
|
5
5
|
export var contentFooterClassName = 'smart-link-content-footer';
|
|
6
|
+
var flexStyles = css({
|
|
7
|
+
display: 'flex'
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
11
|
+
var baseStyles = mq({
|
|
12
|
+
flexDirection: ['column', 'row'],
|
|
13
|
+
flexGrow: [1, 'unset'],
|
|
14
|
+
alignItems: ['unset', 'center'],
|
|
15
|
+
marginTop: [gs(1), gs(1.5)]
|
|
16
|
+
});
|
|
6
17
|
export var ContentFooter = function ContentFooter(_ref) {
|
|
7
18
|
var children = _ref.children,
|
|
8
19
|
_ref$hasSpaceBetween = _ref.hasSpaceBetween,
|
|
9
20
|
hasSpaceBetween = _ref$hasSpaceBetween === void 0 ? false : _ref$hasSpaceBetween;
|
|
10
21
|
return jsx("div", {
|
|
22
|
+
css: [flexStyles, baseStyles,
|
|
11
23
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
flexGrow: [1, 'unset'],
|
|
16
|
-
justifyContent: [hasSpaceBetween ? 'space-between' : 'flex-end', 'space-between'],
|
|
17
|
-
alignItems: ['unset', 'center'],
|
|
18
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
19
|
-
marginTop: [gs(1), gs(1.5)]
|
|
20
|
-
})
|
|
24
|
+
mq({
|
|
25
|
+
justifyContent: [hasSpaceBetween ? 'space-between' : 'flex-end', 'space-between']
|
|
26
|
+
})]
|
|
21
27
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
22
28
|
,
|
|
23
29
|
className: contentFooterClassName
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
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; }
|
|
3
|
-
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; }
|
|
4
1
|
/** @jsx jsx */
|
|
5
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
7
4
|
import React from 'react';
|
|
8
5
|
import { N20A, N30A, B200, N40A, N50A } from '@atlaskit/theme/colors';
|
|
9
6
|
import { gs, br, mq } from '../../common/utils';
|
|
@@ -15,10 +12,14 @@ export var Frame = function Frame() {
|
|
|
15
12
|
};
|
|
16
13
|
return props.compact ? jsx(CompactFrame, props) : jsx(ExpandedFrame, props);
|
|
17
14
|
};
|
|
15
|
+
var sharedBaseFrameStyles = css({
|
|
16
|
+
width: '100%',
|
|
17
|
+
display: 'flex'
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
18
21
|
var sharedFrameStyles = {
|
|
19
22
|
maxWidth: gs(95),
|
|
20
|
-
width: '100%',
|
|
21
|
-
display: 'flex',
|
|
22
23
|
backgroundColor: "var(--ds-surface-raised, white)"
|
|
23
24
|
};
|
|
24
25
|
export var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
@@ -29,8 +30,9 @@ export var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
29
30
|
className = _ref.className,
|
|
30
31
|
isFluidHeight = _ref.isFluidHeight;
|
|
31
32
|
return jsx("div", {
|
|
33
|
+
css: [sharedBaseFrameStyles, sharedFrameStyles,
|
|
32
34
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
33
|
-
|
|
35
|
+
mq({
|
|
34
36
|
'&:hover': isHoverable ? {
|
|
35
37
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4064
|
|
36
38
|
backgroundColor: "var(--ds-background-neutral-subtle-hovered, ".concat(N20A, ")"),
|
|
@@ -44,7 +46,7 @@ export var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
44
46
|
justifyContent: 'space-between',
|
|
45
47
|
overflow: 'hidden',
|
|
46
48
|
boxShadow: "var(--ds-shadow-raised, ".concat("0 1px 1px ".concat(N50A, ", 0 0 1px 1px ").concat(N40A), ")")
|
|
47
|
-
})
|
|
49
|
+
})],
|
|
48
50
|
"data-testid": testId
|
|
49
51
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
50
52
|
,
|
|
@@ -60,8 +62,9 @@ export var CompactFrame = function CompactFrame(_ref2) {
|
|
|
60
62
|
className = _ref2.className,
|
|
61
63
|
inheritDimensions = _ref2.inheritDimensions;
|
|
62
64
|
return jsx("div", {
|
|
65
|
+
css: [sharedBaseFrameStyles, sharedFrameStyles,
|
|
63
66
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
64
|
-
|
|
67
|
+
mq({
|
|
65
68
|
'&:hover': isHoverable ? {
|
|
66
69
|
backgroundColor: "var(--ds-background-neutral-hovered, ".concat(N30A, ")")
|
|
67
70
|
} : undefined,
|
|
@@ -76,7 +79,7 @@ export var CompactFrame = function CompactFrame(_ref2) {
|
|
|
76
79
|
width: ['calc(100% - 16px)', '100%'],
|
|
77
80
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
78
81
|
padding: ["0px ".concat(gs(1)), '0']
|
|
79
|
-
})
|
|
82
|
+
})],
|
|
80
83
|
"data-testid": testId
|
|
81
84
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
82
85
|
,
|
|
@@ -24,6 +24,13 @@ var styles = css({
|
|
|
24
24
|
justifyContent: 'space-between',
|
|
25
25
|
alignItems: 'flex-start'
|
|
26
26
|
});
|
|
27
|
+
var lozengeStyles = {
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
29
|
+
height: gs(2.5),
|
|
30
|
+
display: 'flex',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
justifyContent: 'center'
|
|
33
|
+
};
|
|
27
34
|
/**
|
|
28
35
|
* Class name for selecting non-flexible resolved block card
|
|
29
36
|
*
|
|
@@ -102,13 +109,7 @@ export var ResolvedView = function ResolvedView(_ref) {
|
|
|
102
109
|
name: title,
|
|
103
110
|
textColor: titleTextColor
|
|
104
111
|
}), lozenge && jsx(LozengeBlockWrapper, {
|
|
105
|
-
css:
|
|
106
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
107
|
-
height: gs(2.5),
|
|
108
|
-
display: 'flex',
|
|
109
|
-
alignItems: 'center',
|
|
110
|
-
justifyContent: 'center'
|
|
111
|
-
}
|
|
112
|
+
css: lozengeStyles
|
|
112
113
|
}, jsx(Lozenge, _extends({
|
|
113
114
|
style: lozenge.style
|
|
114
115
|
}, lozenge), lozenge.text))), jsx(CollaboratorList, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
|
-
import Button from '@atlaskit/button
|
|
4
|
+
import Button from '@atlaskit/button';
|
|
5
5
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
6
6
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
7
7
|
import { R300 } from '@atlaskit/theme/colors';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Tooltip from '@atlaskit/tooltip';
|
|
3
|
-
import Button from '@atlaskit/button
|
|
3
|
+
import Button from '@atlaskit/button';
|
|
4
4
|
import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
|
|
5
5
|
var LinkInfoButton = function LinkInfoButton(_ref) {
|
|
6
6
|
var content = _ref.content,
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { TrackQuickActionFailureReason, TrackQuickActionType } from '../../../../../../utils/analytics/analytics';
|
|
2
1
|
export var unknownLoadErrorAnalyticsPayload = {
|
|
3
|
-
smartLinkActionType:
|
|
4
|
-
reason:
|
|
2
|
+
smartLinkActionType: 'StatusUpdate',
|
|
3
|
+
reason: 'UnknownError',
|
|
5
4
|
step: 'load'
|
|
6
5
|
};
|
|
7
6
|
export var permissionLoadErrorAnalyticsPayload = {
|
|
8
|
-
smartLinkActionType:
|
|
9
|
-
reason:
|
|
7
|
+
smartLinkActionType: 'StatusUpdate',
|
|
8
|
+
reason: 'PermissionError',
|
|
10
9
|
step: 'load'
|
|
11
10
|
};
|
|
12
11
|
export var unknownUpdateErrorAnalyticsPayload = {
|
|
13
|
-
smartLinkActionType:
|
|
14
|
-
reason:
|
|
12
|
+
smartLinkActionType: 'StatusUpdate',
|
|
13
|
+
reason: 'UnknownError',
|
|
15
14
|
step: 'update'
|
|
16
15
|
};
|
|
17
16
|
export var validationUpdateErrorAnalyticsPayload = {
|
|
18
|
-
smartLinkActionType:
|
|
19
|
-
reason:
|
|
17
|
+
smartLinkActionType: 'StatusUpdate',
|
|
18
|
+
reason: 'ValidationError',
|
|
20
19
|
step: 'update'
|
|
21
20
|
};
|
|
@@ -10,7 +10,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { R300 } from '@atlaskit/theme/colors';
|
|
12
12
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
13
|
-
import Button from '@atlaskit/button
|
|
13
|
+
import Button from '@atlaskit/button';
|
|
14
14
|
import { Frame } from '../Frame';
|
|
15
15
|
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
16
16
|
import { AKIconWrapper } from '../Icon';
|
|
@@ -11,7 +11,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { R400, N500 } from '@atlaskit/theme/colors';
|
|
13
13
|
import LockIcon from '@atlaskit/icon/glyph/lock-filled';
|
|
14
|
-
import Button from '@atlaskit/button
|
|
14
|
+
import Button from '@atlaskit/button';
|
|
15
15
|
import { Frame } from '../Frame';
|
|
16
16
|
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
17
17
|
import { AKIconWrapper } from '../Icon';
|
|
@@ -8,7 +8,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
9
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
-
import Button from '@atlaskit/button
|
|
11
|
+
import Button from '@atlaskit/button';
|
|
12
12
|
import LockIcon from '@atlaskit/icon/glyph/lock-filled';
|
|
13
13
|
import { N500, R400 } from '@atlaskit/theme/colors';
|
|
14
14
|
import withFrameStyleControl from '../utils/withFrameStyleControl';
|
|
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
|
|
|
10
10
|
import LinkWarningModal from './LinkWarningModal';
|
|
11
11
|
var PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "27.
|
|
13
|
+
packageVersion: "27.7.1",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
var Link = withLinkClickedEvent('a');
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { N300 } from '@atlaskit/theme/colors';
|
|
5
5
|
import { gs, mq } from './utils';
|
|
6
|
+
var baseStyles = css({
|
|
7
|
+
// Spec: only allow two lines MAX to be shown.
|
|
8
|
+
display: '-webkit-box',
|
|
9
|
+
overflow: 'hidden',
|
|
10
|
+
textOverflow: 'ellipsis',
|
|
11
|
+
WebkitLineClamp: 2,
|
|
12
|
+
WebkitBoxOrient: 'vertical',
|
|
13
|
+
wordBreak: 'break-word',
|
|
14
|
+
whiteSpace: 'pre-line',
|
|
15
|
+
// EDM-713: fixes copy-paste from renderer to editor for Firefox
|
|
16
|
+
// due to HTML its unwrapping behaviour on paste.
|
|
17
|
+
MozUserSelect: 'none'
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
21
|
+
var styles = mq({
|
|
22
|
+
fontSize: gs(1.5),
|
|
23
|
+
lineHeight: gs(2.5),
|
|
24
|
+
color: "".concat("var(--ds-text-subtlest, ".concat(N300, ")")),
|
|
25
|
+
fontWeight: 'normal',
|
|
26
|
+
marginTop: gs(0.5),
|
|
27
|
+
// Fallback options.
|
|
28
|
+
maxHeight: gs(5)
|
|
29
|
+
});
|
|
6
30
|
export var Byline = function Byline(_ref) {
|
|
7
31
|
var text = _ref.text,
|
|
8
32
|
children = _ref.children,
|
|
9
33
|
testId = _ref.testId,
|
|
10
34
|
className = _ref.className;
|
|
11
35
|
return jsx("span", {
|
|
12
|
-
|
|
13
|
-
css: mq({
|
|
14
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
15
|
-
fontSize: gs(1.5),
|
|
16
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
17
|
-
lineHeight: gs(2.5),
|
|
18
|
-
color: "".concat("var(--ds-text-subtlest, ".concat(N300, ")")),
|
|
19
|
-
fontWeight: 'normal',
|
|
20
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
21
|
-
marginTop: gs(0.5),
|
|
22
|
-
// Spec: only allow two lines MAX to be shown.
|
|
23
|
-
display: '-webkit-box',
|
|
24
|
-
overflow: 'hidden',
|
|
25
|
-
textOverflow: 'ellipsis',
|
|
26
|
-
WebkitLineClamp: 2,
|
|
27
|
-
WebkitBoxOrient: 'vertical',
|
|
28
|
-
wordBreak: 'break-word',
|
|
29
|
-
// Fallback options.
|
|
30
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
31
|
-
maxHeight: gs(5),
|
|
32
|
-
whiteSpace: 'pre-line',
|
|
33
|
-
// EDM-713: fixes copy-paste from renderer to editor for Firefox
|
|
34
|
-
// due to HTML its unwrapping behaviour on paste.
|
|
35
|
-
MozUserSelect: 'none'
|
|
36
|
-
}),
|
|
36
|
+
css: [baseStyles, styles],
|
|
37
37
|
"data-testid": testId
|
|
38
38
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
39
39
|
,
|
|
@@ -11,10 +11,6 @@ export type IconDescriptor = {
|
|
|
11
11
|
* Options required to prioritise which icon to show
|
|
12
12
|
*/
|
|
13
13
|
export type IconPriorityOpts<T> = {
|
|
14
|
-
/**
|
|
15
|
-
* The '@id' field of the JSON-LD generator object
|
|
16
|
-
*/
|
|
17
|
-
providerId: string | undefined;
|
|
18
14
|
/**
|
|
19
15
|
* Icon choice corresponding to the file format (based on MIME type) for the object.
|
|
20
16
|
*/
|
|
@@ -37,4 +33,4 @@ export type IconPriorityOpts<T> = {
|
|
|
37
33
|
* Reusable priority function for choosing which icon to show.
|
|
38
34
|
* Generic so it can be used to prioritise strings, or React components depending on the usage.
|
|
39
35
|
*/
|
|
40
|
-
export declare function prioritiseIcon<T>({
|
|
36
|
+
export declare function prioritiseIcon<T>({ fileFormatIcon, documentTypeIcon, urlIcon, providerIcon, }: IconPriorityOpts<T>): T | undefined;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="filesystem" />
|
|
2
1
|
import type { ProductType, EnvironmentsKeys } from '@atlaskit/linking-common';
|
|
3
2
|
export interface AISummaryServiceInt {
|
|
4
3
|
summariseUrl: () => Promise<AISummaryState>;
|
|
@@ -116,6 +115,14 @@ export type Durations = {
|
|
|
116
115
|
};
|
|
117
116
|
total: number;
|
|
118
117
|
};
|
|
118
|
+
export type Metadata = {
|
|
119
|
+
bm25Variant?: string;
|
|
120
|
+
confidenceScore?: number;
|
|
121
|
+
isFallbackMessage?: boolean;
|
|
122
|
+
originalQuery?: string;
|
|
123
|
+
semanticSearchLocationVariant?: string;
|
|
124
|
+
semanticSearchVariant?: string;
|
|
125
|
+
};
|
|
119
126
|
export type Message = {
|
|
120
127
|
appendices?: Appendices;
|
|
121
128
|
author?: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CardProps } from '../view/Card';
|
|
3
3
|
import { type FrameStyle } from '../view/EmbedCard/types';
|
|
4
|
-
import { type ActiveThemeState } from '@atlaskit/tokens
|
|
4
|
+
import { type ActiveThemeState } from '@atlaskit/tokens';
|
|
5
5
|
export declare const isCardWithData: (props: CardProps) => boolean;
|
|
6
6
|
export declare const isSpecialEvent: (evt: React.MouseEvent | React.KeyboardEvent) => boolean;
|
|
7
7
|
export declare const isIframe: () => boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type CardAppearance, type CardPlatform, type CardProps } from './types';
|
|
3
3
|
import { type WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "
|
|
4
|
+
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "appearance" | "container" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "actionOptions" | "onResolve" | "ui" | "showHoverPreview" | "showAuthTooltip" | "platform" | "isHovered" | "isFrameVisible" | "frameStyle" | "importer" | "showActions" | "showServerActions" | "fallbackComponent" | "embedIframeRef" | "embedIframeUrlType" | "inlinePreloaderStyle" | "analyticsEvents" | "useLegacyBlockCard" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
5
5
|
export type { CardAppearance, CardProps, CardPlatform };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TrackQuickActionFailureReason, TrackQuickActionType } from '../../../../../../utils/analytics/analytics';
|
|
1
|
+
import { type TrackQuickActionFailureReason, type TrackQuickActionType } from '../../../../../../utils/analytics/analytics';
|
|
2
2
|
export declare const unknownLoadErrorAnalyticsPayload: {
|
|
3
3
|
smartLinkActionType: TrackQuickActionType;
|
|
4
4
|
reason: TrackQuickActionFailureReason;
|
|
@@ -11,10 +11,6 @@ export type IconDescriptor = {
|
|
|
11
11
|
* Options required to prioritise which icon to show
|
|
12
12
|
*/
|
|
13
13
|
export type IconPriorityOpts<T> = {
|
|
14
|
-
/**
|
|
15
|
-
* The '@id' field of the JSON-LD generator object
|
|
16
|
-
*/
|
|
17
|
-
providerId: string | undefined;
|
|
18
14
|
/**
|
|
19
15
|
* Icon choice corresponding to the file format (based on MIME type) for the object.
|
|
20
16
|
*/
|
|
@@ -37,4 +33,4 @@ export type IconPriorityOpts<T> = {
|
|
|
37
33
|
* Reusable priority function for choosing which icon to show.
|
|
38
34
|
* Generic so it can be used to prioritise strings, or React components depending on the usage.
|
|
39
35
|
*/
|
|
40
|
-
export declare function prioritiseIcon<T>({
|
|
36
|
+
export declare function prioritiseIcon<T>({ fileFormatIcon, documentTypeIcon, urlIcon, providerIcon, }: IconPriorityOpts<T>): T | undefined;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="filesystem" />
|
|
2
1
|
import type { ProductType, EnvironmentsKeys } from '@atlaskit/linking-common';
|
|
3
2
|
export interface AISummaryServiceInt {
|
|
4
3
|
summariseUrl: () => Promise<AISummaryState>;
|
|
@@ -128,6 +127,14 @@ export type Durations = {
|
|
|
128
127
|
};
|
|
129
128
|
total: number;
|
|
130
129
|
};
|
|
130
|
+
export type Metadata = {
|
|
131
|
+
bm25Variant?: string;
|
|
132
|
+
confidenceScore?: number;
|
|
133
|
+
isFallbackMessage?: boolean;
|
|
134
|
+
originalQuery?: string;
|
|
135
|
+
semanticSearchLocationVariant?: string;
|
|
136
|
+
semanticSearchVariant?: string;
|
|
137
|
+
};
|
|
131
138
|
export type Message = {
|
|
132
139
|
appendices?: Appendices;
|
|
133
140
|
author?: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CardProps } from '../view/Card';
|
|
3
3
|
import { type FrameStyle } from '../view/EmbedCard/types';
|
|
4
|
-
import { type ActiveThemeState } from '@atlaskit/tokens
|
|
4
|
+
import { type ActiveThemeState } from '@atlaskit/tokens';
|
|
5
5
|
export declare const isCardWithData: (props: CardProps) => boolean;
|
|
6
6
|
export declare const isSpecialEvent: (evt: React.MouseEvent | React.KeyboardEvent) => boolean;
|
|
7
7
|
export declare const isIframe: () => boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type CardAppearance, type CardPlatform, type CardProps } from './types';
|
|
3
3
|
import { type WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "
|
|
4
|
+
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "appearance" | "container" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "actionOptions" | "onResolve" | "ui" | "showHoverPreview" | "showAuthTooltip" | "platform" | "isHovered" | "isFrameVisible" | "frameStyle" | "importer" | "showActions" | "showServerActions" | "fallbackComponent" | "embedIframeRef" | "embedIframeUrlType" | "inlinePreloaderStyle" | "analyticsEvents" | "useLegacyBlockCard" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
5
5
|
export type { CardAppearance, CardProps, CardPlatform };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TrackQuickActionFailureReason, TrackQuickActionType } from '../../../../../../utils/analytics/analytics';
|
|
1
|
+
import { type TrackQuickActionFailureReason, type TrackQuickActionType } from '../../../../../../utils/analytics/analytics';
|
|
2
2
|
export declare const unknownLoadErrorAnalyticsPayload: {
|
|
3
3
|
smartLinkActionType: TrackQuickActionType;
|
|
4
4
|
reason: TrackQuickActionFailureReason;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "27.
|
|
3
|
+
"version": "27.7.1",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -55,14 +55,14 @@
|
|
|
55
55
|
"@atlaskit/outbound-auth-flow-client": "^3.4.0",
|
|
56
56
|
"@atlaskit/platform-feature-flags": "^0.2.1",
|
|
57
57
|
"@atlaskit/popup": "^1.19.0",
|
|
58
|
-
"@atlaskit/primitives": "^8.
|
|
58
|
+
"@atlaskit/primitives": "^8.2.0",
|
|
59
59
|
"@atlaskit/section-message": "^6.5.0",
|
|
60
60
|
"@atlaskit/select": "^17.11.0",
|
|
61
61
|
"@atlaskit/spinner": "^16.2.0",
|
|
62
62
|
"@atlaskit/textarea": "^5.5.0",
|
|
63
63
|
"@atlaskit/textfield": "^6.4.0",
|
|
64
64
|
"@atlaskit/theme": "^12.11.0",
|
|
65
|
-
"@atlaskit/tokens": "^1.
|
|
65
|
+
"@atlaskit/tokens": "^1.53.0",
|
|
66
66
|
"@atlaskit/tooltip": "^18.5.0",
|
|
67
67
|
"@atlaskit/ufo": "^0.2.0",
|
|
68
68
|
"@babel/runtime": "^7.0.0",
|