@atlaskit/smart-card 18.0.13 → 18.0.16
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 +28 -0
- package/dist/cjs/extractors/common/context/extractProvider.js +14 -4
- package/dist/cjs/extractors/common/detail/extractCommentCount.js +3 -1
- package/dist/cjs/extractors/common/detail/extractProgrammingLanguage.js +3 -1
- package/dist/cjs/extractors/common/detail/extractSubscriberCount.js +3 -1
- package/dist/cjs/extractors/common/primitives/extractTitleTextColor.js +3 -1
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +9 -0
- package/dist/cjs/state/flexible-ui-context/index.js +4 -0
- package/dist/cjs/utils/analytics/analytics.js +52 -2
- package/dist/cjs/utils/analytics/index.js +18 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/BlockCard/components/Frame.js +10 -7
- package/dist/cjs/view/BlockCard/components/Link.js +3 -1
- package/dist/cjs/view/BlockCard/components/Provider.js +3 -1
- package/dist/cjs/view/BlockCard/views/ErroredView.js +3 -1
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +3 -1
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +3 -1
- package/dist/cjs/view/BlockCard/views/ResolvingView.js +4 -2
- package/dist/cjs/view/CardWithUrl/component.js +4 -2
- package/dist/cjs/view/CardWithUrl/loader.js +4 -2
- package/dist/cjs/view/EmbedCard/components/styled.js +15 -13
- package/dist/cjs/view/EmbedCard/views/ErroredView.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +26 -4
- package/dist/cjs/view/FlexibleCard/components/actions/index.js +18 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +6 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/index.js +6 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +39 -19
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +92 -17
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +45 -9
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +23 -12
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +8 -2
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/container/index.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +12 -1
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +18 -3
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +9 -1
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +9 -1
- package/dist/cjs/view/FlexibleCard/components/elements/index.js +96 -0
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +10 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +11 -3
- package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +12 -6
- package/dist/cjs/view/FlexibleCard/components/elements/utils.js +7 -3
- package/dist/cjs/view/FlexibleCard/index.js +6 -0
- package/dist/cjs/view/HoverCard/index.js +48 -10
- package/dist/cjs/view/HoverCard/styled.js +3 -1
- package/dist/cjs/view/InlineCard/ErroredView/index.js +3 -1
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +4 -2
- package/dist/cjs/view/InlineCard/Frame/styled.js +16 -13
- package/dist/cjs/view/InlineCard/Icon.js +3 -1
- package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +4 -2
- package/dist/cjs/view/InlineCard/styled.js +6 -4
- package/dist/cjs/view/common/Byline.js +3 -1
- package/dist/cjs/view/common/Metadata.js +3 -1
- package/dist/cjs/view/common/ModalHeader.js +4 -2
- package/dist/es2019/extractors/common/context/extractProvider.js +13 -4
- package/dist/es2019/extractors/common/detail/extractCommentCount.js +2 -1
- package/dist/es2019/extractors/common/detail/extractProgrammingLanguage.js +2 -1
- package/dist/es2019/extractors/common/detail/extractSubscriberCount.js +2 -1
- package/dist/es2019/extractors/common/primitives/extractTitleTextColor.js +2 -1
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +7 -2
- package/dist/es2019/state/flexible-ui-context/index.js +5 -0
- package/dist/es2019/utils/analytics/analytics.js +35 -0
- package/dist/es2019/utils/analytics/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/BlockCard/components/Frame.js +9 -7
- package/dist/es2019/view/BlockCard/components/Link.js +2 -1
- package/dist/es2019/view/BlockCard/components/Provider.js +2 -1
- package/dist/es2019/view/BlockCard/views/ErroredView.js +2 -1
- package/dist/es2019/view/BlockCard/views/ForbiddenView.js +2 -1
- package/dist/es2019/view/BlockCard/views/NotFoundView.js +2 -1
- package/dist/es2019/view/BlockCard/views/ResolvingView.js +3 -2
- package/dist/es2019/view/CardWithUrl/component.js +4 -2
- package/dist/es2019/view/CardWithUrl/loader.js +4 -2
- package/dist/es2019/view/EmbedCard/components/styled.js +15 -15
- package/dist/es2019/view/EmbedCard/views/ErroredView.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +37 -4
- package/dist/es2019/view/FlexibleCard/components/actions/index.js +18 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +6 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +9 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +8 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/index.js +6 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +9 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/snippet-block/index.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +31 -15
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +77 -15
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +35 -8
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +20 -11
- package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +8 -3
- package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +7 -6
- package/dist/es2019/view/FlexibleCard/components/container/index.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +12 -1
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +18 -3
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +9 -1
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +9 -1
- package/dist/es2019/view/FlexibleCard/components/elements/index.js +96 -0
- package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +10 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +11 -3
- package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +8 -1
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +11 -4
- package/dist/es2019/view/FlexibleCard/components/elements/utils.js +5 -2
- package/dist/es2019/view/FlexibleCard/index.js +6 -0
- package/dist/es2019/view/HoverCard/index.js +40 -10
- package/dist/es2019/view/HoverCard/styled.js +6 -1
- package/dist/es2019/view/InlineCard/ErroredView/index.js +2 -1
- package/dist/es2019/view/InlineCard/ForbiddenView/index.js +3 -2
- package/dist/es2019/view/InlineCard/Frame/styled.js +15 -12
- package/dist/es2019/view/InlineCard/Icon.js +7 -6
- package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +3 -2
- package/dist/es2019/view/InlineCard/styled.js +5 -4
- package/dist/es2019/view/common/Byline.js +2 -1
- package/dist/es2019/view/common/Metadata.js +2 -1
- package/dist/es2019/view/common/ModalHeader.js +3 -2
- package/dist/esm/extractors/common/context/extractProvider.js +13 -4
- package/dist/esm/extractors/common/detail/extractCommentCount.js +2 -1
- package/dist/esm/extractors/common/detail/extractProgrammingLanguage.js +2 -1
- package/dist/esm/extractors/common/detail/extractSubscriberCount.js +2 -1
- package/dist/esm/extractors/common/primitives/extractTitleTextColor.js +2 -1
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +10 -1
- package/dist/esm/state/flexible-ui-context/index.js +5 -0
- package/dist/esm/utils/analytics/analytics.js +41 -0
- package/dist/esm/utils/analytics/index.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/BlockCard/components/Frame.js +9 -7
- package/dist/esm/view/BlockCard/components/Link.js +2 -1
- package/dist/esm/view/BlockCard/components/Provider.js +2 -1
- package/dist/esm/view/BlockCard/views/ErroredView.js +2 -1
- package/dist/esm/view/BlockCard/views/ForbiddenView.js +2 -1
- package/dist/esm/view/BlockCard/views/NotFoundView.js +2 -1
- package/dist/esm/view/BlockCard/views/ResolvingView.js +3 -2
- package/dist/esm/view/CardWithUrl/component.js +4 -2
- package/dist/esm/view/CardWithUrl/loader.js +4 -2
- package/dist/esm/view/EmbedCard/components/styled.js +14 -13
- package/dist/esm/view/EmbedCard/views/ErroredView.js +2 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +25 -4
- package/dist/esm/view/FlexibleCard/components/actions/index.js +18 -2
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +6 -0
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +9 -2
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +8 -2
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/index.js +6 -0
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +9 -2
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +5 -0
- package/dist/esm/view/FlexibleCard/components/blocks/snippet-block/index.js +5 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +33 -16
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +79 -17
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +39 -8
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +22 -11
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +8 -3
- package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +2 -1
- package/dist/esm/view/FlexibleCard/components/container/index.js +5 -0
- package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +12 -1
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +18 -3
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +9 -1
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +9 -1
- package/dist/esm/view/FlexibleCard/components/elements/index.js +96 -0
- package/dist/esm/view/FlexibleCard/components/elements/link/index.js +10 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +11 -3
- package/dist/esm/view/FlexibleCard/components/elements/media/index.js +9 -2
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +12 -6
- package/dist/esm/view/FlexibleCard/components/elements/utils.js +5 -3
- package/dist/esm/view/FlexibleCard/index.js +6 -0
- package/dist/esm/view/HoverCard/index.js +42 -10
- package/dist/esm/view/HoverCard/styled.js +2 -1
- package/dist/esm/view/InlineCard/ErroredView/index.js +2 -1
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +3 -2
- package/dist/esm/view/InlineCard/Frame/styled.js +16 -13
- package/dist/esm/view/InlineCard/Icon.js +2 -1
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +3 -2
- package/dist/esm/view/InlineCard/styled.js +5 -4
- package/dist/esm/view/common/Byline.js +2 -1
- package/dist/esm/view/common/Metadata.js +2 -1
- package/dist/esm/view/common/ModalHeader.js +3 -2
- package/dist/types/client/errors.d.ts +3 -2
- package/dist/types/extractors/block/index.d.ts +2 -2
- package/dist/types/extractors/common/__mocks__/jsonld.d.ts +46 -66
- package/dist/types/extractors/common/actions/extractPreviewAction.d.ts +1 -1
- package/dist/types/extractors/common/title-prefix/extractTitlePrefix.d.ts +2 -1
- package/dist/types/extractors/embed/index.d.ts +1 -1
- package/dist/types/extractors/flexible/icon/extract-url-icon.d.ts +1 -1
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +4 -0
- package/dist/types/state/flexible-ui-context/index.d.ts +4 -0
- package/dist/types/state/flexible-ui-context/types.d.ts +102 -0
- package/dist/types/state/hooks/useSmartLink.d.ts +3 -0
- package/dist/types/utils/analytics/analytics.d.ts +5 -1
- package/dist/types/utils/analytics/index.d.ts +1 -1
- package/dist/types/utils/types.d.ts +2 -2
- package/dist/types/view/BlockCard/utils/handlers.d.ts +1 -1
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +1 -0
- package/dist/types/view/CardWithUrl/component.d.ts +1 -1
- package/dist/types/view/CardWithUrl/types.d.ts +1 -0
- package/dist/types/view/EmbedCard/components/styled.d.ts +9 -9
- package/dist/types/view/FlexibleCard/components/actions/action/index.d.ts +8 -0
- package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +4 -2
- package/dist/types/view/FlexibleCard/components/actions/index.d.ts +15 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-group/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-group/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/block/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/element-group/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/element-group/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/blocks/footer-block/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/metadata-block/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/blocks/snippet-block/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/errored/index.d.ts +9 -2
- package/dist/types/view/FlexibleCard/components/blocks/title-block/index.d.ts +11 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +7 -3
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolving/index.d.ts +8 -2
- package/dist/types/view/FlexibleCard/components/blocks/title-block/types.d.ts +10 -1
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +7 -5
- package/dist/types/view/FlexibleCard/components/blocks/utils.d.ts +2 -1
- package/dist/types/view/FlexibleCard/components/container/index.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/container/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/avatar-group/index.d.ts +7 -0
- package/dist/types/view/FlexibleCard/components/elements/badge/index.d.ts +13 -0
- package/dist/types/view/FlexibleCard/components/elements/date-time/index.d.ts +7 -0
- package/dist/types/view/FlexibleCard/components/elements/icon/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/icon/types.d.ts +5 -1
- package/dist/types/view/FlexibleCard/components/elements/index.d.ts +77 -0
- package/dist/types/view/FlexibleCard/components/elements/link/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/lozenge/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/media/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/text/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/text/types.d.ts +1 -2
- package/dist/types/view/FlexibleCard/components/elements/types.d.ts +2 -0
- package/dist/types/view/FlexibleCard/index.d.ts +6 -0
- package/dist/types/view/HoverCard/index.d.ts +3 -2
- package/dist/types/view/HoverCard/types.d.ts +5 -2
- package/dist/types/view/InlineCard/Icon.d.ts +3 -3
- package/dist/types/view/InlineCard/IconAndTitleLayout/styled.d.ts +9 -9
- package/dist/types/view/InlineCard/ResolvingView/styled.d.ts +3 -3
- package/dist/types/view/InlineCard/styled.d.ts +4 -4
- package/package.json +9 -4
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/utils.js +0 -105
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/utils.js +0 -71
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/utils.js +0 -76
- package/dist/types/view/FlexibleCard/components/blocks/title-block/utils.d.ts +0 -11
|
@@ -12,6 +12,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
12
12
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import { R300 } from '@atlaskit/theme/colors';
|
|
15
|
+
import { token } from '@atlaskit/tokens';
|
|
15
16
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
16
17
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
17
18
|
import { Frame } from '../Frame';
|
|
@@ -85,7 +86,7 @@ export var InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
|
|
|
85
86
|
icon: icon || /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(ErrorIcon, {
|
|
86
87
|
label: "error",
|
|
87
88
|
size: "small",
|
|
88
|
-
primaryColor: R300
|
|
89
|
+
primaryColor: token('color.icon.danger', R300)
|
|
89
90
|
})),
|
|
90
91
|
title: this.renderMessage()
|
|
91
92
|
}));
|
|
@@ -13,6 +13,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
13
13
|
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import { R400, N500 } from '@atlaskit/theme/colors';
|
|
16
|
+
import { token } from '@atlaskit/tokens';
|
|
16
17
|
import LockIcon from '@atlaskit/icon/glyph/lock-filled';
|
|
17
18
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
18
19
|
import { Frame } from '../Frame';
|
|
@@ -24,7 +25,7 @@ import { IconStyledButton, LowercaseAppearance, LinkAppearance } from '../styled
|
|
|
24
25
|
var FallbackForbiddenIcon = /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LockIcon, {
|
|
25
26
|
label: "error",
|
|
26
27
|
size: "small",
|
|
27
|
-
primaryColor: R400
|
|
28
|
+
primaryColor: token('color.icon.danger', R400)
|
|
28
29
|
}));
|
|
29
30
|
export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
|
|
30
31
|
_inherits(InlineCardForbiddenView, _React$Component);
|
|
@@ -113,7 +114,7 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
|
|
|
113
114
|
}, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
|
|
114
115
|
icon: icon ? icon : FallbackForbiddenIcon,
|
|
115
116
|
title: this.renderMessage(),
|
|
116
|
-
titleColor: N500
|
|
117
|
+
titleColor: token('color.text.subtle', N500)
|
|
117
118
|
}));
|
|
118
119
|
}
|
|
119
120
|
}]);
|
|
@@ -3,24 +3,24 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
5
|
import styled from '@emotion/styled';
|
|
6
|
-
import { B100, B400, B50, N20 } from '@atlaskit/theme/colors';
|
|
6
|
+
import { B100, B400, B50, DN40A, DN50A, N20, N40A, N50A } from '@atlaskit/theme/colors';
|
|
7
7
|
import { borderRadius as akBorderRadius } from '@atlaskit/theme/constants';
|
|
8
|
-
import { e100 } from '@atlaskit/theme/elevation';
|
|
9
8
|
import { themed } from '@atlaskit/theme/components';
|
|
9
|
+
import { token } from '@atlaskit/tokens';
|
|
10
10
|
import { TitleWrapperClassName } from '../IconAndTitleLayout/styled';
|
|
11
11
|
var BACKGROUND_COLOR_DARK = '#262B31';
|
|
12
|
-
var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 2px ".concat(B100, ";\n outline: none;\n user-select: none;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n");
|
|
12
|
+
var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 2px ".concat(token('color.border.selected', B100), ";\n outline: none;\n user-select: none;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n");
|
|
13
13
|
|
|
14
14
|
var isInteractive = function isInteractive(_ref) {
|
|
15
15
|
var isInteractive = _ref.isInteractive;
|
|
16
16
|
|
|
17
17
|
if (isInteractive) {
|
|
18
18
|
return "\n cursor: pointer;\n :hover {\n background-color: ".concat(themed({
|
|
19
|
-
light: N20,
|
|
20
|
-
dark: BACKGROUND_COLOR_DARK
|
|
19
|
+
light: token('color.background.neutral.subtle.hovered', N20),
|
|
20
|
+
dark: token('color.background.neutral.subtle.hovered', BACKGROUND_COLOR_DARK)
|
|
21
21
|
}), ";\n text-decoration: none;\n }\n :active {\n background-color: ").concat(themed({
|
|
22
|
-
light: B50,
|
|
23
|
-
dark: BACKGROUND_COLOR_DARK
|
|
22
|
+
light: token('color.background.selected', B50),
|
|
23
|
+
dark: token('color.background.selected', BACKGROUND_COLOR_DARK)
|
|
24
24
|
}), ";\n text-decoration: none;\n }\n :focus {\n ").concat(selected, "\n text-decoration: none;\n }\n ");
|
|
25
25
|
} else {
|
|
26
26
|
return '';
|
|
@@ -55,18 +55,21 @@ var withoutHover = function withoutHover(_ref3) {
|
|
|
55
55
|
// NB: `box-decoration-break` required for retaining properties (border-radius) on wrap.
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
export var Wrapper = styled.a(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n line-height: 16px;\n padding: 1px 0.24em 2px 0.24em;\n ", "\n display: inline;\n box-decoration-break: clone;\n border-radius: ", "px;\n color: ", ";\n background-color: ", ";\n ", "
|
|
58
|
+
export var Wrapper = styled.a(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n line-height: 16px;\n padding: 1px 0.24em 2px 0.24em;\n ", "\n display: inline;\n box-decoration-break: clone;\n border-radius: ", "px;\n color: ", ";\n background-color: ", ";\n ", "\n ", "\n ", ";\n ", "\n transition: 0.1s all ease-in-out;\n -moz-user-select: none;\n\n &:hover span.", " {\n text-decoration: ", ";\n }\n"])), function (props) {
|
|
59
59
|
return props.withoutBackground ? "padding-left: 0; margin-left:-2px;" : '';
|
|
60
60
|
}, akBorderRadius(), themed({
|
|
61
|
-
light: B400,
|
|
62
|
-
dark: '#4794FF'
|
|
61
|
+
light: token('color.link', B400),
|
|
62
|
+
dark: token('color.link', '#4794FF')
|
|
63
63
|
}), function (props) {
|
|
64
64
|
return props.withoutBackground ? '' : themed({
|
|
65
|
-
light: 'white',
|
|
66
|
-
dark: BACKGROUND_COLOR_DARK
|
|
65
|
+
light: token('elevation.surface.raised', 'white'),
|
|
66
|
+
dark: token('elevation.surface.raised', 'BACKGROUND_COLOR_DARK')
|
|
67
67
|
});
|
|
68
68
|
}, function (props) {
|
|
69
|
-
return props.withoutBackground ? '' :
|
|
69
|
+
return props.withoutBackground ? '' : themed({
|
|
70
|
+
light: "box-shadow: ".concat(token('elevation.shadow.raised', "0 1px 1px ".concat(N50A, ", 0 0 1px 1px ").concat(N40A)), ";"),
|
|
71
|
+
dark: "box-shadow: ".concat(token('elevation.shadow.raised', "0 1px 1px ".concat(DN50A, ", 0 0 1px 1px ").concat(DN40A)), ";")
|
|
72
|
+
});
|
|
70
73
|
}, function (props) {
|
|
71
74
|
return isInteractive(props);
|
|
72
75
|
}, function (props) {
|
|
@@ -4,6 +4,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
|
4
4
|
|
|
5
5
|
import styled from '@emotion/styled';
|
|
6
6
|
import { keyframes } from '@emotion/core';
|
|
7
|
+
import { token } from '@atlaskit/tokens';
|
|
7
8
|
var placeholderShimmer = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n background-position: -20px 0;\n }\n\n 100% {\n background-position: 20px 0;\n }\n"]))); // TODO: Figure out a more scalable/responsive solution
|
|
8
9
|
// for vertical alignment.
|
|
9
10
|
// Current rationale: vertically positioned at the top of
|
|
@@ -15,4 +16,4 @@ export var Icon = styled.img(_templateObject2 || (_templateObject2 = _taggedTemp
|
|
|
15
16
|
// TODO: Replace this override with proper AtlasKit solution.
|
|
16
17
|
|
|
17
18
|
export var AKIconWrapper = styled.span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-right: -2px;\n"])));
|
|
18
|
-
export var Shimmer = styled.span(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: 14px;\n width: 14px;\n margin-right: 4px;\n border-radius: 2px;\n user-select: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n
|
|
19
|
+
export var Shimmer = styled.span(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: 14px;\n width: 14px;\n margin-right: 4px;\n border-radius: 2px;\n user-select: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background: ", ";\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4236\n background-image: linear-gradient(\n to right,\n ", " 0%,\n ", " 20%,\n ", " 40%,\n ", "100%\n );\n background-repeat: no-repeat;\n background-size: 40px 14px;\n display: inline-block;\n\n animation-duration: 1s;\n animation-fill-mode: forwards;\n animation-iteration-count: infinite;\n animation-name: ", ";\n animation-timing-function: linear;\n"])), token('color.skeleton.subtle', '#f6f7f8'), token('color.skeleton.subtle', '#f6f7f8'), token('color.skeleton', '#edeef1'), token('color.skeleton.subtle', '#f6f7f8'), token('color.skeleton.subtle', '#f6f7f8'), placeholderShimmer);
|
|
@@ -13,6 +13,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
13
13
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
14
14
|
import LockIcon from '@atlaskit/icon/glyph/lock-filled';
|
|
15
15
|
import { N500, R400 } from '@atlaskit/theme/colors';
|
|
16
|
+
import { token } from '@atlaskit/tokens';
|
|
16
17
|
import React from 'react';
|
|
17
18
|
import { FormattedMessage } from 'react-intl-next';
|
|
18
19
|
import { messages } from '@atlaskit/media-ui/messages';
|
|
@@ -23,7 +24,7 @@ import { IconStyledButton, LinkAppearance } from '../styled';
|
|
|
23
24
|
var FallbackUnauthorizedIcon = /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LockIcon, {
|
|
24
25
|
label: "error",
|
|
25
26
|
size: "small",
|
|
26
|
-
primaryColor: R400
|
|
27
|
+
primaryColor: token('color.icon.danger', R400)
|
|
27
28
|
}));
|
|
28
29
|
export var InlineCardUnauthorizedView = /*#__PURE__*/function (_React$Component) {
|
|
29
30
|
_inherits(InlineCardUnauthorizedView, _React$Component);
|
|
@@ -83,7 +84,7 @@ export var InlineCardUnauthorizedView = /*#__PURE__*/function (_React$Component)
|
|
|
83
84
|
}, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
|
|
84
85
|
icon: icon ? icon : FallbackUnauthorizedIcon,
|
|
85
86
|
title: this.renderMessage(),
|
|
86
|
-
titleColor: N500
|
|
87
|
+
titleColor: token('color.text.subtle', N500)
|
|
87
88
|
}));
|
|
88
89
|
}
|
|
89
90
|
}]);
|
|
@@ -5,16 +5,17 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
|
5
5
|
import styled from '@emotion/styled';
|
|
6
6
|
import { B400, N200 } from '@atlaskit/theme/colors';
|
|
7
7
|
import { themed } from '@atlaskit/theme/components';
|
|
8
|
+
import { token } from '@atlaskit/tokens';
|
|
8
9
|
var LINK_COLOR_DARK = '#4794FF'; // By default buttons will hide overflow and ellipsis content instead of wrapping.
|
|
9
10
|
// This basically turns the button back into inline content
|
|
10
11
|
|
|
11
12
|
export var IconStyledButton = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n text-align: initial !important;\n display: inline !important;\n\n &:hover {\n /* Remove the text-decoration to match other inline card hover states */\n text-decoration: none !important;\n }\n\n > span {\n display: inline;\n > span {\n overflow: initial;\n text-overflow: initial;\n white-space: initial;\n }\n }\n"])));
|
|
12
13
|
export var NoLinkAppearance = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n"])), themed({
|
|
13
|
-
light: N200,
|
|
14
|
-
dark: LINK_COLOR_DARK
|
|
14
|
+
light: token('color.text.subtlest', N200),
|
|
15
|
+
dark: token('color.text.subtlest', LINK_COLOR_DARK)
|
|
15
16
|
}));
|
|
16
17
|
export var LowercaseAppearance = styled.span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n text-transform: lowercase;\n"])));
|
|
17
18
|
export var LinkAppearance = styled.span(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n"])), themed({
|
|
18
|
-
light: B400,
|
|
19
|
-
dark: LINK_COLOR_DARK
|
|
19
|
+
light: token('color.link', B400),
|
|
20
|
+
dark: token('color.link', LINK_COLOR_DARK)
|
|
20
21
|
}));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/core';
|
|
3
3
|
import { N300 } from '@atlaskit/theme/colors';
|
|
4
|
+
import { token } from '@atlaskit/tokens';
|
|
4
5
|
import { gs, mq } from './utils';
|
|
5
6
|
export var Byline = function Byline(_ref) {
|
|
6
7
|
var text = _ref.text,
|
|
@@ -11,7 +12,7 @@ export var Byline = function Byline(_ref) {
|
|
|
11
12
|
css: mq({
|
|
12
13
|
fontSize: gs(1.5),
|
|
13
14
|
lineHeight: gs(2.5),
|
|
14
|
-
color: "".concat(N300),
|
|
15
|
+
color: "".concat(token('color.text.subtlest', N300)),
|
|
15
16
|
fontWeight: 'normal',
|
|
16
17
|
marginTop: gs(0.5),
|
|
17
18
|
// Spec: only allow two lines MAX to be shown.
|
|
@@ -3,6 +3,7 @@ import { jsx } from '@emotion/core';
|
|
|
3
3
|
import Tooltip from '@atlaskit/tooltip';
|
|
4
4
|
import { gs } from './utils';
|
|
5
5
|
import { N300 } from '@atlaskit/theme/colors';
|
|
6
|
+
import { token } from '@atlaskit/tokens';
|
|
6
7
|
export var Metadata = function Metadata(_ref) {
|
|
7
8
|
var text = _ref.text,
|
|
8
9
|
icon = _ref.icon,
|
|
@@ -29,7 +30,7 @@ export var Metadata = function Metadata(_ref) {
|
|
|
29
30
|
}, metadataIcon, jsx("span", {
|
|
30
31
|
css: {
|
|
31
32
|
fontSize: gs(1.5),
|
|
32
|
-
color: "".concat(N300),
|
|
33
|
+
color: "".concat(token('color.text.subtlest', N300)),
|
|
33
34
|
marginRight: gs(0.5),
|
|
34
35
|
marginLeft: '2px'
|
|
35
36
|
}
|
|
@@ -6,6 +6,7 @@ import EditorCloseIcon from '@atlaskit/icon/glyph/editor/close';
|
|
|
6
6
|
import ShortcutIcon from '@atlaskit/icon/glyph/shortcut';
|
|
7
7
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
8
8
|
import { N100, N30A } from '@atlaskit/theme/colors';
|
|
9
|
+
import { token } from '@atlaskit/tokens';
|
|
9
10
|
import { FormattedMessage } from 'react-intl-next';
|
|
10
11
|
import { gs } from './utils';
|
|
11
12
|
import { Icon } from './Icon';
|
|
@@ -42,7 +43,7 @@ export var Header = function Header(_ref) {
|
|
|
42
43
|
display: 'flex',
|
|
43
44
|
justifyContent: 'space-between',
|
|
44
45
|
alignItems: 'baseline',
|
|
45
|
-
borderBottom: "1px solid ".concat(N30A)
|
|
46
|
+
borderBottom: "1px solid ".concat(token('color.border', N30A))
|
|
46
47
|
}
|
|
47
48
|
}, jsx("div", {
|
|
48
49
|
css: {
|
|
@@ -59,7 +60,7 @@ export var Header = function Header(_ref) {
|
|
|
59
60
|
}
|
|
60
61
|
}, jsx("h3", null, title), jsx("div", {
|
|
61
62
|
css: {
|
|
62
|
-
color: N100
|
|
63
|
+
color: token('color.text.subtlest', N100)
|
|
63
64
|
}
|
|
64
65
|
}, metadata.items.length && jsx(MetadataList, {
|
|
65
66
|
items: metadata.items
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { ErrorType } from './types/responses';
|
|
1
2
|
export declare type APIErrorKind = 'fatal' | 'auth' | 'error' | 'fallback';
|
|
2
3
|
export declare class APIError extends Error {
|
|
3
4
|
readonly kind: APIErrorKind;
|
|
4
5
|
readonly hostname: string;
|
|
5
6
|
readonly message: string;
|
|
6
|
-
readonly type?:
|
|
7
|
-
constructor(kind: APIErrorKind, hostname: string, message: string, type?:
|
|
7
|
+
readonly type?: ErrorType | undefined;
|
|
8
|
+
constructor(kind: APIErrorKind, hostname: string, message: string, type?: ErrorType | undefined);
|
|
8
9
|
}
|
|
@@ -4,6 +4,6 @@ import { ExtractBlockOpts } from './types';
|
|
|
4
4
|
import { CardProviderRenderers } from '../../state/context/types';
|
|
5
5
|
import { BlockCardResolvedViewProps } from '../../view/BlockCard';
|
|
6
6
|
import { ActionProps } from '../../view/BlockCard/components/Action';
|
|
7
|
-
export declare const extractBlockActions: (props: BlockCardResolvedViewProps, jsonLd: JsonLd.Data.BaseData, opts?: ExtractBlockOpts | undefined, platform?:
|
|
7
|
+
export declare const extractBlockActions: (props: BlockCardResolvedViewProps, jsonLd: JsonLd.Data.BaseData, opts?: ExtractBlockOpts | undefined, platform?: JsonLd.Primitives.Platforms | undefined) => ActionProps[];
|
|
8
8
|
export declare const extractBlockUsers: (jsonLd: JsonLd.Data.BaseData) => LinkPerson[] | undefined;
|
|
9
|
-
export declare const extractBlockProps: (jsonLd: JsonLd.Data.BaseData, meta?: JsonLd.Meta.BaseMeta | undefined, opts?: ExtractBlockOpts | undefined, renderers?: CardProviderRenderers | undefined, platform?:
|
|
9
|
+
export declare const extractBlockProps: (jsonLd: JsonLd.Data.BaseData, meta?: JsonLd.Meta.BaseMeta | undefined, opts?: ExtractBlockOpts | undefined, renderers?: CardProviderRenderers | undefined, platform?: JsonLd.Primitives.Platforms | undefined) => BlockCardResolvedViewProps;
|
|
@@ -27,11 +27,11 @@ export declare const TEST_ASSIGN_ACTION: JsonLd.Data.BaseData['schema:potentialA
|
|
|
27
27
|
export declare const TEST_NO_ID_ACTION: JsonLd.Data.BaseData['schema:potentialAction'];
|
|
28
28
|
export declare const TEST_DOCUMENT_WITH_ACTIONS: {
|
|
29
29
|
'schema:potentialAction': any[];
|
|
30
|
-
'@type': "Collection" | "Document" | "schema:BlogPosting" | "schema:TextDigitalDocument" | "schema:DigitalDocument" | "schema:PresentationDigitalDocument" | "schema:SpreadsheetDigitalDocument" | "atlassian:UndefinedLink" | ("Object" | "Document")[] | (
|
|
30
|
+
'@type': "Collection" | "Document" | "schema:BlogPosting" | "schema:TextDigitalDocument" | "schema:DigitalDocument" | "schema:PresentationDigitalDocument" | "schema:SpreadsheetDigitalDocument" | "atlassian:UndefinedLink" | ("Object" | "Document")[] | (JsonLd.Data.DocumentChildType | JsonLd.Data.DocumentParentType)[] | ("Document" | "schema:DigitalDocument")[];
|
|
31
31
|
'schema:fileFormat'?: string | undefined;
|
|
32
32
|
'atlassian:fileSize'?: number | undefined;
|
|
33
33
|
'schema:dateCreated'?: string | undefined;
|
|
34
|
-
'atlassian:updatedBy'?:
|
|
34
|
+
'atlassian:updatedBy'?: JsonLd.Primitives.Link | JsonLd.Primitives.Person<any> | undefined;
|
|
35
35
|
'schema:commentCount'?: number | undefined;
|
|
36
36
|
'atlassian:isDeleted'?: boolean | undefined;
|
|
37
37
|
'atlassian:dateViewed'?: string | undefined;
|
|
@@ -44,38 +44,28 @@ export declare const TEST_DOCUMENT_WITH_ACTIONS: {
|
|
|
44
44
|
'atlassian:visitUrl'?: string | undefined;
|
|
45
45
|
'atlassian:titlePrefix'?: JsonLd.Data.TitlePrefix | undefined;
|
|
46
46
|
'@id'?: string | undefined;
|
|
47
|
-
attachment?:
|
|
48
|
-
attributedTo?: (
|
|
49
|
-
actor?:
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
context?: string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | undefined;
|
|
66
|
-
generator?: string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | undefined;
|
|
67
|
-
icon?: string | JsonLd.Primitives.LinkModel | JsonLd.Primitives.Image | undefined;
|
|
68
|
-
image?: string | JsonLd.Primitives.LinkModel | JsonLd.Primitives.Image | undefined;
|
|
69
|
-
inReplyTo?: string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | (string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel)[] | undefined;
|
|
70
|
-
location?: string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | (string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel)[] | undefined;
|
|
71
|
-
oneOf?: (string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel)[] | undefined;
|
|
72
|
-
anyOf?: (string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel)[] | undefined;
|
|
73
|
-
closed?: string | boolean | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | undefined;
|
|
74
|
-
preview?: string | (JsonLd.Primitives.Object<any> & JsonLd.Primitives.PreviewExtension) | (JsonLd.Primitives.LinkModel & JsonLd.Primitives.PreviewExtension) | undefined;
|
|
47
|
+
attachment?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
48
|
+
attributedTo?: JsonLd.Primitives.Property<(JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link) & {
|
|
49
|
+
actor?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
50
|
+
}> | undefined;
|
|
51
|
+
audience?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
52
|
+
bcc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
53
|
+
bto?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
54
|
+
cc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
55
|
+
context?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
56
|
+
generator?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
57
|
+
icon?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
|
|
58
|
+
image?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
|
|
59
|
+
inReplyTo?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
60
|
+
location?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
61
|
+
oneOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
|
|
62
|
+
anyOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
|
|
63
|
+
closed?: boolean | JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
64
|
+
preview?: string | ((JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel) & JsonLd.Primitives.PreviewExtension) | undefined;
|
|
75
65
|
replies?: JsonLd.Primitives.Collection<any> | undefined;
|
|
76
|
-
tag?:
|
|
77
|
-
to?:
|
|
78
|
-
url?:
|
|
66
|
+
tag?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
67
|
+
to?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
68
|
+
url?: JsonLd.Primitives.Property<JsonLd.Primitives.Link> | undefined;
|
|
79
69
|
content?: string | undefined;
|
|
80
70
|
contentMap?: Record<string, string> | undefined;
|
|
81
71
|
name?: string | undefined;
|
|
@@ -92,14 +82,14 @@ export declare const TEST_DOCUMENT_WITH_ACTIONS: {
|
|
|
92
82
|
export declare const PREVIEW: JsonLd.Data.BaseData['preview'];
|
|
93
83
|
export declare const TEST_DOCUMENT_WITH_PREVIEW: {
|
|
94
84
|
preview: JsonLd.Primitives.LinkModel & JsonLd.Primitives.PreviewExtension;
|
|
95
|
-
'@type': "Collection" | "Document" | "schema:BlogPosting" | "schema:TextDigitalDocument" | "schema:DigitalDocument" | "schema:PresentationDigitalDocument" | "schema:SpreadsheetDigitalDocument" | "atlassian:UndefinedLink" | ("Object" | "Document")[] | (
|
|
85
|
+
'@type': "Collection" | "Document" | "schema:BlogPosting" | "schema:TextDigitalDocument" | "schema:DigitalDocument" | "schema:PresentationDigitalDocument" | "schema:SpreadsheetDigitalDocument" | "atlassian:UndefinedLink" | ("Object" | "Document")[] | (JsonLd.Data.DocumentChildType | JsonLd.Data.DocumentParentType)[] | ("Document" | "schema:DigitalDocument")[];
|
|
96
86
|
'schema:fileFormat'?: string | undefined;
|
|
97
87
|
'atlassian:fileSize'?: number | undefined;
|
|
98
88
|
'schema:dateCreated'?: string | undefined;
|
|
99
|
-
'atlassian:updatedBy'?:
|
|
89
|
+
'atlassian:updatedBy'?: JsonLd.Primitives.Link | JsonLd.Primitives.Person<any> | undefined;
|
|
100
90
|
'schema:commentCount'?: number | undefined;
|
|
101
91
|
'atlassian:isDeleted'?: boolean | undefined;
|
|
102
|
-
'schema:potentialAction'?:
|
|
92
|
+
'schema:potentialAction'?: JsonLd.Primitives.Property<JsonLd.Data.DocumentAction> | undefined;
|
|
103
93
|
'atlassian:dateViewed'?: string | undefined;
|
|
104
94
|
'atlassian:reactCount'?: number | undefined;
|
|
105
95
|
'atlassian:state'?: string | undefined;
|
|
@@ -110,37 +100,27 @@ export declare const TEST_DOCUMENT_WITH_PREVIEW: {
|
|
|
110
100
|
'atlassian:visitUrl'?: string | undefined;
|
|
111
101
|
'atlassian:titlePrefix'?: JsonLd.Data.TitlePrefix | undefined;
|
|
112
102
|
'@id'?: string | undefined;
|
|
113
|
-
attachment?:
|
|
114
|
-
attributedTo?: (
|
|
115
|
-
actor?:
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
cc?: string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | (string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel)[] | undefined;
|
|
131
|
-
context?: string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | undefined;
|
|
132
|
-
generator?: string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | undefined;
|
|
133
|
-
icon?: string | JsonLd.Primitives.LinkModel | JsonLd.Primitives.Image | undefined;
|
|
134
|
-
image?: string | JsonLd.Primitives.LinkModel | JsonLd.Primitives.Image | undefined;
|
|
135
|
-
inReplyTo?: string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | (string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel)[] | undefined;
|
|
136
|
-
location?: string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | (string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel)[] | undefined;
|
|
137
|
-
oneOf?: (string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel)[] | undefined;
|
|
138
|
-
anyOf?: (string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel)[] | undefined;
|
|
139
|
-
closed?: string | boolean | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | undefined;
|
|
103
|
+
attachment?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
104
|
+
attributedTo?: JsonLd.Primitives.Property<(JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link) & {
|
|
105
|
+
actor?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
106
|
+
}> | undefined;
|
|
107
|
+
audience?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
108
|
+
bcc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
109
|
+
bto?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
110
|
+
cc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
111
|
+
context?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
112
|
+
generator?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
113
|
+
icon?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
|
|
114
|
+
image?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
|
|
115
|
+
inReplyTo?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
116
|
+
location?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
117
|
+
oneOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
|
|
118
|
+
anyOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
|
|
119
|
+
closed?: boolean | JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
140
120
|
replies?: JsonLd.Primitives.Collection<any> | undefined;
|
|
141
|
-
tag?:
|
|
142
|
-
to?:
|
|
143
|
-
url?:
|
|
121
|
+
tag?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
122
|
+
to?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
123
|
+
url?: JsonLd.Primitives.Property<JsonLd.Primitives.Link> | undefined;
|
|
144
124
|
content?: string | undefined;
|
|
145
125
|
contentMap?: Record<string, string> | undefined;
|
|
146
126
|
name?: string | undefined;
|
|
@@ -2,4 +2,4 @@ import { JsonLd } from 'json-ld-types';
|
|
|
2
2
|
import { InvokeHandler } from '../../../model/invoke-handler';
|
|
3
3
|
import { AnalyticsHandler } from '../../../utils/types';
|
|
4
4
|
import { BlockCardResolvedViewProps } from '../../../view/BlockCard';
|
|
5
|
-
export declare const extractPreviewAction: (extensionKey: string | undefined, viewProps: BlockCardResolvedViewProps, jsonLd: JsonLd.Data.BaseData, handleInvoke: InvokeHandler, handleAnalytics: AnalyticsHandler, testId?: string | undefined, platform?:
|
|
5
|
+
export declare const extractPreviewAction: (extensionKey: string | undefined, viewProps: BlockCardResolvedViewProps, jsonLd: JsonLd.Data.BaseData, handleInvoke: InvokeHandler, handleAnalytics: AnalyticsHandler, testId?: string | undefined, platform?: JsonLd.Primitives.Platforms | undefined) => import("../../../view/BlockCard/components/Action").ActionProps | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { JsonLd } from 'json-ld-types';
|
|
3
3
|
import { CardProviderRenderers } from '../../../state/context/types';
|
|
4
|
-
|
|
4
|
+
import { CardAppearance } from '../../../view/Card';
|
|
5
|
+
export declare const extractTitlePrefix: (jsonLd: JsonLd.Data.BaseData, renderers?: CardProviderRenderers | undefined, type?: CardAppearance | undefined) => string | React.ReactNode | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JsonLd } from 'json-ld-types';
|
|
2
2
|
import { EmbedCardResolvedViewProps } from '../../view/EmbedCard/views/ResolvedView';
|
|
3
|
-
export declare const extractEmbedProps: (jsonLd: JsonLd.Data.BaseData, meta?: JsonLd.Meta.BaseMeta | undefined, platform?:
|
|
3
|
+
export declare const extractEmbedProps: (jsonLd: JsonLd.Data.BaseData, meta?: JsonLd.Meta.BaseMeta | undefined, platform?: JsonLd.Primitives.Platforms | undefined) => EmbedCardResolvedViewProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { JsonLd } from 'json-ld-types';
|
|
2
2
|
import { IconDescriptor } from './types';
|
|
3
|
-
declare const extractUrlIcon: (icon?:
|
|
3
|
+
declare const extractUrlIcon: (icon?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined, label?: string | undefined) => IconDescriptor | undefined;
|
|
4
4
|
export default extractUrlIcon;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AnalyticsHandler } from '../../utils/types';
|
|
2
2
|
import { CardInnerAppearance } from '../../view/Card/types';
|
|
3
|
+
import { PreviewDisplay, PreviewInvokeMethod } from '../../view/HoverCard/types';
|
|
3
4
|
import { CardType } from '../store/types';
|
|
4
5
|
import { APIError } from '../../client/errors';
|
|
5
6
|
import { InvokeType } from '../../model/invoke-opts';
|
|
@@ -9,8 +10,11 @@ export declare const useSmartLinkAnalytics: (dispatchAnalytics: AnalyticsHandler
|
|
|
9
10
|
authAlternateAccountEvent: (display: CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
10
11
|
cardClickedEvent: (display: CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined, isModifierKeyPressed?: boolean | undefined) => void;
|
|
11
12
|
actionClickedEvent: (id: string, extensionKey: string, actionType: string, display: CardInnerAppearance, invokeType: InvokeType) => void;
|
|
13
|
+
hoverCardOpenLinkClickedEvent: (previewDisplay: PreviewDisplay, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: PreviewInvokeMethod | undefined) => void;
|
|
12
14
|
closedAuthEvent: (display: CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
13
15
|
renderSuccessEvent: (display: CardInnerAppearance, id: string, definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
16
|
+
hoverCardViewedEvent: (hoverDisplay: PreviewDisplay, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: PreviewInvokeMethod | undefined) => void;
|
|
17
|
+
hoverCardDismissedEvent: (hoverDisplay: PreviewDisplay, hoverTime: number, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: PreviewInvokeMethod | undefined) => void;
|
|
14
18
|
};
|
|
15
19
|
operational: {
|
|
16
20
|
resolvedEvent: (id: string, definitionId?: string | undefined, extensionKey?: string | undefined, resourceType?: string | undefined) => void;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FlexibleUiDataContext } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
5
|
+
* underlying elements.
|
|
6
|
+
*/
|
|
3
7
|
export declare const FlexibleUiContext: import("react").Context<FlexibleUiDataContext | undefined>;
|
|
4
8
|
export declare const useFlexibleUiContext: () => FlexibleUiDataContext | undefined;
|
|
@@ -1,26 +1,128 @@
|
|
|
1
1
|
import { LinkLozenge } from '../../extractors/common/lozenge/types';
|
|
2
2
|
import { LinkPerson } from '../../extractors/common/person/types';
|
|
3
3
|
import { IconType, MediaType } from '../../constants';
|
|
4
|
+
/**
|
|
5
|
+
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
6
|
+
* underlying elements.
|
|
7
|
+
*/
|
|
4
8
|
export declare type FlexibleUiDataContext = {
|
|
9
|
+
/**
|
|
10
|
+
* An array containing data used to populate the AuthorGroup element.
|
|
11
|
+
* @see AvatarGroup
|
|
12
|
+
*/
|
|
5
13
|
authorGroup?: LinkPerson[];
|
|
14
|
+
/**
|
|
15
|
+
* An array containing a @type {LinkPerson} used to populate the CollaboratorGroup element.
|
|
16
|
+
* @see CollaboratorGroup
|
|
17
|
+
*/
|
|
6
18
|
collaboratorGroup?: LinkPerson[];
|
|
19
|
+
/**
|
|
20
|
+
* Contains the number of comments of the linked resource.
|
|
21
|
+
* @type number
|
|
22
|
+
* @see CommentCount
|
|
23
|
+
*/
|
|
7
24
|
commentCount?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Contains the number of views of the linked resource.
|
|
27
|
+
* @type number
|
|
28
|
+
* @see ViewCount
|
|
29
|
+
*/
|
|
8
30
|
viewCount?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Contains the number of react of the linked resource.
|
|
33
|
+
* @type number
|
|
34
|
+
* @see ReactCount
|
|
35
|
+
*/
|
|
9
36
|
reactCount?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Contains the number of votes of the linked resource.
|
|
39
|
+
* @type number
|
|
40
|
+
* @see VoteCount
|
|
41
|
+
*/
|
|
10
42
|
voteCount?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Contains the name of the entity that created the resource.
|
|
45
|
+
* @type string
|
|
46
|
+
* @see CreatedBy
|
|
47
|
+
*/
|
|
11
48
|
createdBy?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Contains the ISO timestamp of when the resource was created.
|
|
51
|
+
* @type string - ISO Timestamp
|
|
52
|
+
* @see CreatedOn
|
|
53
|
+
*/
|
|
12
54
|
createdOn?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Contains the favicon of the resource.
|
|
57
|
+
* @type Icon
|
|
58
|
+
* @see LinkIcon
|
|
59
|
+
*/
|
|
13
60
|
linkIcon?: Icon;
|
|
61
|
+
/**
|
|
62
|
+
* Contains the name of the entity that last modified the resource.
|
|
63
|
+
* @type string
|
|
64
|
+
* @see ModifiedBy
|
|
65
|
+
*/
|
|
14
66
|
modifiedBy?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Contains the ISO timestamp of when the resource was last modified.
|
|
69
|
+
* @type string - ISO Timestamp
|
|
70
|
+
* @see ModifiedOn
|
|
71
|
+
*/
|
|
15
72
|
modifiedOn?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Contains the preview (typically the thumbnail) of the resource.
|
|
75
|
+
* @type Media
|
|
76
|
+
* @see Preview
|
|
77
|
+
*/
|
|
16
78
|
preview?: Media;
|
|
79
|
+
/**
|
|
80
|
+
* Contains the priority icon of the resource.
|
|
81
|
+
* @type Icon
|
|
82
|
+
* @see Priority
|
|
83
|
+
*/
|
|
17
84
|
priority?: Icon;
|
|
85
|
+
/**
|
|
86
|
+
* Contains the programming language of the resource.
|
|
87
|
+
* @type string
|
|
88
|
+
* @see ProgrammingLanguage
|
|
89
|
+
*/
|
|
18
90
|
programmingLanguage?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Contains the snippet of the resource.
|
|
93
|
+
* @type string
|
|
94
|
+
* @see Snippet
|
|
95
|
+
*/
|
|
19
96
|
snippet?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Contains the number of subscribers of the linked resource.
|
|
99
|
+
* @type number
|
|
100
|
+
* @see SubscriberCount
|
|
101
|
+
*/
|
|
20
102
|
subscriberCount?: number;
|
|
103
|
+
/**
|
|
104
|
+
* Contains the number of subscribers of the linked resource.
|
|
105
|
+
* @type number
|
|
106
|
+
* @see SubscriberCount
|
|
107
|
+
*/
|
|
21
108
|
state?: LinkLozenge;
|
|
109
|
+
/**
|
|
110
|
+
* Contains the Title of the linked resource.
|
|
111
|
+
* @type string
|
|
112
|
+
* @see Title
|
|
113
|
+
*/
|
|
22
114
|
title?: string;
|
|
115
|
+
/**
|
|
116
|
+
* Contains the url of the linked resource.
|
|
117
|
+
* @type string
|
|
118
|
+
* @see Title
|
|
119
|
+
*/
|
|
23
120
|
url?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Contains the provider icon of the linked resource.
|
|
123
|
+
* @type Icon
|
|
124
|
+
* @see Provider
|
|
125
|
+
*/
|
|
24
126
|
provider?: Icon;
|
|
25
127
|
};
|
|
26
128
|
export declare type Icon = {
|