@atlaskit/smart-card 38.4.5 → 38.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/cjs/extractors/flexible/index.js +8 -1
- package/dist/cjs/extractors/flexible/utils.js +10 -1
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/EmbedModal/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +28 -4
- package/dist/cjs/view/FlexibleCard/components/elements/applied-to-components-count-element/index.js +2 -10
- package/dist/cjs/view/FlexibleCard/components/elements/assigned-to-element/index.js +21 -0
- package/dist/cjs/view/FlexibleCard/components/elements/assigned-to-group-element/index.js +20 -0
- package/dist/cjs/view/FlexibleCard/components/elements/attachment-count-element/index.js +23 -0
- package/dist/cjs/view/FlexibleCard/components/elements/author-group-element/index.js +20 -0
- package/dist/cjs/view/FlexibleCard/components/elements/checklist-progress-element/index.js +23 -0
- package/dist/cjs/view/FlexibleCard/components/elements/collaborator-group-element/index.js +20 -0
- package/dist/cjs/view/FlexibleCard/components/elements/comment-count-element/index.js +23 -0
- package/dist/cjs/view/FlexibleCard/components/elements/{atlaskit-badge-element → common/base-atlaskit-badge-element}/index.js +8 -3
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-avatar-group-element/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-badge-element/index.js +13 -2
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-date-time-element/index.js +9 -3
- package/dist/cjs/view/FlexibleCard/components/elements/{icon-element → common/base-icon-element}/index.js +25 -12
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-link-element/index.js +8 -2
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/index.js +17 -2
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-text-element/index.js +28 -2
- package/dist/cjs/view/FlexibleCard/components/elements/common/index.js +77 -7
- package/dist/cjs/view/FlexibleCard/components/elements/created-by-element/index.js +21 -0
- package/dist/cjs/view/FlexibleCard/components/elements/created-on-element/index.js +20 -0
- package/dist/cjs/view/FlexibleCard/components/elements/due-on-element/index.js +20 -0
- package/dist/cjs/view/FlexibleCard/components/elements/index.js +10 -0
- package/dist/cjs/view/FlexibleCard/components/elements/latest-commit-element/index.js +23 -0
- package/dist/cjs/view/FlexibleCard/components/elements/link-icon-element/index.js +31 -0
- package/dist/cjs/view/FlexibleCard/components/elements/location-element/index.js +23 -0
- package/dist/cjs/view/FlexibleCard/components/elements/modified-by-element/index.js +21 -0
- package/dist/cjs/view/FlexibleCard/components/elements/modified-on-element/index.js +20 -0
- package/dist/cjs/view/FlexibleCard/components/elements/owned-by-element/index.js +21 -0
- package/dist/cjs/view/FlexibleCard/components/elements/owned-by-group-element/index.js +20 -0
- package/dist/cjs/view/FlexibleCard/components/elements/preview-element/index.js +2 -10
- package/dist/cjs/view/FlexibleCard/components/elements/priority-element/index.js +21 -0
- package/dist/cjs/view/FlexibleCard/components/elements/programming-language-element/index.js +22 -0
- package/dist/cjs/view/FlexibleCard/components/elements/provider-element/index.js +21 -0
- package/dist/cjs/view/FlexibleCard/components/elements/react-count-element/index.js +23 -0
- package/dist/cjs/view/FlexibleCard/components/elements/read-time-element/index.js +21 -0
- package/dist/cjs/view/FlexibleCard/components/elements/sent-on-element/index.js +20 -0
- package/dist/cjs/view/FlexibleCard/components/elements/snippet-element/index.js +2 -7
- package/dist/cjs/view/FlexibleCard/components/elements/source-branch-element/index.js +20 -0
- package/dist/cjs/view/FlexibleCard/components/elements/state-element/index.js +21 -0
- package/dist/cjs/view/FlexibleCard/components/elements/story-points-element/index.js +20 -0
- package/dist/cjs/view/FlexibleCard/components/elements/sub-tasks-progress-element/index.js +23 -0
- package/dist/cjs/view/FlexibleCard/components/elements/subscriber-count-element/index.js +23 -0
- package/dist/cjs/view/FlexibleCard/components/elements/target-branch-element/index.js +20 -0
- package/dist/cjs/view/FlexibleCard/components/elements/title-element/index.js +20 -0
- package/dist/cjs/view/FlexibleCard/components/elements/utils.js +129 -139
- package/dist/cjs/view/FlexibleCard/components/elements/view-count-element/index.js +23 -0
- package/dist/cjs/view/FlexibleCard/components/elements/vote-count-element/index.js +23 -0
- package/dist/cjs/view/HoverCard/components/views/resolving/index.js +2 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/flexible/index.js +9 -1
- package/dist/es2019/extractors/flexible/utils.js +4 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/EmbedModal/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/snippet-block/index.js +28 -4
- package/dist/es2019/view/FlexibleCard/components/elements/applied-to-components-count-element/index.js +3 -8
- package/dist/es2019/view/FlexibleCard/components/elements/assigned-to-element/index.js +14 -0
- package/dist/es2019/view/FlexibleCard/components/elements/assigned-to-group-element/index.js +13 -0
- package/dist/es2019/view/FlexibleCard/components/elements/attachment-count-element/index.js +16 -0
- package/dist/es2019/view/FlexibleCard/components/elements/author-group-element/index.js +13 -0
- package/dist/es2019/view/FlexibleCard/components/elements/checklist-progress-element/index.js +16 -0
- package/dist/es2019/view/FlexibleCard/components/elements/collaborator-group-element/index.js +13 -0
- package/dist/es2019/view/FlexibleCard/components/elements/comment-count-element/index.js +16 -0
- package/dist/es2019/view/FlexibleCard/components/elements/{atlaskit-badge-element → common/base-atlaskit-badge-element}/index.js +7 -2
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-avatar-group-element/index.js +8 -1
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-badge-element/index.js +12 -1
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-date-time-element/index.js +8 -2
- package/dist/es2019/view/FlexibleCard/components/elements/{icon-element → common/base-icon-element}/index.js +19 -5
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-link-element/index.js +7 -1
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/index.js +16 -1
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-text-element/index.js +27 -1
- package/dist/es2019/view/FlexibleCard/components/elements/common/index.js +8 -6
- package/dist/es2019/view/FlexibleCard/components/elements/created-by-element/index.js +14 -0
- package/dist/es2019/view/FlexibleCard/components/elements/created-on-element/index.js +13 -0
- package/dist/es2019/view/FlexibleCard/components/elements/due-on-element/index.js +13 -0
- package/dist/es2019/view/FlexibleCard/components/elements/index.js +10 -0
- package/dist/es2019/view/FlexibleCard/components/elements/latest-commit-element/index.js +16 -0
- package/dist/es2019/view/FlexibleCard/components/elements/link-icon-element/index.js +23 -0
- package/dist/es2019/view/FlexibleCard/components/elements/location-element/index.js +16 -0
- package/dist/es2019/view/FlexibleCard/components/elements/modified-by-element/index.js +14 -0
- package/dist/es2019/view/FlexibleCard/components/elements/modified-on-element/index.js +13 -0
- package/dist/es2019/view/FlexibleCard/components/elements/owned-by-element/index.js +14 -0
- package/dist/es2019/view/FlexibleCard/components/elements/owned-by-group-element/index.js +13 -0
- package/dist/es2019/view/FlexibleCard/components/elements/preview-element/index.js +3 -8
- package/dist/es2019/view/FlexibleCard/components/elements/priority-element/index.js +14 -0
- package/dist/es2019/view/FlexibleCard/components/elements/programming-language-element/index.js +15 -0
- package/dist/es2019/view/FlexibleCard/components/elements/provider-element/index.js +14 -0
- package/dist/es2019/view/FlexibleCard/components/elements/react-count-element/index.js +16 -0
- package/dist/es2019/view/FlexibleCard/components/elements/read-time-element/index.js +14 -0
- package/dist/es2019/view/FlexibleCard/components/elements/sent-on-element/index.js +13 -0
- package/dist/es2019/view/FlexibleCard/components/elements/snippet-element/index.js +2 -7
- package/dist/es2019/view/FlexibleCard/components/elements/source-branch-element/index.js +13 -0
- package/dist/es2019/view/FlexibleCard/components/elements/state-element/index.js +14 -0
- package/dist/es2019/view/FlexibleCard/components/elements/story-points-element/index.js +13 -0
- package/dist/es2019/view/FlexibleCard/components/elements/sub-tasks-progress-element/index.js +16 -0
- package/dist/es2019/view/FlexibleCard/components/elements/subscriber-count-element/index.js +16 -0
- package/dist/es2019/view/FlexibleCard/components/elements/target-branch-element/index.js +13 -0
- package/dist/es2019/view/FlexibleCard/components/elements/title-element/index.js +13 -0
- package/dist/es2019/view/FlexibleCard/components/elements/utils.js +116 -124
- package/dist/es2019/view/FlexibleCard/components/elements/view-count-element/index.js +16 -0
- package/dist/es2019/view/FlexibleCard/components/elements/vote-count-element/index.js +16 -0
- package/dist/es2019/view/HoverCard/components/views/resolving/index.js +2 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/flexible/index.js +9 -2
- package/dist/esm/extractors/flexible/utils.js +9 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/EmbedModal/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/blocks/snippet-block/index.js +28 -4
- package/dist/esm/view/FlexibleCard/components/elements/applied-to-components-count-element/index.js +3 -8
- package/dist/esm/view/FlexibleCard/components/elements/assigned-to-element/index.js +14 -0
- package/dist/esm/view/FlexibleCard/components/elements/assigned-to-group-element/index.js +13 -0
- package/dist/esm/view/FlexibleCard/components/elements/attachment-count-element/index.js +16 -0
- package/dist/esm/view/FlexibleCard/components/elements/author-group-element/index.js +13 -0
- package/dist/esm/view/FlexibleCard/components/elements/checklist-progress-element/index.js +16 -0
- package/dist/esm/view/FlexibleCard/components/elements/collaborator-group-element/index.js +13 -0
- package/dist/esm/view/FlexibleCard/components/elements/comment-count-element/index.js +16 -0
- package/dist/esm/view/FlexibleCard/components/elements/{atlaskit-badge-element → common/base-atlaskit-badge-element}/index.js +7 -2
- package/dist/esm/view/FlexibleCard/components/elements/common/base-avatar-group-element/index.js +8 -1
- package/dist/esm/view/FlexibleCard/components/elements/common/base-badge-element/index.js +12 -1
- package/dist/esm/view/FlexibleCard/components/elements/common/base-date-time-element/index.js +8 -2
- package/dist/esm/view/FlexibleCard/components/elements/{icon-element → common/base-icon-element}/index.js +21 -5
- package/dist/esm/view/FlexibleCard/components/elements/common/base-link-element/index.js +7 -1
- package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/index.js +16 -1
- package/dist/esm/view/FlexibleCard/components/elements/common/base-text-element/index.js +27 -1
- package/dist/esm/view/FlexibleCard/components/elements/common/index.js +8 -6
- package/dist/esm/view/FlexibleCard/components/elements/created-by-element/index.js +14 -0
- package/dist/esm/view/FlexibleCard/components/elements/created-on-element/index.js +13 -0
- package/dist/esm/view/FlexibleCard/components/elements/due-on-element/index.js +13 -0
- package/dist/esm/view/FlexibleCard/components/elements/index.js +10 -0
- package/dist/esm/view/FlexibleCard/components/elements/latest-commit-element/index.js +16 -0
- package/dist/esm/view/FlexibleCard/components/elements/link-icon-element/index.js +24 -0
- package/dist/esm/view/FlexibleCard/components/elements/location-element/index.js +16 -0
- package/dist/esm/view/FlexibleCard/components/elements/modified-by-element/index.js +14 -0
- package/dist/esm/view/FlexibleCard/components/elements/modified-on-element/index.js +13 -0
- package/dist/esm/view/FlexibleCard/components/elements/owned-by-element/index.js +14 -0
- package/dist/esm/view/FlexibleCard/components/elements/owned-by-group-element/index.js +13 -0
- package/dist/esm/view/FlexibleCard/components/elements/preview-element/index.js +3 -8
- package/dist/esm/view/FlexibleCard/components/elements/priority-element/index.js +14 -0
- package/dist/esm/view/FlexibleCard/components/elements/programming-language-element/index.js +15 -0
- package/dist/esm/view/FlexibleCard/components/elements/provider-element/index.js +14 -0
- package/dist/esm/view/FlexibleCard/components/elements/react-count-element/index.js +16 -0
- package/dist/esm/view/FlexibleCard/components/elements/read-time-element/index.js +14 -0
- package/dist/esm/view/FlexibleCard/components/elements/sent-on-element/index.js +13 -0
- package/dist/esm/view/FlexibleCard/components/elements/snippet-element/index.js +2 -7
- package/dist/esm/view/FlexibleCard/components/elements/source-branch-element/index.js +13 -0
- package/dist/esm/view/FlexibleCard/components/elements/state-element/index.js +14 -0
- package/dist/esm/view/FlexibleCard/components/elements/story-points-element/index.js +13 -0
- package/dist/esm/view/FlexibleCard/components/elements/sub-tasks-progress-element/index.js +16 -0
- package/dist/esm/view/FlexibleCard/components/elements/subscriber-count-element/index.js +16 -0
- package/dist/esm/view/FlexibleCard/components/elements/target-branch-element/index.js +13 -0
- package/dist/esm/view/FlexibleCard/components/elements/title-element/index.js +13 -0
- package/dist/esm/view/FlexibleCard/components/elements/utils.js +116 -125
- package/dist/esm/view/FlexibleCard/components/elements/view-count-element/index.js +16 -0
- package/dist/esm/view/FlexibleCard/components/elements/vote-count-element/index.js +16 -0
- package/dist/esm/view/HoverCard/components/views/resolving/index.js +2 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/__fixtures__/bitbucket-pull-request.d.ts +2 -0
- package/dist/types/__fixtures__/compass-scorecard.d.ts +2 -0
- package/dist/types/__fixtures__/confluence-blog.d.ts +2 -0
- package/dist/types/__fixtures__/confluence-page.d.ts +2 -0
- package/dist/types/__fixtures__/confluence-space.d.ts +2 -0
- package/dist/types/__fixtures__/confluence-template.d.ts +2 -0
- package/dist/types/__fixtures__/figma-entity.d.ts +2 -0
- package/dist/types/__fixtures__/figma.d.ts +2 -0
- package/dist/types/__fixtures__/jira-roadmap.d.ts +2 -0
- package/dist/types/__fixtures__/jira-task.d.ts +2 -0
- package/dist/types/__fixtures__/jira-timeline.d.ts +2 -0
- package/dist/types/__fixtures__/youtube-video.d.ts +2 -0
- package/dist/types/extractors/flexible/utils.d.ts +3 -0
- package/dist/types/state/flexible-ui-context/types.d.ts +8 -0
- package/dist/types/view/FlexibleCard/components/elements/assigned-to-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/assigned-to-group-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/attachment-count-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/author-group-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/checklist-progress-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/collaborator-group-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/comment-count-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/common/base-atlaskit-badge-element/index.d.ts +13 -0
- package/dist/types/view/FlexibleCard/components/elements/common/base-avatar-group-element/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/elements/common/base-badge-element/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/elements/common/base-date-time-element/index.d.ts +4 -3
- package/dist/{types-ts4.5/view/FlexibleCard/components/elements/icon-element → types/view/FlexibleCard/components/elements/common/base-icon-element}/index.d.ts +15 -4
- package/dist/types/view/FlexibleCard/components/elements/common/base-link-element/index.d.ts +3 -2
- package/dist/types/view/FlexibleCard/components/elements/common/base-lozenge-element/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/elements/common/base-text-element/index.d.ts +3 -0
- package/dist/types/view/FlexibleCard/components/elements/common/index.d.ts +8 -6
- package/dist/types/view/FlexibleCard/components/elements/created-by-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/created-on-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/due-on-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/index.d.ts +12 -8
- package/dist/types/view/FlexibleCard/components/elements/latest-commit-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/link-icon-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/location-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/modified-by-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/modified-on-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/owned-by-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/owned-by-group-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/priority-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/programming-language-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/provider-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/react-count-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/read-time-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/sent-on-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/source-branch-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/state-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/story-points-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/sub-tasks-progress-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/subscriber-count-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/target-branch-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/title-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/utils.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/view-count-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/elements/vote-count-element/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/external.d.ts +3 -4
- package/dist/types-ts4.5/__fixtures__/bitbucket-pull-request.d.ts +2 -0
- package/dist/types-ts4.5/__fixtures__/compass-scorecard.d.ts +2 -0
- package/dist/types-ts4.5/__fixtures__/confluence-blog.d.ts +2 -0
- package/dist/types-ts4.5/__fixtures__/confluence-page.d.ts +2 -0
- package/dist/types-ts4.5/__fixtures__/confluence-space.d.ts +2 -0
- package/dist/types-ts4.5/__fixtures__/confluence-template.d.ts +2 -0
- package/dist/types-ts4.5/__fixtures__/figma-entity.d.ts +2 -0
- package/dist/types-ts4.5/__fixtures__/figma.d.ts +2 -0
- package/dist/types-ts4.5/__fixtures__/jira-roadmap.d.ts +2 -0
- package/dist/types-ts4.5/__fixtures__/jira-task.d.ts +2 -0
- package/dist/types-ts4.5/__fixtures__/jira-timeline.d.ts +2 -0
- package/dist/types-ts4.5/__fixtures__/youtube-video.d.ts +2 -0
- package/dist/types-ts4.5/extractors/flexible/utils.d.ts +3 -0
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +8 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/assigned-to-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/assigned-to-group-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/attachment-count-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/author-group-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/checklist-progress-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/collaborator-group-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/comment-count-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-atlaskit-badge-element/index.d.ts +13 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-avatar-group-element/index.d.ts +1 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-badge-element/index.d.ts +1 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-date-time-element/index.d.ts +4 -3
- package/dist/{types/view/FlexibleCard/components/elements/icon-element → types-ts4.5/view/FlexibleCard/components/elements/common/base-icon-element}/index.d.ts +15 -4
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-link-element/index.d.ts +3 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-lozenge-element/index.d.ts +1 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-text-element/index.d.ts +3 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/index.d.ts +8 -6
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/created-by-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/created-on-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/due-on-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/index.d.ts +12 -8
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/latest-commit-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/link-icon-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/location-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/modified-by-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/modified-on-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/owned-by-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/owned-by-group-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/priority-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/programming-language-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/provider-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/react-count-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/read-time-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/sent-on-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/source-branch-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/state-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/story-points-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/sub-tasks-progress-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/subscriber-count-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/target-branch-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/title-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/utils.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/view-count-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/vote-count-element/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/external.d.ts +3 -4
- package/package.json +6 -3
- package/dist/types/view/FlexibleCard/components/elements/atlaskit-badge-element/index.d.ts +0 -12
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/atlaskit-badge-element/index.d.ts +0 -12
- /package/dist/cjs/view/FlexibleCard/components/elements/{atlaskit-badge-element → common/base-atlaskit-badge-element}/index.compiled.css +0 -0
- /package/dist/cjs/view/FlexibleCard/components/elements/{icon-element → common/base-icon-element}/index.compiled.css +0 -0
- /package/dist/es2019/view/FlexibleCard/components/elements/{atlaskit-badge-element → common/base-atlaskit-badge-element}/index.compiled.css +0 -0
- /package/dist/es2019/view/FlexibleCard/components/elements/{icon-element → common/base-icon-element}/index.compiled.css +0 -0
- /package/dist/esm/view/FlexibleCard/components/elements/{atlaskit-badge-element → common/base-atlaskit-badge-element}/index.compiled.css +0 -0
- /package/dist/esm/view/FlexibleCard/components/elements/{icon-element → common/base-icon-element}/index.compiled.css +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ElementName } from '../../../../../constants';
|
|
4
|
+
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
5
|
+
import { BaseBadgeElement } from '../common';
|
|
6
|
+
const PriorityElement = props => {
|
|
7
|
+
var _context$priority;
|
|
8
|
+
const context = useFlexibleUiContext();
|
|
9
|
+
const data = (_context$priority = context === null || context === void 0 ? void 0 : context.priority) !== null && _context$priority !== void 0 ? _context$priority : null;
|
|
10
|
+
return data ? /*#__PURE__*/React.createElement(BaseBadgeElement, _extends({}, data, props, {
|
|
11
|
+
name: ElementName.Priority
|
|
12
|
+
})) : null;
|
|
13
|
+
};
|
|
14
|
+
export default PriorityElement;
|
package/dist/es2019/view/FlexibleCard/components/elements/programming-language-element/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ElementName, IconType } from '../../../../../constants';
|
|
4
|
+
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
5
|
+
import { BaseBadgeElement, toBadgeProps } from '../common';
|
|
6
|
+
const ProgrammingLanguageElement = props => {
|
|
7
|
+
const context = useFlexibleUiContext();
|
|
8
|
+
const data = context ? toBadgeProps(context.programmingLanguage) : null;
|
|
9
|
+
return data ? /*#__PURE__*/React.createElement(BaseBadgeElement, _extends({
|
|
10
|
+
icon: IconType.ProgrammingLanguage
|
|
11
|
+
}, data, props, {
|
|
12
|
+
name: ElementName.ProgrammingLanguage
|
|
13
|
+
})) : null;
|
|
14
|
+
};
|
|
15
|
+
export default ProgrammingLanguageElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ElementName } from '../../../../../constants';
|
|
4
|
+
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
5
|
+
import { BaseBadgeElement } from '../common';
|
|
6
|
+
const ProviderElement = props => {
|
|
7
|
+
var _context$provider;
|
|
8
|
+
const context = useFlexibleUiContext();
|
|
9
|
+
const data = (_context$provider = context === null || context === void 0 ? void 0 : context.provider) !== null && _context$provider !== void 0 ? _context$provider : null;
|
|
10
|
+
return data ? /*#__PURE__*/React.createElement(BaseBadgeElement, _extends({}, data, props, {
|
|
11
|
+
name: ElementName.Provider
|
|
12
|
+
})) : null;
|
|
13
|
+
};
|
|
14
|
+
export default ProviderElement;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ElementName, IconType } from '../../../../../constants';
|
|
4
|
+
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
5
|
+
import { BaseBadgeElement, toBadgeProps } from '../common';
|
|
6
|
+
const ReactCountElement = props => {
|
|
7
|
+
var _context$reactCount;
|
|
8
|
+
const context = useFlexibleUiContext();
|
|
9
|
+
const data = context ? toBadgeProps((_context$reactCount = context.reactCount) === null || _context$reactCount === void 0 ? void 0 : _context$reactCount.toString()) : null;
|
|
10
|
+
return data ? /*#__PURE__*/React.createElement(BaseBadgeElement, _extends({
|
|
11
|
+
icon: IconType.React
|
|
12
|
+
}, data, props, {
|
|
13
|
+
name: ElementName.ReactCount
|
|
14
|
+
})) : null;
|
|
15
|
+
};
|
|
16
|
+
export default ReactCountElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ElementName } from '../../../../../constants';
|
|
4
|
+
import { messages } from '../../../../../messages';
|
|
5
|
+
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
6
|
+
import { BaseTextElement, toFormattedTextProps } from '../common';
|
|
7
|
+
const ReadTimeElement = props => {
|
|
8
|
+
const context = useFlexibleUiContext();
|
|
9
|
+
const data = context ? toFormattedTextProps(messages.read_time, context.readTime) : null;
|
|
10
|
+
return data ? /*#__PURE__*/React.createElement(BaseTextElement, _extends({}, data, props, {
|
|
11
|
+
name: ElementName.ReadTime
|
|
12
|
+
})) : null;
|
|
13
|
+
};
|
|
14
|
+
export default ReadTimeElement;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ElementName } from '../../../../../constants';
|
|
4
|
+
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
5
|
+
import { BaseDateTimeElement, toDateTimeProps } from '../common';
|
|
6
|
+
const SentOnElement = props => {
|
|
7
|
+
const context = useFlexibleUiContext();
|
|
8
|
+
const data = context ? toDateTimeProps('sent', context.sentOn) : null;
|
|
9
|
+
return data ? /*#__PURE__*/React.createElement(BaseDateTimeElement, _extends({}, data, props, {
|
|
10
|
+
name: ElementName.SentOn
|
|
11
|
+
})) : null;
|
|
12
|
+
};
|
|
13
|
+
export default SentOnElement;
|
|
@@ -3,9 +3,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import "./index.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
-
import { useContext } from 'react';
|
|
7
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import {
|
|
7
|
+
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
9
8
|
import { BaseTextElement } from '../common';
|
|
10
9
|
const SNIPPET_DEFAULT_MAX_LINES = 3;
|
|
11
10
|
|
|
@@ -19,11 +18,7 @@ const SnippetElement = props => {
|
|
|
19
18
|
className,
|
|
20
19
|
...restOfProps
|
|
21
20
|
} = props !== null && props !== void 0 ? props : {};
|
|
22
|
-
const context =
|
|
23
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
24
|
-
useFlexibleUiContext() :
|
|
25
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
26
|
-
useContext(FlexibleUiContext);
|
|
21
|
+
const context = useFlexibleUiContext();
|
|
27
22
|
return /*#__PURE__*/React.createElement(BaseTextElement, _extends({
|
|
28
23
|
content: overrideContent !== null && overrideContent !== void 0 ? overrideContent : context === null || context === void 0 ? void 0 : context.snippet,
|
|
29
24
|
maxLines: maxLines,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ElementName } from '../../../../../constants';
|
|
4
|
+
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
5
|
+
import { BaseTextElement, toTextProps } from '../common';
|
|
6
|
+
const SourceBranchElement = props => {
|
|
7
|
+
const context = useFlexibleUiContext();
|
|
8
|
+
const data = context ? toTextProps(context.sourceBranch) : null;
|
|
9
|
+
return data ? /*#__PURE__*/React.createElement(BaseTextElement, _extends({}, data, props, {
|
|
10
|
+
name: ElementName.SourceBranch
|
|
11
|
+
})) : null;
|
|
12
|
+
};
|
|
13
|
+
export default SourceBranchElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ElementName } from '../../../../../constants';
|
|
4
|
+
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
5
|
+
import { BaseLozengeElement } from '../common';
|
|
6
|
+
const StateElement = props => {
|
|
7
|
+
var _context$state;
|
|
8
|
+
const context = useFlexibleUiContext();
|
|
9
|
+
const data = (_context$state = context === null || context === void 0 ? void 0 : context.state) !== null && _context$state !== void 0 ? _context$state : null;
|
|
10
|
+
return data ? /*#__PURE__*/React.createElement(BaseLozengeElement, _extends({}, data, props, {
|
|
11
|
+
name: ElementName.State
|
|
12
|
+
})) : null;
|
|
13
|
+
};
|
|
14
|
+
export default StateElement;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ElementName } from '../../../../../constants';
|
|
4
|
+
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
5
|
+
import { BaseAtlaskitBadgeElement, toAtlaskitBadgeProps } from '../common';
|
|
6
|
+
const StoryPointsElement = props => {
|
|
7
|
+
const context = useFlexibleUiContext();
|
|
8
|
+
const data = context ? toAtlaskitBadgeProps(context.storyPoints) : null;
|
|
9
|
+
return data ? /*#__PURE__*/React.createElement(BaseAtlaskitBadgeElement, _extends({}, data, props, {
|
|
10
|
+
name: ElementName.StoryPoints
|
|
11
|
+
})) : null;
|
|
12
|
+
};
|
|
13
|
+
export default StoryPointsElement;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ElementName, IconType } from '../../../../../constants';
|
|
4
|
+
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
5
|
+
import { BaseBadgeElement, toBadgeProps } from '../common';
|
|
6
|
+
const SubTasksProgressElement = props => {
|
|
7
|
+
var _context$subTasksProg;
|
|
8
|
+
const context = useFlexibleUiContext();
|
|
9
|
+
const data = context ? toBadgeProps((_context$subTasksProg = context.subTasksProgress) === null || _context$subTasksProg === void 0 ? void 0 : _context$subTasksProg.toString()) : null;
|
|
10
|
+
return data ? /*#__PURE__*/React.createElement(BaseBadgeElement, _extends({
|
|
11
|
+
icon: IconType.SubTasksProgress
|
|
12
|
+
}, data, props, {
|
|
13
|
+
name: ElementName.SubTasksProgress
|
|
14
|
+
})) : null;
|
|
15
|
+
};
|
|
16
|
+
export default SubTasksProgressElement;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ElementName, IconType } from '../../../../../constants';
|
|
4
|
+
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
5
|
+
import { BaseBadgeElement, toBadgeProps } from '../common';
|
|
6
|
+
const SubscriberCountElement = props => {
|
|
7
|
+
var _context$subscriberCo;
|
|
8
|
+
const context = useFlexibleUiContext();
|
|
9
|
+
const data = context ? toBadgeProps((_context$subscriberCo = context.subscriberCount) === null || _context$subscriberCo === void 0 ? void 0 : _context$subscriberCo.toString()) : null;
|
|
10
|
+
return data ? /*#__PURE__*/React.createElement(BaseBadgeElement, _extends({
|
|
11
|
+
icon: IconType.Subscriber
|
|
12
|
+
}, data, props, {
|
|
13
|
+
name: ElementName.SubscriberCount
|
|
14
|
+
})) : null;
|
|
15
|
+
};
|
|
16
|
+
export default SubscriberCountElement;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ElementName } from '../../../../../constants';
|
|
4
|
+
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
5
|
+
import { BaseTextElement, toTextProps } from '../common';
|
|
6
|
+
const TargetBranchElement = props => {
|
|
7
|
+
const context = useFlexibleUiContext();
|
|
8
|
+
const data = context ? toTextProps(context.targetBranch) : null;
|
|
9
|
+
return data ? /*#__PURE__*/React.createElement(BaseTextElement, _extends({}, data, props, {
|
|
10
|
+
name: ElementName.TargetBranch
|
|
11
|
+
})) : null;
|
|
12
|
+
};
|
|
13
|
+
export default TargetBranchElement;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ElementName } from '../../../../../constants';
|
|
4
|
+
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
5
|
+
import { BaseLinkElement, toLinkProps } from '../common';
|
|
6
|
+
const TitleElement = props => {
|
|
7
|
+
const context = useFlexibleUiContext();
|
|
8
|
+
const data = context ? toLinkProps(context.title, context.url) : null;
|
|
9
|
+
return data ? /*#__PURE__*/React.createElement(BaseLinkElement, _extends({}, data, props, {
|
|
10
|
+
name: ElementName.Title
|
|
11
|
+
})) : null;
|
|
12
|
+
};
|
|
13
|
+
export default TitleElement;
|
|
@@ -1,16 +1,53 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useContext } from 'react';
|
|
3
|
-
import { FormattedDate } from 'react-intl-next';
|
|
4
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { ElementName, IconType, SmartLinkInternalTheme } from '../../../../constants';
|
|
6
5
|
import { messages } from '../../../../messages';
|
|
7
6
|
import { FlexibleUiContext, useFlexibleUiContext } from '../../../../state/flexible-ui-context';
|
|
8
|
-
import { isProfileType } from '../../../../utils';
|
|
9
7
|
import AppliedToComponentsCount from './applied-to-components-count-element';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
8
|
+
import assignedToElement from './assigned-to-element';
|
|
9
|
+
import assignedToGroupElement from './assigned-to-group-element';
|
|
10
|
+
import attachmentCountElement from './attachment-count-element';
|
|
11
|
+
import authorGroupElement from './author-group-element';
|
|
12
|
+
import checklistProgressElement from './checklist-progress-element';
|
|
13
|
+
import collaboratorGroupElement from './collaborator-group-element';
|
|
14
|
+
import commentCountElement from './comment-count-element';
|
|
15
|
+
import { BaseAtlaskitBadgeElement, BaseAvatarGroupElement, BaseBadgeElement, BaseDateTimeElement, BaseIconElement, BaseLinkElement, BaseLozengeElement, BaseTextElement, toAtlaskitBadgeProps, toAvatarGroupProps, toBadgeProps, toDateLozengeProps, toDateTimeProps, toFormattedTextProps, toLinkIconProps, toLinkProps, toTextProps } from './common';
|
|
16
|
+
import createdByElement from './created-by-element';
|
|
17
|
+
import createdOnElement from './created-on-element';
|
|
18
|
+
import dueOnElement from './due-on-element';
|
|
19
|
+
import latestCommitElement from './latest-commit-element';
|
|
20
|
+
import linkIconElement from './link-icon-element';
|
|
21
|
+
import locationElement from './location-element';
|
|
13
22
|
import MediaElement from './media-element';
|
|
23
|
+
import modifiedByElement from './modified-by-element';
|
|
24
|
+
import modifiedOnElement from './modified-on-element';
|
|
25
|
+
import ownedByElement from './owned-by-element';
|
|
26
|
+
import ownedByGroupElement from './owned-by-group-element';
|
|
27
|
+
import previewElement from './preview-element';
|
|
28
|
+
import priorityElement from './priority-element';
|
|
29
|
+
import programmingLanguageElement from './programming-language-element';
|
|
30
|
+
import providerElement from './provider-element';
|
|
31
|
+
import reactCountElement from './react-count-element';
|
|
32
|
+
import readTimeElement from './read-time-element';
|
|
33
|
+
import sentOnElement from './sent-on-element';
|
|
34
|
+
import sourceBranchElement from './source-branch-element';
|
|
35
|
+
import stateElement from './state-element';
|
|
36
|
+
import storyPointsElement from './story-points-element';
|
|
37
|
+
import subTasksProgressElement from './sub-tasks-progress-element';
|
|
38
|
+
import subscriberCountElement from './subscriber-count-element';
|
|
39
|
+
import targetBranchElement from './target-branch-element';
|
|
40
|
+
import titleElement from './title-element';
|
|
41
|
+
import viewCountElement from './view-count-element';
|
|
42
|
+
import voteCountElement from './vote-count-element';
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated remove on FG clean up platform-linking-flexible-card-elements-refactor
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated remove on FG clean up platform-linking-flexible-card-elements-refactor
|
|
50
|
+
*/
|
|
14
51
|
const elementMappings = {
|
|
15
52
|
[ElementName.AppliedToComponentsCount]: {
|
|
16
53
|
component: AppliedToComponentsCount,
|
|
@@ -22,138 +59,171 @@ const elementMappings = {
|
|
|
22
59
|
component: BaseBadgeElement,
|
|
23
60
|
props: {
|
|
24
61
|
icon: IconType.Attachment
|
|
25
|
-
}
|
|
62
|
+
},
|
|
63
|
+
newComponent: attachmentCountElement
|
|
26
64
|
},
|
|
27
65
|
[ElementName.AuthorGroup]: {
|
|
28
|
-
component: BaseAvatarGroupElement
|
|
66
|
+
component: BaseAvatarGroupElement,
|
|
67
|
+
newComponent: authorGroupElement
|
|
29
68
|
},
|
|
30
69
|
[ElementName.ChecklistProgress]: {
|
|
31
70
|
component: BaseBadgeElement,
|
|
32
71
|
props: {
|
|
33
72
|
icon: IconType.CheckItem
|
|
34
|
-
}
|
|
73
|
+
},
|
|
74
|
+
newComponent: checklistProgressElement
|
|
35
75
|
},
|
|
36
76
|
[ElementName.CollaboratorGroup]: {
|
|
37
|
-
component: BaseAvatarGroupElement
|
|
77
|
+
component: BaseAvatarGroupElement,
|
|
78
|
+
newComponent: collaboratorGroupElement
|
|
38
79
|
},
|
|
39
80
|
[ElementName.CommentCount]: {
|
|
40
81
|
component: BaseBadgeElement,
|
|
41
82
|
props: {
|
|
42
83
|
icon: IconType.Comment
|
|
43
|
-
}
|
|
84
|
+
},
|
|
85
|
+
newComponent: commentCountElement
|
|
44
86
|
},
|
|
45
87
|
[ElementName.ViewCount]: {
|
|
46
88
|
component: BaseBadgeElement,
|
|
47
89
|
props: {
|
|
48
90
|
icon: IconType.View
|
|
49
|
-
}
|
|
91
|
+
},
|
|
92
|
+
newComponent: viewCountElement
|
|
50
93
|
},
|
|
51
94
|
[ElementName.ReactCount]: {
|
|
52
95
|
component: BaseBadgeElement,
|
|
53
96
|
props: {
|
|
54
97
|
icon: IconType.React
|
|
55
|
-
}
|
|
98
|
+
},
|
|
99
|
+
newComponent: reactCountElement
|
|
56
100
|
},
|
|
57
101
|
[ElementName.VoteCount]: {
|
|
58
102
|
component: BaseBadgeElement,
|
|
59
103
|
props: {
|
|
60
104
|
icon: IconType.Vote
|
|
61
|
-
}
|
|
105
|
+
},
|
|
106
|
+
newComponent: voteCountElement
|
|
62
107
|
},
|
|
63
108
|
[ElementName.CreatedBy]: {
|
|
64
|
-
component: BaseTextElement
|
|
109
|
+
component: BaseTextElement,
|
|
110
|
+
newComponent: createdByElement
|
|
65
111
|
},
|
|
66
112
|
[ElementName.OwnedBy]: {
|
|
67
|
-
component: BaseTextElement
|
|
113
|
+
component: BaseTextElement,
|
|
114
|
+
newComponent: ownedByElement
|
|
68
115
|
},
|
|
69
116
|
[ElementName.AssignedTo]: {
|
|
70
|
-
component: BaseTextElement
|
|
117
|
+
component: BaseTextElement,
|
|
118
|
+
newComponent: assignedToElement
|
|
71
119
|
},
|
|
72
120
|
[ElementName.AssignedToGroup]: {
|
|
73
|
-
component: BaseAvatarGroupElement
|
|
121
|
+
component: BaseAvatarGroupElement,
|
|
122
|
+
newComponent: assignedToGroupElement
|
|
74
123
|
},
|
|
75
124
|
[ElementName.OwnedByGroup]: {
|
|
76
|
-
component: BaseAvatarGroupElement
|
|
125
|
+
component: BaseAvatarGroupElement,
|
|
126
|
+
newComponent: ownedByGroupElement
|
|
77
127
|
},
|
|
78
128
|
[ElementName.CreatedOn]: {
|
|
79
|
-
component: BaseDateTimeElement
|
|
129
|
+
component: BaseDateTimeElement,
|
|
130
|
+
newComponent: createdOnElement
|
|
80
131
|
},
|
|
81
132
|
[ElementName.DueOn]: {
|
|
82
|
-
component: BaseLozengeElement
|
|
133
|
+
component: BaseLozengeElement,
|
|
134
|
+
newComponent: dueOnElement
|
|
83
135
|
},
|
|
84
136
|
[ElementName.LatestCommit]: {
|
|
85
137
|
component: BaseBadgeElement,
|
|
86
138
|
props: {
|
|
87
139
|
icon: IconType.Commit
|
|
88
|
-
}
|
|
140
|
+
},
|
|
141
|
+
newComponent: latestCommitElement
|
|
89
142
|
},
|
|
90
143
|
[ElementName.LinkIcon]: {
|
|
91
|
-
component:
|
|
144
|
+
component: BaseIconElement,
|
|
145
|
+
newComponent: linkIconElement
|
|
92
146
|
},
|
|
93
147
|
[ElementName.ModifiedBy]: {
|
|
94
|
-
component: BaseTextElement
|
|
148
|
+
component: BaseTextElement,
|
|
149
|
+
newComponent: modifiedByElement
|
|
95
150
|
},
|
|
96
151
|
[ElementName.ModifiedOn]: {
|
|
97
|
-
component: BaseDateTimeElement
|
|
152
|
+
component: BaseDateTimeElement,
|
|
153
|
+
newComponent: modifiedOnElement
|
|
98
154
|
},
|
|
99
155
|
[ElementName.Preview]: {
|
|
100
|
-
component: MediaElement
|
|
156
|
+
component: MediaElement,
|
|
157
|
+
newComponent: previewElement
|
|
101
158
|
},
|
|
102
159
|
[ElementName.Priority]: {
|
|
103
|
-
component: BaseBadgeElement
|
|
160
|
+
component: BaseBadgeElement,
|
|
161
|
+
newComponent: priorityElement
|
|
104
162
|
},
|
|
105
163
|
[ElementName.ProgrammingLanguage]: {
|
|
106
164
|
component: BaseBadgeElement,
|
|
107
165
|
props: {
|
|
108
166
|
icon: IconType.ProgrammingLanguage
|
|
109
|
-
}
|
|
167
|
+
},
|
|
168
|
+
newComponent: programmingLanguageElement
|
|
110
169
|
},
|
|
111
170
|
[ElementName.Provider]: {
|
|
112
|
-
component: BaseBadgeElement
|
|
171
|
+
component: BaseBadgeElement,
|
|
172
|
+
newComponent: providerElement
|
|
113
173
|
},
|
|
114
174
|
[ElementName.ReadTime]: {
|
|
115
|
-
component: BaseTextElement
|
|
175
|
+
component: BaseTextElement,
|
|
176
|
+
newComponent: readTimeElement
|
|
116
177
|
},
|
|
117
178
|
[ElementName.SentOn]: {
|
|
118
|
-
component: BaseDateTimeElement
|
|
179
|
+
component: BaseDateTimeElement,
|
|
180
|
+
newComponent: sentOnElement
|
|
119
181
|
},
|
|
120
182
|
[ElementName.SourceBranch]: {
|
|
121
|
-
component: BaseTextElement
|
|
183
|
+
component: BaseTextElement,
|
|
184
|
+
newComponent: sourceBranchElement
|
|
122
185
|
},
|
|
123
186
|
[ElementName.State]: {
|
|
124
|
-
component: BaseLozengeElement
|
|
187
|
+
component: BaseLozengeElement,
|
|
188
|
+
newComponent: stateElement
|
|
125
189
|
},
|
|
126
190
|
[ElementName.SubscriberCount]: {
|
|
127
191
|
component: BaseBadgeElement,
|
|
128
192
|
props: {
|
|
129
193
|
icon: IconType.Subscriber
|
|
130
|
-
}
|
|
194
|
+
},
|
|
195
|
+
newComponent: subscriberCountElement
|
|
131
196
|
},
|
|
132
197
|
[ElementName.SubTasksProgress]: {
|
|
133
198
|
component: BaseBadgeElement,
|
|
134
199
|
props: {
|
|
135
200
|
icon: IconType.SubTasksProgress
|
|
136
|
-
}
|
|
201
|
+
},
|
|
202
|
+
newComponent: subTasksProgressElement
|
|
137
203
|
},
|
|
138
204
|
[ElementName.StoryPoints]: {
|
|
139
|
-
component:
|
|
205
|
+
component: BaseAtlaskitBadgeElement,
|
|
206
|
+
newComponent: storyPointsElement
|
|
140
207
|
},
|
|
141
208
|
[ElementName.TargetBranch]: {
|
|
142
|
-
component: BaseTextElement
|
|
209
|
+
component: BaseTextElement,
|
|
210
|
+
newComponent: targetBranchElement
|
|
143
211
|
},
|
|
144
212
|
[ElementName.Title]: {
|
|
145
|
-
component: BaseLinkElement
|
|
213
|
+
component: BaseLinkElement,
|
|
214
|
+
newComponent: titleElement
|
|
146
215
|
},
|
|
147
216
|
[ElementName.Location]: {
|
|
148
217
|
component: BaseLinkElement,
|
|
149
218
|
props: {
|
|
150
219
|
theme: SmartLinkInternalTheme.Grey
|
|
151
|
-
}
|
|
220
|
+
},
|
|
221
|
+
newComponent: locationElement
|
|
152
222
|
}
|
|
153
223
|
};
|
|
154
224
|
|
|
155
225
|
/**
|
|
156
|
-
* @deprecated
|
|
226
|
+
* @deprecated remove on FG clean up platform-linking-flexible-card-elements-refactor
|
|
157
227
|
*/
|
|
158
228
|
const getContextKey = name => {
|
|
159
229
|
// Attempt to predict context prop name in advance to reduce the amount of
|
|
@@ -162,7 +232,7 @@ const getContextKey = name => {
|
|
|
162
232
|
};
|
|
163
233
|
|
|
164
234
|
/**
|
|
165
|
-
* @deprecated
|
|
235
|
+
* @deprecated remove on FG clean up platform-linking-flexible-card-elements-refactor
|
|
166
236
|
*/
|
|
167
237
|
const getData = (elementName, contextKey, context) => {
|
|
168
238
|
if (!context) {
|
|
@@ -223,97 +293,19 @@ const getData = (elementName, contextKey, context) => {
|
|
|
223
293
|
return typeof data === 'object' ? data : undefined;
|
|
224
294
|
}
|
|
225
295
|
};
|
|
226
|
-
const toAvatarGroupProps = (items, showFallbackAvatar) => {
|
|
227
|
-
return items ? {
|
|
228
|
-
items
|
|
229
|
-
} : showFallbackAvatar ? {
|
|
230
|
-
items: []
|
|
231
|
-
} : undefined;
|
|
232
|
-
};
|
|
233
|
-
const toBadgeProps = label => {
|
|
234
|
-
return label ? {
|
|
235
|
-
label
|
|
236
|
-
} : undefined;
|
|
237
|
-
};
|
|
238
|
-
const toAtlaskitBadgeProps = value => {
|
|
239
|
-
return value ? {
|
|
240
|
-
value
|
|
241
|
-
} : undefined;
|
|
242
|
-
};
|
|
243
|
-
const toDateLozengeProps = dateString => {
|
|
244
|
-
if (dateString) {
|
|
245
|
-
const text = Date.parse(dateString) ? /*#__PURE__*/React.createElement(FormattedDate, {
|
|
246
|
-
value: new Date(dateString),
|
|
247
|
-
year: "numeric",
|
|
248
|
-
month: "short",
|
|
249
|
-
day: "numeric",
|
|
250
|
-
formatMatcher: "best fit"
|
|
251
|
-
}) : dateString;
|
|
252
|
-
return {
|
|
253
|
-
text
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
};
|
|
257
|
-
const toDateTimeProps = (type, dateString) => {
|
|
258
|
-
return dateString ? {
|
|
259
|
-
date: new Date(dateString),
|
|
260
|
-
type
|
|
261
|
-
} : undefined;
|
|
262
|
-
};
|
|
263
|
-
const toFormattedTextProps = (descriptor, context) => {
|
|
264
|
-
if (fg('platform-linking-additional-flexible-element-props')) {
|
|
265
|
-
return context ? {
|
|
266
|
-
message: {
|
|
267
|
-
descriptor,
|
|
268
|
-
values: {
|
|
269
|
-
context
|
|
270
|
-
}
|
|
271
|
-
},
|
|
272
|
-
content: context
|
|
273
|
-
} : undefined;
|
|
274
|
-
}
|
|
275
|
-
return context ? {
|
|
276
|
-
message: {
|
|
277
|
-
descriptor,
|
|
278
|
-
values: {
|
|
279
|
-
context
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
} : undefined;
|
|
283
|
-
};
|
|
284
|
-
const toLinkProps = (text, url) => {
|
|
285
|
-
return text ? {
|
|
286
|
-
text,
|
|
287
|
-
url
|
|
288
|
-
} : undefined;
|
|
289
|
-
};
|
|
290
|
-
const toTextProps = content => {
|
|
291
|
-
return content ? {
|
|
292
|
-
content
|
|
293
|
-
} : undefined;
|
|
294
|
-
};
|
|
295
|
-
const toLinkIconProps = (data, type) => {
|
|
296
|
-
const isDataLinkIcon = _data => {
|
|
297
|
-
return typeof _data === 'object' && _data !== null && ('icon' in _data || 'url' in _data);
|
|
298
|
-
};
|
|
299
|
-
if (!isDataLinkIcon(data)) {
|
|
300
|
-
return typeof data === 'object' ? data : undefined;
|
|
301
|
-
}
|
|
302
|
-
const isImageRound = isProfileType(type);
|
|
303
|
-
return {
|
|
304
|
-
...data,
|
|
305
|
-
appearance: isImageRound ? 'round' : 'square'
|
|
306
|
-
};
|
|
307
|
-
};
|
|
308
296
|
|
|
309
297
|
/**
|
|
310
|
-
* @deprecated
|
|
298
|
+
* @deprecated remove on FG platform-linking-flexible-card-elements-refactor clean up
|
|
311
299
|
*/
|
|
312
300
|
export const createElement = name => {
|
|
313
301
|
const {
|
|
314
302
|
component: BaseElement,
|
|
315
|
-
props
|
|
303
|
+
props,
|
|
304
|
+
newComponent
|
|
316
305
|
} = elementMappings[name] || {};
|
|
306
|
+
if (newComponent && fg('platform-linking-flexible-card-elements-refactor')) {
|
|
307
|
+
return newComponent;
|
|
308
|
+
}
|
|
317
309
|
const contextKey = getContextKey(name);
|
|
318
310
|
if (!BaseElement) {
|
|
319
311
|
throw Error(`Element ${name} does not exist.`);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ElementName, IconType } from '../../../../../constants';
|
|
4
|
+
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
5
|
+
import { BaseBadgeElement, toBadgeProps } from '../common';
|
|
6
|
+
const ViewCountElement = props => {
|
|
7
|
+
var _context$viewCount;
|
|
8
|
+
const context = useFlexibleUiContext();
|
|
9
|
+
const data = context ? toBadgeProps((_context$viewCount = context.viewCount) === null || _context$viewCount === void 0 ? void 0 : _context$viewCount.toString()) : null;
|
|
10
|
+
return data ? /*#__PURE__*/React.createElement(BaseBadgeElement, _extends({
|
|
11
|
+
icon: IconType.View
|
|
12
|
+
}, data, props, {
|
|
13
|
+
name: ElementName.ViewCount
|
|
14
|
+
})) : null;
|
|
15
|
+
};
|
|
16
|
+
export default ViewCountElement;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ElementName, IconType } from '../../../../../constants';
|
|
4
|
+
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
5
|
+
import { BaseBadgeElement, toBadgeProps } from '../common';
|
|
6
|
+
const VoteCountElement = props => {
|
|
7
|
+
var _context$voteCount;
|
|
8
|
+
const context = useFlexibleUiContext();
|
|
9
|
+
const data = context ? toBadgeProps((_context$voteCount = context.voteCount) === null || _context$voteCount === void 0 ? void 0 : _context$voteCount.toString()) : null;
|
|
10
|
+
return data ? /*#__PURE__*/React.createElement(BaseBadgeElement, _extends({
|
|
11
|
+
icon: IconType.Vote
|
|
12
|
+
}, data, props, {
|
|
13
|
+
name: ElementName.VoteCount
|
|
14
|
+
})) : null;
|
|
15
|
+
};
|
|
16
|
+
export default VoteCountElement;
|
|
@@ -6,7 +6,7 @@ import React from 'react';
|
|
|
6
6
|
import { CustomBlock } from '../../../../FlexibleCard/components/blocks';
|
|
7
7
|
import ActionGroup from '../../../../FlexibleCard/components/blocks/action-group';
|
|
8
8
|
import { LoadingSkeleton } from '../../../../FlexibleCard/components/common/loading-skeleton';
|
|
9
|
-
import
|
|
9
|
+
import { BaseIconElement } from '../../../../FlexibleCard/components/elements/common';
|
|
10
10
|
import { CARD_WIDTH_REM } from '../../../styled';
|
|
11
11
|
const loadingViewContainer = null;
|
|
12
12
|
const skeletonContainer = null;
|
|
@@ -34,7 +34,7 @@ const HoverCardLoadingView = ({
|
|
|
34
34
|
}, /*#__PURE__*/React.createElement(CustomBlock, _extends({}, titleBlockProps, {
|
|
35
35
|
testId: `${testId}-title-block`,
|
|
36
36
|
className: ax(["_zulpcxkx _1bsb1osq"])
|
|
37
|
-
}), /*#__PURE__*/React.createElement(
|
|
37
|
+
}), /*#__PURE__*/React.createElement(BaseIconElement, {
|
|
38
38
|
render: () => /*#__PURE__*/React.createElement(LoadingSkeleton, null),
|
|
39
39
|
size: size
|
|
40
40
|
}), /*#__PURE__*/React.createElement("span", {
|