@atlaskit/smart-card 26.9.2 → 26.9.3
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 +7 -0
- package/dist/cjs/extractors/block/index.js +10 -10
- package/dist/cjs/extractors/common/actions/extractPreviewAction.js +3 -3
- package/dist/cjs/extractors/common/byline/extractByline.js +5 -5
- package/dist/cjs/extractors/common/icon/extractIcon.js +4 -4
- package/dist/cjs/extractors/common/lozenge/extractLozenge.js +2 -2
- package/dist/cjs/extractors/common/lozenge/extractTaskType.js +2 -2
- package/dist/cjs/extractors/embed/index.js +5 -5
- package/dist/cjs/extractors/flexible/actions/extract-preview-action.js +5 -6
- package/dist/cjs/extractors/flexible/actions/extract-view-action.js +2 -2
- package/dist/cjs/extractors/flexible/collaboratorGroup/index.js +3 -3
- package/dist/cjs/extractors/flexible/extract-preview.js +2 -2
- package/dist/cjs/extractors/flexible/extract-priority.js +2 -2
- package/dist/cjs/extractors/flexible/extract-state.js +2 -2
- package/dist/cjs/extractors/flexible/icon/extract-jsonld-data-icon.js +2 -2
- package/dist/cjs/extractors/flexible/icon/extract-provider-icon.js +2 -2
- package/dist/cjs/extractors/flexible/icon/extract-url-icon.js +2 -2
- package/dist/cjs/extractors/flexible/index.js +6 -6
- package/dist/cjs/extractors/flexible/utils.js +4 -4
- package/dist/cjs/extractors/inline/index.js +4 -4
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleForbiddenView.js +2 -2
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +2 -2
- package/dist/cjs/view/FlexibleCard/utils.js +2 -2
- package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +2 -2
- package/dist/cjs/view/HoverCard/utils.js +2 -2
- package/dist/cjs/view/InlineCard/index.js +4 -4
- package/dist/es2019/extractors/block/index.js +1 -1
- package/dist/es2019/extractors/common/actions/extractPreviewAction.js +1 -1
- package/dist/es2019/extractors/common/byline/extractByline.js +1 -1
- package/dist/es2019/extractors/common/icon/extractIcon.js +1 -1
- package/dist/es2019/extractors/common/lozenge/extractLozenge.js +1 -1
- package/dist/es2019/extractors/common/lozenge/extractTaskType.js +1 -1
- package/dist/es2019/extractors/embed/index.js +1 -1
- package/dist/es2019/extractors/flexible/actions/extract-preview-action.js +1 -2
- package/dist/es2019/extractors/flexible/actions/extract-view-action.js +1 -1
- package/dist/es2019/extractors/flexible/collaboratorGroup/index.js +1 -1
- package/dist/es2019/extractors/flexible/extract-preview.js +1 -1
- package/dist/es2019/extractors/flexible/extract-priority.js +1 -1
- package/dist/es2019/extractors/flexible/extract-state.js +1 -1
- package/dist/es2019/extractors/flexible/icon/extract-jsonld-data-icon.js +1 -1
- package/dist/es2019/extractors/flexible/icon/extract-provider-icon.js +1 -1
- package/dist/es2019/extractors/flexible/icon/extract-url-icon.js +1 -1
- package/dist/es2019/extractors/flexible/index.js +1 -1
- package/dist/es2019/extractors/flexible/utils.js +1 -1
- package/dist/es2019/extractors/inline/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleForbiddenView.js +1 -1
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +1 -1
- package/dist/es2019/view/FlexibleCard/utils.js +1 -1
- package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +1 -1
- package/dist/es2019/view/HoverCard/utils.js +1 -1
- package/dist/es2019/view/InlineCard/index.js +1 -1
- package/dist/esm/extractors/block/index.js +1 -1
- package/dist/esm/extractors/common/actions/extractPreviewAction.js +1 -1
- package/dist/esm/extractors/common/byline/extractByline.js +1 -1
- package/dist/esm/extractors/common/icon/extractIcon.js +1 -1
- package/dist/esm/extractors/common/lozenge/extractLozenge.js +1 -1
- package/dist/esm/extractors/common/lozenge/extractTaskType.js +1 -1
- package/dist/esm/extractors/embed/index.js +1 -1
- package/dist/esm/extractors/flexible/actions/extract-preview-action.js +1 -2
- package/dist/esm/extractors/flexible/actions/extract-view-action.js +1 -1
- package/dist/esm/extractors/flexible/collaboratorGroup/index.js +1 -1
- package/dist/esm/extractors/flexible/extract-preview.js +1 -1
- package/dist/esm/extractors/flexible/extract-priority.js +1 -1
- package/dist/esm/extractors/flexible/extract-state.js +1 -1
- package/dist/esm/extractors/flexible/icon/extract-jsonld-data-icon.js +1 -1
- package/dist/esm/extractors/flexible/icon/extract-provider-icon.js +1 -1
- package/dist/esm/extractors/flexible/icon/extract-url-icon.js +1 -1
- package/dist/esm/extractors/flexible/index.js +1 -1
- package/dist/esm/extractors/flexible/utils.js +1 -1
- package/dist/esm/extractors/inline/index.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/BlockCard/views/flexible/FlexibleForbiddenView.js +1 -1
- package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +1 -1
- package/dist/esm/view/FlexibleCard/utils.js +1 -1
- package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +1 -1
- package/dist/esm/view/HoverCard/utils.js +1 -1
- package/dist/esm/view/InlineCard/index.js +1 -1
- package/dist/types/extractors/block/index.d.ts +1 -1
- package/dist/types/extractors/common/icon/extractIcon.d.ts +1 -1
- package/dist/types/extractors/flexible/collaboratorGroup/index.d.ts +1 -1
- package/dist/types/state/flexible-ui-context/types.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +2 -1
- package/dist/types-ts4.5/extractors/block/index.d.ts +1 -1
- package/dist/types-ts4.5/extractors/common/icon/extractIcon.d.ts +1 -1
- package/dist/types-ts4.5/extractors/flexible/collaboratorGroup/index.d.ts +1 -1
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +1 -1
- package/dist/types-ts4.5/view/Card/types.d.ts +2 -1
- package/package.json +2 -1
- package/report.api.md +1 -1
- package/tmp/api-report-tmp.d.ts +937 -0
|
@@ -46,7 +46,7 @@ var _ForbiddenView = require("./ForbiddenView");
|
|
|
46
46
|
var _ResolvedView = require("./ResolvedView");
|
|
47
47
|
var _ResolvingView = require("./ResolvingView");
|
|
48
48
|
var _UnauthorisedView = require("./UnauthorisedView");
|
|
49
|
-
var
|
|
49
|
+
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
50
50
|
var _linkProvider = require("@atlaskit/link-provider");
|
|
51
51
|
var _helpers = require("../../state/helpers");
|
|
52
52
|
var InlineCard = function InlineCard(_ref) {
|
|
@@ -109,7 +109,7 @@ var InlineCard = function InlineCard(_ref) {
|
|
|
109
109
|
status: status
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
var provider = (0,
|
|
112
|
+
var provider = (0, _linkExtractors.extractProvider)(cardDetails);
|
|
113
113
|
return /*#__PURE__*/_react.default.createElement(_UnauthorisedView.InlineCardUnauthorizedView, {
|
|
114
114
|
icon: provider && provider.icon,
|
|
115
115
|
context: provider && provider.text,
|
|
@@ -130,7 +130,7 @@ var InlineCard = function InlineCard(_ref) {
|
|
|
130
130
|
status: status
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
|
-
var providerForbidden = (0,
|
|
133
|
+
var providerForbidden = (0, _linkExtractors.extractProvider)(cardDetails);
|
|
134
134
|
var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : (0, _jsonld.getForbiddenJsonLd)().meta;
|
|
135
135
|
var requestAccessContext = (0, _context.extractRequestAccessContext)({
|
|
136
136
|
jsonLd: cardMetadata,
|
|
@@ -154,7 +154,7 @@ var InlineCard = function InlineCard(_ref) {
|
|
|
154
154
|
status: status
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
var providerNotFound = (0,
|
|
157
|
+
var providerNotFound = (0, _linkExtractors.extractProvider)(cardDetails);
|
|
158
158
|
return /*#__PURE__*/_react.default.createElement(_ErroredView.InlineCardErroredView, {
|
|
159
159
|
url: url,
|
|
160
160
|
icon: providerNotFound && providerNotFound.icon,
|
|
@@ -2,7 +2,7 @@ import { extractTitleTextColor, extractSummary } from '../common/primitives';
|
|
|
2
2
|
import { extractLozenge } from '../common/lozenge';
|
|
3
3
|
import { extractIcon } from '../common/icon';
|
|
4
4
|
import { extractCommentCount, extractProgrammingLanguage, extractSubscriberCount, extractAttachmentCount } from '../common/detail';
|
|
5
|
-
import { extractLink, extractTitle, extractProvider, extractMembers, extractPersonAssignedTo, extractPersonCreatedBy, extractPersonUpdatedBy, extractImage } from '@atlaskit/
|
|
5
|
+
import { extractLink, extractTitle, extractProvider, extractMembers, extractPersonAssignedTo, extractPersonCreatedBy, extractPersonUpdatedBy, extractImage } from '@atlaskit/link-extractors';
|
|
6
6
|
import { extractByline } from '../common/byline/extractByline';
|
|
7
7
|
import { extractTitlePrefix } from '../common/title-prefix/extractTitlePrefix';
|
|
8
8
|
import { extractActions } from '../common/actions/extractActions';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { extractDownloadUrl } from '../detail';
|
|
2
|
-
import { extractPreview, extractProvider } from '@atlaskit/
|
|
2
|
+
import { extractPreview, extractProvider } from '@atlaskit/link-extractors';
|
|
3
3
|
import { PreviewAction } from '../../../view/BlockCard';
|
|
4
4
|
import { CardDisplay } from '../../../constants';
|
|
5
5
|
import { extractIsSupportTheming } from '../../common/meta/extractIsSupportTheming';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FormattedRelativeTime } from 'react-intl-next';
|
|
3
3
|
import { selectUnit } from '@formatjs/intl-utils';
|
|
4
|
-
import { extractDateCreated, extractDateUpdated, extractPersonCreatedBy, extractPersonUpdatedBy } from '@atlaskit/
|
|
4
|
+
import { extractDateCreated, extractDateUpdated, extractPersonCreatedBy, extractPersonUpdatedBy } from '@atlaskit/link-extractors';
|
|
5
5
|
export const extractByline = jsonLd => {
|
|
6
6
|
const updatedAt = extractDateUpdated(jsonLd);
|
|
7
7
|
const createdAt = extractDateCreated(jsonLd);
|
|
@@ -6,7 +6,7 @@ import BranchIcon from '@atlaskit/icon-object/glyph/branch/16';
|
|
|
6
6
|
import RepoIcon from '@atlaskit/icon-object/glyph/code/16';
|
|
7
7
|
import TaskIcon from '@atlaskit/icon-object/glyph/task/16';
|
|
8
8
|
import { extractorPriorityMap } from './priority';
|
|
9
|
-
import { extractProvider, extractUrlFromIconJsonLd, extractTitle } from '@atlaskit/
|
|
9
|
+
import { extractProvider, extractUrlFromIconJsonLd, extractTitle } from '@atlaskit/link-extractors';
|
|
10
10
|
import { extractFileFormat } from './extractFileFormat';
|
|
11
11
|
import { extractIconFromDocument } from './extractIconFromDocument';
|
|
12
12
|
import { extractIconFromTask } from './extractIconFromTask';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { extractState } from './extractState';
|
|
2
2
|
import { extractTag } from './extractTag';
|
|
3
3
|
import { extractTaskStatus } from './extractTaskStatus';
|
|
4
|
-
import { extractType } from '@atlaskit/
|
|
4
|
+
import { extractType } from '@atlaskit/link-extractors';
|
|
5
5
|
import { extractTaskType } from './extractTaskType';
|
|
6
6
|
const DOC_TYPES = ['schema:BlogPosting', 'schema:TextDigitalDocument', 'schema:DigitalDocument', 'schema:PresentationDigitalDocument', 'schema:SpreadsheetDigitalDocument'];
|
|
7
7
|
export const extractLozenge = jsonLd => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extractUrlFromIconJsonLd } from '@atlaskit/
|
|
1
|
+
import { extractUrlFromIconJsonLd } from '@atlaskit/link-extractors';
|
|
2
2
|
export const extractTaskType = jsonLd => {
|
|
3
3
|
// TODO: Remove once Jira migrate to the correct type.
|
|
4
4
|
const taskType = jsonLd['atlassian:taskType'] || jsonLd.taskType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extractLink, extractTitle, extractProvider, extractPreview } from '@atlaskit/
|
|
1
|
+
import { extractLink, extractTitle, extractProvider, extractPreview } from '@atlaskit/link-extractors';
|
|
2
2
|
import { extractIsTrusted } from '../common/meta/extractIsTrusted';
|
|
3
3
|
import { extractIsSupportTheming } from '../common/meta/extractIsSupportTheming';
|
|
4
4
|
const extractEmbedPreview = (jsonLd, platform, iframeUrlType) => {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { extractDownloadUrl } from '../../common/detail';
|
|
2
|
-
import { extractPreview as extractPreviewData } from '@atlaskit/
|
|
3
|
-
import { extractLink, extractProvider, extractTitle } from '@atlaskit/linking-common/extractors';
|
|
2
|
+
import { extractPreview as extractPreviewData, extractLink, extractProvider, extractTitle } from '@atlaskit/link-extractors';
|
|
4
3
|
import { extractLinkIcon } from '../icon';
|
|
5
4
|
import { extractIsSupportTheming } from '../../common/meta/extractIsSupportTheming';
|
|
6
5
|
export const extractPreviewAction = response => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extractLink } from '@atlaskit/
|
|
1
|
+
import { extractLink } from '@atlaskit/link-extractors';
|
|
2
2
|
import { getActionsFromJsonLd } from '../../common/actions/extractActions';
|
|
3
3
|
export const extractViewAction = data => {
|
|
4
4
|
const viewActionExists = getActionsFromJsonLd(data).find(action => action['@type'] === 'ViewAction');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extractMembers, extractPersonFromJsonLd } from '@atlaskit/
|
|
1
|
+
import { extractMembers, extractPersonFromJsonLd } from '@atlaskit/link-extractors';
|
|
2
2
|
export const extractPersonsUpdatedBy = jsonLd => {
|
|
3
3
|
if (jsonLd['@type'] === 'atlassian:Project') {
|
|
4
4
|
const members = extractMembers(jsonLd);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IconType } from '../../constants';
|
|
2
|
-
import { extractUrlFromIconJsonLd } from '@atlaskit/
|
|
2
|
+
import { extractUrlFromIconJsonLd } from '@atlaskit/link-extractors';
|
|
3
3
|
const priorityMapper = {
|
|
4
4
|
blocker: IconType.PriorityBlocker,
|
|
5
5
|
critical: IconType.PriorityCritical,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { extractLozenge } from '../common/lozenge';
|
|
2
2
|
import { getExtensionKey } from '../../state/helpers';
|
|
3
3
|
import extractServerAction from './extract-server-action';
|
|
4
|
-
import { extractLink } from '@atlaskit/
|
|
4
|
+
import { extractLink } from '@atlaskit/link-extractors';
|
|
5
5
|
import { extractPreviewAction } from './actions/extract-preview-action';
|
|
6
6
|
const toInvokeRequest = (extensionKey, resourceIdentifiers, actionType, details) => {
|
|
7
7
|
if (!actionType) {
|
|
@@ -5,7 +5,7 @@ import extractJiraTaskIcon from './extract-jira-task-icon';
|
|
|
5
5
|
import extractProviderIcon from './extract-provider-icon';
|
|
6
6
|
import extractUrlIcon from './extract-url-icon';
|
|
7
7
|
import { extractTaskType } from '../../common/lozenge';
|
|
8
|
-
import { extractTitle } from '@atlaskit/
|
|
8
|
+
import { extractTitle } from '@atlaskit/link-extractors';
|
|
9
9
|
import { extractorPriorityMap as priorityMap } from '../../common/icon/priority';
|
|
10
10
|
import { IconType } from '../../../constants';
|
|
11
11
|
const extractTask = (data, label) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CONFLUENCE_GENERATOR_ID, JIRA_GENERATOR_ID } from '../../constants';
|
|
2
2
|
import { IconType } from '../../../constants';
|
|
3
3
|
import extractUrlIcon from './extract-url-icon';
|
|
4
|
-
import { extractTitle } from '@atlaskit/
|
|
4
|
+
import { extractTitle } from '@atlaskit/link-extractors';
|
|
5
5
|
const extractProviderIcon = data => {
|
|
6
6
|
if (!data) {
|
|
7
7
|
return undefined;
|
|
@@ -2,7 +2,7 @@ import { extractSummary } from '../common/primitives';
|
|
|
2
2
|
import { extractLinkIcon } from './icon';
|
|
3
3
|
import { extractAttachmentCount, extractChecklistProgress, extractCommentCount, extractCreatedBy, extractModifiedBy, extractProgrammingLanguage, extractSubscriberCount, extractViewCount, extractReactCount, extractVoteCount, extractSourceBranch, extractTargetBranch, extractDueOn, extractLocation, extractOwnedBy } from './utils';
|
|
4
4
|
import { extractPersonsUpdatedBy } from './collaboratorGroup';
|
|
5
|
-
import { extractPersonCreatedBy, extractTitle, extractDateUpdated, extractDateCreated, extractLink } from '@atlaskit/
|
|
5
|
+
import { extractPersonCreatedBy, extractTitle, extractDateUpdated, extractDateCreated, extractLink } from '@atlaskit/link-extractors';
|
|
6
6
|
import extractPriority from './extract-priority';
|
|
7
7
|
import extractProviderIcon from './icon/extract-provider-icon';
|
|
8
8
|
import extractPreview from './extract-preview';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extractPersonOwnedBy, extractPersonCreatedBy, extractPersonUpdatedBy } from '@atlaskit/
|
|
1
|
+
import { extractPersonOwnedBy, extractPersonCreatedBy, extractPersonUpdatedBy } from '@atlaskit/link-extractors';
|
|
2
2
|
const extractLinkName = link => {
|
|
3
3
|
if (link && typeof link === 'object' && link['@type'] === 'Link') {
|
|
4
4
|
return link.name;
|
|
@@ -2,7 +2,7 @@ import { extractTitleTextColor } from '../common/primitives';
|
|
|
2
2
|
import { extractLozenge } from '../common/lozenge';
|
|
3
3
|
import { extractIcon } from '../common/icon';
|
|
4
4
|
import { extractTitlePrefix } from '../common/title-prefix';
|
|
5
|
-
import { extractLink, extractTitle, extractProvider } from '@atlaskit/
|
|
5
|
+
import { extractLink, extractTitle, extractProvider } from '@atlaskit/link-extractors';
|
|
6
6
|
import { CONFLUENCE_GENERATOR_ID, JIRA_GENERATOR_ID } from '../constants';
|
|
7
7
|
export const extractInlineIcon = jsonLd => {
|
|
8
8
|
const provider = extractProvider(jsonLd);
|
package/dist/es2019/version.json
CHANGED
|
@@ -9,7 +9,7 @@ import BlockCardFooter from '../../components/flexible/footer';
|
|
|
9
9
|
import { ForbiddenAction } from '../../actions/flexible/ForbiddenAction';
|
|
10
10
|
import Text from '../../../FlexibleCard/components/elements/text';
|
|
11
11
|
import { getForbiddenJsonLd } from '../../../../utils/jsonld';
|
|
12
|
-
import { extractProvider } from '@atlaskit/
|
|
12
|
+
import { extractProvider } from '@atlaskit/link-extractors';
|
|
13
13
|
import { extractRequestAccessContext } from '../../../../extractors/common/context';
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -4,7 +4,7 @@ import { AuthorizeAction } from '../../actions/flexible/AuthorizeAction';
|
|
|
4
4
|
import BlockCardFooter from '../../components/flexible/footer';
|
|
5
5
|
import { CustomBlock, TitleBlock } from '../../../FlexibleCard/components/blocks';
|
|
6
6
|
import { SmartLinkStatus } from '../../../../constants';
|
|
7
|
-
import { extractProvider } from '@atlaskit/
|
|
7
|
+
import { extractProvider } from '@atlaskit/link-extractors';
|
|
8
8
|
import UnauthorisedViewContent from '../../../common/UnauthorisedViewContent';
|
|
9
9
|
import { css } from '@emotion/react';
|
|
10
10
|
import { tokens } from '../../../../utils/token';
|
|
@@ -5,7 +5,7 @@ import { messages } from '../../messages';
|
|
|
5
5
|
import extractFlexibleUiContext from '../../extractors/flexible';
|
|
6
6
|
import { extractErrorIcon } from '../../extractors/flexible/icon';
|
|
7
7
|
import { handleOnClick } from '../../utils';
|
|
8
|
-
import { extractProvider } from '@atlaskit/
|
|
8
|
+
import { extractProvider } from '@atlaskit/link-extractors';
|
|
9
9
|
import extractProviderIcon from '../../extractors/flexible/icon/extract-provider-icon';
|
|
10
10
|
export const getContextByStatus = params => {
|
|
11
11
|
const {
|
|
@@ -4,7 +4,7 @@ import { FormattedMessage } from 'react-intl-next';
|
|
|
4
4
|
import FlexibleCard from '../../../../FlexibleCard';
|
|
5
5
|
import { messages } from '../../../../../messages';
|
|
6
6
|
import { CustomBlock } from '../../../../FlexibleCard/components/blocks';
|
|
7
|
-
import { extractProvider } from '@atlaskit/
|
|
7
|
+
import { extractProvider } from '@atlaskit/link-extractors';
|
|
8
8
|
import { connectButtonStyles, mainTextStyles, titleBlockStyles } from './styled';
|
|
9
9
|
import UnauthorisedViewContent from '../../../../common/UnauthorisedViewContent';
|
|
10
10
|
import ActionGroup from '../../../../FlexibleCard/components/blocks/action-group';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementName } from '../../constants';
|
|
2
|
-
import { extractType } from '@atlaskit/
|
|
2
|
+
import { extractType } from '@atlaskit/link-extractors';
|
|
3
3
|
import { extractOwnedBy } from '../../extractors/flexible/utils';
|
|
4
4
|
export const getSimulatedMetadata = (extensionKey = '', data) => {
|
|
5
5
|
const types = data ? extractType(data) : undefined;
|
|
@@ -9,7 +9,7 @@ import { InlineCardForbiddenView } from './ForbiddenView';
|
|
|
9
9
|
import { InlineCardResolvedView } from './ResolvedView';
|
|
10
10
|
import { InlineCardResolvingView } from './ResolvingView';
|
|
11
11
|
import { InlineCardUnauthorizedView } from './UnauthorisedView';
|
|
12
|
-
import { extractProvider } from '@atlaskit/
|
|
12
|
+
import { extractProvider } from '@atlaskit/link-extractors';
|
|
13
13
|
import { useFeatureFlag } from '@atlaskit/link-provider';
|
|
14
14
|
import { getExtensionKey } from '../../state/helpers';
|
|
15
15
|
export { InlineCardResolvedView, InlineCardResolvingView, InlineCardErroredView, InlineCardForbiddenView, InlineCardUnauthorizedView };
|
|
@@ -5,7 +5,7 @@ import { extractTitleTextColor, extractSummary } from '../common/primitives';
|
|
|
5
5
|
import { extractLozenge } from '../common/lozenge';
|
|
6
6
|
import { extractIcon } from '../common/icon';
|
|
7
7
|
import { extractCommentCount, extractProgrammingLanguage, extractSubscriberCount, extractAttachmentCount } from '../common/detail';
|
|
8
|
-
import { extractLink, extractTitle, extractProvider, extractMembers, extractPersonAssignedTo, extractPersonCreatedBy, extractPersonUpdatedBy, extractImage } from '@atlaskit/
|
|
8
|
+
import { extractLink, extractTitle, extractProvider, extractMembers, extractPersonAssignedTo, extractPersonCreatedBy, extractPersonUpdatedBy, extractImage } from '@atlaskit/link-extractors';
|
|
9
9
|
import { extractByline } from '../common/byline/extractByline';
|
|
10
10
|
import { extractTitlePrefix } from '../common/title-prefix/extractTitlePrefix';
|
|
11
11
|
import { extractActions } from '../common/actions/extractActions';
|
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
4
|
import { extractDownloadUrl } from '../detail';
|
|
5
|
-
import { extractPreview, extractProvider } from '@atlaskit/
|
|
5
|
+
import { extractPreview, extractProvider } from '@atlaskit/link-extractors';
|
|
6
6
|
import { PreviewAction } from '../../../view/BlockCard';
|
|
7
7
|
import { CardDisplay } from '../../../constants';
|
|
8
8
|
import { extractIsSupportTheming } from '../../common/meta/extractIsSupportTheming';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FormattedRelativeTime } from 'react-intl-next';
|
|
3
3
|
import { selectUnit } from '@formatjs/intl-utils';
|
|
4
|
-
import { extractDateCreated, extractDateUpdated, extractPersonCreatedBy, extractPersonUpdatedBy } from '@atlaskit/
|
|
4
|
+
import { extractDateCreated, extractDateUpdated, extractPersonCreatedBy, extractPersonUpdatedBy } from '@atlaskit/link-extractors';
|
|
5
5
|
export var extractByline = function extractByline(jsonLd) {
|
|
6
6
|
var updatedAt = extractDateUpdated(jsonLd);
|
|
7
7
|
var createdAt = extractDateCreated(jsonLd);
|
|
@@ -6,7 +6,7 @@ import BranchIcon from '@atlaskit/icon-object/glyph/branch/16';
|
|
|
6
6
|
import RepoIcon from '@atlaskit/icon-object/glyph/code/16';
|
|
7
7
|
import TaskIcon from '@atlaskit/icon-object/glyph/task/16';
|
|
8
8
|
import { extractorPriorityMap } from './priority';
|
|
9
|
-
import { extractProvider, extractUrlFromIconJsonLd, extractTitle } from '@atlaskit/
|
|
9
|
+
import { extractProvider, extractUrlFromIconJsonLd, extractTitle } from '@atlaskit/link-extractors';
|
|
10
10
|
import { extractFileFormat } from './extractFileFormat';
|
|
11
11
|
import { extractIconFromDocument } from './extractIconFromDocument';
|
|
12
12
|
import { extractIconFromTask } from './extractIconFromTask';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { extractState } from './extractState';
|
|
2
2
|
import { extractTag } from './extractTag';
|
|
3
3
|
import { extractTaskStatus } from './extractTaskStatus';
|
|
4
|
-
import { extractType } from '@atlaskit/
|
|
4
|
+
import { extractType } from '@atlaskit/link-extractors';
|
|
5
5
|
import { extractTaskType } from './extractTaskType';
|
|
6
6
|
var DOC_TYPES = ['schema:BlogPosting', 'schema:TextDigitalDocument', 'schema:DigitalDocument', 'schema:PresentationDigitalDocument', 'schema:SpreadsheetDigitalDocument'];
|
|
7
7
|
export var extractLozenge = function extractLozenge(jsonLd) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extractUrlFromIconJsonLd } from '@atlaskit/
|
|
1
|
+
import { extractUrlFromIconJsonLd } from '@atlaskit/link-extractors';
|
|
2
2
|
export var extractTaskType = function extractTaskType(jsonLd) {
|
|
3
3
|
// TODO: Remove once Jira migrate to the correct type.
|
|
4
4
|
var taskType = jsonLd['atlassian:taskType'] || jsonLd.taskType;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
-
import { extractLink, extractTitle, extractProvider, extractPreview } from '@atlaskit/
|
|
4
|
+
import { extractLink, extractTitle, extractProvider, extractPreview } from '@atlaskit/link-extractors';
|
|
5
5
|
import { extractIsTrusted } from '../common/meta/extractIsTrusted';
|
|
6
6
|
import { extractIsSupportTheming } from '../common/meta/extractIsSupportTheming';
|
|
7
7
|
var extractEmbedPreview = function extractEmbedPreview(jsonLd, platform, iframeUrlType) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { extractDownloadUrl } from '../../common/detail';
|
|
2
|
-
import { extractPreview as extractPreviewData } from '@atlaskit/
|
|
3
|
-
import { extractLink, extractProvider, extractTitle } from '@atlaskit/linking-common/extractors';
|
|
2
|
+
import { extractPreview as extractPreviewData, extractLink, extractProvider, extractTitle } from '@atlaskit/link-extractors';
|
|
4
3
|
import { extractLinkIcon } from '../icon';
|
|
5
4
|
import { extractIsSupportTheming } from '../../common/meta/extractIsSupportTheming';
|
|
6
5
|
export var extractPreviewAction = function extractPreviewAction(response) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extractLink } from '@atlaskit/
|
|
1
|
+
import { extractLink } from '@atlaskit/link-extractors';
|
|
2
2
|
import { getActionsFromJsonLd } from '../../common/actions/extractActions';
|
|
3
3
|
export var extractViewAction = function extractViewAction(data) {
|
|
4
4
|
var viewActionExists = getActionsFromJsonLd(data).find(function (action) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extractMembers, extractPersonFromJsonLd } from '@atlaskit/
|
|
1
|
+
import { extractMembers, extractPersonFromJsonLd } from '@atlaskit/link-extractors';
|
|
2
2
|
export var extractPersonsUpdatedBy = function extractPersonsUpdatedBy(jsonLd) {
|
|
3
3
|
if (jsonLd['@type'] === 'atlassian:Project') {
|
|
4
4
|
var members = extractMembers(jsonLd);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IconType } from '../../constants';
|
|
2
|
-
import { extractUrlFromIconJsonLd } from '@atlaskit/
|
|
2
|
+
import { extractUrlFromIconJsonLd } from '@atlaskit/link-extractors';
|
|
3
3
|
var priorityMapper = {
|
|
4
4
|
blocker: IconType.PriorityBlocker,
|
|
5
5
|
critical: IconType.PriorityCritical,
|
|
@@ -4,7 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
import { extractLozenge } from '../common/lozenge';
|
|
5
5
|
import { getExtensionKey } from '../../state/helpers';
|
|
6
6
|
import extractServerAction from './extract-server-action';
|
|
7
|
-
import { extractLink } from '@atlaskit/
|
|
7
|
+
import { extractLink } from '@atlaskit/link-extractors';
|
|
8
8
|
import { extractPreviewAction } from './actions/extract-preview-action';
|
|
9
9
|
var toInvokeRequest = function toInvokeRequest(extensionKey, resourceIdentifiers, actionType, details) {
|
|
10
10
|
if (!actionType) {
|
|
@@ -5,7 +5,7 @@ import extractJiraTaskIcon from './extract-jira-task-icon';
|
|
|
5
5
|
import extractProviderIcon from './extract-provider-icon';
|
|
6
6
|
import extractUrlIcon from './extract-url-icon';
|
|
7
7
|
import { extractTaskType } from '../../common/lozenge';
|
|
8
|
-
import { extractTitle } from '@atlaskit/
|
|
8
|
+
import { extractTitle } from '@atlaskit/link-extractors';
|
|
9
9
|
import { extractorPriorityMap as priorityMap } from '../../common/icon/priority';
|
|
10
10
|
import { IconType } from '../../../constants';
|
|
11
11
|
var extractTask = function extractTask(data, label) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CONFLUENCE_GENERATOR_ID, JIRA_GENERATOR_ID } from '../../constants';
|
|
2
2
|
import { IconType } from '../../../constants';
|
|
3
3
|
import extractUrlIcon from './extract-url-icon';
|
|
4
|
-
import { extractTitle } from '@atlaskit/
|
|
4
|
+
import { extractTitle } from '@atlaskit/link-extractors';
|
|
5
5
|
var extractProviderIcon = function extractProviderIcon(data) {
|
|
6
6
|
if (!data) {
|
|
7
7
|
return undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extractUrlFromIconJsonLd } from '@atlaskit/
|
|
1
|
+
import { extractUrlFromIconJsonLd } from '@atlaskit/link-extractors';
|
|
2
2
|
var extractUrlIcon = function extractUrlIcon(icon, label) {
|
|
3
3
|
var url = icon && extractUrlFromIconJsonLd(icon);
|
|
4
4
|
return url ? {
|
|
@@ -2,7 +2,7 @@ import { extractSummary } from '../common/primitives';
|
|
|
2
2
|
import { extractLinkIcon } from './icon';
|
|
3
3
|
import { extractAttachmentCount, extractChecklistProgress, extractCommentCount, extractCreatedBy, extractModifiedBy, extractProgrammingLanguage, extractSubscriberCount, extractViewCount, extractReactCount, extractVoteCount, extractSourceBranch, extractTargetBranch, extractDueOn, extractLocation, extractOwnedBy } from './utils';
|
|
4
4
|
import { extractPersonsUpdatedBy } from './collaboratorGroup';
|
|
5
|
-
import { extractPersonCreatedBy, extractTitle, extractDateUpdated, extractDateCreated, extractLink } from '@atlaskit/
|
|
5
|
+
import { extractPersonCreatedBy, extractTitle, extractDateUpdated, extractDateCreated, extractLink } from '@atlaskit/link-extractors';
|
|
6
6
|
import extractPriority from './extract-priority';
|
|
7
7
|
import extractProviderIcon from './icon/extract-provider-icon';
|
|
8
8
|
import extractPreview from './extract-preview';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
-
import { extractPersonOwnedBy, extractPersonCreatedBy, extractPersonUpdatedBy } from '@atlaskit/
|
|
2
|
+
import { extractPersonOwnedBy, extractPersonCreatedBy, extractPersonUpdatedBy } from '@atlaskit/link-extractors';
|
|
3
3
|
var extractLinkName = function extractLinkName(link) {
|
|
4
4
|
if (link && _typeof(link) === 'object' && link['@type'] === 'Link') {
|
|
5
5
|
return link.name;
|
|
@@ -2,7 +2,7 @@ import { extractTitleTextColor } from '../common/primitives';
|
|
|
2
2
|
import { extractLozenge } from '../common/lozenge';
|
|
3
3
|
import { extractIcon } from '../common/icon';
|
|
4
4
|
import { extractTitlePrefix } from '../common/title-prefix';
|
|
5
|
-
import { extractLink, extractTitle, extractProvider } from '@atlaskit/
|
|
5
|
+
import { extractLink, extractTitle, extractProvider } from '@atlaskit/link-extractors';
|
|
6
6
|
import { CONFLUENCE_GENERATOR_ID, JIRA_GENERATOR_ID } from '../constants';
|
|
7
7
|
export var extractInlineIcon = function extractInlineIcon(jsonLd) {
|
|
8
8
|
var provider = extractProvider(jsonLd);
|
package/dist/esm/version.json
CHANGED
|
@@ -10,7 +10,7 @@ import BlockCardFooter from '../../components/flexible/footer';
|
|
|
10
10
|
import { ForbiddenAction } from '../../actions/flexible/ForbiddenAction';
|
|
11
11
|
import Text from '../../../FlexibleCard/components/elements/text';
|
|
12
12
|
import { getForbiddenJsonLd } from '../../../../utils/jsonld';
|
|
13
|
-
import { extractProvider } from '@atlaskit/
|
|
13
|
+
import { extractProvider } from '@atlaskit/link-extractors';
|
|
14
14
|
import { extractRequestAccessContext } from '../../../../extractors/common/context';
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -6,7 +6,7 @@ import { AuthorizeAction } from '../../actions/flexible/AuthorizeAction';
|
|
|
6
6
|
import BlockCardFooter from '../../components/flexible/footer';
|
|
7
7
|
import { CustomBlock, TitleBlock } from '../../../FlexibleCard/components/blocks';
|
|
8
8
|
import { SmartLinkStatus } from '../../../../constants';
|
|
9
|
-
import { extractProvider } from '@atlaskit/
|
|
9
|
+
import { extractProvider } from '@atlaskit/link-extractors';
|
|
10
10
|
import UnauthorisedViewContent from '../../../common/UnauthorisedViewContent';
|
|
11
11
|
import { css } from '@emotion/react';
|
|
12
12
|
import { tokens } from '../../../../utils/token';
|
|
@@ -5,7 +5,7 @@ import { messages } from '../../messages';
|
|
|
5
5
|
import extractFlexibleUiContext from '../../extractors/flexible';
|
|
6
6
|
import { extractErrorIcon } from '../../extractors/flexible/icon';
|
|
7
7
|
import { handleOnClick } from '../../utils';
|
|
8
|
-
import { extractProvider } from '@atlaskit/
|
|
8
|
+
import { extractProvider } from '@atlaskit/link-extractors';
|
|
9
9
|
import extractProviderIcon from '../../extractors/flexible/icon/extract-provider-icon';
|
|
10
10
|
export var getContextByStatus = function getContextByStatus(params) {
|
|
11
11
|
var _ref = params !== null && params !== void 0 ? params : {},
|
|
@@ -4,7 +4,7 @@ import { FormattedMessage } from 'react-intl-next';
|
|
|
4
4
|
import FlexibleCard from '../../../../FlexibleCard';
|
|
5
5
|
import { messages } from '../../../../../messages';
|
|
6
6
|
import { CustomBlock } from '../../../../FlexibleCard/components/blocks';
|
|
7
|
-
import { extractProvider } from '@atlaskit/
|
|
7
|
+
import { extractProvider } from '@atlaskit/link-extractors';
|
|
8
8
|
import { connectButtonStyles, mainTextStyles, titleBlockStyles } from './styled';
|
|
9
9
|
import UnauthorisedViewContent from '../../../../common/UnauthorisedViewContent';
|
|
10
10
|
import ActionGroup from '../../../../FlexibleCard/components/blocks/action-group';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementName } from '../../constants';
|
|
2
|
-
import { extractType } from '@atlaskit/
|
|
2
|
+
import { extractType } from '@atlaskit/link-extractors';
|
|
3
3
|
import { extractOwnedBy } from '../../extractors/flexible/utils';
|
|
4
4
|
export var getSimulatedMetadata = function getSimulatedMetadata() {
|
|
5
5
|
var extensionKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
@@ -9,7 +9,7 @@ import { InlineCardForbiddenView } from './ForbiddenView';
|
|
|
9
9
|
import { InlineCardResolvedView } from './ResolvedView';
|
|
10
10
|
import { InlineCardResolvingView } from './ResolvingView';
|
|
11
11
|
import { InlineCardUnauthorizedView } from './UnauthorisedView';
|
|
12
|
-
import { extractProvider } from '@atlaskit/
|
|
12
|
+
import { extractProvider } from '@atlaskit/link-extractors';
|
|
13
13
|
import { useFeatureFlag } from '@atlaskit/link-provider';
|
|
14
14
|
import { getExtensionKey } from '../../state/helpers';
|
|
15
15
|
export { InlineCardResolvedView, InlineCardResolvingView, InlineCardErroredView, InlineCardForbiddenView, InlineCardUnauthorizedView };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JsonLd } from 'json-ld-types';
|
|
2
2
|
import { CardProviderRenderers } from '@atlaskit/link-provider';
|
|
3
|
-
import { LinkPerson } from '@atlaskit/
|
|
3
|
+
import { LinkPerson } from '@atlaskit/link-extractors';
|
|
4
4
|
import { ExtractBlockOpts } from './types';
|
|
5
5
|
import { CardPlatform } from '../../view/Card';
|
|
6
6
|
import { BlockCardResolvedViewProps } from '../../view/BlockCard';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { JsonLd } from 'json-ld-types';
|
|
3
|
-
import { LinkProvider } from '@atlaskit/
|
|
3
|
+
import { LinkProvider } from '@atlaskit/link-extractors';
|
|
4
4
|
import { LinkTaskType } from '../lozenge/extractTaskType';
|
|
5
5
|
export type IconPriority = 'type' | 'provider';
|
|
6
6
|
export interface IconOpts {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { JsonLd } from 'json-ld-types';
|
|
2
|
-
import { LinkPerson } from '@atlaskit/
|
|
2
|
+
import { LinkPerson } from '@atlaskit/link-extractors';
|
|
3
3
|
export type LinkTypeUpdatedBy = JsonLd.Data.Document | JsonLd.Data.Project | JsonLd.Data.SourceCodePullRequest | JsonLd.Data.SourceCodeReference | JsonLd.Data.SourceCodeRepository | JsonLd.Data.Task;
|
|
4
4
|
export declare const extractPersonsUpdatedBy: (jsonLd: LinkTypeUpdatedBy) => LinkPerson[] | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LinkLozenge } from '../../extractors/common/lozenge/types';
|
|
2
|
-
import { LinkPerson } from '@atlaskit/
|
|
2
|
+
import { LinkPerson } from '@atlaskit/link-extractors';
|
|
3
3
|
import { IconType, MediaType } from '../../constants';
|
|
4
4
|
/**
|
|
5
5
|
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
-
import { CardAppearance
|
|
3
|
+
import { CardAppearance } from '@atlaskit/linking-common';
|
|
4
|
+
import { CardPlatform } from '@atlaskit/link-extractors';
|
|
4
5
|
import { AnalyticsFacade } from '../../state/analytics';
|
|
5
6
|
import { FlexibleUiOptions } from '../FlexibleCard/types';
|
|
6
7
|
import { InlinePreloaderStyle, OnErrorCallback } from '../types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JsonLd } from 'json-ld-types';
|
|
2
2
|
import { CardProviderRenderers } from '@atlaskit/link-provider';
|
|
3
|
-
import { LinkPerson } from '@atlaskit/
|
|
3
|
+
import { LinkPerson } from '@atlaskit/link-extractors';
|
|
4
4
|
import { ExtractBlockOpts } from './types';
|
|
5
5
|
import { CardPlatform } from '../../view/Card';
|
|
6
6
|
import { BlockCardResolvedViewProps } from '../../view/BlockCard';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { JsonLd } from 'json-ld-types';
|
|
3
|
-
import { LinkProvider } from '@atlaskit/
|
|
3
|
+
import { LinkProvider } from '@atlaskit/link-extractors';
|
|
4
4
|
import { LinkTaskType } from '../lozenge/extractTaskType';
|
|
5
5
|
export type IconPriority = 'type' | 'provider';
|
|
6
6
|
export interface IconOpts {
|