@atlaskit/smart-card 34.8.0 → 34.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/constants.js +1 -0
- package/dist/cjs/extractors/common/icon/extractIconFromDocument.js +26 -4
- package/dist/cjs/extractors/flexible/icon/extract-document-type-icon.js +28 -5
- package/dist/cjs/extractors/flexible/icon/extract-jsonld-data-icon.js +1 -1
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/flexible.js +9 -9
- package/dist/cjs/utils/index.js +33 -22
- package/dist/cjs/view/EmbedCard/components/styled.compiled.css +4 -1
- package/dist/cjs/view/EmbedCard/components/styled.js +1 -1
- package/dist/cjs/view/EmbedCard/views/unresolved-view/index.compiled.css +4 -1
- package/dist/cjs/view/EmbedCard/views/unresolved-view/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.compiled.css +4 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/action-footer/index.compiled.css +3 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +25 -16
- package/dist/cjs/view/InlineCard/ForbiddenView/index.compiled.css +5 -2
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/ai-prism/ai-glowing-border/index.compiled.css +5 -2
- package/dist/cjs/view/common/ai-prism/ai-glowing-border/index.js +1 -1
- package/dist/es2019/constants.js +1 -0
- package/dist/es2019/extractors/common/icon/extractIconFromDocument.js +26 -4
- package/dist/es2019/extractors/flexible/icon/extract-document-type-icon.js +28 -5
- package/dist/es2019/extractors/flexible/icon/extract-jsonld-data-icon.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/index.js +8 -0
- package/dist/es2019/view/EmbedCard/components/styled.compiled.css +4 -1
- package/dist/es2019/view/EmbedCard/components/styled.js +1 -1
- package/dist/es2019/view/EmbedCard/views/unresolved-view/index.compiled.css +4 -1
- package/dist/es2019/view/EmbedCard/views/unresolved-view/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.compiled.css +4 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/action-footer/index.compiled.css +3 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +6 -0
- package/dist/es2019/view/InlineCard/ForbiddenView/index.compiled.css +5 -2
- package/dist/es2019/view/InlineCard/ForbiddenView/index.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/ai-prism/ai-glowing-border/index.compiled.css +5 -2
- package/dist/es2019/view/common/ai-prism/ai-glowing-border/index.js +1 -1
- package/dist/esm/constants.js +1 -0
- package/dist/esm/extractors/common/icon/extractIconFromDocument.js +26 -4
- package/dist/esm/extractors/flexible/icon/extract-document-type-icon.js +28 -5
- package/dist/esm/extractors/flexible/icon/extract-jsonld-data-icon.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/flexible.js +13 -9
- package/dist/esm/utils/index.js +32 -22
- package/dist/esm/view/EmbedCard/components/styled.compiled.css +4 -1
- package/dist/esm/view/EmbedCard/components/styled.js +1 -1
- package/dist/esm/view/EmbedCard/views/unresolved-view/index.compiled.css +4 -1
- package/dist/esm/view/EmbedCard/views/unresolved-view/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.compiled.css +4 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/action-footer/index.compiled.css +3 -1
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +23 -16
- package/dist/esm/view/InlineCard/ForbiddenView/index.compiled.css +5 -2
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/ai-prism/ai-glowing-border/index.compiled.css +5 -2
- package/dist/esm/view/common/ai-prism/ai-glowing-border/index.js +1 -1
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/extractors/common/icon/prioritiseIcon.d.ts +5 -0
- package/dist/types/extractors/flexible/icon/extract-document-type-icon.d.ts +16 -1
- package/dist/types-ts4.5/constants.d.ts +1 -0
- package/dist/types-ts4.5/extractors/common/icon/prioritiseIcon.d.ts +5 -0
- package/dist/types-ts4.5/extractors/flexible/icon/extract-document-type-icon.d.ts +16 -1
- package/package.json +4 -3
|
@@ -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.
|
|
23
|
+
packageVersion: "34.9.0",
|
|
24
24
|
componentName: 'linkUrl'
|
|
25
25
|
};
|
|
26
26
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
._1yt4v77o{padding:var(--ds-space-025,2px)}
|
|
3
2
|
._2rkoftgi{border-radius:8px}._16jlkb7n{flex-grow:1}
|
|
3
|
+
._19bvv77o{padding-left:var(--ds-space-025,2px)}
|
|
4
4
|
._1bsb1ns9{width:-moz-fit-content;width:fit-content}
|
|
5
5
|
._1e0c1txw{display:flex}
|
|
6
6
|
._1pbykb7n{z-index:1}
|
|
7
|
-
.
|
|
7
|
+
._ca0qv77o{padding-top:var(--ds-space-025,2px)}
|
|
8
|
+
._kqswh2mm{position:relative}
|
|
9
|
+
._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
|
|
10
|
+
._u5f3v77o{padding-right:var(--ds-space-025,2px)}
|
|
@@ -33,7 +33,7 @@ var AIGlowingBorderNew = function AIGlowingBorderNew(_ref) {
|
|
|
33
33
|
className = _ref.className;
|
|
34
34
|
return /*#__PURE__*/React.createElement("div", {
|
|
35
35
|
"data-testid": testId,
|
|
36
|
-
className: (0, _runtime.ax)(["
|
|
36
|
+
className: (0, _runtime.ax)(["_1e0c1txw _kqswh2mm _ca0qv77o _u5f3v77o _n3tdv77o _19bvv77o _1bsb1ns9"])
|
|
37
37
|
}, /*#__PURE__*/React.createElement(_animatedSvgContainer.default, {
|
|
38
38
|
palette: palette,
|
|
39
39
|
isMoving: isMoving,
|
package/dist/es2019/constants.js
CHANGED
|
@@ -203,6 +203,7 @@ export let IconType = /*#__PURE__*/function (IconType) {
|
|
|
203
203
|
IconType["Story"] = "Jira:Story";
|
|
204
204
|
IconType["SubTask"] = "Jira:SubTask";
|
|
205
205
|
IconType["Task"] = "Jira:Task";
|
|
206
|
+
IconType["LiveDocument"] = "Confluence:LiveDocument";
|
|
206
207
|
IconType["Confluence"] = "Provider:Confluence";
|
|
207
208
|
IconType["Jira"] = "Provider:Jira";
|
|
208
209
|
IconType["Default"] = "Default";
|
|
@@ -3,8 +3,10 @@ import DocumentIcon from '@atlaskit/icon-file-type/glyph/document/16';
|
|
|
3
3
|
import FileIcon from '@atlaskit/icon-file-type/glyph/generic/16';
|
|
4
4
|
import PresentationIcon from '@atlaskit/icon-file-type/glyph/presentation/16';
|
|
5
5
|
import SpreadsheetIcon from '@atlaskit/icon-file-type/glyph/spreadsheet/16';
|
|
6
|
+
import LiveDocumentIcon from '@atlaskit/icon-lab/core/page-live-doc';
|
|
6
7
|
import BlogIcon from '@atlaskit/icon-object/glyph/blog/16';
|
|
7
8
|
import DocumentFilledIcon from '@atlaskit/icon/core/migration/page--document-filled';
|
|
9
|
+
import { isConfluenceGenerator } from '@atlaskit/link-extractors';
|
|
8
10
|
import { getIconForFileType } from '../../../utils';
|
|
9
11
|
import { prioritiseIcon } from './prioritiseIcon';
|
|
10
12
|
/**
|
|
@@ -38,10 +40,7 @@ const documentTypeToIcon = (type, opts) => {
|
|
|
38
40
|
testId: "blog-icon"
|
|
39
41
|
});
|
|
40
42
|
case 'schema:DigitalDocument':
|
|
41
|
-
return
|
|
42
|
-
label: opts.title || 'file',
|
|
43
|
-
testId: "file-icon"
|
|
44
|
-
});
|
|
43
|
+
return digitalDocumentToIcon(opts);
|
|
45
44
|
case 'schema:TextDigitalDocument':
|
|
46
45
|
return /*#__PURE__*/React.createElement(DocumentIcon, {
|
|
47
46
|
label: opts.title || 'document',
|
|
@@ -69,4 +68,27 @@ const documentTypeToIcon = (type, opts) => {
|
|
|
69
68
|
testId: "document-icon"
|
|
70
69
|
});
|
|
71
70
|
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Enables providers to represent `schema:DigitalDocument` in a manner which
|
|
75
|
+
* aligns with their customers when representing provider-specific types, which
|
|
76
|
+
* do not apply across multiple providers.
|
|
77
|
+
* @example Confluence digital documents represent 'live documents', specific to Confluence.
|
|
78
|
+
* @remark This mechanism will be superseded by backend-driven icon URLs as part
|
|
79
|
+
* of go/j/MODES-5864. Do not add more!
|
|
80
|
+
*/
|
|
81
|
+
const digitalDocumentToIcon = opts => {
|
|
82
|
+
var _opts$provider;
|
|
83
|
+
if ((_opts$provider = opts.provider) !== null && _opts$provider !== void 0 && _opts$provider.id && isConfluenceGenerator(opts.provider.id)) {
|
|
84
|
+
return /*#__PURE__*/React.createElement(LiveDocumentIcon, {
|
|
85
|
+
label: "live-doc",
|
|
86
|
+
testId: "live-doc-icon"
|
|
87
|
+
});
|
|
88
|
+
} else {
|
|
89
|
+
return /*#__PURE__*/React.createElement(FileIcon, {
|
|
90
|
+
label: opts.title || 'file',
|
|
91
|
+
testId: "file-icon"
|
|
92
|
+
});
|
|
93
|
+
}
|
|
72
94
|
};
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
import { isConfluenceGenerator } from '@atlaskit/link-extractors';
|
|
1
2
|
import { IconType } from '../../../constants';
|
|
2
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Computes the relevant icon for a document type.
|
|
5
|
+
*
|
|
6
|
+
* @remark Note that document icons can vary based on the provider. E.g., a
|
|
7
|
+
* provider may choose to re-use one of these document types in their domain,
|
|
8
|
+
* but offer a different SVG icon on the frontend (to map to this type in their
|
|
9
|
+
* domain). See `schema:digitalDocument` for an example of this behaviour. This
|
|
10
|
+
* mechanism will be superseded by backend-driven icon URLs as part of
|
|
11
|
+
* go/j/MODES-5864. Do not add more!
|
|
12
|
+
*
|
|
13
|
+
* @param documentType JSON-LD document type
|
|
14
|
+
* @param label human-readable label to be displayed on the icon
|
|
15
|
+
* @param providerId JSON-LD provider (generator ID)
|
|
16
|
+
* @returns an icon descriptor representing the document type
|
|
17
|
+
*/
|
|
18
|
+
const extractDocumentTypeIcon = (documentType, label, providerId) => {
|
|
3
19
|
switch (documentType) {
|
|
4
20
|
case 'schema:BlogPosting':
|
|
5
21
|
return {
|
|
@@ -7,10 +23,17 @@ const extractDocumentTypeIcon = (documentType, label) => {
|
|
|
7
23
|
label: label || 'Blog'
|
|
8
24
|
};
|
|
9
25
|
case 'schema:DigitalDocument':
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
26
|
+
if (providerId && isConfluenceGenerator(providerId)) {
|
|
27
|
+
return {
|
|
28
|
+
icon: IconType.LiveDocument,
|
|
29
|
+
label: label || 'Live Document'
|
|
30
|
+
};
|
|
31
|
+
} else {
|
|
32
|
+
return {
|
|
33
|
+
icon: IconType.File,
|
|
34
|
+
label: label || 'File'
|
|
35
|
+
};
|
|
36
|
+
}
|
|
14
37
|
case 'schema:TextDigitalDocument':
|
|
15
38
|
return {
|
|
16
39
|
icon: IconType.Document,
|
|
@@ -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.
|
|
5
|
+
packageVersion: "34.9.0"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -256,6 +256,14 @@ export const getLazyIcons = () => {
|
|
|
256
256
|
default: () => import( /* webpackChunkName: "@atlaskit-internal_glyphTask" */'@atlaskit/icon-object/glyph/task/16'),
|
|
257
257
|
large: () => import( /* webpackChunkName: "@atlaskit-internal_glyphTask" */'@atlaskit/icon-object/glyph/task/24')
|
|
258
258
|
},
|
|
259
|
+
// Confluence icons
|
|
260
|
+
[IconType.LiveDocument]: {
|
|
261
|
+
default: () => import( /* webpackChunkName: "@atlaskit-internal_glyphConfluenceLiveDocument" */'@atlaskit/icon-lab/core/page-live-doc').then(({
|
|
262
|
+
default: LiveDocumentIcon
|
|
263
|
+
}) => ({
|
|
264
|
+
default: LiveDocumentIcon
|
|
265
|
+
}))
|
|
266
|
+
},
|
|
259
267
|
// Provider icons
|
|
260
268
|
[IconType.Confluence]: {
|
|
261
269
|
default: () => import( /* webpackChunkName: "@atlaskit-internal_glyphConfluence" */'@atlaskit/logo/confluence-icon').then(({
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
._11c8qk37{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
2
|
._14mjpd34:after{border-radius:var(--ds-border-radius-200,8px)}
|
|
3
|
-
._18s81cq1{margin:var(--ds-space-050,4px) 0 var(--ds-space-150,9pt) var(--ds-space-150,9pt)}
|
|
4
3
|
._18s81xf9{margin:0 var(--ds-space-100,8px) var(--ds-space-100,8px)}
|
|
5
4
|
._19ith6cr{border:1px solid var(--ds-border,#dfe1e6)}
|
|
6
5
|
._1u3rh6cr:hover:after{border:1px solid var(--ds-border,#dfe1e6)}
|
|
@@ -19,10 +18,12 @@
|
|
|
19
18
|
._18m91wug{overflow-y:auto}
|
|
20
19
|
._18postnw:after{position:absolute}
|
|
21
20
|
._18u01wug{margin-left:auto}
|
|
21
|
+
._18u0utpp{margin-left:var(--ds-space-150,9pt)}
|
|
22
22
|
._19do1kw7:after{left:inherit}
|
|
23
23
|
._19doidpf:after{left:0}
|
|
24
24
|
._19dox0bf:after{left:var(--ds-space-negative-100,-8px)}
|
|
25
25
|
._19pk19bv{margin-top:10px}
|
|
26
|
+
._19pk1b66{margin-top:var(--ds-space-050,4px)}
|
|
26
27
|
._19pkidpf{margin-top:0}
|
|
27
28
|
._1aaxusic{float:right}
|
|
28
29
|
._1bsb176v{width:125px}
|
|
@@ -48,6 +49,7 @@
|
|
|
48
49
|
._1ul91pd6{min-width:var(--_10q0298)}
|
|
49
50
|
._2hwx1b66{margin-right:var(--ds-space-050,4px)}
|
|
50
51
|
._2hwx1wug{margin-right:auto}
|
|
52
|
+
._2hwxidpf{margin-right:0}
|
|
51
53
|
._2lx21bp4{flex-direction:column}
|
|
52
54
|
._4cvr1h6o{align-items:center}
|
|
53
55
|
._4t3i17ym{height:var(--_rcxkve)}
|
|
@@ -74,6 +76,7 @@
|
|
|
74
76
|
._kqswstnw{position:absolute}
|
|
75
77
|
._o5721q9c{white-space:nowrap}
|
|
76
78
|
._otyridpf{margin-bottom:0}
|
|
79
|
+
._otyrutpp{margin-bottom:var(--ds-space-150,9pt)}
|
|
77
80
|
._p12f1ayu{max-width:var(--_1et2rhb)}
|
|
78
81
|
._rd9b1wug >.embed-preview>div{margin-right:auto}
|
|
79
82
|
._syaz1rc1{color:var(--ds-text-subtlest,#5e6c84)}
|
|
@@ -203,7 +203,7 @@ export const Thumbnail = forwardRef(({
|
|
|
203
203
|
"--_13orr8u": ix(`url(${__cmplp.src})`)
|
|
204
204
|
},
|
|
205
205
|
ref: __cmplr,
|
|
206
|
-
className: ax(["_2rko1sit
|
|
206
|
+
className: ax(["_2rko1sit _1bsbckbl _4t3ickbl _1aaxusic _19pk1b66 _2hwxidpf _otyrutpp _18u0utpp _bfhkqrzy _1lrw1dfr _1itk2pcs", __cmplp.className])
|
|
207
207
|
}));
|
|
208
208
|
});
|
|
209
209
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
._11c81oud{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
|
-
._1yt4pxbi{padding:var(--ds-space-200,1pc)}
|
|
3
2
|
._zulpv47k{gap:var(--ds-space-250,20px)}
|
|
4
3
|
._18u01wug{margin-left:auto}
|
|
4
|
+
._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
|
|
5
5
|
._19pk1wug{margin-top:auto}
|
|
6
6
|
._1bah1h6o{justify-content:center}
|
|
7
7
|
._1bsbmgvx{width:180px}
|
|
@@ -13,7 +13,10 @@
|
|
|
13
13
|
._4t3i1kw7{height:inherit}
|
|
14
14
|
._4t3i68cl{height:90pt}
|
|
15
15
|
._5ral1f51{object-fit:contain}
|
|
16
|
+
._ca0qpxbi{padding-top:var(--ds-space-200,1pc)}
|
|
17
|
+
._n3tdpxbi{padding-bottom:var(--ds-space-200,1pc)}
|
|
16
18
|
._otyr1wug{margin-bottom:auto}
|
|
17
19
|
._p12f1kdj{max-width:25pc}
|
|
18
20
|
._rsufaqso{object-position:center center}
|
|
21
|
+
._u5f3pxbi{padding-right:var(--ds-space-200,1pc)}
|
|
19
22
|
._y3gn1h6o{text-align:center}
|
|
@@ -82,7 +82,7 @@ const UnresolvedView = ({
|
|
|
82
82
|
"data-testid": `${testId}-unresolved-container`,
|
|
83
83
|
className: ax(["_1e0c11p5 _4t3i1kw7"])
|
|
84
84
|
}, /*#__PURE__*/React.createElement("div", {
|
|
85
|
-
className: ax(["_19pk1wug _2hwx1wug _otyr1wug _18u01wug
|
|
85
|
+
className: ax(["_19pk1wug _2hwx1wug _otyr1wug _18u01wug _zulpv47k _1e0c1txw _2lx21bp4 _1bah1h6o _y3gn1h6o _4cvr1h6o _ca0qpxbi _u5f3pxbi _n3tdpxbi _19bvpxbi _p12f1kdj"])
|
|
86
86
|
}, image, /*#__PURE__*/React.createElement(Heading, {
|
|
87
87
|
size: "large",
|
|
88
88
|
testId: `${testId}-unresolved-title`
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
._kkk2n7od{all:unset}._11c8qk37{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
3
|
-
.
|
|
3
|
+
._19bv1b66{padding-left:var(--ds-space-050,4px)}
|
|
4
4
|
._1bsb1osq{width:100%}
|
|
5
|
+
._ca0q1b66{padding-top:var(--ds-space-050,4px)}
|
|
6
|
+
._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
|
|
5
7
|
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
8
|
+
._u5f31b66{padding-right:var(--ds-space-050,4px)}
|
|
6
9
|
._irr3166n:hover{background-color:var(--ds-background-neutral-subtle-hovered,#091e420f)}
|
|
7
10
|
._1di61dty:active{background-color:var(--ds-background-neutral-subtle-pressed,#091e4224)}
|
package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js
CHANGED
|
@@ -11,7 +11,7 @@ import { getPrimitivesInlineSpaceBySize } from '../../../utils';
|
|
|
11
11
|
import ActionIcon from '../action-icon';
|
|
12
12
|
import ActionButtonOld from './action-buttonOld';
|
|
13
13
|
const styles = {
|
|
14
|
-
button: "_kkk2n7od
|
|
14
|
+
button: "_kkk2n7od _ca0q1b66 _u5f31b66 _n3td1b66 _19bv1b66 _1bsb1osq _irr3166n _1di61dty",
|
|
15
15
|
content: "_11c8qk37 _syaz1fxt"
|
|
16
16
|
};
|
|
17
17
|
const ActionButtonNew = ({
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
._kkk2n7od{all:unset}._11c8qk37{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
3
|
-
._18s8u2gc{margin:var(--ds-space-100,8px)}
|
|
4
3
|
._1yt412x7{padding:var(--ds-space-075,6px)}
|
|
5
4
|
._2rkoglpi{border-radius:var(--ds-border-radius,4px)}
|
|
6
5
|
._18zru2gc{padding-inline:var(--ds-space-100,8px)}
|
|
6
|
+
._18u0u2gc{margin-left:var(--ds-space-100,8px)}
|
|
7
|
+
._19pku2gc{margin-top:var(--ds-space-100,8px)}
|
|
7
8
|
._1bsb1osq{width:100%}
|
|
9
|
+
._2hwxu2gc{margin-right:var(--ds-space-100,8px)}
|
|
8
10
|
._bfhk1gly{background-color:var(--ds-background-danger,#ffeceb)}
|
|
9
11
|
._bozgv77o{padding-inline-start:var(--ds-space-025,2px)}
|
|
10
12
|
._fiawglyw:empty{display:none}
|
|
@@ -37,7 +37,7 @@ const ActionFooterNew = ({
|
|
|
37
37
|
}
|
|
38
38
|
return /*#__PURE__*/React.createElement("div", {
|
|
39
39
|
"data-testId": `${testId}-footer`,
|
|
40
|
-
className: ax(["_kkk2n7od _2rkoglpi
|
|
40
|
+
className: ax(["_kkk2n7od _2rkoglpi _1yt412x7 _18zru2gc _19pku2gc _2hwxu2gc _otyrze3t _18u0u2gc _vwz4gktf _1bsb1osq _fiawglyw", message.appearance === 'error' && "_bfhk1gly"])
|
|
41
41
|
}, /*#__PURE__*/React.createElement(MotionWrapper, {
|
|
42
42
|
isFadeIn: true,
|
|
43
43
|
show: true,
|
|
@@ -50,6 +50,12 @@ const importIconMapperOld = {
|
|
|
50
50
|
[IconType.Story]: () => import( /* webpackChunkName: "glyphStory" */'@atlaskit/icon-object/glyph/story/16'),
|
|
51
51
|
[IconType.SubTask]: () => import( /* webpackChunkName: "glyphSubTask" */'@atlaskit/icon-object/glyph/subtask/16'),
|
|
52
52
|
[IconType.Task]: () => import( /* webpackChunkName: "glyphTask" */'@atlaskit/icon-object/glyph/task/16'),
|
|
53
|
+
// Confluence icons
|
|
54
|
+
[IconType.LiveDocument]: () => import( /* webpackChunkName: "glyphConfluenceLiveDocument" */'@atlaskit/icon-lab/core/page-live-doc').then(({
|
|
55
|
+
default: LiveDocumentIcon
|
|
56
|
+
}) => ({
|
|
57
|
+
default: LiveDocumentIcon
|
|
58
|
+
})),
|
|
53
59
|
// Provider icons
|
|
54
60
|
[IconType.Confluence]: () => import( /* webpackChunkName: "glyphConfluence" */'@atlaskit/logo/confluence-icon').then(({
|
|
55
61
|
ConfluenceIcon
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
.
|
|
1
|
+
._19bvze3t{padding-left:var(--ds-space-0,0)}
|
|
2
2
|
._2hwx1i6y{margin-right:var(--ds-space-negative-025,-2px)}
|
|
3
|
-
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
3
|
+
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
4
|
+
._ca0qze3t{padding-top:var(--ds-space-0,0)}
|
|
5
|
+
._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
|
|
6
|
+
._u5f3ze3t{padding-right:var(--ds-space-0,0)}
|
|
@@ -22,7 +22,7 @@ import withFrameStyleControl from '../utils/withFrameStyleControl';
|
|
|
22
22
|
import { InlineCardForbiddenViewOld } from './InlineCardForbiddenViewOld';
|
|
23
23
|
const styles = {
|
|
24
24
|
iconWrapper: "_2hwx1i6y",
|
|
25
|
-
actionButtonLozengeStyle: "
|
|
25
|
+
actionButtonLozengeStyle: "_bfhksm61 _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t"
|
|
26
26
|
};
|
|
27
27
|
const fallbackForbiddenIcon = () => {
|
|
28
28
|
return fg('platform-smart-card-icon-migration') ? /*#__PURE__*/React.createElement(Box, {
|
|
@@ -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.
|
|
13
|
+
packageVersion: "34.9.0",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
._1yt4v77o{padding:var(--ds-space-025,2px)}
|
|
3
2
|
._2rkoftgi{border-radius:8px}._16jlkb7n{flex-grow:1}
|
|
3
|
+
._19bvv77o{padding-left:var(--ds-space-025,2px)}
|
|
4
4
|
._1bsb1ns9{width:-moz-fit-content;width:fit-content}
|
|
5
5
|
._1e0c1txw{display:flex}
|
|
6
6
|
._1pbykb7n{z-index:1}
|
|
7
|
-
.
|
|
7
|
+
._ca0qv77o{padding-top:var(--ds-space-025,2px)}
|
|
8
|
+
._kqswh2mm{position:relative}
|
|
9
|
+
._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
|
|
10
|
+
._u5f3v77o{padding-right:var(--ds-space-025,2px)}
|
|
@@ -22,7 +22,7 @@ const AIGlowingBorderNew = ({
|
|
|
22
22
|
className
|
|
23
23
|
}) => /*#__PURE__*/React.createElement("div", {
|
|
24
24
|
"data-testid": testId,
|
|
25
|
-
className: ax(["
|
|
25
|
+
className: ax(["_1e0c1txw _kqswh2mm _ca0qv77o _u5f3v77o _n3tdv77o _19bvv77o _1bsb1ns9"])
|
|
26
26
|
}, /*#__PURE__*/React.createElement(AnimatedSvgContainer, {
|
|
27
27
|
palette: palette,
|
|
28
28
|
isMoving: isMoving,
|
package/dist/esm/constants.js
CHANGED
|
@@ -203,6 +203,7 @@ export var IconType = /*#__PURE__*/function (IconType) {
|
|
|
203
203
|
IconType["Story"] = "Jira:Story";
|
|
204
204
|
IconType["SubTask"] = "Jira:SubTask";
|
|
205
205
|
IconType["Task"] = "Jira:Task";
|
|
206
|
+
IconType["LiveDocument"] = "Confluence:LiveDocument";
|
|
206
207
|
IconType["Confluence"] = "Provider:Confluence";
|
|
207
208
|
IconType["Jira"] = "Provider:Jira";
|
|
208
209
|
IconType["Default"] = "Default";
|
|
@@ -3,8 +3,10 @@ import DocumentIcon from '@atlaskit/icon-file-type/glyph/document/16';
|
|
|
3
3
|
import FileIcon from '@atlaskit/icon-file-type/glyph/generic/16';
|
|
4
4
|
import PresentationIcon from '@atlaskit/icon-file-type/glyph/presentation/16';
|
|
5
5
|
import SpreadsheetIcon from '@atlaskit/icon-file-type/glyph/spreadsheet/16';
|
|
6
|
+
import LiveDocumentIcon from '@atlaskit/icon-lab/core/page-live-doc';
|
|
6
7
|
import BlogIcon from '@atlaskit/icon-object/glyph/blog/16';
|
|
7
8
|
import DocumentFilledIcon from '@atlaskit/icon/core/migration/page--document-filled';
|
|
9
|
+
import { isConfluenceGenerator } from '@atlaskit/link-extractors';
|
|
8
10
|
import { getIconForFileType } from '../../../utils';
|
|
9
11
|
import { prioritiseIcon } from './prioritiseIcon';
|
|
10
12
|
/**
|
|
@@ -38,10 +40,7 @@ var documentTypeToIcon = function documentTypeToIcon(type, opts) {
|
|
|
38
40
|
testId: "blog-icon"
|
|
39
41
|
});
|
|
40
42
|
case 'schema:DigitalDocument':
|
|
41
|
-
return
|
|
42
|
-
label: opts.title || 'file',
|
|
43
|
-
testId: "file-icon"
|
|
44
|
-
});
|
|
43
|
+
return digitalDocumentToIcon(opts);
|
|
45
44
|
case 'schema:TextDigitalDocument':
|
|
46
45
|
return /*#__PURE__*/React.createElement(DocumentIcon, {
|
|
47
46
|
label: opts.title || 'document',
|
|
@@ -69,4 +68,27 @@ var documentTypeToIcon = function documentTypeToIcon(type, opts) {
|
|
|
69
68
|
testId: "document-icon"
|
|
70
69
|
});
|
|
71
70
|
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Enables providers to represent `schema:DigitalDocument` in a manner which
|
|
75
|
+
* aligns with their customers when representing provider-specific types, which
|
|
76
|
+
* do not apply across multiple providers.
|
|
77
|
+
* @example Confluence digital documents represent 'live documents', specific to Confluence.
|
|
78
|
+
* @remark This mechanism will be superseded by backend-driven icon URLs as part
|
|
79
|
+
* of go/j/MODES-5864. Do not add more!
|
|
80
|
+
*/
|
|
81
|
+
var digitalDocumentToIcon = function digitalDocumentToIcon(opts) {
|
|
82
|
+
var _opts$provider;
|
|
83
|
+
if ((_opts$provider = opts.provider) !== null && _opts$provider !== void 0 && _opts$provider.id && isConfluenceGenerator(opts.provider.id)) {
|
|
84
|
+
return /*#__PURE__*/React.createElement(LiveDocumentIcon, {
|
|
85
|
+
label: "live-doc",
|
|
86
|
+
testId: "live-doc-icon"
|
|
87
|
+
});
|
|
88
|
+
} else {
|
|
89
|
+
return /*#__PURE__*/React.createElement(FileIcon, {
|
|
90
|
+
label: opts.title || 'file',
|
|
91
|
+
testId: "file-icon"
|
|
92
|
+
});
|
|
93
|
+
}
|
|
72
94
|
};
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
import { isConfluenceGenerator } from '@atlaskit/link-extractors';
|
|
1
2
|
import { IconType } from '../../../constants';
|
|
2
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Computes the relevant icon for a document type.
|
|
5
|
+
*
|
|
6
|
+
* @remark Note that document icons can vary based on the provider. E.g., a
|
|
7
|
+
* provider may choose to re-use one of these document types in their domain,
|
|
8
|
+
* but offer a different SVG icon on the frontend (to map to this type in their
|
|
9
|
+
* domain). See `schema:digitalDocument` for an example of this behaviour. This
|
|
10
|
+
* mechanism will be superseded by backend-driven icon URLs as part of
|
|
11
|
+
* go/j/MODES-5864. Do not add more!
|
|
12
|
+
*
|
|
13
|
+
* @param documentType JSON-LD document type
|
|
14
|
+
* @param label human-readable label to be displayed on the icon
|
|
15
|
+
* @param providerId JSON-LD provider (generator ID)
|
|
16
|
+
* @returns an icon descriptor representing the document type
|
|
17
|
+
*/
|
|
18
|
+
var extractDocumentTypeIcon = function extractDocumentTypeIcon(documentType, label, providerId) {
|
|
3
19
|
switch (documentType) {
|
|
4
20
|
case 'schema:BlogPosting':
|
|
5
21
|
return {
|
|
@@ -7,10 +23,17 @@ var extractDocumentTypeIcon = function extractDocumentTypeIcon(documentType, lab
|
|
|
7
23
|
label: label || 'Blog'
|
|
8
24
|
};
|
|
9
25
|
case 'schema:DigitalDocument':
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
26
|
+
if (providerId && isConfluenceGenerator(providerId)) {
|
|
27
|
+
return {
|
|
28
|
+
icon: IconType.LiveDocument,
|
|
29
|
+
label: label || 'Live Document'
|
|
30
|
+
};
|
|
31
|
+
} else {
|
|
32
|
+
return {
|
|
33
|
+
icon: IconType.File,
|
|
34
|
+
label: label || 'File'
|
|
35
|
+
};
|
|
36
|
+
}
|
|
14
37
|
case 'schema:TextDigitalDocument':
|
|
15
38
|
return {
|
|
16
39
|
icon: IconType.Document,
|
|
@@ -47,7 +47,7 @@ function chooseIcon(_ref2) {
|
|
|
47
47
|
label: label,
|
|
48
48
|
providerId: providerId,
|
|
49
49
|
data: data
|
|
50
|
-
}) || extractDocumentTypeIcon(type, label);
|
|
50
|
+
}) || extractDocumentTypeIcon(type, label, providerId);
|
|
51
51
|
return prioritiseIcon({
|
|
52
52
|
fileFormatIcon: fileFormatIcon,
|
|
53
53
|
documentTypeIcon: documentTypeIcon,
|
|
@@ -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.
|
|
7
|
+
packageVersion: "34.9.0"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -5,13 +5,13 @@ import { FooterBlock, PreviewBlock, TitleBlock } from '../view/FlexibleCard/comp
|
|
|
5
5
|
import * as Elements from '../view/FlexibleCard/components/elements';
|
|
6
6
|
export var isFlexibleUiCard = function isFlexibleUiCard(children) {
|
|
7
7
|
if (children && React.Children.toArray(children).some(function (child) {
|
|
8
|
-
return
|
|
8
|
+
return _isFlexibleUiTitleBlock(child);
|
|
9
9
|
})) {
|
|
10
10
|
return true;
|
|
11
11
|
}
|
|
12
12
|
return false;
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
var _isFlexibleUiBlock = function isFlexibleUiBlock(node) {
|
|
15
15
|
var _node$type;
|
|
16
16
|
if (!fg('bandicoots-compiled-migration-smartcard')) {
|
|
17
17
|
return /*#__PURE__*/React.isValidElement(node) && Object.values(Blocks).some(function (type) {
|
|
@@ -34,7 +34,7 @@ export var isFlexibleUiBlock = function isFlexibleUiBlock(node) {
|
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
if (typeof child.type !== 'string' && ((_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.name) !== 'Style') {
|
|
37
|
-
isChildrenValid =
|
|
37
|
+
isChildrenValid = _isFlexibleUiBlock(child);
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
return isChildrenValid;
|
|
@@ -46,7 +46,8 @@ export var isFlexibleUiBlock = function isFlexibleUiBlock(node) {
|
|
|
46
46
|
}
|
|
47
47
|
return false;
|
|
48
48
|
};
|
|
49
|
-
export
|
|
49
|
+
export { _isFlexibleUiBlock as isFlexibleUiBlock };
|
|
50
|
+
var _isFlexibleUiElement = function isFlexibleUiElement(node) {
|
|
50
51
|
var _node$type2;
|
|
51
52
|
if (!fg('bandicoots-compiled-migration-smartcard')) {
|
|
52
53
|
return /*#__PURE__*/React.isValidElement(node) && Object.values(Elements).some(function (type) {
|
|
@@ -74,14 +75,15 @@ export var isFlexibleUiElement = function isFlexibleUiElement(node) {
|
|
|
74
75
|
return;
|
|
75
76
|
}
|
|
76
77
|
if (typeof child.type !== 'string' && ((_child$type2 = child.type) === null || _child$type2 === void 0 ? void 0 : _child$type2.name) !== 'Style') {
|
|
77
|
-
isChildrenValid =
|
|
78
|
+
isChildrenValid = _isFlexibleUiElement(child);
|
|
78
79
|
}
|
|
79
80
|
});
|
|
80
81
|
return isChildrenValid;
|
|
81
82
|
}
|
|
82
83
|
return false;
|
|
83
84
|
};
|
|
84
|
-
export
|
|
85
|
+
export { _isFlexibleUiElement as isFlexibleUiElement };
|
|
86
|
+
var _isFlexibleUiTitleBlock = function isFlexibleUiTitleBlock(node) {
|
|
85
87
|
var _node$type3;
|
|
86
88
|
if (!fg('bandicoots-compiled-migration-smartcard')) {
|
|
87
89
|
return /*#__PURE__*/React.isValidElement(node) && node.type === TitleBlock;
|
|
@@ -105,14 +107,15 @@ export var isFlexibleUiTitleBlock = function isFlexibleUiTitleBlock(node) {
|
|
|
105
107
|
return;
|
|
106
108
|
}
|
|
107
109
|
if (typeof child.type !== 'string' && ((_child$type3 = child.type) === null || _child$type3 === void 0 ? void 0 : _child$type3.name) !== 'Style') {
|
|
108
|
-
isChildrenValid =
|
|
110
|
+
isChildrenValid = _isFlexibleUiTitleBlock(child);
|
|
109
111
|
}
|
|
110
112
|
});
|
|
111
113
|
return isChildrenValid;
|
|
112
114
|
}
|
|
113
115
|
return false;
|
|
114
116
|
};
|
|
115
|
-
export
|
|
117
|
+
export { _isFlexibleUiTitleBlock as isFlexibleUiTitleBlock };
|
|
118
|
+
var _isFlexibleUiPreviewBlock = function isFlexibleUiPreviewBlock(node) {
|
|
116
119
|
var _node$type4;
|
|
117
120
|
if (!fg('bandicoots-compiled-migration-smartcard')) {
|
|
118
121
|
return /*#__PURE__*/React.isValidElement(node) && node.type === PreviewBlock;
|
|
@@ -136,13 +139,14 @@ export var isFlexibleUiPreviewBlock = function isFlexibleUiPreviewBlock(node) {
|
|
|
136
139
|
return;
|
|
137
140
|
}
|
|
138
141
|
if (typeof child.type !== 'string' && ((_child$type4 = child.type) === null || _child$type4 === void 0 ? void 0 : _child$type4.name) !== 'Style') {
|
|
139
|
-
isChildrenValid =
|
|
142
|
+
isChildrenValid = _isFlexibleUiPreviewBlock(child);
|
|
140
143
|
}
|
|
141
144
|
});
|
|
142
145
|
return isChildrenValid;
|
|
143
146
|
}
|
|
144
147
|
return false;
|
|
145
148
|
};
|
|
149
|
+
export { _isFlexibleUiPreviewBlock as isFlexibleUiPreviewBlock };
|
|
146
150
|
export var isFlexibleUiFooterBlock = function isFlexibleUiFooterBlock(node) {
|
|
147
151
|
return /*#__PURE__*/React.isValidElement(node) && node.type === FooterBlock;
|
|
148
152
|
};
|