@atlaskit/smart-card 45.13.4 → 45.14.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 +17 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-metadata--default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-composition--default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-blocker--default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-critical--default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-high--default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-highest--default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-low--default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-lowest--default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-major--default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-medium--default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-minor--default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-trivial--default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-false-platform-sl-3p-preauth-better-hovercard-false.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-false-platform-sl-3p-preauth-better-hovercard-true.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-true-platform-sl-3p-preauth-better-hovercard-false.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-true-platform-sl-3p-preauth-better-hovercard-true.png +2 -2
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/index.js +111 -10
- package/dist/cjs/view/EmbedModal/utils.js +32 -2
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +10 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-metadata--default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-composition--default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-blocker--default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-critical--default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-high--default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-highest--default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-low--default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-lowest--default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-major--default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-medium--default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-minor--default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-trivial--default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-false-platform-sl-3p-preauth-better-hovercard-false.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-false-platform-sl-3p-preauth-better-hovercard-true.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-true-platform-sl-3p-preauth-better-hovercard-false.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-true-platform-sl-3p-preauth-better-hovercard-true.png +2 -2
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/index.js +51 -10
- package/dist/es2019/view/EmbedModal/utils.js +32 -2
- package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +9 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-metadata--default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-composition--default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-blocker--default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-critical--default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-high--default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-highest--default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-low--default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-lowest--default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-major--default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-medium--default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-minor--default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card-icon/icon-type-priority-trivial--default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-false-platform-sl-3p-preauth-better-hovercard-false.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-false-platform-sl-3p-preauth-better-hovercard-true.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-true-platform-sl-3p-preauth-better-hovercard-false.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-true-platform-sl-3p-preauth-better-hovercard-true.png +2 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/index.js +91 -10
- package/dist/esm/view/EmbedModal/utils.js +32 -2
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +10 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/common/ui/icons/priority-blocker-icon.d.ts +1 -0
- package/dist/types/common/ui/icons/priority-critical-icon.d.ts +1 -0
- package/dist/types/common/ui/icons/priority-high-icon.d.ts +1 -0
- package/dist/types/common/ui/icons/priority-highest-icon.d.ts +1 -0
- package/dist/types/common/ui/icons/priority-low-icon.d.ts +1 -0
- package/dist/types/common/ui/icons/priority-lowest-icon.d.ts +1 -0
- package/dist/types/common/ui/icons/priority-major-icon.d.ts +1 -0
- package/dist/types/common/ui/icons/priority-medium-icon.d.ts +1 -0
- package/dist/types/common/ui/icons/priority-minor-icon.d.ts +1 -0
- package/dist/types/common/ui/icons/priority-trivial-icon.d.ts +1 -0
- package/package.json +9 -3
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import Loadable from 'react-loadable';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
+
import { token } from '@atlaskit/tokens/get-token';
|
|
5
6
|
import { themeObjectToString } from '@atlaskit/tokens/theme-state-transformer';
|
|
6
7
|
import { IconType, SmartLinkSize } from '../constants';
|
|
7
8
|
import extractFileFormatIcon from '../extractors/flexible/icon/extract-file-formatIcon';
|
|
@@ -310,34 +311,74 @@ export const getLazyIcons = () => {
|
|
|
310
311
|
},
|
|
311
312
|
// Local priority icons (custom SVG components)
|
|
312
313
|
[IconType.PriorityBlocker]: {
|
|
313
|
-
default: () => import( /* webpackChunkName: "@atlaskit-
|
|
314
|
+
default: () => fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityBlocker" */'@atlaskit/icon/core/priority-blocker').then(module => ({
|
|
315
|
+
default: props => /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
316
|
+
color: token('color.icon.accent.red')
|
|
317
|
+
}))
|
|
318
|
+
})) : import( /* webpackChunkName: "@atlaskit-internal_glyphBlocker" */'../common/ui/icons/priority-blocker-icon')
|
|
314
319
|
},
|
|
315
320
|
[IconType.PriorityCritical]: {
|
|
316
|
-
default: () => import( /* webpackChunkName: "@atlaskit-
|
|
321
|
+
default: () => fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityCritical" */'@atlaskit/icon/core/priority-critical').then(module => ({
|
|
322
|
+
default: props => /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
323
|
+
color: token('color.icon.accent.red')
|
|
324
|
+
}))
|
|
325
|
+
})) : import( /* webpackChunkName: "@atlaskit-internal_glyphCritical" */'../common/ui/icons/priority-critical-icon')
|
|
317
326
|
},
|
|
318
327
|
[IconType.PriorityHigh]: {
|
|
319
|
-
default: () => import( /* webpackChunkName: "@atlaskit-
|
|
328
|
+
default: () => fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityHigh" */'@atlaskit/icon/core/priority-high').then(module => ({
|
|
329
|
+
default: props => /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
330
|
+
color: token('color.icon.accent.red')
|
|
331
|
+
}))
|
|
332
|
+
})) : import( /* webpackChunkName: "@atlaskit-internal_glyphHigh" */'../common/ui/icons/priority-high-icon')
|
|
320
333
|
},
|
|
321
334
|
[IconType.PriorityHighest]: {
|
|
322
|
-
default: () => import( /* webpackChunkName: "@atlaskit-
|
|
335
|
+
default: () => fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityHighest" */'@atlaskit/icon/core/priority-highest').then(module => ({
|
|
336
|
+
default: props => /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
337
|
+
color: token('color.icon.accent.red')
|
|
338
|
+
}))
|
|
339
|
+
})) : import( /* webpackChunkName: "@atlaskit-internal_glyphHighest" */'../common/ui/icons/priority-highest-icon')
|
|
323
340
|
},
|
|
324
341
|
[IconType.PriorityLow]: {
|
|
325
|
-
default: () => import( /* webpackChunkName: "@atlaskit-
|
|
342
|
+
default: () => fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityLow" */'@atlaskit/icon/core/priority-low').then(module => ({
|
|
343
|
+
default: props => /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
344
|
+
color: token('color.icon.accent.blue')
|
|
345
|
+
}))
|
|
346
|
+
})) : import( /* webpackChunkName: "@atlaskit-internal_glyphLow" */'../common/ui/icons/priority-low-icon')
|
|
326
347
|
},
|
|
327
348
|
[IconType.PriorityLowest]: {
|
|
328
|
-
default: () => import( /* webpackChunkName: "@atlaskit-
|
|
349
|
+
default: () => fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityLowest" */'@atlaskit/icon/core/priority-lowest').then(module => ({
|
|
350
|
+
default: props => /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
351
|
+
color: token('color.icon.accent.blue')
|
|
352
|
+
}))
|
|
353
|
+
})) : import( /* webpackChunkName: "@atlaskit-internal_glyphLowest" */'../common/ui/icons/priority-lowest-icon')
|
|
329
354
|
},
|
|
330
355
|
[IconType.PriorityMajor]: {
|
|
331
|
-
default: () => import( /* webpackChunkName: "@atlaskit-
|
|
356
|
+
default: () => fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityMajor" */'@atlaskit/icon/core/priority-major').then(module => ({
|
|
357
|
+
default: props => /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
358
|
+
color: token('color.icon.accent.red')
|
|
359
|
+
}))
|
|
360
|
+
})) : import( /* webpackChunkName: "@atlaskit-internal_glyphMajor" */'../common/ui/icons/priority-major-icon')
|
|
332
361
|
},
|
|
333
362
|
[IconType.PriorityMedium]: {
|
|
334
|
-
default: () => import( /* webpackChunkName: "@atlaskit-
|
|
363
|
+
default: () => fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityMedium" */'@atlaskit/icon/core/priority-medium').then(module => ({
|
|
364
|
+
default: props => /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
365
|
+
color: token('color.icon.accent.orange')
|
|
366
|
+
}))
|
|
367
|
+
})) : import( /* webpackChunkName: "@atlaskit-internal_glyphMedium" */'../common/ui/icons/priority-medium-icon')
|
|
335
368
|
},
|
|
336
369
|
[IconType.PriorityMinor]: {
|
|
337
|
-
default: () => import( /* webpackChunkName: "@atlaskit-
|
|
370
|
+
default: () => fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityMinor" */'@atlaskit/icon/core/priority-minor').then(module => ({
|
|
371
|
+
default: props => /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
372
|
+
color: token('color.icon.accent.blue')
|
|
373
|
+
}))
|
|
374
|
+
})) : import( /* webpackChunkName: "@atlaskit-internal_glyphMinor" */'../common/ui/icons/priority-minor-icon')
|
|
338
375
|
},
|
|
339
376
|
[IconType.PriorityTrivial]: {
|
|
340
|
-
default: () => import( /* webpackChunkName: "@atlaskit-
|
|
377
|
+
default: () => fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityTrivial" */'@atlaskit/icon/core/priority-trivial').then(module => ({
|
|
378
|
+
default: props => /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
379
|
+
color: token('color.icon.accent.gray')
|
|
380
|
+
}))
|
|
381
|
+
})) : import( /* webpackChunkName: "@atlaskit-internal_glyphTrivial" */'../common/ui/icons/priority-trivial-icon')
|
|
341
382
|
}
|
|
342
383
|
};
|
|
343
384
|
};
|
|
@@ -1,7 +1,37 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import ReactDOM from 'react-dom';
|
|
4
|
+
import { createRoot } from 'react-dom/client';
|
|
4
5
|
import { IntlProvider } from 'react-intl';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
let reactRoots = new WeakMap();
|
|
8
|
+
|
|
9
|
+
/** Mounts `element` into `mountPoint`: uses the React 18/19 `createRoot` API when `nike_r19_render_unmount` is on, else the legacy render path. */
|
|
10
|
+
const renderToMountPoint = (element, mountPoint) => {
|
|
11
|
+
if (fg('nike_r19_render_unmount')) {
|
|
12
|
+
let root = reactRoots.get(mountPoint);
|
|
13
|
+
if (!root) {
|
|
14
|
+
root = createRoot(mountPoint);
|
|
15
|
+
reactRoots.set(mountPoint, root);
|
|
16
|
+
}
|
|
17
|
+
root.render(element);
|
|
18
|
+
} else {
|
|
19
|
+
ReactDOM.render(element, mountPoint);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** Unmounts the tree at `mountPoint`: uses `root.unmount()` when `nike_r19_render_unmount` is on, else the legacy unmount path. */
|
|
24
|
+
const unmountFromMountPoint = mountPoint => {
|
|
25
|
+
if (fg('nike_r19_render_unmount')) {
|
|
26
|
+
const root = reactRoots.get(mountPoint);
|
|
27
|
+
if (root) {
|
|
28
|
+
root.unmount();
|
|
29
|
+
reactRoots.delete(mountPoint);
|
|
30
|
+
}
|
|
31
|
+
} else {
|
|
32
|
+
ReactDOM.unmountComponentAtNode(mountPoint);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
5
35
|
const IFRAME_NAME = 'twp-editor-preview-iframe';
|
|
6
36
|
const POPUP_MOUNT_POINT_ID = 'twp-editor-preview-iframe';
|
|
7
37
|
|
|
@@ -31,13 +61,13 @@ export async function openEmbedModal({
|
|
|
31
61
|
document.body.appendChild(popupMountPoint);
|
|
32
62
|
}
|
|
33
63
|
let Modal = await import('./index');
|
|
34
|
-
|
|
64
|
+
renderToMountPoint( /*#__PURE__*/React.createElement(IntlProvider, {
|
|
35
65
|
locale: "en"
|
|
36
66
|
}, /*#__PURE__*/React.createElement(Modal.default, _extends({}, props, {
|
|
37
67
|
iframeName: IFRAME_NAME,
|
|
38
68
|
onClose: _context => {
|
|
39
69
|
if (popupMountPoint) {
|
|
40
|
-
|
|
70
|
+
unmountFromMountPoint(popupMountPoint);
|
|
41
71
|
}
|
|
42
72
|
if (onClose) {
|
|
43
73
|
onClose(_context);
|
|
@@ -23,8 +23,9 @@ const importIcon = importFn => {
|
|
|
23
23
|
const getBlogIcon = () => require('../../../../../common/ui/icons/blog-icon').default;
|
|
24
24
|
const getDocumentIcon = () => require('../../../../../common/ui/icons/page-icon').default;
|
|
25
25
|
const getLiveDocumentIcon = () => require('../../../../../common/ui/icons/live-document-icon').default;
|
|
26
|
+
const PRIORITY_ICONS = [IconType.PriorityBlocker, IconType.PriorityCritical, IconType.PriorityHigh, IconType.PriorityHighest, IconType.PriorityLow, IconType.PriorityLowest, IconType.PriorityMajor, IconType.PriorityMedium, IconType.PriorityMinor, IconType.PriorityTrivial];
|
|
26
27
|
const isCoreIcon = icon => {
|
|
27
|
-
return [IconType.Project, IconType.Template, IconType.Forbidden, IconType.Default, IconType.Error, IconType.Attachment, IconType.CheckItem, IconType.Component, IconType.Comment, IconType.View, IconType.React, IconType.Vote, IconType.PriorityUndefined, IconType.ProgrammingLanguage, IconType.Subscriber, IconType.SubTasksProgress].includes(icon);
|
|
28
|
+
return [IconType.Project, IconType.Template, IconType.Forbidden, IconType.Default, IconType.Error, IconType.Attachment, IconType.CheckItem, IconType.Component, IconType.Comment, IconType.View, IconType.React, IconType.Vote, IconType.PriorityUndefined, IconType.ProgrammingLanguage, IconType.Subscriber, IconType.SubTasksProgress, ...(fg('platform_sl_priority_icon') ? PRIORITY_ICONS : [])].includes(icon);
|
|
28
29
|
};
|
|
29
30
|
const AtlaskitIcon = ({
|
|
30
31
|
icon,
|
|
@@ -88,6 +89,13 @@ const AtlaskitIcon = ({
|
|
|
88
89
|
});
|
|
89
90
|
case SmartLinkSize.Large:
|
|
90
91
|
case SmartLinkSize.XLarge:
|
|
92
|
+
if (PRIORITY_ICONS.includes(icon) && fg('platform_sl_priority_icon')) {
|
|
93
|
+
return /*#__PURE__*/React.createElement(ImportedIcon, {
|
|
94
|
+
label: label,
|
|
95
|
+
testId: testId,
|
|
96
|
+
color: color
|
|
97
|
+
});
|
|
98
|
+
}
|
|
91
99
|
let appearance;
|
|
92
100
|
if (icon === IconType.Error || icon === IconType.Forbidden) {
|
|
93
101
|
appearance = 'redBold';
|
|
@@ -9,7 +9,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
9
9
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
10
10
|
const PACKAGE_DATA = {
|
|
11
11
|
packageName: "@atlaskit/smart-card",
|
|
12
|
-
packageVersion: "45.13.
|
|
12
|
+
packageVersion: "45.13.5",
|
|
13
13
|
componentName: 'linkUrl'
|
|
14
14
|
};
|
|
15
15
|
const LinkUrl = ({
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:ff920567e7c479cb4b392387a65d13782dbd2d0ba8f5c2e151468ff763b05745
|
|
3
|
+
size 155671
|
package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-composition--default.png
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:c291fcaaf70a8fe7fb591f81b8cb847f9fed6a41bff8b68b4fc3537858c63327
|
|
3
|
+
size 103954
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:b1f967736efa7f07f65cde83bfd59c6034e1f7f7271eeadcce4eddd72abae460
|
|
3
|
+
size 909
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:8afc83fc97fe9a18ae1e22b07b5740802daa92c3c5c3d0afcf92a047acd466d0
|
|
3
|
+
size 693
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:eb628b90b7507b2d8dd0a9fa25bb38ddbfe3ed139ab745ecfe5d3b7baf8c2ee8
|
|
3
|
+
size 578
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:e13590c476875e065a8e5a4107da0ec08f57906f4f50d933180baeed8de41485
|
|
3
|
+
size 735
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:13a75abc78d4f38d5000684f61edf516e53e8ab1553af7a6a02b8423cf86acb4
|
|
3
|
+
size 538
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:5d01a73fff315767f18623a554df194bf7ff52652df8c02a9dc615b4ad3c2245
|
|
3
|
+
size 718
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:d4945d7a7f3a66a0e55692d2e13220913ea15a7cefb5ecdcd36ed78d616aae53
|
|
3
|
+
size 898
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:4661af0db6c199053587fa1fdea292a078d09c14bfa11c75898409799b47f124
|
|
3
|
+
size 391
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:8d038fc0b7e46d84dbc71ca95a76438ab2bfb836d7e603651c12c2a20051ddbf
|
|
3
|
+
size 881
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:d3f200ff0ce9d4b1db2062033076ccfe9865a5d750c44842e00fd47331100348
|
|
3
|
+
size 868
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:06012e2c14c38c3fc9da9fa230c9fc55dd0b011c7f5756b930968f1a88700828
|
|
3
|
+
size 220083
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:06012e2c14c38c3fc9da9fa230c9fc55dd0b011c7f5756b930968f1a88700828
|
|
3
|
+
size 220083
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:cd8bc16db0eebc4cfd0f8882a3483ed84905e78317f8d6ff1d053d720b9b05f4
|
|
3
|
+
size 220298
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:cd8bc16db0eebc4cfd0f8882a3483ed84905e78317f8d6ff1d053d720b9b05f4
|
|
3
|
+
size 220298
|
|
@@ -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: "45.13.
|
|
7
|
+
packageVersion: "45.13.5" || ''
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import Loadable from 'react-loadable';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
+
import { token } from '@atlaskit/tokens/get-token';
|
|
9
10
|
import { themeObjectToString } from '@atlaskit/tokens/theme-state-transformer';
|
|
10
11
|
import { IconType, SmartLinkSize } from '../constants';
|
|
11
12
|
import extractFileFormatIcon from '../extractors/flexible/icon/extract-file-formatIcon';
|
|
@@ -476,43 +477,123 @@ export var getLazyIcons = function getLazyIcons() {
|
|
|
476
477
|
}
|
|
477
478
|
}), IconType.PriorityBlocker, {
|
|
478
479
|
default: function _default() {
|
|
479
|
-
return import( /* webpackChunkName: "@atlaskit-
|
|
480
|
+
return fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityBlocker" */'@atlaskit/icon/core/priority-blocker').then(function (module) {
|
|
481
|
+
return {
|
|
482
|
+
default: function _default(props) {
|
|
483
|
+
return /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
484
|
+
color: token('color.icon.accent.red')
|
|
485
|
+
}));
|
|
486
|
+
}
|
|
487
|
+
};
|
|
488
|
+
}) : import( /* webpackChunkName: "@atlaskit-internal_glyphBlocker" */'../common/ui/icons/priority-blocker-icon');
|
|
480
489
|
}
|
|
481
490
|
}), IconType.PriorityCritical, {
|
|
482
491
|
default: function _default() {
|
|
483
|
-
return import( /* webpackChunkName: "@atlaskit-
|
|
492
|
+
return fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityCritical" */'@atlaskit/icon/core/priority-critical').then(function (module) {
|
|
493
|
+
return {
|
|
494
|
+
default: function _default(props) {
|
|
495
|
+
return /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
496
|
+
color: token('color.icon.accent.red')
|
|
497
|
+
}));
|
|
498
|
+
}
|
|
499
|
+
};
|
|
500
|
+
}) : import( /* webpackChunkName: "@atlaskit-internal_glyphCritical" */'../common/ui/icons/priority-critical-icon');
|
|
484
501
|
}
|
|
485
502
|
}), IconType.PriorityHigh, {
|
|
486
503
|
default: function _default() {
|
|
487
|
-
return import( /* webpackChunkName: "@atlaskit-
|
|
504
|
+
return fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityHigh" */'@atlaskit/icon/core/priority-high').then(function (module) {
|
|
505
|
+
return {
|
|
506
|
+
default: function _default(props) {
|
|
507
|
+
return /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
508
|
+
color: token('color.icon.accent.red')
|
|
509
|
+
}));
|
|
510
|
+
}
|
|
511
|
+
};
|
|
512
|
+
}) : import( /* webpackChunkName: "@atlaskit-internal_glyphHigh" */'../common/ui/icons/priority-high-icon');
|
|
488
513
|
}
|
|
489
514
|
}), IconType.PriorityHighest, {
|
|
490
515
|
default: function _default() {
|
|
491
|
-
return import( /* webpackChunkName: "@atlaskit-
|
|
516
|
+
return fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityHighest" */'@atlaskit/icon/core/priority-highest').then(function (module) {
|
|
517
|
+
return {
|
|
518
|
+
default: function _default(props) {
|
|
519
|
+
return /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
520
|
+
color: token('color.icon.accent.red')
|
|
521
|
+
}));
|
|
522
|
+
}
|
|
523
|
+
};
|
|
524
|
+
}) : import( /* webpackChunkName: "@atlaskit-internal_glyphHighest" */'../common/ui/icons/priority-highest-icon');
|
|
492
525
|
}
|
|
493
526
|
}), IconType.PriorityLow, {
|
|
494
527
|
default: function _default() {
|
|
495
|
-
return import( /* webpackChunkName: "@atlaskit-
|
|
528
|
+
return fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityLow" */'@atlaskit/icon/core/priority-low').then(function (module) {
|
|
529
|
+
return {
|
|
530
|
+
default: function _default(props) {
|
|
531
|
+
return /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
532
|
+
color: token('color.icon.accent.blue')
|
|
533
|
+
}));
|
|
534
|
+
}
|
|
535
|
+
};
|
|
536
|
+
}) : import( /* webpackChunkName: "@atlaskit-internal_glyphLow" */'../common/ui/icons/priority-low-icon');
|
|
496
537
|
}
|
|
497
538
|
}), IconType.PriorityLowest, {
|
|
498
539
|
default: function _default() {
|
|
499
|
-
return import( /* webpackChunkName: "@atlaskit-
|
|
540
|
+
return fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityLowest" */'@atlaskit/icon/core/priority-lowest').then(function (module) {
|
|
541
|
+
return {
|
|
542
|
+
default: function _default(props) {
|
|
543
|
+
return /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
544
|
+
color: token('color.icon.accent.blue')
|
|
545
|
+
}));
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
}) : import( /* webpackChunkName: "@atlaskit-internal_glyphLowest" */'../common/ui/icons/priority-lowest-icon');
|
|
500
549
|
}
|
|
501
550
|
}), IconType.PriorityMajor, {
|
|
502
551
|
default: function _default() {
|
|
503
|
-
return import( /* webpackChunkName: "@atlaskit-
|
|
552
|
+
return fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityMajor" */'@atlaskit/icon/core/priority-major').then(function (module) {
|
|
553
|
+
return {
|
|
554
|
+
default: function _default(props) {
|
|
555
|
+
return /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
556
|
+
color: token('color.icon.accent.red')
|
|
557
|
+
}));
|
|
558
|
+
}
|
|
559
|
+
};
|
|
560
|
+
}) : import( /* webpackChunkName: "@atlaskit-internal_glyphMajor" */'../common/ui/icons/priority-major-icon');
|
|
504
561
|
}
|
|
505
562
|
}), _defineProperty(_defineProperty(_defineProperty(_ref3, IconType.PriorityMedium, {
|
|
506
563
|
default: function _default() {
|
|
507
|
-
return import( /* webpackChunkName: "@atlaskit-
|
|
564
|
+
return fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityMedium" */'@atlaskit/icon/core/priority-medium').then(function (module) {
|
|
565
|
+
return {
|
|
566
|
+
default: function _default(props) {
|
|
567
|
+
return /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
568
|
+
color: token('color.icon.accent.orange')
|
|
569
|
+
}));
|
|
570
|
+
}
|
|
571
|
+
};
|
|
572
|
+
}) : import( /* webpackChunkName: "@atlaskit-internal_glyphMedium" */'../common/ui/icons/priority-medium-icon');
|
|
508
573
|
}
|
|
509
574
|
}), IconType.PriorityMinor, {
|
|
510
575
|
default: function _default() {
|
|
511
|
-
return import( /* webpackChunkName: "@atlaskit-
|
|
576
|
+
return fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityMinor" */'@atlaskit/icon/core/priority-minor').then(function (module) {
|
|
577
|
+
return {
|
|
578
|
+
default: function _default(props) {
|
|
579
|
+
return /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
580
|
+
color: token('color.icon.accent.blue')
|
|
581
|
+
}));
|
|
582
|
+
}
|
|
583
|
+
};
|
|
584
|
+
}) : import( /* webpackChunkName: "@atlaskit-internal_glyphMinor" */'../common/ui/icons/priority-minor-icon');
|
|
512
585
|
}
|
|
513
586
|
}), IconType.PriorityTrivial, {
|
|
514
587
|
default: function _default() {
|
|
515
|
-
return import( /* webpackChunkName: "@atlaskit-
|
|
588
|
+
return fg('platform_sl_priority_icon') ? import( /* webpackChunkName: "@atlaskit-internal_glyphPriorityTrivial" */'@atlaskit/icon/core/priority-trivial').then(function (module) {
|
|
589
|
+
return {
|
|
590
|
+
default: function _default(props) {
|
|
591
|
+
return /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
592
|
+
color: token('color.icon.accent.gray')
|
|
593
|
+
}));
|
|
594
|
+
}
|
|
595
|
+
};
|
|
596
|
+
}) : import( /* webpackChunkName: "@atlaskit-internal_glyphTrivial" */'../common/ui/icons/priority-trivial-icon');
|
|
516
597
|
}
|
|
517
598
|
});
|
|
518
599
|
};
|
|
@@ -5,7 +5,37 @@ var _excluded = ["onClose"];
|
|
|
5
5
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import ReactDOM from 'react-dom';
|
|
8
|
+
import { createRoot } from 'react-dom/client';
|
|
8
9
|
import { IntlProvider } from 'react-intl';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
+
var reactRoots = new WeakMap();
|
|
12
|
+
|
|
13
|
+
/** Mounts `element` into `mountPoint`: uses the React 18/19 `createRoot` API when `nike_r19_render_unmount` is on, else the legacy render path. */
|
|
14
|
+
var renderToMountPoint = function renderToMountPoint(element, mountPoint) {
|
|
15
|
+
if (fg('nike_r19_render_unmount')) {
|
|
16
|
+
var root = reactRoots.get(mountPoint);
|
|
17
|
+
if (!root) {
|
|
18
|
+
root = createRoot(mountPoint);
|
|
19
|
+
reactRoots.set(mountPoint, root);
|
|
20
|
+
}
|
|
21
|
+
root.render(element);
|
|
22
|
+
} else {
|
|
23
|
+
ReactDOM.render(element, mountPoint);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** Unmounts the tree at `mountPoint`: uses `root.unmount()` when `nike_r19_render_unmount` is on, else the legacy unmount path. */
|
|
28
|
+
var unmountFromMountPoint = function unmountFromMountPoint(mountPoint) {
|
|
29
|
+
if (fg('nike_r19_render_unmount')) {
|
|
30
|
+
var root = reactRoots.get(mountPoint);
|
|
31
|
+
if (root) {
|
|
32
|
+
root.unmount();
|
|
33
|
+
reactRoots.delete(mountPoint);
|
|
34
|
+
}
|
|
35
|
+
} else {
|
|
36
|
+
ReactDOM.unmountComponentAtNode(mountPoint);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
9
39
|
var IFRAME_NAME = 'twp-editor-preview-iframe';
|
|
10
40
|
var POPUP_MOUNT_POINT_ID = 'twp-editor-preview-iframe';
|
|
11
41
|
|
|
@@ -50,13 +80,13 @@ function _openEmbedModal() {
|
|
|
50
80
|
return import('./index');
|
|
51
81
|
case 1:
|
|
52
82
|
Modal = _context2.sent;
|
|
53
|
-
|
|
83
|
+
renderToMountPoint( /*#__PURE__*/React.createElement(IntlProvider, {
|
|
54
84
|
locale: "en"
|
|
55
85
|
}, /*#__PURE__*/React.createElement(Modal.default, _extends({}, props, {
|
|
56
86
|
iframeName: IFRAME_NAME,
|
|
57
87
|
onClose: function onClose(_context) {
|
|
58
88
|
if (popupMountPoint) {
|
|
59
|
-
|
|
89
|
+
unmountFromMountPoint(popupMountPoint);
|
|
60
90
|
}
|
|
61
91
|
if (_onClose) {
|
|
62
92
|
_onClose(_context);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import Loadable from 'react-loadable';
|
|
4
5
|
import { IconTile } from '@atlaskit/icon';
|
|
@@ -35,8 +36,9 @@ var getDocumentIcon = function getDocumentIcon() {
|
|
|
35
36
|
var getLiveDocumentIcon = function getLiveDocumentIcon() {
|
|
36
37
|
return require('../../../../../common/ui/icons/live-document-icon').default;
|
|
37
38
|
};
|
|
39
|
+
var PRIORITY_ICONS = [IconType.PriorityBlocker, IconType.PriorityCritical, IconType.PriorityHigh, IconType.PriorityHighest, IconType.PriorityLow, IconType.PriorityLowest, IconType.PriorityMajor, IconType.PriorityMedium, IconType.PriorityMinor, IconType.PriorityTrivial];
|
|
38
40
|
var isCoreIcon = function isCoreIcon(icon) {
|
|
39
|
-
return [IconType.Project, IconType.Template, IconType.Forbidden, IconType.Default, IconType.Error, IconType.Attachment, IconType.CheckItem, IconType.Component, IconType.Comment, IconType.View, IconType.React, IconType.Vote, IconType.PriorityUndefined, IconType.ProgrammingLanguage, IconType.Subscriber, IconType.SubTasksProgress].includes(icon);
|
|
41
|
+
return [IconType.Project, IconType.Template, IconType.Forbidden, IconType.Default, IconType.Error, IconType.Attachment, IconType.CheckItem, IconType.Component, IconType.Comment, IconType.View, IconType.React, IconType.Vote, IconType.PriorityUndefined, IconType.ProgrammingLanguage, IconType.Subscriber, IconType.SubTasksProgress].concat(_toConsumableArray(fg('platform_sl_priority_icon') ? PRIORITY_ICONS : [])).includes(icon);
|
|
40
42
|
};
|
|
41
43
|
var AtlaskitIcon = function AtlaskitIcon(_ref) {
|
|
42
44
|
var icon = _ref.icon,
|
|
@@ -100,6 +102,13 @@ var AtlaskitIcon = function AtlaskitIcon(_ref) {
|
|
|
100
102
|
});
|
|
101
103
|
case SmartLinkSize.Large:
|
|
102
104
|
case SmartLinkSize.XLarge:
|
|
105
|
+
if (PRIORITY_ICONS.includes(icon) && fg('platform_sl_priority_icon')) {
|
|
106
|
+
return /*#__PURE__*/React.createElement(ImportedIcon, {
|
|
107
|
+
label: label,
|
|
108
|
+
testId: testId,
|
|
109
|
+
color: color
|
|
110
|
+
});
|
|
111
|
+
}
|
|
103
112
|
var appearance;
|
|
104
113
|
if (icon === IconType.Error || icon === IconType.Forbidden) {
|
|
105
114
|
appearance = 'redBold';
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
var PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "45.13.
|
|
15
|
+
packageVersion: "45.13.5",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
var LinkUrl = function LinkUrl(_ref) {
|