@atlaskit/smart-card 32.8.1 → 32.8.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 +16 -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/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/test-utils.js +1 -11
- package/dist/cjs/view/BlockCard/views/UnauthorisedView.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +2 -3
- 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/FlexibleCard/components/elements/badge/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/styled.js +2 -3
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/utils.js +3 -6
- package/dist/cjs/view/HoverCard/components/views/forbidden/styled.js +2 -4
- package/dist/cjs/view/HoverCard/components/views/unauthorised/styled.js +2 -3
- package/dist/cjs/view/InlineCard/styled.js +1 -6
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/ai-summary/index.js +1 -2
- 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/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/test-utils.js +0 -10
- package/dist/es2019/view/BlockCard/views/UnauthorisedView.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +2 -3
- 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/FlexibleCard/components/elements/badge/index.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/styled.js +2 -3
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/utils.js +3 -6
- package/dist/es2019/view/HoverCard/components/views/forbidden/styled.js +2 -4
- package/dist/es2019/view/HoverCard/components/views/unauthorised/styled.js +2 -3
- package/dist/es2019/view/InlineCard/styled.js +0 -5
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/ai-summary/index.js +1 -2
- 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/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/test-utils.js +0 -10
- package/dist/esm/view/BlockCard/views/UnauthorisedView.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +2 -3
- 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/FlexibleCard/components/elements/badge/index.js +1 -2
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +1 -2
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/styled.js +2 -3
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +1 -2
- package/dist/esm/view/FlexibleCard/components/utils.js +3 -6
- package/dist/esm/view/HoverCard/components/views/forbidden/styled.js +2 -4
- package/dist/esm/view/HoverCard/components/views/unauthorised/styled.js +2 -3
- package/dist/esm/view/InlineCard/styled.js +0 -5
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/ai-summary/index.js +1 -2
- 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/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/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 +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;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { extractCommentCount } from './extractCommentCount';
|
|
2
|
-
export type { LinkCommentType } from './extractCommentCount';
|
|
3
|
-
export { extractDownloadUrl } from './extractDownloadUrl';
|
|
4
|
-
export { extractProgrammingLanguage } from './extractProgrammingLanguage';
|
|
5
|
-
export type { LinkProgrammingLanguageType } from './extractProgrammingLanguage';
|
|
6
|
-
export { extractSubscriberCount } from './extractSubscriberCount';
|
|
7
|
-
export type { LinkSubscriberType } from './extractSubscriberCount';
|
|
8
|
-
export { extractAttachmentCount } from './extractAttachmentCount';
|
|
9
|
-
export type { LinkAttachmentType } from './extractAttachmentCount';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type DestinationProduct, type DestinationSubproduct } from '../../utils/analytics/types';
|
|
2
|
-
export interface CommonEventProps {
|
|
3
|
-
definitionId?: string;
|
|
4
|
-
extensionKey?: string;
|
|
5
|
-
resourceType?: string;
|
|
6
|
-
destinationSubproduct?: DestinationSubproduct | string;
|
|
7
|
-
destinationProduct?: DestinationProduct | string;
|
|
8
|
-
location?: string;
|
|
9
|
-
}
|
|
@@ -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;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { extractCommentCount } from './extractCommentCount';
|
|
2
|
-
export type { LinkCommentType } from './extractCommentCount';
|
|
3
|
-
export { extractDownloadUrl } from './extractDownloadUrl';
|
|
4
|
-
export { extractProgrammingLanguage } from './extractProgrammingLanguage';
|
|
5
|
-
export type { LinkProgrammingLanguageType } from './extractProgrammingLanguage';
|
|
6
|
-
export { extractSubscriberCount } from './extractSubscriberCount';
|
|
7
|
-
export type { LinkSubscriberType } from './extractSubscriberCount';
|
|
8
|
-
export { extractAttachmentCount } from './extractAttachmentCount';
|
|
9
|
-
export type { LinkAttachmentType } from './extractAttachmentCount';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type DestinationProduct, type DestinationSubproduct } from '../../utils/analytics/types';
|
|
2
|
-
export interface CommonEventProps {
|
|
3
|
-
definitionId?: string;
|
|
4
|
-
extensionKey?: string;
|
|
5
|
-
resourceType?: string;
|
|
6
|
-
destinationSubproduct?: DestinationSubproduct | string;
|
|
7
|
-
destinationProduct?: DestinationProduct | string;
|
|
8
|
-
location?: string;
|
|
9
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|