@atlaskit/smart-card 32.8.2 → 33.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/cjs/extractors/action/extract-invoke-download-action.js +2 -2
- package/dist/cjs/extractors/common/icon/extractIcon.js +0 -5
- package/dist/cjs/extractors/common/icon/extractIconFromDocument.js +0 -1
- package/dist/cjs/extractors/common/icon/extractIconFromTask.js +0 -11
- package/dist/cjs/extractors/common/icon/prioritiseIcon.js +0 -4
- package/dist/cjs/extractors/flexible/actions/extract-download-action.js +2 -2
- package/dist/cjs/extractors/flexible/actions/extract-preview-action.js +2 -2
- package/dist/cjs/index.js +2 -34
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/test-utils.js +1 -11
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/mocks.js +1 -4
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +1 -7
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +0 -1
- package/dist/cjs/view/InlineCard/styled.js +1 -6
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/action/extract-invoke-download-action.js +1 -1
- package/dist/es2019/extractors/common/icon/extractIcon.js +0 -5
- package/dist/es2019/extractors/common/icon/extractIconFromDocument.js +0 -1
- package/dist/es2019/extractors/common/icon/extractIconFromTask.js +0 -11
- package/dist/es2019/extractors/common/icon/prioritiseIcon.js +0 -4
- package/dist/es2019/extractors/flexible/actions/extract-download-action.js +1 -1
- package/dist/es2019/extractors/flexible/actions/extract-preview-action.js +1 -1
- package/dist/es2019/index.js +0 -20
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/test-utils.js +0 -10
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/mocks.js +0 -3
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +0 -6
- package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +0 -1
- package/dist/es2019/view/InlineCard/styled.js +0 -5
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/action/extract-invoke-download-action.js +1 -1
- package/dist/esm/extractors/common/icon/extractIcon.js +0 -5
- package/dist/esm/extractors/common/icon/extractIconFromDocument.js +0 -1
- package/dist/esm/extractors/common/icon/extractIconFromTask.js +0 -11
- package/dist/esm/extractors/common/icon/prioritiseIcon.js +0 -4
- package/dist/esm/extractors/flexible/actions/extract-download-action.js +1 -1
- package/dist/esm/extractors/flexible/actions/extract-preview-action.js +1 -1
- package/dist/esm/index.js +0 -20
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/test-utils.js +0 -10
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/mocks.js +0 -3
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +0 -6
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +0 -1
- package/dist/esm/view/InlineCard/styled.js +0 -5
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/extractors/common/__mocks__/jsonld.d.ts +0 -8
- package/dist/types/extractors/common/icon/prioritiseIcon.d.ts +0 -9
- package/dist/types/extractors/flexible/utils.d.ts +4 -0
- package/dist/types/index.d.ts +0 -17
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +0 -6
- package/dist/types/utils/analytics/types.d.ts +1 -9
- package/dist/types/utils/test-utils.d.ts +0 -2
- package/dist/types/view/EmbedCard/types.d.ts +1 -7
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/mocks.d.ts +1 -2
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.d.ts +0 -5
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/types.d.ts +0 -16
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/types.d.ts +0 -3
- package/dist/types/view/HoverCard/types.d.ts +0 -2
- package/dist/types/view/InlineCard/styled.d.ts +0 -4
- package/dist/types-ts4.5/extractors/common/__mocks__/jsonld.d.ts +0 -8
- package/dist/types-ts4.5/extractors/common/icon/prioritiseIcon.d.ts +0 -9
- package/dist/types-ts4.5/extractors/flexible/utils.d.ts +4 -0
- package/dist/types-ts4.5/index.d.ts +0 -17
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +0 -6
- package/dist/types-ts4.5/utils/analytics/types.d.ts +1 -9
- package/dist/types-ts4.5/utils/test-utils.d.ts +0 -2
- package/dist/types-ts4.5/view/EmbedCard/types.d.ts +1 -7
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/mocks.d.ts +1 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.d.ts +0 -5
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/types.d.ts +0 -16
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/types.d.ts +0 -3
- package/dist/types-ts4.5/view/HoverCard/types.d.ts +0 -2
- package/dist/types-ts4.5/view/InlineCard/styled.d.ts +0 -4
- package/package.json +1 -1
- package/dist/cjs/extractors/common/byline/extractByline.js +0 -40
- package/dist/cjs/extractors/common/detail/extractAttachmentCount.js +0 -23
- package/dist/cjs/extractors/common/detail/extractCommentCount.js +0 -24
- package/dist/cjs/extractors/common/detail/extractProgrammingLanguage.js +0 -23
- package/dist/cjs/extractors/common/detail/extractSubscriberCount.js +0 -23
- package/dist/cjs/extractors/common/detail/index.js +0 -40
- package/dist/cjs/extractors/common/detail/types.js +0 -1
- package/dist/cjs/state/analytics/types.js +0 -5
- package/dist/es2019/extractors/common/byline/extractByline.js +0 -35
- package/dist/es2019/extractors/common/detail/extractAttachmentCount.js +0 -16
- package/dist/es2019/extractors/common/detail/extractCommentCount.js +0 -17
- package/dist/es2019/extractors/common/detail/extractProgrammingLanguage.js +0 -16
- package/dist/es2019/extractors/common/detail/extractSubscriberCount.js +0 -16
- package/dist/es2019/extractors/common/detail/index.js +0 -5
- package/dist/es2019/extractors/common/detail/types.js +0 -0
- package/dist/es2019/state/analytics/types.js +0 -1
- package/dist/esm/extractors/common/byline/extractByline.js +0 -33
- package/dist/esm/extractors/common/detail/extractAttachmentCount.js +0 -16
- package/dist/esm/extractors/common/detail/extractCommentCount.js +0 -17
- package/dist/esm/extractors/common/detail/extractProgrammingLanguage.js +0 -16
- package/dist/esm/extractors/common/detail/extractSubscriberCount.js +0 -16
- package/dist/esm/extractors/common/detail/index.js +0 -5
- package/dist/esm/extractors/common/detail/types.js +0 -0
- package/dist/esm/state/analytics/types.js +0 -1
- package/dist/types/extractors/common/byline/extractByline.d.ts +0 -3
- package/dist/types/extractors/common/detail/extractAttachmentCount.d.ts +0 -4
- package/dist/types/extractors/common/detail/extractCommentCount.d.ts +0 -4
- package/dist/types/extractors/common/detail/extractProgrammingLanguage.d.ts +0 -4
- package/dist/types/extractors/common/detail/extractSubscriberCount.d.ts +0 -4
- package/dist/types/extractors/common/detail/index.d.ts +0 -9
- package/dist/types/extractors/common/detail/types.d.ts +0 -5
- package/dist/types/state/analytics/types.d.ts +0 -9
- package/dist/types-ts4.5/extractors/common/byline/extractByline.d.ts +0 -3
- package/dist/types-ts4.5/extractors/common/detail/extractAttachmentCount.d.ts +0 -4
- package/dist/types-ts4.5/extractors/common/detail/extractCommentCount.d.ts +0 -4
- package/dist/types-ts4.5/extractors/common/detail/extractProgrammingLanguage.d.ts +0 -4
- package/dist/types-ts4.5/extractors/common/detail/extractSubscriberCount.d.ts +0 -4
- package/dist/types-ts4.5/extractors/common/detail/index.d.ts +0 -9
- package/dist/types-ts4.5/extractors/common/detail/types.d.ts +0 -5
- package/dist/types-ts4.5/state/analytics/types.d.ts +0 -9
- /package/dist/cjs/extractors/common/{detail → download}/extractDownloadUrl.js +0 -0
- /package/dist/es2019/extractors/common/{detail → download}/extractDownloadUrl.js +0 -0
- /package/dist/esm/extractors/common/{detail → download}/extractDownloadUrl.js +0 -0
- /package/dist/types/extractors/common/{detail → download}/extractDownloadUrl.d.ts +0 -0
- /package/dist/types-ts4.5/extractors/common/{detail → download}/extractDownloadUrl.d.ts +0 -0
|
@@ -1,23 +1,6 @@
|
|
|
1
|
-
import { type JsonLd } from 'json-ld-types';
|
|
2
|
-
/** @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-15961 Internal documentation for deprecation (no external access)} */
|
|
3
|
-
export type ResolveResponse = JsonLd.Response;
|
|
4
|
-
/** @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-15961 Internal documentation for deprecation (no external access)} */
|
|
5
|
-
export { SmartCardProvider as Provider, SmartCardContext } from './state';
|
|
6
|
-
/** @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-15961 Internal documentation for deprecation (no external access)} */
|
|
7
|
-
export type { ProviderProps, CardType } from './state';
|
|
8
|
-
/** @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-15961 Internal documentation for deprecation (no external access)} */
|
|
9
|
-
export type { CardAdf, InlineCardAdf, BlockCardAdf, EmbedCardAdf, DatasourceAdf, DatasourceAdfView, } from '@atlaskit/linking-common';
|
|
10
|
-
/** @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-15961 Internal documentation for deprecation (no external access)} */
|
|
11
|
-
export { APIError } from '@atlaskit/linking-common';
|
|
12
|
-
/** @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-15961 Internal documentation for deprecation (no external access)} */
|
|
13
|
-
export { CardClient as Client } from '@atlaskit/link-provider';
|
|
14
1
|
export { Card } from './view/Card';
|
|
15
2
|
export type { CardProps, CardAppearance, CardPlatform } from './view/Card';
|
|
16
3
|
export { CardAction } from './view/Card/types';
|
|
17
|
-
/** @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-15961 Internal documentation for deprecation (no external access)} */
|
|
18
|
-
export { SmartCardContext as Context } from '@atlaskit/link-provider';
|
|
19
|
-
/** @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-15961 Internal documentation for deprecation (no external access)} */
|
|
20
|
-
export type { CardContext } from '@atlaskit/link-provider';
|
|
21
4
|
export { EmbedResizeMessageListener } from './view/EmbedCard/EmbedResizeMessageListener';
|
|
22
5
|
export { ExpandedFrame } from './view/EmbedCard/components/ExpandedFrame';
|
|
23
6
|
export { embedHeaderHeight } from './view/EmbedCard/components/styled';
|
|
@@ -129,12 +129,6 @@ export type ModelUsage = {
|
|
|
129
129
|
total_cost: number;
|
|
130
130
|
duration: number;
|
|
131
131
|
};
|
|
132
|
-
export type Durations = {
|
|
133
|
-
events: {
|
|
134
|
-
[key: string]: number;
|
|
135
|
-
};
|
|
136
|
-
total: number;
|
|
137
|
-
};
|
|
138
132
|
export type Metadata = {
|
|
139
133
|
bm25Variant?: string;
|
|
140
134
|
confidenceScore?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ErrorInfo } from 'react';
|
|
2
|
-
import { type
|
|
2
|
+
import { type CardType } from '@atlaskit/linking-common';
|
|
3
3
|
import { type InvokeType } from '../../model/invoke-opts';
|
|
4
4
|
import { type CardInnerAppearance } from '../../view/Card/types';
|
|
5
5
|
export type DestinationProduct = 'jira' | 'confluence' | 'bitbucket' | 'trello';
|
|
@@ -15,14 +15,6 @@ export interface CommonEventProps {
|
|
|
15
15
|
location?: string;
|
|
16
16
|
statusDetails?: string;
|
|
17
17
|
}
|
|
18
|
-
export type ResolvedEventProps = CommonEventProps & {
|
|
19
|
-
id: string;
|
|
20
|
-
};
|
|
21
|
-
export type UnresolvedEventProps = CommonEventProps & {
|
|
22
|
-
id: string;
|
|
23
|
-
status: string;
|
|
24
|
-
error?: APIError;
|
|
25
|
-
};
|
|
26
18
|
export type InvokeSucceededEventProps = CommonEventProps & {
|
|
27
19
|
id?: string;
|
|
28
20
|
actionType: string;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
3
|
-
import { type RequestAccessMessageKey } from '../../messages';
|
|
4
3
|
import { type InvokeHandler } from '../../model/invoke-handler';
|
|
5
4
|
import { type AnalyticsFacade } from '../../state/analytics';
|
|
6
5
|
import { type CardState } from '../../state/types';
|
|
7
6
|
import type { CardActionOptions, CardPlatform, EmbedIframeUrlType, OnResolveCallback } from '../Card/types';
|
|
8
|
-
import { type
|
|
7
|
+
import { type OnErrorCallback } from '../types';
|
|
9
8
|
export type EmbedCardProps = {
|
|
10
9
|
url: string;
|
|
11
10
|
cardState: CardState;
|
|
@@ -43,10 +42,5 @@ export interface AccessContext {
|
|
|
43
42
|
url?: string;
|
|
44
43
|
smartLinksAccessMetadataExperimentCohort?: 'experiment' | 'control' | 'not-enrolled';
|
|
45
44
|
}
|
|
46
|
-
export interface RequestAccessContextProps extends AccessContext {
|
|
47
|
-
action?: ActionProps;
|
|
48
|
-
callToActionMessageKey?: RequestAccessMessageKey;
|
|
49
|
-
descriptiveMessageKey?: RequestAccessMessageKey;
|
|
50
|
-
}
|
|
51
45
|
export type InlinePreloaderStyle = 'on-left-with-skeleton' | 'on-right-without-skeleton';
|
|
52
46
|
export type FrameStyle = 'show' | 'hide' | 'showOnHover';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { type GetManualRulesResponse, type
|
|
1
|
+
import { type GetManualRulesResponse, type ManualRule } from './types';
|
|
2
2
|
export declare const mockRules: GetManualRulesResponse;
|
|
3
3
|
export declare const mockTransformedRules: ManualRule[];
|
|
4
|
-
export declare const mockInvocationResponse: InvocationResponse;
|
|
5
4
|
export declare const mockGetUrl = "https://test-api/get/rules";
|
|
6
5
|
export declare const mockInvokeUrl = "https://test-api/invoke";
|
|
@@ -7,11 +7,6 @@ import type { Ari, Environment, InvocationResponse, InvocationResult, UserInputs
|
|
|
7
7
|
* for.
|
|
8
8
|
*/
|
|
9
9
|
export declare const createStubInvokeManuallyTriggeredRule: (stubbedInvocationResultForAllObjects: InvocationResult, responseDelay?: number) => (_env: Environment | null, _site: Ari, _ruleId: number, objects: string[], _inputs?: UserInputs) => Promise<InvocationResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* Default stubbed invokeManuallyTriggeredRule call. Returns 'SUCCESS' for
|
|
12
|
-
* all objects the rule was called for.
|
|
13
|
-
*/
|
|
14
|
-
export declare const successStubInvokeManuallyTriggeredRule: (_env: Environment | null, _site: Ari, _ruleId: number, objects: string[], _inputs?: UserInputs) => Promise<InvocationResponse>;
|
|
15
10
|
/**
|
|
16
11
|
* Render into a container which is appended to `document.body`.
|
|
17
12
|
*
|
|
@@ -75,22 +75,6 @@ export declare const SOFTWARE_PROJECT = "software";
|
|
|
75
75
|
export declare const SERVICE_DESK_PROJECT = "service_desk";
|
|
76
76
|
export declare const PRODUCT_DISCOVERY_PROJECT = "product_discovery";
|
|
77
77
|
export type ProjectType = typeof CORE_PROJECT | typeof SOFTWARE_PROJECT | typeof SERVICE_DESK_PROJECT | typeof PRODUCT_DISCOVERY_PROJECT;
|
|
78
|
-
export type ProjectId = string;
|
|
79
|
-
export type ProjectKey = string;
|
|
80
78
|
export type CloudId = string;
|
|
81
79
|
export type Environment = 'prod' | 'pre-prod' | 'staging' | 'dev' | 'local';
|
|
82
|
-
export type DevStack = {
|
|
83
|
-
name: string;
|
|
84
|
-
};
|
|
85
|
-
type EnvironmentDetails = {
|
|
86
|
-
failedStack: boolean;
|
|
87
|
-
releasedSuccessfully: boolean;
|
|
88
|
-
rolledBackStack: boolean;
|
|
89
|
-
stack: string;
|
|
90
|
-
};
|
|
91
|
-
type EnvironmentResponse = {
|
|
92
|
-
liveStack: EnvironmentDetails;
|
|
93
|
-
otherStacks: EnvironmentDetails[];
|
|
94
|
-
};
|
|
95
|
-
export type StacksResponse = Record<Environment, EnvironmentResponse>;
|
|
96
80
|
export {};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { type MediaPlacement } from '../../../../../constants';
|
|
2
2
|
import { type BlockProps } from '../types';
|
|
3
|
-
export type OnPreviewRenderOptions = {
|
|
4
|
-
placement?: MediaPlacement;
|
|
5
|
-
};
|
|
6
3
|
export type PreviewBlockProps = {
|
|
7
4
|
/**
|
|
8
5
|
* Indicate whether preview block should ignore the padding its parent container.
|
|
@@ -67,8 +67,6 @@ export interface HoverCardComponentProps extends HoverCardProps, HoverCardIntern
|
|
|
67
67
|
canOpen?: boolean;
|
|
68
68
|
closeOnChildClick?: boolean;
|
|
69
69
|
}
|
|
70
|
-
export type PreviewDisplay = 'card' | 'embed';
|
|
71
|
-
export type PreviewInvokeMethod = 'keyboard' | 'mouse_hover' | 'mouse_click';
|
|
72
70
|
export type HoverCardContentProps = {
|
|
73
71
|
id?: string;
|
|
74
72
|
analytics?: AnalyticsFacade;
|
|
@@ -7,10 +7,6 @@ export declare const NoLinkAppearance: import("@emotion/styled").StyledComponent
|
|
|
7
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
8
8
|
as?: import("react").ElementType<any> | undefined;
|
|
9
9
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
10
|
-
export declare const LowercaseAppearance: import("@emotion/styled").StyledComponent<{
|
|
11
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
-
as?: import("react").ElementType<any> | undefined;
|
|
13
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
14
10
|
export declare const LinkAppearance: import("@emotion/styled").StyledComponent<{
|
|
15
11
|
theme?: import("@emotion/react").Theme | undefined;
|
|
16
12
|
as?: import("react").ElementType<any> | undefined;
|
package/package.json
CHANGED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.extractByline = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _intlUtils = require("@formatjs/intl-utils");
|
|
10
|
-
var _reactIntlNext = require("react-intl-next");
|
|
11
|
-
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
12
|
-
var extractByline = exports.extractByline = function extractByline(jsonLd) {
|
|
13
|
-
var updatedAt = (0, _linkExtractors.extractDateUpdated)(jsonLd);
|
|
14
|
-
var createdAt = (0, _linkExtractors.extractDateCreated)(jsonLd);
|
|
15
|
-
if (updatedAt) {
|
|
16
|
-
var _selectUnit = (0, _intlUtils.selectUnit)(new Date(updatedAt).getTime()),
|
|
17
|
-
value = _selectUnit.value,
|
|
18
|
-
unit = _selectUnit.unit;
|
|
19
|
-
var updatedBy = (0, _linkExtractors.extractPersonUpdatedBy)(jsonLd);
|
|
20
|
-
return /*#__PURE__*/_react.default.createElement("span", null, "Updated ", updatedBy && "by ".concat(updatedBy.name), ' ', /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedRelativeTime, {
|
|
21
|
-
value: value,
|
|
22
|
-
unit: unit
|
|
23
|
-
}));
|
|
24
|
-
} else if (createdAt) {
|
|
25
|
-
var _selectUnit2 = (0, _intlUtils.selectUnit)(new Date(createdAt).getTime()),
|
|
26
|
-
_value = _selectUnit2.value,
|
|
27
|
-
_unit = _selectUnit2.unit;
|
|
28
|
-
var createdBy = (0, _linkExtractors.extractPersonCreatedBy)(jsonLd);
|
|
29
|
-
var createdByPerson = extractFirstPerson(createdBy);
|
|
30
|
-
return /*#__PURE__*/_react.default.createElement("span", null, "Created ", createdByPerson && "by ".concat(createdByPerson.name), ' ', /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedRelativeTime, {
|
|
31
|
-
value: _value,
|
|
32
|
-
unit: _unit
|
|
33
|
-
}));
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
var extractFirstPerson = function extractFirstPerson(persons) {
|
|
37
|
-
if (persons && persons.length > 0) {
|
|
38
|
-
return persons.shift();
|
|
39
|
-
}
|
|
40
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.extractAttachmentCount = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _attachment = _interopRequireDefault(require("@atlaskit/icon/core/migration/attachment"));
|
|
10
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
11
|
-
var extractAttachmentCount = exports.extractAttachmentCount = function extractAttachmentCount(jsonLd) {
|
|
12
|
-
var attachmentCount = jsonLd['atlassian:attachmentCount'];
|
|
13
|
-
if (attachmentCount) {
|
|
14
|
-
return {
|
|
15
|
-
text: attachmentCount.toString(),
|
|
16
|
-
icon: /*#__PURE__*/_react.default.createElement(_attachment.default, {
|
|
17
|
-
LEGACY_size: "small",
|
|
18
|
-
label: "attachments",
|
|
19
|
-
color: "var(--ds-icon-subtle, ".concat(_colors.N600, ")")
|
|
20
|
-
})
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.extractCommentCount = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _comment = _interopRequireDefault(require("@atlaskit/icon/core/migration/comment"));
|
|
10
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
11
|
-
var extractCommentCount = exports.extractCommentCount = function extractCommentCount(jsonLd) {
|
|
12
|
-
var commentCount = jsonLd['schema:commentCount'];
|
|
13
|
-
if (commentCount) {
|
|
14
|
-
return {
|
|
15
|
-
text: commentCount.toString(),
|
|
16
|
-
icon: /*#__PURE__*/_react.default.createElement(_comment.default, {
|
|
17
|
-
label: "comment-count",
|
|
18
|
-
key: "comments-count-icon",
|
|
19
|
-
LEGACY_size: "small",
|
|
20
|
-
color: "var(--ds-icon-subtle, ".concat(_colors.N600, ")")
|
|
21
|
-
})
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.extractProgrammingLanguage = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _angleBracketsCode = _interopRequireDefault(require("@atlaskit/icon/core/migration/angle-brackets--code"));
|
|
10
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
11
|
-
var extractProgrammingLanguage = exports.extractProgrammingLanguage = function extractProgrammingLanguage(jsonLd) {
|
|
12
|
-
var programmingLanguage = jsonLd['schema:programmingLanguage'];
|
|
13
|
-
if (programmingLanguage) {
|
|
14
|
-
return {
|
|
15
|
-
text: programmingLanguage,
|
|
16
|
-
icon: /*#__PURE__*/_react.default.createElement(_angleBracketsCode.default, {
|
|
17
|
-
LEGACY_size: "small",
|
|
18
|
-
label: "code",
|
|
19
|
-
color: "var(--ds-icon-subtle, ".concat(_colors.N600, ")")
|
|
20
|
-
})
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.extractSubscriberCount = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _peopleGroupPeople = _interopRequireDefault(require("@atlaskit/icon/core/migration/people-group--people"));
|
|
10
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
11
|
-
var extractSubscriberCount = exports.extractSubscriberCount = function extractSubscriberCount(jsonLd) {
|
|
12
|
-
var subscriberCount = jsonLd['atlassian:subscriberCount'];
|
|
13
|
-
if (subscriberCount) {
|
|
14
|
-
return {
|
|
15
|
-
text: subscriberCount.toString(),
|
|
16
|
-
icon: /*#__PURE__*/_react.default.createElement(_peopleGroupPeople.default, {
|
|
17
|
-
LEGACY_size: "small",
|
|
18
|
-
label: "subscribers",
|
|
19
|
-
color: "var(--ds-icon-subtle, ".concat(_colors.N600, ")")
|
|
20
|
-
})
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "extractAttachmentCount", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _extractAttachmentCount.extractAttachmentCount;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "extractCommentCount", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _extractCommentCount.extractCommentCount;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "extractDownloadUrl", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _extractDownloadUrl.extractDownloadUrl;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "extractProgrammingLanguage", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _extractProgrammingLanguage.extractProgrammingLanguage;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "extractSubscriberCount", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function get() {
|
|
33
|
-
return _extractSubscriberCount.extractSubscriberCount;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
var _extractCommentCount = require("./extractCommentCount");
|
|
37
|
-
var _extractDownloadUrl = require("./extractDownloadUrl");
|
|
38
|
-
var _extractProgrammingLanguage = require("./extractProgrammingLanguage");
|
|
39
|
-
var _extractSubscriberCount = require("./extractSubscriberCount");
|
|
40
|
-
var _extractAttachmentCount = require("./extractAttachmentCount");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { selectUnit } from '@formatjs/intl-utils';
|
|
3
|
-
import { FormattedRelativeTime } from 'react-intl-next';
|
|
4
|
-
import { extractDateCreated, extractDateUpdated, extractPersonCreatedBy, extractPersonUpdatedBy } from '@atlaskit/link-extractors';
|
|
5
|
-
export const extractByline = jsonLd => {
|
|
6
|
-
const updatedAt = extractDateUpdated(jsonLd);
|
|
7
|
-
const createdAt = extractDateCreated(jsonLd);
|
|
8
|
-
if (updatedAt) {
|
|
9
|
-
const {
|
|
10
|
-
value,
|
|
11
|
-
unit
|
|
12
|
-
} = selectUnit(new Date(updatedAt).getTime());
|
|
13
|
-
const updatedBy = extractPersonUpdatedBy(jsonLd);
|
|
14
|
-
return /*#__PURE__*/React.createElement("span", null, "Updated ", updatedBy && `by ${updatedBy.name}`, ' ', /*#__PURE__*/React.createElement(FormattedRelativeTime, {
|
|
15
|
-
value: value,
|
|
16
|
-
unit: unit
|
|
17
|
-
}));
|
|
18
|
-
} else if (createdAt) {
|
|
19
|
-
const {
|
|
20
|
-
value,
|
|
21
|
-
unit
|
|
22
|
-
} = selectUnit(new Date(createdAt).getTime());
|
|
23
|
-
const createdBy = extractPersonCreatedBy(jsonLd);
|
|
24
|
-
const createdByPerson = extractFirstPerson(createdBy);
|
|
25
|
-
return /*#__PURE__*/React.createElement("span", null, "Created ", createdByPerson && `by ${createdByPerson.name}`, ' ', /*#__PURE__*/React.createElement(FormattedRelativeTime, {
|
|
26
|
-
value: value,
|
|
27
|
-
unit: unit
|
|
28
|
-
}));
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
const extractFirstPerson = persons => {
|
|
32
|
-
if (persons && persons.length > 0) {
|
|
33
|
-
return persons.shift();
|
|
34
|
-
}
|
|
35
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import AttachmentIcon from '@atlaskit/icon/core/migration/attachment';
|
|
3
|
-
import { N600 } from '@atlaskit/theme/colors';
|
|
4
|
-
export const extractAttachmentCount = jsonLd => {
|
|
5
|
-
const attachmentCount = jsonLd['atlassian:attachmentCount'];
|
|
6
|
-
if (attachmentCount) {
|
|
7
|
-
return {
|
|
8
|
-
text: attachmentCount.toString(),
|
|
9
|
-
icon: /*#__PURE__*/React.createElement(AttachmentIcon, {
|
|
10
|
-
LEGACY_size: "small",
|
|
11
|
-
label: "attachments",
|
|
12
|
-
color: `var(--ds-icon-subtle, ${N600})`
|
|
13
|
-
})
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ChatIcon from '@atlaskit/icon/core/migration/comment';
|
|
3
|
-
import { N600 } from '@atlaskit/theme/colors';
|
|
4
|
-
export const extractCommentCount = jsonLd => {
|
|
5
|
-
const commentCount = jsonLd['schema:commentCount'];
|
|
6
|
-
if (commentCount) {
|
|
7
|
-
return {
|
|
8
|
-
text: commentCount.toString(),
|
|
9
|
-
icon: /*#__PURE__*/React.createElement(ChatIcon, {
|
|
10
|
-
label: "comment-count",
|
|
11
|
-
key: "comments-count-icon",
|
|
12
|
-
LEGACY_size: "small",
|
|
13
|
-
color: `var(--ds-icon-subtle, ${N600})`
|
|
14
|
-
})
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import CodeIcon from '@atlaskit/icon/core/migration/angle-brackets--code';
|
|
3
|
-
import { N600 } from '@atlaskit/theme/colors';
|
|
4
|
-
export const extractProgrammingLanguage = jsonLd => {
|
|
5
|
-
const programmingLanguage = jsonLd['schema:programmingLanguage'];
|
|
6
|
-
if (programmingLanguage) {
|
|
7
|
-
return {
|
|
8
|
-
text: programmingLanguage,
|
|
9
|
-
icon: /*#__PURE__*/React.createElement(CodeIcon, {
|
|
10
|
-
LEGACY_size: "small",
|
|
11
|
-
label: "code",
|
|
12
|
-
color: `var(--ds-icon-subtle, ${N600})`
|
|
13
|
-
})
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PeopleIcon from '@atlaskit/icon/core/migration/people-group--people';
|
|
3
|
-
import { N600 } from '@atlaskit/theme/colors';
|
|
4
|
-
export const extractSubscriberCount = jsonLd => {
|
|
5
|
-
const subscriberCount = jsonLd['atlassian:subscriberCount'];
|
|
6
|
-
if (subscriberCount) {
|
|
7
|
-
return {
|
|
8
|
-
text: subscriberCount.toString(),
|
|
9
|
-
icon: /*#__PURE__*/React.createElement(PeopleIcon, {
|
|
10
|
-
LEGACY_size: "small",
|
|
11
|
-
label: "subscribers",
|
|
12
|
-
color: `var(--ds-icon-subtle, ${N600})`
|
|
13
|
-
})
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { extractCommentCount } from './extractCommentCount';
|
|
2
|
-
export { extractDownloadUrl } from './extractDownloadUrl';
|
|
3
|
-
export { extractProgrammingLanguage } from './extractProgrammingLanguage';
|
|
4
|
-
export { extractSubscriberCount } from './extractSubscriberCount';
|
|
5
|
-
export { extractAttachmentCount } from './extractAttachmentCount';
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { selectUnit } from '@formatjs/intl-utils';
|
|
3
|
-
import { FormattedRelativeTime } from 'react-intl-next';
|
|
4
|
-
import { extractDateCreated, extractDateUpdated, extractPersonCreatedBy, extractPersonUpdatedBy } from '@atlaskit/link-extractors';
|
|
5
|
-
export var extractByline = function extractByline(jsonLd) {
|
|
6
|
-
var updatedAt = extractDateUpdated(jsonLd);
|
|
7
|
-
var createdAt = extractDateCreated(jsonLd);
|
|
8
|
-
if (updatedAt) {
|
|
9
|
-
var _selectUnit = selectUnit(new Date(updatedAt).getTime()),
|
|
10
|
-
value = _selectUnit.value,
|
|
11
|
-
unit = _selectUnit.unit;
|
|
12
|
-
var updatedBy = extractPersonUpdatedBy(jsonLd);
|
|
13
|
-
return /*#__PURE__*/React.createElement("span", null, "Updated ", updatedBy && "by ".concat(updatedBy.name), ' ', /*#__PURE__*/React.createElement(FormattedRelativeTime, {
|
|
14
|
-
value: value,
|
|
15
|
-
unit: unit
|
|
16
|
-
}));
|
|
17
|
-
} else if (createdAt) {
|
|
18
|
-
var _selectUnit2 = selectUnit(new Date(createdAt).getTime()),
|
|
19
|
-
_value = _selectUnit2.value,
|
|
20
|
-
_unit = _selectUnit2.unit;
|
|
21
|
-
var createdBy = extractPersonCreatedBy(jsonLd);
|
|
22
|
-
var createdByPerson = extractFirstPerson(createdBy);
|
|
23
|
-
return /*#__PURE__*/React.createElement("span", null, "Created ", createdByPerson && "by ".concat(createdByPerson.name), ' ', /*#__PURE__*/React.createElement(FormattedRelativeTime, {
|
|
24
|
-
value: _value,
|
|
25
|
-
unit: _unit
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
var extractFirstPerson = function extractFirstPerson(persons) {
|
|
30
|
-
if (persons && persons.length > 0) {
|
|
31
|
-
return persons.shift();
|
|
32
|
-
}
|
|
33
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import AttachmentIcon from '@atlaskit/icon/core/migration/attachment';
|
|
3
|
-
import { N600 } from '@atlaskit/theme/colors';
|
|
4
|
-
export var extractAttachmentCount = function extractAttachmentCount(jsonLd) {
|
|
5
|
-
var attachmentCount = jsonLd['atlassian:attachmentCount'];
|
|
6
|
-
if (attachmentCount) {
|
|
7
|
-
return {
|
|
8
|
-
text: attachmentCount.toString(),
|
|
9
|
-
icon: /*#__PURE__*/React.createElement(AttachmentIcon, {
|
|
10
|
-
LEGACY_size: "small",
|
|
11
|
-
label: "attachments",
|
|
12
|
-
color: "var(--ds-icon-subtle, ".concat(N600, ")")
|
|
13
|
-
})
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ChatIcon from '@atlaskit/icon/core/migration/comment';
|
|
3
|
-
import { N600 } from '@atlaskit/theme/colors';
|
|
4
|
-
export var extractCommentCount = function extractCommentCount(jsonLd) {
|
|
5
|
-
var commentCount = jsonLd['schema:commentCount'];
|
|
6
|
-
if (commentCount) {
|
|
7
|
-
return {
|
|
8
|
-
text: commentCount.toString(),
|
|
9
|
-
icon: /*#__PURE__*/React.createElement(ChatIcon, {
|
|
10
|
-
label: "comment-count",
|
|
11
|
-
key: "comments-count-icon",
|
|
12
|
-
LEGACY_size: "small",
|
|
13
|
-
color: "var(--ds-icon-subtle, ".concat(N600, ")")
|
|
14
|
-
})
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import CodeIcon from '@atlaskit/icon/core/migration/angle-brackets--code';
|
|
3
|
-
import { N600 } from '@atlaskit/theme/colors';
|
|
4
|
-
export var extractProgrammingLanguage = function extractProgrammingLanguage(jsonLd) {
|
|
5
|
-
var programmingLanguage = jsonLd['schema:programmingLanguage'];
|
|
6
|
-
if (programmingLanguage) {
|
|
7
|
-
return {
|
|
8
|
-
text: programmingLanguage,
|
|
9
|
-
icon: /*#__PURE__*/React.createElement(CodeIcon, {
|
|
10
|
-
LEGACY_size: "small",
|
|
11
|
-
label: "code",
|
|
12
|
-
color: "var(--ds-icon-subtle, ".concat(N600, ")")
|
|
13
|
-
})
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PeopleIcon from '@atlaskit/icon/core/migration/people-group--people';
|
|
3
|
-
import { N600 } from '@atlaskit/theme/colors';
|
|
4
|
-
export var extractSubscriberCount = function extractSubscriberCount(jsonLd) {
|
|
5
|
-
var subscriberCount = jsonLd['atlassian:subscriberCount'];
|
|
6
|
-
if (subscriberCount) {
|
|
7
|
-
return {
|
|
8
|
-
text: subscriberCount.toString(),
|
|
9
|
-
icon: /*#__PURE__*/React.createElement(PeopleIcon, {
|
|
10
|
-
LEGACY_size: "small",
|
|
11
|
-
label: "subscribers",
|
|
12
|
-
color: "var(--ds-icon-subtle, ".concat(N600, ")")
|
|
13
|
-
})
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { extractCommentCount } from './extractCommentCount';
|
|
2
|
-
export { extractDownloadUrl } from './extractDownloadUrl';
|
|
3
|
-
export { extractProgrammingLanguage } from './extractProgrammingLanguage';
|
|
4
|
-
export { extractSubscriberCount } from './extractSubscriberCount';
|
|
5
|
-
export { extractAttachmentCount } from './extractAttachmentCount';
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type JsonLd } from 'json-ld-types';
|
|
2
|
-
import { type LinkDetail } from './types';
|
|
3
|
-
export type LinkAttachmentType = JsonLd.Data.Document | JsonLd.Data.Task | JsonLd.Data.TaskType | JsonLd.Data.Project;
|
|
4
|
-
export declare const extractAttachmentCount: (jsonLd: LinkAttachmentType) => LinkDetail | undefined;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type JsonLd } from 'json-ld-types';
|
|
2
|
-
import { type LinkDetail } from './types';
|
|
3
|
-
export type LinkCommentType = JsonLd.Data.Document | JsonLd.Data.Page | JsonLd.Data.Project | JsonLd.Data.SourceCodeCommit | JsonLd.Data.TaskType;
|
|
4
|
-
export declare const extractCommentCount: (jsonLd: LinkCommentType) => LinkDetail | undefined;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type JsonLd } from 'json-ld-types';
|
|
2
|
-
import { type LinkDetail } from './types';
|
|
3
|
-
export type LinkProgrammingLanguageType = JsonLd.Data.SourceCodeDocument | JsonLd.Data.SourceCodeCommit | JsonLd.Data.SourceCodePullRequest | JsonLd.Data.SourceCodeReference | JsonLd.Data.SourceCodeRepository;
|
|
4
|
-
export declare const extractProgrammingLanguage: (jsonLd: LinkProgrammingLanguageType) => LinkDetail | undefined;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type JsonLd } from 'json-ld-types';
|
|
2
|
-
import { type LinkDetail } from './types';
|
|
3
|
-
export type LinkSubscriberType = JsonLd.Data.SourceCodeRepository | JsonLd.Data.Task | JsonLd.Data.TaskType;
|
|
4
|
-
export declare const extractSubscriberCount: (jsonLd: LinkSubscriberType) => LinkDetail | undefined;
|