@atlaskit/smart-card 46.14.6 → 46.15.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 +14 -0
- package/dist/cjs/__tests__/vr-tests/bitbucket-favicon.svg +1 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/get-icon-for-file-type.js +6 -25
- package/dist/cjs/view/EmbedCard/views/ResolvedView.js +1 -20
- package/dist/cjs/view/FlexibleCard/components/actions/follow-action/index.js +5 -41
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +3 -35
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/__tests__/vr-tests/bitbucket-favicon.svg +1 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/get-icon-for-file-type.js +6 -19
- package/dist/es2019/view/EmbedCard/views/ResolvedView.js +1 -11
- package/dist/es2019/view/FlexibleCard/components/actions/follow-action/index.js +1 -26
- package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +3 -29
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/__tests__/vr-tests/bitbucket-favicon.svg +1 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/get-icon-for-file-type.js +6 -25
- package/dist/esm/view/EmbedCard/views/ResolvedView.js +1 -17
- package/dist/esm/view/FlexibleCard/components/actions/follow-action/index.js +5 -36
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +3 -35
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/package.json +2 -4
- package/dist/cjs/view/FlexibleCard/components/importIcon.js +0 -20
- package/dist/es2019/view/FlexibleCard/components/importIcon.js +0 -7
- package/dist/esm/view/FlexibleCard/components/importIcon.js +0 -13
- package/dist/types/view/FlexibleCard/components/importIcon.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 46.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`e7c39cfa5da6c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e7c39cfa5da6c) -
|
|
8
|
+
Cleanup `feature_gate` `platform_sl_replace_react_loadable`. Smart card icons, follow action icons
|
|
9
|
+
and the embed Rovo actions footer now always load via `React.lazy` instead of `react-loadable`.
|
|
10
|
+
Remove the unused `react-loadable` and `@types/react-loadable` dependencies from
|
|
11
|
+
`@atlaskit/smart-card`.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 46.14.6
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="192" height="192" viewBox="0 0 32 32"><image href="data:image/png;base64,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" width="32" height="32" /></svg>
|
|
@@ -25,7 +25,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
25
25
|
var context = exports.context = {
|
|
26
26
|
componentName: 'smart-cards',
|
|
27
27
|
packageName: "@atlaskit/smart-card" || '',
|
|
28
|
-
packageVersion: "46.14.
|
|
28
|
+
packageVersion: "46.14.6" || ''
|
|
29
29
|
};
|
|
30
30
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
31
31
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.getIconForFileType = void 0;
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _reactLoadable = _interopRequireDefault(require("react-loadable"));
|
|
11
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
12
10
|
var _extractFileFormatIcon = _interopRequireDefault(require("../extractors/flexible/icon/extract-file-formatIcon"));
|
|
13
11
|
var _getLazyIcons = require("./get-lazy-icons");
|
|
14
12
|
var _lazyComponent = require("./lazy-component");
|
|
@@ -22,6 +20,7 @@ var getTypeToIconMap = function getTypeToIconMap(fileFormat) {
|
|
|
22
20
|
return [(_lazyIcons$iconDescri = lazyIcons[iconDescriptor.icon]) === null || _lazyIcons$iconDescri === void 0 ? void 0 : _lazyIcons$iconDescri.default, (_iconDescriptor$label = iconDescriptor.label) !== null && _iconDescriptor$label !== void 0 ? _iconDescriptor$label : ''];
|
|
23
21
|
};
|
|
24
22
|
var getIconForFileType = exports.getIconForFileType = function getIconForFileType(fileMimeType, showIconLabel) {
|
|
23
|
+
var _extractFileFormatIco;
|
|
25
24
|
if (!fileMimeType) {
|
|
26
25
|
return;
|
|
27
26
|
}
|
|
@@ -34,31 +33,13 @@ var getIconForFileType = exports.getIconForFileType = function getIconForFileTyp
|
|
|
34
33
|
if (!importCb) {
|
|
35
34
|
return;
|
|
36
35
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (iconType) {
|
|
41
|
-
var LazyIcon = (0, _lazyComponent.getLazyIconComponent)("".concat(iconType, ":default"), importCb);
|
|
42
|
-
var lazyLabel = (showIconLabel !== null && showIconLabel !== void 0 ? showIconLabel : true) ? icon[1] || '' : '';
|
|
43
|
-
return /*#__PURE__*/_react.default.createElement(LazyIcon, {
|
|
44
|
-
testId: "document-file-format-icon",
|
|
45
|
-
label: lazyLabel
|
|
46
|
-
});
|
|
47
|
-
}
|
|
36
|
+
var iconType = (_extractFileFormatIco = (0, _extractFileFormatIcon.default)(fileMimeType.toLowerCase())) === null || _extractFileFormatIco === void 0 ? void 0 : _extractFileFormatIco.icon;
|
|
37
|
+
if (!iconType) {
|
|
38
|
+
return;
|
|
48
39
|
}
|
|
49
|
-
var
|
|
50
|
-
loader: function loader() {
|
|
51
|
-
return importCb().then(function (module) {
|
|
52
|
-
return module.default;
|
|
53
|
-
});
|
|
54
|
-
},
|
|
55
|
-
loading: function loading() {
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
}); // because we're using dynamic loading here, TS will not be able to infer the type
|
|
59
|
-
|
|
40
|
+
var LazyIcon = (0, _lazyComponent.getLazyIconComponent)("".concat(iconType, ":default"), importCb);
|
|
60
41
|
var label = (showIconLabel !== null && showIconLabel !== void 0 ? showIconLabel : true) ? icon[1] || '' : '';
|
|
61
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement(LazyIcon, {
|
|
62
43
|
testId: "document-file-format-icon",
|
|
63
44
|
label: label
|
|
64
45
|
});
|
|
@@ -11,7 +11,6 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
11
11
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
-
var _reactLoadable = _interopRequireDefault(require("react-loadable"));
|
|
15
14
|
var _link = _interopRequireDefault(require("@atlaskit/icon/core/link"));
|
|
16
15
|
var _useSmartLinkContext2 = require("@atlaskit/link-provider/use-smart-link-context");
|
|
17
16
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
@@ -30,20 +29,6 @@ var _Frame = require("../components/Frame");
|
|
|
30
29
|
var _ImageIcon = require("../components/ImageIcon");
|
|
31
30
|
var _useEmbedResolvePostMessageListener = require("../useEmbedResolvePostMessageListener");
|
|
32
31
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
33
|
-
var EmbedRovoActionsFooter = (0, _reactLoadable.default)({
|
|
34
|
-
loader: function loader() {
|
|
35
|
-
return Promise.resolve().then(function () {
|
|
36
|
-
return _interopRequireWildcard(require( /* webpackChunkName: "smart-card-embed-rovo-actions-footer" */'../components/rovo-actions-footer'));
|
|
37
|
-
}).then(function (module) {
|
|
38
|
-
return module.default;
|
|
39
|
-
});
|
|
40
|
-
},
|
|
41
|
-
loading: function loading() {
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
EmbedRovoActionsFooter.displayName = 'lazy(EmbedRovoActionsFooter)';
|
|
46
|
-
|
|
47
32
|
// Inline module-scope lazy() so product SSR tooling can preload it before hydration.
|
|
48
33
|
var LazyEmbedRovoActionsFooter = (0, _lazyComponent.withSuspense)( /*#__PURE__*/(0, _react.lazy)(function () {
|
|
49
34
|
return Promise.resolve().then(function () {
|
|
@@ -90,11 +75,7 @@ var EmbedFrameWithRovoFooter = function EmbedFrameWithRovoFooter(_ref) {
|
|
|
90
75
|
});
|
|
91
76
|
}, [details, isEmbedRovoActionsFooterEnabled, product, rovoActionData]);
|
|
92
77
|
var footer = _react.default.useMemo(function () {
|
|
93
|
-
return rovoActionData && prompts.length > 0 ?
|
|
94
|
-
actionData: rovoActionData,
|
|
95
|
-
prompts: prompts,
|
|
96
|
-
testId: "".concat(testId, "-rovo-actions-footer")
|
|
97
|
-
}) : /*#__PURE__*/_react.default.createElement(EmbedRovoActionsFooter, {
|
|
78
|
+
return rovoActionData && prompts.length > 0 ? /*#__PURE__*/_react.default.createElement(LazyEmbedRovoActionsFooter, {
|
|
98
79
|
actionData: rovoActionData,
|
|
99
80
|
prompts: prompts,
|
|
100
81
|
testId: "".concat(testId, "-rovo-actions-footer")
|
|
@@ -11,46 +11,21 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _reactIntl = require("react-intl");
|
|
13
13
|
var _featureGates = _interopRequireDefault(require("@atlaskit/feature-gate-js-client/feature-gates"));
|
|
14
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
15
14
|
var _constants = require("../../../../../constants");
|
|
16
15
|
var _messages = require("../../../../../messages");
|
|
17
16
|
var _useFlexibleUiContext = require("../../../../../state/flexible-ui-context/useFlexibleUiContext");
|
|
18
17
|
var _lazyComponent = require("../../../../../utils/lazy-component");
|
|
19
|
-
var _importIcon = require("../../importIcon");
|
|
20
18
|
var _serverAction = _interopRequireDefault(require("../action/server-action"));
|
|
21
19
|
var _utils = require("./utils");
|
|
22
20
|
var _excluded = ["value", "isProject"];
|
|
23
21
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
24
|
-
var importIconMapper = {
|
|
25
|
-
goal: function goal() {
|
|
26
|
-
return Promise.resolve().then(function () {
|
|
27
|
-
return _interopRequireWildcard(require( /* webpackChunkName: "glyphGoal" */'./goal-icon'));
|
|
28
|
-
}).then(function (_ref) {
|
|
29
|
-
var GoalIcon = _ref.GoalIcon;
|
|
30
|
-
return {
|
|
31
|
-
default: GoalIcon
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
},
|
|
35
|
-
projects: function projects() {
|
|
36
|
-
return Promise.resolve().then(function () {
|
|
37
|
-
return _interopRequireWildcard(require( /* webpackChunkName: "glyphProjects" */'./projects-icon'));
|
|
38
|
-
}).then(function (_ref2) {
|
|
39
|
-
var ProjectsIcon = _ref2.ProjectsIcon;
|
|
40
|
-
return {
|
|
41
|
-
default: ProjectsIcon
|
|
42
|
-
};
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
|
|
47
22
|
// Inline module-scope lazy() calls so product SSR tooling can preload them before hydration.
|
|
48
23
|
var lazyIconMapper = {
|
|
49
24
|
goal: (0, _lazyComponent.withSuspense)( /*#__PURE__*/(0, _react.lazy)(function () {
|
|
50
25
|
return Promise.resolve().then(function () {
|
|
51
26
|
return _interopRequireWildcard(require( /* webpackChunkName: "glyphGoal" */'./goal-icon'));
|
|
52
|
-
}).then(function (
|
|
53
|
-
var GoalIcon =
|
|
27
|
+
}).then(function (_ref) {
|
|
28
|
+
var GoalIcon = _ref.GoalIcon;
|
|
54
29
|
return {
|
|
55
30
|
default: GoalIcon
|
|
56
31
|
};
|
|
@@ -59,25 +34,14 @@ var lazyIconMapper = {
|
|
|
59
34
|
projects: (0, _lazyComponent.withSuspense)( /*#__PURE__*/(0, _react.lazy)(function () {
|
|
60
35
|
return Promise.resolve().then(function () {
|
|
61
36
|
return _interopRequireWildcard(require( /* webpackChunkName: "glyphProjects" */'./projects-icon'));
|
|
62
|
-
}).then(function (
|
|
63
|
-
var ProjectsIcon =
|
|
37
|
+
}).then(function (_ref2) {
|
|
38
|
+
var ProjectsIcon = _ref2.ProjectsIcon;
|
|
64
39
|
return {
|
|
65
40
|
default: ProjectsIcon
|
|
66
41
|
};
|
|
67
42
|
}).catch(_lazyComponent.renderNothingOnLoadError);
|
|
68
43
|
}), 'lazy(ProjectsIcon)')
|
|
69
44
|
};
|
|
70
|
-
var getIcon = function getIcon(stackIconType) {
|
|
71
|
-
if ((0, _fg.fg)('platform_sl_replace_react_loadable')) {
|
|
72
|
-
var _lazyIconMapper$stack;
|
|
73
|
-
return (_lazyIconMapper$stack = lazyIconMapper[stackIconType]) !== null && _lazyIconMapper$stack !== void 0 ? _lazyIconMapper$stack : null;
|
|
74
|
-
}
|
|
75
|
-
var importFn = importIconMapper[stackIconType];
|
|
76
|
-
if (!importFn) {
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
|
-
return (0, _importIcon.importIcon)(importFn);
|
|
80
|
-
};
|
|
81
45
|
var FollowAction = function FollowAction(props) {
|
|
82
46
|
var _context$actions;
|
|
83
47
|
var context = (0, _useFlexibleUiContext.useFlexibleUiContext)();
|
|
@@ -100,7 +64,7 @@ var FollowAction = function FollowAction(props) {
|
|
|
100
64
|
var stackTooltipMessage = isProject ? projectTooltipMessage : goalTooltipMessage;
|
|
101
65
|
var tooltipMessage = isStackItem ? stackTooltipMessage : message;
|
|
102
66
|
var stackIconType = isProject ? 'projects' : 'goal';
|
|
103
|
-
var ImportedIcon =
|
|
67
|
+
var ImportedIcon = lazyIconMapper[stackIconType];
|
|
104
68
|
var followIcon = /*#__PURE__*/_react.default.createElement(ImportedIcon, {
|
|
105
69
|
label: "",
|
|
106
70
|
testId: "smart-action-follow-action-".concat(stackIconType, "-icon")
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _reactLoadable = _interopRequireDefault(require("react-loadable"));
|
|
11
10
|
var _iconTile = _interopRequireDefault(require("@atlaskit/icon/icon-tile"));
|
|
12
11
|
var _confluenceIcon = require("@atlaskit/logo/confluence-icon");
|
|
13
12
|
var _jiraIcon = require("@atlaskit/logo/jira-icon");
|
|
@@ -17,16 +16,6 @@ var _constants = require("../../../../../constants");
|
|
|
17
16
|
var _getLazyIcons = require("../../../../../utils/get-lazy-icons");
|
|
18
17
|
var _isIconSizeLarge = require("../../../../../utils/is-icon-size-large");
|
|
19
18
|
var _lazyComponent = require("../../../../../utils/lazy-component");
|
|
20
|
-
var getIconImportFn = function getIconImportFn(icon, size) {
|
|
21
|
-
var item = (0, _getLazyIcons.getLazyIcons)()[icon];
|
|
22
|
-
if ((0, _isIconSizeLarge.isIconSizeLarge)(size) && item !== null && item !== void 0 && item.large) {
|
|
23
|
-
return item.large;
|
|
24
|
-
}
|
|
25
|
-
return item === null || item === void 0 ? void 0 : item.default;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
// Only used when platform_sl_replace_react_loadable is on. Kept separate from getIconImportFn so
|
|
29
|
-
// the gate-off path is unchanged.
|
|
30
19
|
var getLazyIcon = function getLazyIcon(icon, size) {
|
|
31
20
|
var item = (0, _getLazyIcons.getLazyIcons)()[icon];
|
|
32
21
|
if ((0, _isIconSizeLarge.isIconSizeLarge)(size) && item !== null && item !== void 0 && item.large) {
|
|
@@ -34,18 +23,6 @@ var getLazyIcon = function getLazyIcon(icon, size) {
|
|
|
34
23
|
}
|
|
35
24
|
return item !== null && item !== void 0 && item.default ? (0, _lazyComponent.getLazyIconComponent)("".concat(icon, ":default"), item.default) : undefined;
|
|
36
25
|
};
|
|
37
|
-
var importIcon = function importIcon(importFn) {
|
|
38
|
-
return (0, _reactLoadable.default)({
|
|
39
|
-
loader: function loader() {
|
|
40
|
-
return importFn().then(function (module) {
|
|
41
|
-
return module.default;
|
|
42
|
-
});
|
|
43
|
-
},
|
|
44
|
-
loading: function loading() {
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
}); // Because we're using dynamic loading here, TS will not be able to infer the type.
|
|
48
|
-
};
|
|
49
26
|
var getBlogIcon = function getBlogIcon() {
|
|
50
27
|
return require('../../../../../common/ui/icons/blog-icon').default;
|
|
51
28
|
};
|
|
@@ -101,18 +78,9 @@ var AtlaskitIcon = function AtlaskitIcon(_ref) {
|
|
|
101
78
|
});
|
|
102
79
|
}
|
|
103
80
|
}
|
|
104
|
-
var ImportedIcon;
|
|
105
|
-
if (
|
|
106
|
-
|
|
107
|
-
if (!ImportedIcon) {
|
|
108
|
-
return null;
|
|
109
|
-
}
|
|
110
|
-
} else {
|
|
111
|
-
var importFn = getIconImportFn(icon, size);
|
|
112
|
-
if (!importFn) {
|
|
113
|
-
return null;
|
|
114
|
-
}
|
|
115
|
-
ImportedIcon = importIcon(importFn);
|
|
81
|
+
var ImportedIcon = getLazyIcon(icon, size);
|
|
82
|
+
if (!ImportedIcon) {
|
|
83
|
+
return null;
|
|
116
84
|
}
|
|
117
85
|
if (isCoreIcon(icon)) {
|
|
118
86
|
var color;
|
|
@@ -19,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
19
19
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
20
20
|
var PACKAGE_DATA = {
|
|
21
21
|
packageName: "@atlaskit/smart-card",
|
|
22
|
-
packageVersion: "46.14.
|
|
22
|
+
packageVersion: "46.14.6",
|
|
23
23
|
componentName: 'linkUrl'
|
|
24
24
|
};
|
|
25
25
|
var LinkUrl = function LinkUrl(_ref) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="192" height="192" viewBox="0 0 32 32"><image href="data:image/png;base64,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" width="32" height="32" /></svg>
|
|
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export const context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card" || '',
|
|
7
|
-
packageVersion: "46.14.
|
|
7
|
+
packageVersion: "46.14.6" || ''
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Loadable from 'react-loadable';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
2
|
import extractFileFormatIcon from '../extractors/flexible/icon/extract-file-formatIcon';
|
|
5
3
|
import { getLazyIcons } from './get-lazy-icons';
|
|
6
4
|
import { getLazyIconComponent } from './lazy-component';
|
|
@@ -14,6 +12,7 @@ const getTypeToIconMap = fileFormat => {
|
|
|
14
12
|
return [(_lazyIcons$iconDescri = lazyIcons[iconDescriptor.icon]) === null || _lazyIcons$iconDescri === void 0 ? void 0 : _lazyIcons$iconDescri.default, (_iconDescriptor$label = iconDescriptor.label) !== null && _iconDescriptor$label !== void 0 ? _iconDescriptor$label : ''];
|
|
15
13
|
};
|
|
16
14
|
export const getIconForFileType = (fileMimeType, showIconLabel) => {
|
|
15
|
+
var _extractFileFormatIco;
|
|
17
16
|
if (!fileMimeType) {
|
|
18
17
|
return;
|
|
19
18
|
}
|
|
@@ -25,25 +24,13 @@ export const getIconForFileType = (fileMimeType, showIconLabel) => {
|
|
|
25
24
|
if (!importCb) {
|
|
26
25
|
return;
|
|
27
26
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (iconType) {
|
|
32
|
-
const LazyIcon = getLazyIconComponent(`${iconType}:default`, importCb);
|
|
33
|
-
const lazyLabel = (showIconLabel !== null && showIconLabel !== void 0 ? showIconLabel : true) ? icon[1] || '' : '';
|
|
34
|
-
return /*#__PURE__*/React.createElement(LazyIcon, {
|
|
35
|
-
testId: "document-file-format-icon",
|
|
36
|
-
label: lazyLabel
|
|
37
|
-
});
|
|
38
|
-
}
|
|
27
|
+
const iconType = (_extractFileFormatIco = extractFileFormatIcon(fileMimeType.toLowerCase())) === null || _extractFileFormatIco === void 0 ? void 0 : _extractFileFormatIco.icon;
|
|
28
|
+
if (!iconType) {
|
|
29
|
+
return;
|
|
39
30
|
}
|
|
40
|
-
const
|
|
41
|
-
loader: () => importCb().then(module => module.default),
|
|
42
|
-
loading: () => null
|
|
43
|
-
}); // because we're using dynamic loading here, TS will not be able to infer the type
|
|
44
|
-
|
|
31
|
+
const LazyIcon = getLazyIconComponent(`${iconType}:default`, importCb);
|
|
45
32
|
const label = (showIconLabel !== null && showIconLabel !== void 0 ? showIconLabel : true) ? icon[1] || '' : '';
|
|
46
|
-
return /*#__PURE__*/React.createElement(
|
|
33
|
+
return /*#__PURE__*/React.createElement(LazyIcon, {
|
|
47
34
|
testId: "document-file-format-icon",
|
|
48
35
|
label: label
|
|
49
36
|
});
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import "./ResolvedView.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { lazy } from 'react';
|
|
5
|
-
import Loadable from 'react-loadable';
|
|
6
5
|
import LinkGlyph from '@atlaskit/icon/core/link';
|
|
7
6
|
import { useSmartLinkContext } from '@atlaskit/link-provider/use-smart-link-context';
|
|
8
7
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -20,11 +19,6 @@ import { ExpandedFrame } from '../components/ExpandedFrame';
|
|
|
20
19
|
import { Frame } from '../components/Frame';
|
|
21
20
|
import { ImageIcon } from '../components/ImageIcon';
|
|
22
21
|
import { useEmbedResolvePostMessageListener } from '../useEmbedResolvePostMessageListener';
|
|
23
|
-
const EmbedRovoActionsFooter = Loadable({
|
|
24
|
-
loader: () => import( /* webpackChunkName: "smart-card-embed-rovo-actions-footer" */'../components/rovo-actions-footer').then(module => module.default),
|
|
25
|
-
loading: () => null
|
|
26
|
-
});
|
|
27
|
-
EmbedRovoActionsFooter.displayName = 'lazy(EmbedRovoActionsFooter)';
|
|
28
22
|
|
|
29
23
|
// Inline module-scope lazy() so product SSR tooling can preload it before hydration.
|
|
30
24
|
const LazyEmbedRovoActionsFooter = withSuspense( /*#__PURE__*/lazy(() => import( /* webpackChunkName: "smart-card-embed-rovo-actions-footer" */'../components/rovo-actions-footer').catch(renderNothingOnLoadError)), 'lazy(EmbedRovoActionsFooter)');
|
|
@@ -68,11 +62,7 @@ const EmbedFrameWithRovoFooter = ({
|
|
|
68
62
|
response: details
|
|
69
63
|
});
|
|
70
64
|
}, [details, isEmbedRovoActionsFooterEnabled, product, rovoActionData]);
|
|
71
|
-
const footer = React.useMemo(() => rovoActionData && prompts.length > 0 ?
|
|
72
|
-
actionData: rovoActionData,
|
|
73
|
-
prompts: prompts,
|
|
74
|
-
testId: `${testId}-rovo-actions-footer`
|
|
75
|
-
}) : /*#__PURE__*/React.createElement(EmbedRovoActionsFooter, {
|
|
65
|
+
const footer = React.useMemo(() => rovoActionData && prompts.length > 0 ? /*#__PURE__*/React.createElement(LazyEmbedRovoActionsFooter, {
|
|
76
66
|
actionData: rovoActionData,
|
|
77
67
|
prompts: prompts,
|
|
78
68
|
testId: `${testId}-rovo-actions-footer`
|
|
@@ -2,26 +2,12 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { lazy } from 'react';
|
|
3
3
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
4
4
|
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
5
|
import { ActionName } from '../../../../../constants';
|
|
7
6
|
import { messages } from '../../../../../messages';
|
|
8
7
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context/useFlexibleUiContext';
|
|
9
8
|
import { renderNothingOnLoadError, withSuspense } from '../../../../../utils/lazy-component';
|
|
10
|
-
import { importIcon } from '../../importIcon';
|
|
11
9
|
import ServerAction from '../action/server-action';
|
|
12
10
|
import { getFollowActionErrorMessage } from './utils';
|
|
13
|
-
const importIconMapper = {
|
|
14
|
-
goal: () => import( /* webpackChunkName: "glyphGoal" */'./goal-icon').then(({
|
|
15
|
-
GoalIcon
|
|
16
|
-
}) => ({
|
|
17
|
-
default: GoalIcon
|
|
18
|
-
})),
|
|
19
|
-
projects: () => import( /* webpackChunkName: "glyphProjects" */'./projects-icon').then(({
|
|
20
|
-
ProjectsIcon
|
|
21
|
-
}) => ({
|
|
22
|
-
default: ProjectsIcon
|
|
23
|
-
}))
|
|
24
|
-
};
|
|
25
11
|
|
|
26
12
|
// Inline module-scope lazy() calls so product SSR tooling can preload them before hydration.
|
|
27
13
|
const lazyIconMapper = {
|
|
@@ -36,17 +22,6 @@ const lazyIconMapper = {
|
|
|
36
22
|
default: ProjectsIcon
|
|
37
23
|
})).catch(renderNothingOnLoadError)), 'lazy(ProjectsIcon)')
|
|
38
24
|
};
|
|
39
|
-
const getIcon = stackIconType => {
|
|
40
|
-
if (fg('platform_sl_replace_react_loadable')) {
|
|
41
|
-
var _lazyIconMapper$stack;
|
|
42
|
-
return (_lazyIconMapper$stack = lazyIconMapper[stackIconType]) !== null && _lazyIconMapper$stack !== void 0 ? _lazyIconMapper$stack : null;
|
|
43
|
-
}
|
|
44
|
-
const importFn = importIconMapper[stackIconType];
|
|
45
|
-
if (!importFn) {
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
return importIcon(importFn);
|
|
49
|
-
};
|
|
50
25
|
const FollowAction = props => {
|
|
51
26
|
var _context$actions;
|
|
52
27
|
const context = useFlexibleUiContext();
|
|
@@ -71,7 +46,7 @@ const FollowAction = props => {
|
|
|
71
46
|
const stackTooltipMessage = isProject ? projectTooltipMessage : goalTooltipMessage;
|
|
72
47
|
const tooltipMessage = isStackItem ? stackTooltipMessage : message;
|
|
73
48
|
const stackIconType = isProject ? 'projects' : 'goal';
|
|
74
|
-
const ImportedIcon =
|
|
49
|
+
const ImportedIcon = lazyIconMapper[stackIconType];
|
|
75
50
|
const followIcon = /*#__PURE__*/React.createElement(ImportedIcon, {
|
|
76
51
|
label: "",
|
|
77
52
|
testId: `smart-action-follow-action-${stackIconType}-icon`
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import Loadable from 'react-loadable';
|
|
4
3
|
import IconTile from '@atlaskit/icon/icon-tile';
|
|
5
4
|
import { ConfluenceIcon } from '@atlaskit/logo/confluence-icon';
|
|
6
5
|
import { JiraIcon } from '@atlaskit/logo/jira-icon';
|
|
@@ -10,16 +9,6 @@ import { IconType, SmartLinkSize } from '../../../../../constants';
|
|
|
10
9
|
import { getLazyIcons } from '../../../../../utils/get-lazy-icons';
|
|
11
10
|
import { isIconSizeLarge } from '../../../../../utils/is-icon-size-large';
|
|
12
11
|
import { getLazyIconComponent } from '../../../../../utils/lazy-component';
|
|
13
|
-
const getIconImportFn = (icon, size) => {
|
|
14
|
-
const item = getLazyIcons()[icon];
|
|
15
|
-
if (isIconSizeLarge(size) && item !== null && item !== void 0 && item.large) {
|
|
16
|
-
return item.large;
|
|
17
|
-
}
|
|
18
|
-
return item === null || item === void 0 ? void 0 : item.default;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
// Only used when platform_sl_replace_react_loadable is on. Kept separate from getIconImportFn so
|
|
22
|
-
// the gate-off path is unchanged.
|
|
23
12
|
const getLazyIcon = (icon, size) => {
|
|
24
13
|
const item = getLazyIcons()[icon];
|
|
25
14
|
if (isIconSizeLarge(size) && item !== null && item !== void 0 && item.large) {
|
|
@@ -27,12 +16,6 @@ const getLazyIcon = (icon, size) => {
|
|
|
27
16
|
}
|
|
28
17
|
return item !== null && item !== void 0 && item.default ? getLazyIconComponent(`${icon}:default`, item.default) : undefined;
|
|
29
18
|
};
|
|
30
|
-
const importIcon = importFn => {
|
|
31
|
-
return Loadable({
|
|
32
|
-
loader: () => importFn().then(module => module.default),
|
|
33
|
-
loading: () => null
|
|
34
|
-
}); // Because we're using dynamic loading here, TS will not be able to infer the type.
|
|
35
|
-
};
|
|
36
19
|
const getBlogIcon = () => require('../../../../../common/ui/icons/blog-icon').default;
|
|
37
20
|
const getDocumentIcon = () => require('../../../../../common/ui/icons/page-icon').default;
|
|
38
21
|
const getLiveDocumentIcon = () => require('../../../../../common/ui/icons/live-document-icon').default;
|
|
@@ -82,18 +65,9 @@ const AtlaskitIcon = ({
|
|
|
82
65
|
});
|
|
83
66
|
}
|
|
84
67
|
}
|
|
85
|
-
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
if (!ImportedIcon) {
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
} else {
|
|
92
|
-
const importFn = getIconImportFn(icon, size);
|
|
93
|
-
if (!importFn) {
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
ImportedIcon = importIcon(importFn);
|
|
68
|
+
const ImportedIcon = getLazyIcon(icon, size);
|
|
69
|
+
if (!ImportedIcon) {
|
|
70
|
+
return null;
|
|
97
71
|
}
|
|
98
72
|
if (isCoreIcon(icon)) {
|
|
99
73
|
let color;
|
|
@@ -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: "46.14.
|
|
12
|
+
packageVersion: "46.14.6",
|
|
13
13
|
componentName: 'linkUrl'
|
|
14
14
|
};
|
|
15
15
|
const LinkUrl = ({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="192" height="192" viewBox="0 0 32 32"><image href="data:image/png;base64,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" width="32" height="32" /></svg>
|
|
@@ -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: "46.14.
|
|
7
|
+
packageVersion: "46.14.6" || ''
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import Loadable from 'react-loadable';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
3
|
import extractFileFormatIcon from '../extractors/flexible/icon/extract-file-formatIcon';
|
|
6
4
|
import { getLazyIcons } from './get-lazy-icons';
|
|
7
5
|
import { getLazyIconComponent } from './lazy-component';
|
|
@@ -15,6 +13,7 @@ var getTypeToIconMap = function getTypeToIconMap(fileFormat) {
|
|
|
15
13
|
return [(_lazyIcons$iconDescri = lazyIcons[iconDescriptor.icon]) === null || _lazyIcons$iconDescri === void 0 ? void 0 : _lazyIcons$iconDescri.default, (_iconDescriptor$label = iconDescriptor.label) !== null && _iconDescriptor$label !== void 0 ? _iconDescriptor$label : ''];
|
|
16
14
|
};
|
|
17
15
|
export var getIconForFileType = function getIconForFileType(fileMimeType, showIconLabel) {
|
|
16
|
+
var _extractFileFormatIco;
|
|
18
17
|
if (!fileMimeType) {
|
|
19
18
|
return;
|
|
20
19
|
}
|
|
@@ -27,31 +26,13 @@ export var getIconForFileType = function getIconForFileType(fileMimeType, showIc
|
|
|
27
26
|
if (!importCb) {
|
|
28
27
|
return;
|
|
29
28
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (iconType) {
|
|
34
|
-
var LazyIcon = getLazyIconComponent("".concat(iconType, ":default"), importCb);
|
|
35
|
-
var lazyLabel = (showIconLabel !== null && showIconLabel !== void 0 ? showIconLabel : true) ? icon[1] || '' : '';
|
|
36
|
-
return /*#__PURE__*/React.createElement(LazyIcon, {
|
|
37
|
-
testId: "document-file-format-icon",
|
|
38
|
-
label: lazyLabel
|
|
39
|
-
});
|
|
40
|
-
}
|
|
29
|
+
var iconType = (_extractFileFormatIco = extractFileFormatIcon(fileMimeType.toLowerCase())) === null || _extractFileFormatIco === void 0 ? void 0 : _extractFileFormatIco.icon;
|
|
30
|
+
if (!iconType) {
|
|
31
|
+
return;
|
|
41
32
|
}
|
|
42
|
-
var
|
|
43
|
-
loader: function loader() {
|
|
44
|
-
return importCb().then(function (module) {
|
|
45
|
-
return module.default;
|
|
46
|
-
});
|
|
47
|
-
},
|
|
48
|
-
loading: function loading() {
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
}); // because we're using dynamic loading here, TS will not be able to infer the type
|
|
52
|
-
|
|
33
|
+
var LazyIcon = getLazyIconComponent("".concat(iconType, ":default"), importCb);
|
|
53
34
|
var label = (showIconLabel !== null && showIconLabel !== void 0 ? showIconLabel : true) ? icon[1] || '' : '';
|
|
54
|
-
return /*#__PURE__*/React.createElement(
|
|
35
|
+
return /*#__PURE__*/React.createElement(LazyIcon, {
|
|
55
36
|
testId: "document-file-format-icon",
|
|
56
37
|
label: label
|
|
57
38
|
});
|
|
@@ -3,7 +3,6 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import "./ResolvedView.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React, { lazy } from 'react';
|
|
6
|
-
import Loadable from 'react-loadable';
|
|
7
6
|
import LinkGlyph from '@atlaskit/icon/core/link';
|
|
8
7
|
import { useSmartLinkContext } from '@atlaskit/link-provider/use-smart-link-context';
|
|
9
8
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -21,17 +20,6 @@ import { ExpandedFrame } from '../components/ExpandedFrame';
|
|
|
21
20
|
import { Frame } from '../components/Frame';
|
|
22
21
|
import { ImageIcon } from '../components/ImageIcon';
|
|
23
22
|
import { useEmbedResolvePostMessageListener } from '../useEmbedResolvePostMessageListener';
|
|
24
|
-
var EmbedRovoActionsFooter = Loadable({
|
|
25
|
-
loader: function loader() {
|
|
26
|
-
return import( /* webpackChunkName: "smart-card-embed-rovo-actions-footer" */'../components/rovo-actions-footer').then(function (module) {
|
|
27
|
-
return module.default;
|
|
28
|
-
});
|
|
29
|
-
},
|
|
30
|
-
loading: function loading() {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
EmbedRovoActionsFooter.displayName = 'lazy(EmbedRovoActionsFooter)';
|
|
35
23
|
|
|
36
24
|
// Inline module-scope lazy() so product SSR tooling can preload it before hydration.
|
|
37
25
|
var LazyEmbedRovoActionsFooter = withSuspense( /*#__PURE__*/lazy(function () {
|
|
@@ -77,11 +65,7 @@ var EmbedFrameWithRovoFooter = function EmbedFrameWithRovoFooter(_ref) {
|
|
|
77
65
|
});
|
|
78
66
|
}, [details, isEmbedRovoActionsFooterEnabled, product, rovoActionData]);
|
|
79
67
|
var footer = React.useMemo(function () {
|
|
80
|
-
return rovoActionData && prompts.length > 0 ?
|
|
81
|
-
actionData: rovoActionData,
|
|
82
|
-
prompts: prompts,
|
|
83
|
-
testId: "".concat(testId, "-rovo-actions-footer")
|
|
84
|
-
}) : /*#__PURE__*/React.createElement(EmbedRovoActionsFooter, {
|
|
68
|
+
return rovoActionData && prompts.length > 0 ? /*#__PURE__*/React.createElement(LazyEmbedRovoActionsFooter, {
|
|
85
69
|
actionData: rovoActionData,
|
|
86
70
|
prompts: prompts,
|
|
87
71
|
testId: "".concat(testId, "-rovo-actions-footer")
|
|
@@ -4,63 +4,32 @@ var _excluded = ["value", "isProject"];
|
|
|
4
4
|
import React, { lazy } from 'react';
|
|
5
5
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
6
6
|
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
7
|
import { ActionName } from '../../../../../constants';
|
|
9
8
|
import { messages } from '../../../../../messages';
|
|
10
9
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context/useFlexibleUiContext';
|
|
11
10
|
import { renderNothingOnLoadError, withSuspense } from '../../../../../utils/lazy-component';
|
|
12
|
-
import { importIcon } from '../../importIcon';
|
|
13
11
|
import ServerAction from '../action/server-action';
|
|
14
12
|
import { getFollowActionErrorMessage } from './utils';
|
|
15
|
-
var importIconMapper = {
|
|
16
|
-
goal: function goal() {
|
|
17
|
-
return import( /* webpackChunkName: "glyphGoal" */'./goal-icon').then(function (_ref) {
|
|
18
|
-
var GoalIcon = _ref.GoalIcon;
|
|
19
|
-
return {
|
|
20
|
-
default: GoalIcon
|
|
21
|
-
};
|
|
22
|
-
});
|
|
23
|
-
},
|
|
24
|
-
projects: function projects() {
|
|
25
|
-
return import( /* webpackChunkName: "glyphProjects" */'./projects-icon').then(function (_ref2) {
|
|
26
|
-
var ProjectsIcon = _ref2.ProjectsIcon;
|
|
27
|
-
return {
|
|
28
|
-
default: ProjectsIcon
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
13
|
|
|
34
14
|
// Inline module-scope lazy() calls so product SSR tooling can preload them before hydration.
|
|
35
15
|
var lazyIconMapper = {
|
|
36
16
|
goal: withSuspense( /*#__PURE__*/lazy(function () {
|
|
37
|
-
return import( /* webpackChunkName: "glyphGoal" */'./goal-icon').then(function (
|
|
38
|
-
var GoalIcon =
|
|
17
|
+
return import( /* webpackChunkName: "glyphGoal" */'./goal-icon').then(function (_ref) {
|
|
18
|
+
var GoalIcon = _ref.GoalIcon;
|
|
39
19
|
return {
|
|
40
20
|
default: GoalIcon
|
|
41
21
|
};
|
|
42
22
|
}).catch(renderNothingOnLoadError);
|
|
43
23
|
}), 'lazy(GoalIcon)'),
|
|
44
24
|
projects: withSuspense( /*#__PURE__*/lazy(function () {
|
|
45
|
-
return import( /* webpackChunkName: "glyphProjects" */'./projects-icon').then(function (
|
|
46
|
-
var ProjectsIcon =
|
|
25
|
+
return import( /* webpackChunkName: "glyphProjects" */'./projects-icon').then(function (_ref2) {
|
|
26
|
+
var ProjectsIcon = _ref2.ProjectsIcon;
|
|
47
27
|
return {
|
|
48
28
|
default: ProjectsIcon
|
|
49
29
|
};
|
|
50
30
|
}).catch(renderNothingOnLoadError);
|
|
51
31
|
}), 'lazy(ProjectsIcon)')
|
|
52
32
|
};
|
|
53
|
-
var getIcon = function getIcon(stackIconType) {
|
|
54
|
-
if (fg('platform_sl_replace_react_loadable')) {
|
|
55
|
-
var _lazyIconMapper$stack;
|
|
56
|
-
return (_lazyIconMapper$stack = lazyIconMapper[stackIconType]) !== null && _lazyIconMapper$stack !== void 0 ? _lazyIconMapper$stack : null;
|
|
57
|
-
}
|
|
58
|
-
var importFn = importIconMapper[stackIconType];
|
|
59
|
-
if (!importFn) {
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
return importIcon(importFn);
|
|
63
|
-
};
|
|
64
33
|
var FollowAction = function FollowAction(props) {
|
|
65
34
|
var _context$actions;
|
|
66
35
|
var context = useFlexibleUiContext();
|
|
@@ -83,7 +52,7 @@ var FollowAction = function FollowAction(props) {
|
|
|
83
52
|
var stackTooltipMessage = isProject ? projectTooltipMessage : goalTooltipMessage;
|
|
84
53
|
var tooltipMessage = isStackItem ? stackTooltipMessage : message;
|
|
85
54
|
var stackIconType = isProject ? 'projects' : 'goal';
|
|
86
|
-
var ImportedIcon =
|
|
55
|
+
var ImportedIcon = lazyIconMapper[stackIconType];
|
|
87
56
|
var followIcon = /*#__PURE__*/React.createElement(ImportedIcon, {
|
|
88
57
|
label: "",
|
|
89
58
|
testId: "smart-action-follow-action-".concat(stackIconType, "-icon")
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import Loadable from 'react-loadable';
|
|
4
3
|
import IconTile from '@atlaskit/icon/icon-tile';
|
|
5
4
|
import { ConfluenceIcon } from '@atlaskit/logo/confluence-icon';
|
|
6
5
|
import { JiraIcon } from '@atlaskit/logo/jira-icon';
|
|
@@ -10,16 +9,6 @@ import { IconType, SmartLinkSize } from '../../../../../constants';
|
|
|
10
9
|
import { getLazyIcons } from '../../../../../utils/get-lazy-icons';
|
|
11
10
|
import { isIconSizeLarge } from '../../../../../utils/is-icon-size-large';
|
|
12
11
|
import { getLazyIconComponent } from '../../../../../utils/lazy-component';
|
|
13
|
-
var getIconImportFn = function getIconImportFn(icon, size) {
|
|
14
|
-
var item = getLazyIcons()[icon];
|
|
15
|
-
if (isIconSizeLarge(size) && item !== null && item !== void 0 && item.large) {
|
|
16
|
-
return item.large;
|
|
17
|
-
}
|
|
18
|
-
return item === null || item === void 0 ? void 0 : item.default;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
// Only used when platform_sl_replace_react_loadable is on. Kept separate from getIconImportFn so
|
|
22
|
-
// the gate-off path is unchanged.
|
|
23
12
|
var getLazyIcon = function getLazyIcon(icon, size) {
|
|
24
13
|
var item = getLazyIcons()[icon];
|
|
25
14
|
if (isIconSizeLarge(size) && item !== null && item !== void 0 && item.large) {
|
|
@@ -27,18 +16,6 @@ var getLazyIcon = function getLazyIcon(icon, size) {
|
|
|
27
16
|
}
|
|
28
17
|
return item !== null && item !== void 0 && item.default ? getLazyIconComponent("".concat(icon, ":default"), item.default) : undefined;
|
|
29
18
|
};
|
|
30
|
-
var importIcon = function importIcon(importFn) {
|
|
31
|
-
return Loadable({
|
|
32
|
-
loader: function loader() {
|
|
33
|
-
return importFn().then(function (module) {
|
|
34
|
-
return module.default;
|
|
35
|
-
});
|
|
36
|
-
},
|
|
37
|
-
loading: function loading() {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
}); // Because we're using dynamic loading here, TS will not be able to infer the type.
|
|
41
|
-
};
|
|
42
19
|
var getBlogIcon = function getBlogIcon() {
|
|
43
20
|
return require('../../../../../common/ui/icons/blog-icon').default;
|
|
44
21
|
};
|
|
@@ -94,18 +71,9 @@ var AtlaskitIcon = function AtlaskitIcon(_ref) {
|
|
|
94
71
|
});
|
|
95
72
|
}
|
|
96
73
|
}
|
|
97
|
-
var ImportedIcon;
|
|
98
|
-
if (
|
|
99
|
-
|
|
100
|
-
if (!ImportedIcon) {
|
|
101
|
-
return null;
|
|
102
|
-
}
|
|
103
|
-
} else {
|
|
104
|
-
var importFn = getIconImportFn(icon, size);
|
|
105
|
-
if (!importFn) {
|
|
106
|
-
return null;
|
|
107
|
-
}
|
|
108
|
-
ImportedIcon = importIcon(importFn);
|
|
74
|
+
var ImportedIcon = getLazyIcon(icon, size);
|
|
75
|
+
if (!ImportedIcon) {
|
|
76
|
+
return null;
|
|
109
77
|
}
|
|
110
78
|
if (isCoreIcon(icon)) {
|
|
111
79
|
var color;
|
|
@@ -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: "46.14.
|
|
15
|
+
packageVersion: "46.14.6",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
var LinkUrl = function LinkUrl(_ref) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "46.
|
|
3
|
+
"version": "46.15.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -108,7 +108,6 @@
|
|
|
108
108
|
"markdown-to-jsx": "^7.1.7",
|
|
109
109
|
"react-error-boundary": "^3.1.3",
|
|
110
110
|
"react-lazily-render": "^1.2.0",
|
|
111
|
-
"react-loadable": "^5.1.0",
|
|
112
111
|
"react-magnetic-di": "^3.1.4",
|
|
113
112
|
"react-render-image": "^1.1.3",
|
|
114
113
|
"use-sync-external-store": "^1.5.0",
|
|
@@ -132,7 +131,7 @@
|
|
|
132
131
|
"@atlaskit/link-provider": "^6.1.0",
|
|
133
132
|
"@atlaskit/media-test-helpers": "^43.0.0",
|
|
134
133
|
"@atlaskit/page": "^15.3.0",
|
|
135
|
-
"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration": "^3.
|
|
134
|
+
"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration": "^3.5.0",
|
|
136
135
|
"@atlaskit/radio": "^10.2.0",
|
|
137
136
|
"@atlaskit/range": "^12.2.0",
|
|
138
137
|
"@atlaskit/ssr": "workspace:^",
|
|
@@ -151,7 +150,6 @@
|
|
|
151
150
|
"@types/facepaint": "^1.2.1",
|
|
152
151
|
"@types/lorem-ipsum": "^1.0.2",
|
|
153
152
|
"@types/react": "^18.2.0",
|
|
154
|
-
"@types/react-loadable": "^5.4.1",
|
|
155
153
|
"@types/use-sync-external-store": "^1",
|
|
156
154
|
"abortcontroller-polyfill": "^1.1.9",
|
|
157
155
|
"brace": "^0.11.1",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.importIcon = void 0;
|
|
8
|
-
var _reactLoadable = _interopRequireDefault(require("react-loadable"));
|
|
9
|
-
var importIcon = exports.importIcon = function importIcon(importFn) {
|
|
10
|
-
return (0, _reactLoadable.default)({
|
|
11
|
-
loader: function loader() {
|
|
12
|
-
return importFn().then(function (module) {
|
|
13
|
-
return module.default;
|
|
14
|
-
});
|
|
15
|
-
},
|
|
16
|
-
loading: function loading() {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
}); // Because we're using dynamic loading here, TS will not be able to infer the type.
|
|
20
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import Loadable from 'react-loadable';
|
|
2
|
-
export const importIcon = importFn => {
|
|
3
|
-
return Loadable({
|
|
4
|
-
loader: () => importFn().then(module => module.default),
|
|
5
|
-
loading: () => null
|
|
6
|
-
}); // Because we're using dynamic loading here, TS will not be able to infer the type.
|
|
7
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import Loadable from 'react-loadable';
|
|
2
|
-
export var importIcon = function importIcon(importFn) {
|
|
3
|
-
return Loadable({
|
|
4
|
-
loader: function loader() {
|
|
5
|
-
return importFn().then(function (module) {
|
|
6
|
-
return module.default;
|
|
7
|
-
});
|
|
8
|
-
},
|
|
9
|
-
loading: function loading() {
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
}); // Because we're using dynamic loading here, TS will not be able to infer the type.
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const importIcon: (importFn: () => Promise<any>) => any;
|