@atlaskit/smart-card 34.10.2 → 34.10.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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 34.10.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#110748](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110748)
8
+ [`a3f7f14d75b3c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a3f7f14d75b3c) -
9
+ [ux] Update inline card icons
10
+ - Updated dependencies
11
+
3
12
  ## 34.10.2
4
13
 
5
14
  ### Patch Changes
@@ -12,10 +12,64 @@ var _3 = _interopRequireDefault(require("@atlaskit/icon-file-type/glyph/presenta
12
12
  var _4 = _interopRequireDefault(require("@atlaskit/icon-file-type/glyph/spreadsheet/16"));
13
13
  var _pageLiveDoc = _interopRequireDefault(require("@atlaskit/icon-lab/core/page-live-doc"));
14
14
  var _5 = _interopRequireDefault(require("@atlaskit/icon-object/glyph/blog/16"));
15
+ var _fileDocumentFilled = _interopRequireDefault(require("@atlaskit/icon/core/migration/file--document-filled"));
15
16
  var _pageDocumentFilled = _interopRequireDefault(require("@atlaskit/icon/core/migration/page--document-filled"));
16
17
  var _linkExtractors = require("@atlaskit/link-extractors");
18
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
+ var _blogIcon = _interopRequireDefault(require("../../../common/ui/icons/blog-icon"));
20
+ var _chartBarIcon = _interopRequireDefault(require("../../../common/ui/icons/chart-bar-icon"));
21
+ var _fileIcon = _interopRequireDefault(require("../../../common/ui/icons/file-icon"));
22
+ var _listBulletIcon = _interopRequireDefault(require("../../../common/ui/icons/list-bullet-icon"));
23
+ var _pageIcon = _interopRequireDefault(require("../../../common/ui/icons/page-icon"));
17
24
  var _utils = require("../../../utils");
18
25
  var _prioritiseIcon = require("./prioritiseIcon");
26
+ // TODO Delete this and rename BlogIconNew to BlogIcon when cleaning platform-smart-card-icon-migration
27
+ var BlogIcon = function BlogIcon(props) {
28
+ if ((0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration')) {
29
+ return /*#__PURE__*/_react.default.createElement(_blogIcon.default, props);
30
+ }
31
+ return /*#__PURE__*/_react.default.createElement(_5.default, props);
32
+ };
33
+
34
+ // TODO Delete this and rename FileIconNew to FileIcon when cleaning platform-smart-card-icon-migration
35
+ var FileIcon = function FileIcon(props) {
36
+ if ((0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration')) {
37
+ return /*#__PURE__*/_react.default.createElement(_fileIcon.default, props);
38
+ }
39
+ return /*#__PURE__*/_react.default.createElement(_2.default, props);
40
+ };
41
+
42
+ // TODO Delete this and rename DocumentIconNew to DocumentIcon when cleaning platform-smart-card-icon-migration
43
+ var DocumentIcon = function DocumentIcon(props) {
44
+ if ((0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration')) {
45
+ return /*#__PURE__*/_react.default.createElement(_pageIcon.default, props);
46
+ }
47
+ return /*#__PURE__*/_react.default.createElement(_.default, props);
48
+ };
49
+
50
+ // TODO Delete this and rename PresentationIconNew to PresentationIcon when cleaning platform-smart-card-icon-migration
51
+ var PresentationIcon = function PresentationIcon(props) {
52
+ if ((0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration')) {
53
+ return /*#__PURE__*/_react.default.createElement(_chartBarIcon.default, props);
54
+ }
55
+ return /*#__PURE__*/_react.default.createElement(_3.default, props);
56
+ };
57
+
58
+ // TODO Delete this and rename SpreadsheetIconNew to SpreadsheetIcon when cleaning platform-smart-card-icon-migration
59
+ var SpreadsheetIcon = function SpreadsheetIcon(props) {
60
+ if ((0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration')) {
61
+ return /*#__PURE__*/_react.default.createElement(_listBulletIcon.default, props);
62
+ }
63
+ return /*#__PURE__*/_react.default.createElement(_4.default, props);
64
+ };
65
+
66
+ // TODO Delete this and rename DocumentFilledIconNew to DocumentFilledIcon when cleaning platform-smart-card-icon-migration
67
+ var DocumentFilledIcon = function DocumentFilledIcon(props) {
68
+ if ((0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration')) {
69
+ return /*#__PURE__*/_react.default.createElement(_fileDocumentFilled.default, props);
70
+ }
71
+ return /*#__PURE__*/_react.default.createElement(_pageDocumentFilled.default, props);
72
+ };
19
73
  /**
20
74
  * Extracts an icon for a document pbject
21
75
  *
@@ -42,35 +96,35 @@ var documentFileFormatToIcon = function documentFileFormatToIcon(opts) {
42
96
  var documentTypeToIcon = function documentTypeToIcon(type, opts) {
43
97
  switch (type) {
44
98
  case 'schema:BlogPosting':
45
- return /*#__PURE__*/_react.default.createElement(_5.default, {
99
+ return /*#__PURE__*/_react.default.createElement(BlogIcon, {
46
100
  label: opts.title || 'blog',
47
101
  testId: "blog-icon"
48
102
  });
49
103
  case 'schema:DigitalDocument':
50
104
  return digitalDocumentToIcon(opts);
51
105
  case 'schema:TextDigitalDocument':
52
- return /*#__PURE__*/_react.default.createElement(_.default, {
106
+ return /*#__PURE__*/_react.default.createElement(DocumentIcon, {
53
107
  label: opts.title || 'document',
54
108
  testId: "document-icon"
55
109
  });
56
110
  case 'schema:PresentationDigitalDocument':
57
- return /*#__PURE__*/_react.default.createElement(_3.default, {
111
+ return /*#__PURE__*/_react.default.createElement(PresentationIcon, {
58
112
  label: opts.title || 'presentation',
59
113
  testId: "presentation-icon"
60
114
  });
61
115
  case 'schema:SpreadsheetDigitalDocument':
62
- return /*#__PURE__*/_react.default.createElement(_4.default, {
116
+ return /*#__PURE__*/_react.default.createElement(SpreadsheetIcon, {
63
117
  label: opts.title || 'spreadsheet',
64
118
  testId: "spreadsheet-icon"
65
119
  });
66
120
  case 'atlassian:Template':
67
- return /*#__PURE__*/_react.default.createElement(_pageDocumentFilled.default, {
121
+ return /*#__PURE__*/_react.default.createElement(DocumentFilledIcon, {
68
122
  color: "currentColor",
69
123
  label: opts.title || 'template',
70
124
  testId: "document-filled-icon"
71
125
  });
72
126
  case 'atlassian:UndefinedLink':
73
- return /*#__PURE__*/_react.default.createElement(_.default, {
127
+ return /*#__PURE__*/_react.default.createElement(DocumentIcon, {
74
128
  label: opts.title || 'undefinedLink',
75
129
  testId: "document-icon"
76
130
  });
@@ -93,7 +147,7 @@ var digitalDocumentToIcon = function digitalDocumentToIcon(opts) {
93
147
  testId: "live-doc-icon"
94
148
  });
95
149
  } else {
96
- return /*#__PURE__*/_react.default.createElement(_2.default, {
150
+ return /*#__PURE__*/_react.default.createElement(FileIcon, {
97
151
  label: opts.title || 'file',
98
152
  testId: "file-icon"
99
153
  });
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
11
11
  var context = exports.context = {
12
12
  componentName: 'smart-cards',
13
13
  packageName: "@atlaskit/smart-card",
14
- packageVersion: "34.10.2"
14
+ packageVersion: "34.10.3"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -20,7 +20,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
20
20
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
21
21
  var PACKAGE_DATA = {
22
22
  packageName: "@atlaskit/smart-card",
23
- packageVersion: "34.10.2",
23
+ packageVersion: "34.10.3",
24
24
  componentName: 'linkUrl'
25
25
  };
26
26
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -1,14 +1,69 @@
1
1
  import React from 'react';
2
- import DocumentIcon from '@atlaskit/icon-file-type/glyph/document/16';
3
- import FileIcon from '@atlaskit/icon-file-type/glyph/generic/16';
4
- import PresentationIcon from '@atlaskit/icon-file-type/glyph/presentation/16';
5
- import SpreadsheetIcon from '@atlaskit/icon-file-type/glyph/spreadsheet/16';
2
+ import DocumentIconOld from '@atlaskit/icon-file-type/glyph/document/16';
3
+ import FileIconOld from '@atlaskit/icon-file-type/glyph/generic/16';
4
+ import PresentationIconOld from '@atlaskit/icon-file-type/glyph/presentation/16';
5
+ import SpreadsheetIconOld from '@atlaskit/icon-file-type/glyph/spreadsheet/16';
6
6
  import LiveDocumentIcon from '@atlaskit/icon-lab/core/page-live-doc';
7
- import BlogIcon from '@atlaskit/icon-object/glyph/blog/16';
8
- import DocumentFilledIcon from '@atlaskit/icon/core/migration/page--document-filled';
7
+ import BlogIconOld from '@atlaskit/icon-object/glyph/blog/16';
8
+ import DocumentFilledIconNew from '@atlaskit/icon/core/migration/file--document-filled';
9
+ import DocumentFilledIconOld from '@atlaskit/icon/core/migration/page--document-filled';
9
10
  import { isConfluenceGenerator } from '@atlaskit/link-extractors';
11
+ import { fg } from '@atlaskit/platform-feature-flags';
12
+ import BlogIconNew from '../../../common/ui/icons/blog-icon';
13
+ import PresentationIconNew from '../../../common/ui/icons/chart-bar-icon';
14
+ import FileIconNew from '../../../common/ui/icons/file-icon';
15
+ import SpreadsheetIconNew from '../../../common/ui/icons/list-bullet-icon';
16
+ import DocumentIconNew from '../../../common/ui/icons/page-icon';
10
17
  import { getIconForFileType } from '../../../utils';
11
18
  import { prioritiseIcon } from './prioritiseIcon';
19
+
20
+ // TODO Delete this and rename BlogIconNew to BlogIcon when cleaning platform-smart-card-icon-migration
21
+ const BlogIcon = props => {
22
+ if (fg('platform-smart-card-icon-migration')) {
23
+ return /*#__PURE__*/React.createElement(BlogIconNew, props);
24
+ }
25
+ return /*#__PURE__*/React.createElement(BlogIconOld, props);
26
+ };
27
+
28
+ // TODO Delete this and rename FileIconNew to FileIcon when cleaning platform-smart-card-icon-migration
29
+ const FileIcon = props => {
30
+ if (fg('platform-smart-card-icon-migration')) {
31
+ return /*#__PURE__*/React.createElement(FileIconNew, props);
32
+ }
33
+ return /*#__PURE__*/React.createElement(FileIconOld, props);
34
+ };
35
+
36
+ // TODO Delete this and rename DocumentIconNew to DocumentIcon when cleaning platform-smart-card-icon-migration
37
+ const DocumentIcon = props => {
38
+ if (fg('platform-smart-card-icon-migration')) {
39
+ return /*#__PURE__*/React.createElement(DocumentIconNew, props);
40
+ }
41
+ return /*#__PURE__*/React.createElement(DocumentIconOld, props);
42
+ };
43
+
44
+ // TODO Delete this and rename PresentationIconNew to PresentationIcon when cleaning platform-smart-card-icon-migration
45
+ const PresentationIcon = props => {
46
+ if (fg('platform-smart-card-icon-migration')) {
47
+ return /*#__PURE__*/React.createElement(PresentationIconNew, props);
48
+ }
49
+ return /*#__PURE__*/React.createElement(PresentationIconOld, props);
50
+ };
51
+
52
+ // TODO Delete this and rename SpreadsheetIconNew to SpreadsheetIcon when cleaning platform-smart-card-icon-migration
53
+ const SpreadsheetIcon = props => {
54
+ if (fg('platform-smart-card-icon-migration')) {
55
+ return /*#__PURE__*/React.createElement(SpreadsheetIconNew, props);
56
+ }
57
+ return /*#__PURE__*/React.createElement(SpreadsheetIconOld, props);
58
+ };
59
+
60
+ // TODO Delete this and rename DocumentFilledIconNew to DocumentFilledIcon when cleaning platform-smart-card-icon-migration
61
+ const DocumentFilledIcon = props => {
62
+ if (fg('platform-smart-card-icon-migration')) {
63
+ return /*#__PURE__*/React.createElement(DocumentFilledIconNew, props);
64
+ }
65
+ return /*#__PURE__*/React.createElement(DocumentFilledIconOld, props);
66
+ };
12
67
  /**
13
68
  * Extracts an icon for a document pbject
14
69
  *
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
2
2
  export const context = {
3
3
  componentName: 'smart-cards',
4
4
  packageName: "@atlaskit/smart-card",
5
- packageVersion: "34.10.2"
5
+ packageVersion: "34.10.3"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
10
10
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
11
11
  const PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "34.10.2",
13
+ packageVersion: "34.10.3",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  const Anchor = withLinkClickedEvent('a');
@@ -1,14 +1,69 @@
1
1
  import React from 'react';
2
- import DocumentIcon from '@atlaskit/icon-file-type/glyph/document/16';
3
- import FileIcon from '@atlaskit/icon-file-type/glyph/generic/16';
4
- import PresentationIcon from '@atlaskit/icon-file-type/glyph/presentation/16';
5
- import SpreadsheetIcon from '@atlaskit/icon-file-type/glyph/spreadsheet/16';
2
+ import DocumentIconOld from '@atlaskit/icon-file-type/glyph/document/16';
3
+ import FileIconOld from '@atlaskit/icon-file-type/glyph/generic/16';
4
+ import PresentationIconOld from '@atlaskit/icon-file-type/glyph/presentation/16';
5
+ import SpreadsheetIconOld from '@atlaskit/icon-file-type/glyph/spreadsheet/16';
6
6
  import LiveDocumentIcon from '@atlaskit/icon-lab/core/page-live-doc';
7
- import BlogIcon from '@atlaskit/icon-object/glyph/blog/16';
8
- import DocumentFilledIcon from '@atlaskit/icon/core/migration/page--document-filled';
7
+ import BlogIconOld from '@atlaskit/icon-object/glyph/blog/16';
8
+ import DocumentFilledIconNew from '@atlaskit/icon/core/migration/file--document-filled';
9
+ import DocumentFilledIconOld from '@atlaskit/icon/core/migration/page--document-filled';
9
10
  import { isConfluenceGenerator } from '@atlaskit/link-extractors';
11
+ import { fg } from '@atlaskit/platform-feature-flags';
12
+ import BlogIconNew from '../../../common/ui/icons/blog-icon';
13
+ import PresentationIconNew from '../../../common/ui/icons/chart-bar-icon';
14
+ import FileIconNew from '../../../common/ui/icons/file-icon';
15
+ import SpreadsheetIconNew from '../../../common/ui/icons/list-bullet-icon';
16
+ import DocumentIconNew from '../../../common/ui/icons/page-icon';
10
17
  import { getIconForFileType } from '../../../utils';
11
18
  import { prioritiseIcon } from './prioritiseIcon';
19
+
20
+ // TODO Delete this and rename BlogIconNew to BlogIcon when cleaning platform-smart-card-icon-migration
21
+ var BlogIcon = function BlogIcon(props) {
22
+ if (fg('platform-smart-card-icon-migration')) {
23
+ return /*#__PURE__*/React.createElement(BlogIconNew, props);
24
+ }
25
+ return /*#__PURE__*/React.createElement(BlogIconOld, props);
26
+ };
27
+
28
+ // TODO Delete this and rename FileIconNew to FileIcon when cleaning platform-smart-card-icon-migration
29
+ var FileIcon = function FileIcon(props) {
30
+ if (fg('platform-smart-card-icon-migration')) {
31
+ return /*#__PURE__*/React.createElement(FileIconNew, props);
32
+ }
33
+ return /*#__PURE__*/React.createElement(FileIconOld, props);
34
+ };
35
+
36
+ // TODO Delete this and rename DocumentIconNew to DocumentIcon when cleaning platform-smart-card-icon-migration
37
+ var DocumentIcon = function DocumentIcon(props) {
38
+ if (fg('platform-smart-card-icon-migration')) {
39
+ return /*#__PURE__*/React.createElement(DocumentIconNew, props);
40
+ }
41
+ return /*#__PURE__*/React.createElement(DocumentIconOld, props);
42
+ };
43
+
44
+ // TODO Delete this and rename PresentationIconNew to PresentationIcon when cleaning platform-smart-card-icon-migration
45
+ var PresentationIcon = function PresentationIcon(props) {
46
+ if (fg('platform-smart-card-icon-migration')) {
47
+ return /*#__PURE__*/React.createElement(PresentationIconNew, props);
48
+ }
49
+ return /*#__PURE__*/React.createElement(PresentationIconOld, props);
50
+ };
51
+
52
+ // TODO Delete this and rename SpreadsheetIconNew to SpreadsheetIcon when cleaning platform-smart-card-icon-migration
53
+ var SpreadsheetIcon = function SpreadsheetIcon(props) {
54
+ if (fg('platform-smart-card-icon-migration')) {
55
+ return /*#__PURE__*/React.createElement(SpreadsheetIconNew, props);
56
+ }
57
+ return /*#__PURE__*/React.createElement(SpreadsheetIconOld, props);
58
+ };
59
+
60
+ // TODO Delete this and rename DocumentFilledIconNew to DocumentFilledIcon when cleaning platform-smart-card-icon-migration
61
+ var DocumentFilledIcon = function DocumentFilledIcon(props) {
62
+ if (fg('platform-smart-card-icon-migration')) {
63
+ return /*#__PURE__*/React.createElement(DocumentFilledIconNew, props);
64
+ }
65
+ return /*#__PURE__*/React.createElement(DocumentFilledIconOld, props);
66
+ };
12
67
  /**
13
68
  * Extracts an icon for a document pbject
14
69
  *
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
4
4
  export var context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "34.10.2"
7
+ packageVersion: "34.10.3"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
13
13
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
14
14
  var PACKAGE_DATA = {
15
15
  packageName: "@atlaskit/smart-card",
16
- packageVersion: "34.10.2",
16
+ packageVersion: "34.10.3",
17
17
  componentName: 'linkUrl'
18
18
  };
19
19
  var Anchor = withLinkClickedEvent('a');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "34.10.2",
3
+ "version": "34.10.3",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,9 +39,9 @@
39
39
  "@atlaskit/form": "^11.1.0",
40
40
  "@atlaskit/frontend-utilities": "^2.9.0",
41
41
  "@atlaskit/heading": "^4.1.0",
42
- "@atlaskit/icon": "^23.6.0",
42
+ "@atlaskit/icon": "^23.7.0",
43
43
  "@atlaskit/icon-file-type": "^6.9.0",
44
- "@atlaskit/icon-lab": "^2.1.0",
44
+ "@atlaskit/icon-lab": "^2.4.0",
45
45
  "@atlaskit/icon-object": "^6.10.0",
46
46
  "@atlaskit/icon-priority": "^6.3.0",
47
47
  "@atlaskit/legacy-custom-icons": "^0.21.0",
@@ -49,7 +49,7 @@
49
49
  "@atlaskit/link-analytics": "^8.7.0",
50
50
  "@atlaskit/link-client-extension": "^3.1.0",
51
51
  "@atlaskit/link-extractors": "^1.10.0",
52
- "@atlaskit/linking-common": "^6.2.0",
52
+ "@atlaskit/linking-common": "^6.3.0",
53
53
  "@atlaskit/linking-types": "^9.6.0",
54
54
  "@atlaskit/logo": "^15.2.0",
55
55
  "@atlaskit/lozenge": "^11.13.0",