@atlaskit/smart-card 34.6.2 → 34.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/views/ResolvedView.compiled.css +1 -0
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/ActionBlockOld.js +116 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.compiled.css +7 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +21 -26
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/ActionGroupOld.js +147 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +2 -8
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.compiled.css +4 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +28 -32
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/FeatureDiscoveryOld.js +71 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.compiled.css +4 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.js +30 -18
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.js +3 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/AISummaryBlockResolvedViewOld.js +65 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.compiled.css +2 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +22 -15
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.compiled.css +4 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +7 -6
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.compiled.css +2 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +7 -4
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +3 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/RelatedLinksModal/components/related-link-item/index.compiled.css +4 -0
- package/dist/cjs/view/RelatedLinksModal/components/related-link-item/index.js +20 -12
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/ResolvedView.compiled.css +1 -0
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/ActionBlockOld.js +96 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.compiled.css +7 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +20 -24
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/ActionGroupOld.js +121 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +2 -9
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.compiled.css +4 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +24 -32
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/FeatureDiscoveryOld.js +63 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.compiled.css +5 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.js +21 -16
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.js +3 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/AISummaryBlockResolvedViewOld.js +58 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.compiled.css +2 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +18 -11
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.compiled.css +4 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +7 -6
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.compiled.css +2 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +8 -4
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +3 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/RelatedLinksModal/components/related-link-item/index.compiled.css +4 -0
- package/dist/es2019/view/RelatedLinksModal/components/related-link-item/index.js +12 -7
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/views/ResolvedView.compiled.css +1 -0
- package/dist/esm/view/BlockCard/views/ResolvedView.js +2 -2
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/ActionBlockOld.js +105 -0
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.compiled.css +7 -0
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +20 -24
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/ActionGroupOld.js +141 -0
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +2 -9
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.compiled.css +4 -0
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +24 -32
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/FeatureDiscoveryOld.js +64 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.compiled.css +4 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.js +25 -16
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.js +3 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/AISummaryBlockResolvedViewOld.js +55 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.compiled.css +2 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +18 -11
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.compiled.css +4 -1
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +7 -6
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +2 -1
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.compiled.css +2 -1
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +8 -4
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +3 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/RelatedLinksModal/components/related-link-item/index.compiled.css +4 -0
- package/dist/esm/view/RelatedLinksModal/components/related-link-item/index.js +12 -7
- package/dist/types/view/FlexibleCard/components/blocks/action-block/ActionBlockOld.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-block/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/blocks/action-group/ActionGroupOld.d.ts +11 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-group/action-group-item/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/blocks/action-group/index.d.ts +2 -9
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/FeatureDiscoveryOld.d.ts +12 -0
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.d.ts +1 -6
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.d.ts +3 -0
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/resolved/AISummaryBlockResolvedViewOld.d.ts +10 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/ActionBlockOld.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/index.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-group/ActionGroupOld.d.ts +11 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-group/action-group-item/index.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-group/index.d.ts +2 -9
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/FeatureDiscoveryOld.d.ts +12 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.d.ts +1 -6
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.d.ts +3 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/resolved/AISummaryBlockResolvedViewOld.d.ts +10 -0
- package/package.json +1 -1
|
@@ -1,21 +1,19 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
5
|
var _excluded = ["triggerRef"];
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
*/
|
|
6
|
+
import "./index.compiled.css";
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
9
9
|
import { useCallback, useMemo, useState } from 'react';
|
|
10
|
-
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
|
-
import { css, jsx } from '@emotion/react';
|
|
13
10
|
import { FormattedMessage } from 'react-intl-next';
|
|
14
11
|
import { di } from 'react-magnetic-di';
|
|
15
12
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
16
13
|
import Button from '@atlaskit/button/standard-button';
|
|
17
14
|
import DropdownMenu from '@atlaskit/dropdown-menu';
|
|
18
15
|
import MoreIcon from '@atlaskit/icon/core/migration/show-more-horizontal--more';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
17
|
import Tooltip from '@atlaskit/tooltip';
|
|
20
18
|
import { SmartLinkSize } from '../../../../../constants';
|
|
21
19
|
import { messages } from '../../../../../messages';
|
|
@@ -23,19 +21,8 @@ import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../..
|
|
|
23
21
|
import { sizeToButtonSpacing } from '../../utils';
|
|
24
22
|
import { filterActionItems } from '../utils';
|
|
25
23
|
import ActionGroupItem from './action-group-item';
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
29
|
-
lineHeight: '1rem',
|
|
30
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
31
|
-
'> div': {
|
|
32
|
-
alignItems: 'center',
|
|
33
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
34
|
-
'button:focus-visible': {
|
|
35
|
-
outlineOffset: "var(--ds-space-negative-025, -2px)"
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
});
|
|
24
|
+
import ActionGroupOld from './ActionGroupOld';
|
|
25
|
+
var styles = null;
|
|
39
26
|
var renderActionItems = function renderActionItems() {
|
|
40
27
|
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
41
28
|
var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : SmartLinkSize.Medium;
|
|
@@ -43,7 +30,7 @@ var renderActionItems = function renderActionItems() {
|
|
|
43
30
|
var asDropDownItems = arguments.length > 3 ? arguments[3] : undefined;
|
|
44
31
|
var onActionItemClick = arguments.length > 4 ? arguments[4] : undefined;
|
|
45
32
|
return items.map(function (item, idx) {
|
|
46
|
-
return
|
|
33
|
+
return /*#__PURE__*/React.createElement(ActionGroupItem, {
|
|
47
34
|
item: item,
|
|
48
35
|
key: idx,
|
|
49
36
|
size: size,
|
|
@@ -61,7 +48,7 @@ var renderActionItems = function renderActionItems() {
|
|
|
61
48
|
* @param {ActionGroupProps} ActionGroupProps
|
|
62
49
|
* @see Action
|
|
63
50
|
*/
|
|
64
|
-
var
|
|
51
|
+
var ActionGroupNew = function ActionGroupNew(_ref) {
|
|
65
52
|
var _ref$items = _ref.items,
|
|
66
53
|
items = _ref$items === void 0 ? [] : _ref$items,
|
|
67
54
|
_ref$size = _ref.size,
|
|
@@ -101,23 +88,23 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
101
88
|
var actionItems = isMoreThenTwoItems ? renderableActionItems.slice(visibleButtonsNum - 1) : [];
|
|
102
89
|
if (actionItems.length > 0) {
|
|
103
90
|
var spacing = sizeToButtonSpacing[size];
|
|
104
|
-
var moreIcon =
|
|
91
|
+
var moreIcon = /*#__PURE__*/React.createElement(MoreIcon, {
|
|
105
92
|
label: "more",
|
|
106
93
|
color: "currentColor"
|
|
107
94
|
});
|
|
108
|
-
var formatMessage =
|
|
109
|
-
return
|
|
95
|
+
var formatMessage = /*#__PURE__*/React.createElement(FormattedMessage, messages.more_actions);
|
|
96
|
+
return /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
110
97
|
isOpen: isOpen,
|
|
111
98
|
onOpenChange: onOpenChange,
|
|
112
99
|
trigger: function trigger(_ref2) {
|
|
113
100
|
var triggerRef = _ref2.triggerRef,
|
|
114
101
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
115
|
-
return
|
|
102
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
116
103
|
content: formatMessage,
|
|
117
104
|
hideTooltipOnClick: true,
|
|
118
105
|
testId: "action-group-more-button-tooltip",
|
|
119
106
|
tag: "span"
|
|
120
|
-
},
|
|
107
|
+
}, /*#__PURE__*/React.createElement(Button, _extends({}, props, {
|
|
121
108
|
spacing: spacing,
|
|
122
109
|
testId: "action-group-more-button",
|
|
123
110
|
iconBefore: moreIcon,
|
|
@@ -130,12 +117,17 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
130
117
|
}
|
|
131
118
|
return null;
|
|
132
119
|
}, [appearance, isMoreThenTwoItems, isOpen, onActionItemClick, onOpenChange, renderableActionItems, size, ui === null || ui === void 0 ? void 0 : ui.zIndex, visibleButtonsNum]);
|
|
133
|
-
return renderableActionItems.length > 0 ?
|
|
134
|
-
css: styles
|
|
120
|
+
return renderableActionItems.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
135
121
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
136
|
-
,
|
|
137
|
-
className: "actions-button-group",
|
|
122
|
+
className: ax(["_1e0c116y _vwz41j6v _dzc21h6o _1ilq1i6y", "actions-button-group"]),
|
|
138
123
|
"data-action-open": isOpen
|
|
139
|
-
},
|
|
124
|
+
}, /*#__PURE__*/React.createElement(ButtonGroup, null, actionButtons, moreActionDropdown)) : null;
|
|
125
|
+
};
|
|
126
|
+
var ActionGroup = function ActionGroup(props) {
|
|
127
|
+
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
128
|
+
return /*#__PURE__*/React.createElement(ActionGroupNew, props);
|
|
129
|
+
} else {
|
|
130
|
+
return /*#__PURE__*/React.createElement(ActionGroupOld, props);
|
|
131
|
+
}
|
|
140
132
|
};
|
|
141
133
|
export default ActionGroup;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { useEffect, useMemo, useRef } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
+
import { jsx } from '@emotion/react';
|
|
9
|
+
import { StorageClient } from '@atlaskit/frontend-utilities/storage-client';
|
|
10
|
+
import { getPulseStyles } from './styled';
|
|
11
|
+
var LOCAL_STORAGE_CLIENT_KEY = '@atlaskit/smart-card';
|
|
12
|
+
var LOCAL_STORAGE_DISCOVERY_KEY = 'action-discovery-ai-summarise';
|
|
13
|
+
var LOCAL_STORAGE_DISCOVERY_VALUE = 'discovered';
|
|
14
|
+
var LOCAL_STORAGE_DISCOVERY_EXPIRY_IN_MS = 15552000000; // 180 days
|
|
15
|
+
var LOCAL_STORAGE_DISCOVERY_REQUIRED_TIME = 2000;
|
|
16
|
+
/**
|
|
17
|
+
* This is a hacky solution to help with the feature discovery.
|
|
18
|
+
* This implementation must be removed once the experiment is completed.
|
|
19
|
+
* Cleanup on https://product-fabric.atlassian.net/browse/EDM-9649
|
|
20
|
+
*/
|
|
21
|
+
var FeatureDiscoveryOld = function FeatureDiscoveryOld(_ref) {
|
|
22
|
+
var children = _ref.children,
|
|
23
|
+
testId = _ref.testId;
|
|
24
|
+
var renderedTime = useRef();
|
|
25
|
+
var storageClient = useMemo(function () {
|
|
26
|
+
return new StorageClient(LOCAL_STORAGE_CLIENT_KEY);
|
|
27
|
+
}, []);
|
|
28
|
+
var discovered = useMemo(function () {
|
|
29
|
+
try {
|
|
30
|
+
return storageClient.getItem(LOCAL_STORAGE_DISCOVERY_KEY) === LOCAL_STORAGE_DISCOVERY_VALUE;
|
|
31
|
+
} catch (_unused) {
|
|
32
|
+
// If localStorage is not available, don't show feature discovery component. Treat it as 'discovered'.
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
}, [storageClient]);
|
|
36
|
+
useEffect(function () {
|
|
37
|
+
renderedTime.current = Date.now();
|
|
38
|
+
return function () {
|
|
39
|
+
if (!discovered && renderedTime.current) {
|
|
40
|
+
var duration = Date.now() - renderedTime.current;
|
|
41
|
+
if (duration > LOCAL_STORAGE_DISCOVERY_REQUIRED_TIME) {
|
|
42
|
+
try {
|
|
43
|
+
storageClient.setItemWithExpiry(LOCAL_STORAGE_DISCOVERY_KEY, LOCAL_STORAGE_DISCOVERY_VALUE, LOCAL_STORAGE_DISCOVERY_EXPIRY_IN_MS);
|
|
44
|
+
} catch (_unused2) {
|
|
45
|
+
// silent error
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}, [storageClient, discovered]);
|
|
51
|
+
var component = useMemo(function () {
|
|
52
|
+
if (!discovered) {
|
|
53
|
+
return (
|
|
54
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
55
|
+
jsx("span", {
|
|
56
|
+
css: getPulseStyles(),
|
|
57
|
+
"data-testid": "".concat(testId, "-discovery")
|
|
58
|
+
}, children)
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
}, [children, discovered, testId]);
|
|
62
|
+
return component !== null && component !== void 0 ? component : children;
|
|
63
|
+
};
|
|
64
|
+
export default FeatureDiscoveryOld;
|
package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
|
+
import "./index.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useEffect, useMemo, useRef } from 'react';
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { jsx } from '@emotion/react';
|
|
9
6
|
import { StorageClient } from '@atlaskit/frontend-utilities/storage-client';
|
|
10
|
-
import {
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
+
import FeatureDiscoveryOld from './FeatureDiscoveryOld';
|
|
11
9
|
var LOCAL_STORAGE_CLIENT_KEY = '@atlaskit/smart-card';
|
|
12
10
|
var LOCAL_STORAGE_DISCOVERY_KEY = 'action-discovery-ai-summarise';
|
|
13
11
|
var LOCAL_STORAGE_DISCOVERY_VALUE = 'discovered';
|
|
14
12
|
var LOCAL_STORAGE_DISCOVERY_EXPIRY_IN_MS = 15552000000; // 180 days
|
|
15
13
|
var LOCAL_STORAGE_DISCOVERY_REQUIRED_TIME = 2000;
|
|
14
|
+
var pulseKeyframes = null;
|
|
15
|
+
var pulseStyles = null;
|
|
16
|
+
|
|
16
17
|
/**
|
|
17
18
|
* This is a hacky solution to help with the feature discovery.
|
|
18
19
|
* This implementation must be removed once the experiment is completed.
|
|
19
20
|
* Cleanup on https://product-fabric.atlassian.net/browse/EDM-9649
|
|
20
21
|
*/
|
|
21
|
-
var
|
|
22
|
+
var FeatureDiscoveryNew = function FeatureDiscoveryNew(_ref) {
|
|
22
23
|
var children = _ref.children,
|
|
23
24
|
testId = _ref.testId;
|
|
24
25
|
var renderedTime = useRef();
|
|
@@ -50,15 +51,23 @@ var FeatureDiscovery = function FeatureDiscovery(_ref) {
|
|
|
50
51
|
}, [storageClient, discovered]);
|
|
51
52
|
var component = useMemo(function () {
|
|
52
53
|
if (!discovered) {
|
|
53
|
-
return (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
55
|
+
"data-testid": "".concat(testId, "-discovery"),
|
|
56
|
+
className: ax(["_2rko1l7b _y44v1kew _1e0c116y _16qs10kv"]),
|
|
57
|
+
style: {
|
|
58
|
+
"--_zsb6fb": ix("0 0 0 0 ".concat("var(--ds-border-discovery, #8270DB)")),
|
|
59
|
+
"--_d0o24t": ix("".concat(pulseKeyframes, " 2s cubic-bezier(0.5, 0, 0, 1) 0.25s both 2"))
|
|
60
|
+
}
|
|
61
|
+
}, children);
|
|
60
62
|
}
|
|
61
63
|
}, [children, discovered, testId]);
|
|
62
64
|
return component !== null && component !== void 0 ? component : children;
|
|
63
65
|
};
|
|
66
|
+
var FeatureDiscovery = function FeatureDiscovery(props) {
|
|
67
|
+
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
68
|
+
return /*#__PURE__*/React.createElement(FeatureDiscoveryNew, props);
|
|
69
|
+
} else {
|
|
70
|
+
return /*#__PURE__*/React.createElement(FeatureDiscoveryOld, props);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
64
73
|
export default FeatureDiscovery;
|
package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css, keyframes } from '@emotion/react';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated remove on FF cleanup of bandicoots-compiled-migration-smartcard
|
|
5
|
+
*/
|
|
3
6
|
export var getPulseStyles = function getPulseStyles() {
|
|
4
7
|
var color = "var(--ds-border-discovery, #8270DB)";
|
|
5
8
|
var pulseKeyframes = keyframes({
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React, { useRef } from 'react';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
|
+
import { css } from '@emotion/react';
|
|
6
|
+
import { di } from 'react-magnetic-di';
|
|
7
|
+
import { SmartLinkDirection } from '../../../../../../constants';
|
|
8
|
+
import useAISummaryAction from '../../../../../../state/hooks/use-ai-summary-action';
|
|
9
|
+
import AISummary from '../../../../../common/ai-summary';
|
|
10
|
+
import MotionWrapper from '../../../common/motion-wrapper';
|
|
11
|
+
import Block from '../../block';
|
|
12
|
+
import AIEventSummaryViewed from '../ai-event-summary-viewed';
|
|
13
|
+
var AISummaryBlockResolvedViewOld = function AISummaryBlockResolvedViewOld(props) {
|
|
14
|
+
var testId = props.testId,
|
|
15
|
+
_props$aiSummaryMinHe = props.aiSummaryMinHeight,
|
|
16
|
+
aiSummaryMinHeight = _props$aiSummaryMinHe === void 0 ? 0 : _props$aiSummaryMinHe,
|
|
17
|
+
placeholder = props.placeholder,
|
|
18
|
+
url = props.url;
|
|
19
|
+
var _useAISummaryAction = useAISummaryAction(url),
|
|
20
|
+
_useAISummaryAction$s = _useAISummaryAction.state,
|
|
21
|
+
content = _useAISummaryAction$s.content,
|
|
22
|
+
status = _useAISummaryAction$s.status;
|
|
23
|
+
var showAISummary = status === 'done' ||
|
|
24
|
+
// We want to display the AI Summary component only when there is content available during the loading process.
|
|
25
|
+
status === 'loading' && !!content;
|
|
26
|
+
var isSummarisedOnMountRef = useRef(status === 'done');
|
|
27
|
+
var minHeight = isSummarisedOnMountRef.current ? 0 : aiSummaryMinHeight;
|
|
28
|
+
if (!showAISummary) {
|
|
29
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, placeholder);
|
|
30
|
+
}
|
|
31
|
+
return /*#__PURE__*/React.createElement(Block, _extends({}, props, {
|
|
32
|
+
direction: SmartLinkDirection.Vertical,
|
|
33
|
+
testId: "".concat(testId, "-resolved-view")
|
|
34
|
+
/**
|
|
35
|
+
* Enabled for feature discovery to allow box shadow to overflow
|
|
36
|
+
* Cleanup: https://product-fabric.atlassian.net/browse/EDM-8681
|
|
37
|
+
*/,
|
|
38
|
+
overrideCss: css({
|
|
39
|
+
overflow: 'visible'
|
|
40
|
+
},
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
42
|
+
props.overrideCss)
|
|
43
|
+
}), status === 'done' && /*#__PURE__*/React.createElement(AIEventSummaryViewed, {
|
|
44
|
+
fromCache: isSummarisedOnMountRef.current
|
|
45
|
+
}), /*#__PURE__*/React.createElement(MotionWrapper, {
|
|
46
|
+
minHeight: minHeight,
|
|
47
|
+
show: showAISummary,
|
|
48
|
+
showTransition: !isSummarisedOnMountRef.current
|
|
49
|
+
}, /*#__PURE__*/React.createElement(AISummary, {
|
|
50
|
+
testId: "".concat(testId, "-ai-summary"),
|
|
51
|
+
minHeight: minHeight,
|
|
52
|
+
content: content
|
|
53
|
+
})));
|
|
54
|
+
};
|
|
55
|
+
export default AISummaryBlockResolvedViewOld;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
3
|
+
import "./index.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { Fragment, useRef } from 'react';
|
|
6
7
|
import { di } from 'react-magnetic-di';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
9
|
import { SmartLinkDirection } from '../../../../../../constants';
|
|
8
10
|
import useAISummaryAction from '../../../../../../state/hooks/use-ai-summary-action';
|
|
9
11
|
import AISummary from '../../../../../common/ai-summary';
|
|
10
12
|
import MotionWrapper from '../../../common/motion-wrapper';
|
|
11
13
|
import Block from '../../block';
|
|
12
14
|
import AIEventSummaryViewed from '../ai-event-summary-viewed';
|
|
13
|
-
|
|
15
|
+
import AISummaryBlockResolvedViewOld from './AISummaryBlockResolvedViewOld';
|
|
16
|
+
var styles = null;
|
|
17
|
+
var AISummaryBlockResolvedViewNew = function AISummaryBlockResolvedViewNew(props) {
|
|
14
18
|
var testId = props.testId,
|
|
15
19
|
_props$aiSummaryMinHe = props.aiSummaryMinHeight,
|
|
16
20
|
aiSummaryMinHeight = _props$aiSummaryMinHe === void 0 ? 0 : _props$aiSummaryMinHe,
|
|
@@ -26,7 +30,7 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
|
26
30
|
var isSummarisedOnMountRef = useRef(status === 'done');
|
|
27
31
|
var minHeight = isSummarisedOnMountRef.current ? 0 : aiSummaryMinHeight;
|
|
28
32
|
if (!showAISummary) {
|
|
29
|
-
return /*#__PURE__*/React.createElement(
|
|
33
|
+
return /*#__PURE__*/React.createElement(Fragment, null, placeholder);
|
|
30
34
|
}
|
|
31
35
|
return /*#__PURE__*/React.createElement(Block, _extends({}, props, {
|
|
32
36
|
direction: SmartLinkDirection.Vertical,
|
|
@@ -35,11 +39,7 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
|
35
39
|
* Enabled for feature discovery to allow box shadow to overflow
|
|
36
40
|
* Cleanup: https://product-fabric.atlassian.net/browse/EDM-8681
|
|
37
41
|
*/,
|
|
38
|
-
|
|
39
|
-
overflow: 'visible'
|
|
40
|
-
},
|
|
41
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
42
|
-
props.overrideCss)
|
|
42
|
+
className: ax(["_1reoewfl _18m9ewfl"])
|
|
43
43
|
}), status === 'done' && /*#__PURE__*/React.createElement(AIEventSummaryViewed, {
|
|
44
44
|
fromCache: isSummarisedOnMountRef.current
|
|
45
45
|
}), /*#__PURE__*/React.createElement(MotionWrapper, {
|
|
@@ -52,4 +52,11 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
|
52
52
|
content: content
|
|
53
53
|
})));
|
|
54
54
|
};
|
|
55
|
+
var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
56
|
+
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
57
|
+
return /*#__PURE__*/React.createElement(AISummaryBlockResolvedViewNew, props);
|
|
58
|
+
} else {
|
|
59
|
+
return /*#__PURE__*/React.createElement(AISummaryBlockResolvedViewOld, props);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
55
62
|
export default AISummaryBlockResolvedView;
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
._1dthv2br{-webkit-box-align:start}
|
|
13
13
|
._1e0c1txw{display:flex}
|
|
14
14
|
._1e0c1ule{display:block}
|
|
15
|
+
._1e0ccj1k{display:-webkit-box}
|
|
15
16
|
._1iu61nu9 >div[data-smart-element-date-time], ._166k1nu9 >div[data-smart-element-text], ._1div1nu9 >span[data-smart-element-date-time], ._bmfb1nu9 >span[data-smart-element-text]{display:inline}
|
|
16
17
|
._1nmz1hna{word-break:break-word}
|
|
17
18
|
._1o9z11wp{flex-shrink:3}
|
|
@@ -42,5 +43,7 @@
|
|
|
42
43
|
._r291v2br{-ms-flex-align:start}
|
|
43
44
|
._s7n4nkob{vertical-align:middle}
|
|
44
45
|
._sudp1e54{-webkit-box-orient:vertical}
|
|
46
|
+
._vwz41j6v{line-height:1rem}
|
|
45
47
|
._y3gn1e5h{text-align:left}
|
|
46
|
-
._y3gnusic{text-align:right}
|
|
48
|
+
._y3gnusic{text-align:right}
|
|
49
|
+
@supports not (-webkit-line-clamp:1){._102k1k8s{max-height:1.5rem}._102k1m1q{max-height:1.75rem}}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
|
+
/* eslint-disable @atlaskit/design-system/use-tokens-typography */
|
|
2
3
|
import "./index.compiled.css";
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -11,10 +12,10 @@ var alignmentStyleMap = {
|
|
|
11
12
|
left: "_1dthv2br _r291v2br _1bah1y6m _y3gn1e5h"
|
|
12
13
|
};
|
|
13
14
|
var baseStyleBySize = {
|
|
14
|
-
xlarge: "_zulp147b _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf",
|
|
15
|
-
large: "_zulp1e9d _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf",
|
|
16
|
-
medium: "_zulpcxkx _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf",
|
|
17
|
-
small: "_zulppdf9 _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf"
|
|
15
|
+
xlarge: "_zulp147b _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf _vwz41j6v",
|
|
16
|
+
large: "_zulp1e9d _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf _vwz41j6v",
|
|
17
|
+
medium: "_zulpcxkx _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf _vwz41j6v",
|
|
18
|
+
small: "_zulppdf9 _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf _vwz41j6v"
|
|
18
19
|
};
|
|
19
20
|
var baseStyleByDirection = {
|
|
20
21
|
horizontal: "_2lx2vrvc _4cvr1h6o",
|
|
@@ -48,6 +49,7 @@ var gapStylesRight = {
|
|
|
48
49
|
medium: "_24rccxkx _3dveidpf",
|
|
49
50
|
small: "_24rcpdf9 _3dveidpf"
|
|
50
51
|
};
|
|
52
|
+
var minWidthStyle = null;
|
|
51
53
|
|
|
52
54
|
/**
|
|
53
55
|
* Creates a group of Action components. Accepts an array of Actions, in addition to some styling
|
|
@@ -71,13 +73,12 @@ var ElementGroupNew = function ElementGroupNew(_ref) {
|
|
|
71
73
|
_ref$position = _ref.position,
|
|
72
74
|
position = _ref$position === void 0 ? SmartLinkPosition.Center : _ref$position,
|
|
73
75
|
className = _ref.className;
|
|
74
|
-
var totalCss = [baseStyleBySize[size], baseStyleByDirection[direction], baseStyle, alignmentStyleMap[align], null, widthStyle[width], direction === SmartLinkDirection.Horizontal ? horizontalStyleBase : {}, direction === SmartLinkDirection.Horizontal ? horizontalStyleByHeight[size] : {}, direction === SmartLinkDirection.Horizontal ? SmartLinkAlignment.Left ? gapStylesLeft[size] : gapStylesRight[size] : {}, positionStyle[position]];
|
|
75
76
|
return /*#__PURE__*/React.createElement("div", {
|
|
76
77
|
"data-smart-element-group": true,
|
|
77
78
|
"data-testid": testId
|
|
78
79
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
79
80
|
,
|
|
80
|
-
className: ax([baseStyleBySize[size], baseStyleByDirection[direction], "_fiawglyw _1ouwidpf _f6ju1ns9", alignmentStyleMap[align], "_1ul99by0", widthStyle[width], direction === SmartLinkDirection.Horizontal && "_1reo15vq _18m915vq _1e0c1ule _s7n4nkob _1bto1l2s _1nmz1hna _1yyjkb7n _sudp1e54 _1aaynkob _15tynkob _1iu61nu9 _166k1nu9 _1div1nu9 _bmfb1nu9", direction === SmartLinkDirection.Horizontal &&
|
|
81
|
+
className: ax([baseStyleBySize[size], baseStyleByDirection[direction], "_fiawglyw _1ouwidpf _f6ju1ns9", alignmentStyleMap[align], "_1ul99by0", widthStyle[width], direction === SmartLinkDirection.Horizontal && "_1reo15vq _18m915vq _1e0c1ule _s7n4nkob _1bto1l2s _1nmz1hna _1yyjkb7n _sudp1e54 _1aaynkob _15tynkob _1iu61nu9 _166k1nu9 _1div1nu9 _bmfb1nu9", direction === SmartLinkDirection.Horizontal && horizontalStyleByHeight[size], direction === SmartLinkDirection.Horizontal && align === SmartLinkAlignment.Left && gapStylesLeft[size], direction === SmartLinkDirection.Horizontal && align === SmartLinkAlignment.Right && gapStylesRight[size], positionStyle[position], className])
|
|
81
82
|
}, renderChildren(children, size));
|
|
82
83
|
};
|
|
83
84
|
var ElementGroup = function ElementGroup(props) {
|
|
@@ -46,7 +46,8 @@ var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
|
|
|
46
46
|
}, /*#__PURE__*/React.createElement(ActionGroup, {
|
|
47
47
|
onDropdownOpenChange: onDropdownOpenChange,
|
|
48
48
|
items: actions,
|
|
49
|
-
appearance: "default"
|
|
49
|
+
appearance: "default",
|
|
50
|
+
size: size
|
|
50
51
|
})) : null);
|
|
51
52
|
};
|
|
52
53
|
var FooterBlockResolvedViewExported = function FooterBlockResolvedViewExported(props) {
|
|
@@ -1,4 +1,3 @@
|
|
|
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
1
|
._18m915vq{overflow-y:hidden}
|
|
3
2
|
._1bto1l2s{text-overflow:ellipsis}
|
|
4
3
|
._1e0ccj1k{display:-webkit-box}
|
|
@@ -7,4 +6,6 @@
|
|
|
7
6
|
._1yyjcs5v{-webkit-line-clamp:2}
|
|
8
7
|
._1yyjkb7n{-webkit-line-clamp:1}
|
|
9
8
|
._sudp1e54{-webkit-box-orient:vertical}
|
|
9
|
+
._vwz41k8s{line-height:1.5rem}
|
|
10
|
+
._vwz41m1q{line-height:1.75rem}
|
|
10
11
|
@supports not (-webkit-line-clamp:1){._102k1k7u{max-height:3.5rem}._102k1wto{max-height:3rem}}
|
|
@@ -5,6 +5,8 @@ var _excluded = ["maxLines", "status", "testId", "primary", "secondary"];
|
|
|
5
5
|
import "./index.compiled.css";
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { ax, ix } from "@compiled/react/runtime";
|
|
8
|
+
/* eslint-disable @atlaskit/design-system/use-tokens-typography */
|
|
9
|
+
|
|
8
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
11
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize, SmartLinkStatus, SmartLinkWidth } from '../../../../../constants';
|
|
10
12
|
import Block from '../block';
|
|
@@ -19,10 +21,10 @@ var truncateStyles = {
|
|
|
19
21
|
'2': "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _1nmz1hna _1yyjcs5v _sudp1e54"
|
|
20
22
|
};
|
|
21
23
|
var sizeStyles = {
|
|
22
|
-
xlarge: "
|
|
23
|
-
large: "
|
|
24
|
-
medium: "
|
|
25
|
-
small: "
|
|
24
|
+
xlarge: "_vwz41m1q _102k1k7u",
|
|
25
|
+
large: "_vwz41m1q _102k1k7u",
|
|
26
|
+
medium: "_vwz41k8s _102k1wto",
|
|
27
|
+
small: "_vwz41k8s _102k1wto"
|
|
26
28
|
};
|
|
27
29
|
var getMaxLines = function getMaxLines(maxLines) {
|
|
28
30
|
if (maxLines > MAXIMUM_MAX_LINES) {
|
|
@@ -67,11 +69,13 @@ var MetadataBlock = function MetadataBlock(_ref) {
|
|
|
67
69
|
align: SmartLinkAlignment.Left,
|
|
68
70
|
direction: SmartLinkDirection.Horizontal,
|
|
69
71
|
width: SmartLinkWidth.Flexible,
|
|
72
|
+
size: size,
|
|
70
73
|
className: ax([truncateStyles[maxLinesTotal], sizeStyles[size]])
|
|
71
74
|
}, primaryElements), secondaryElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
72
75
|
align: SmartLinkAlignment.Right,
|
|
73
76
|
direction: SmartLinkDirection.Horizontal,
|
|
74
77
|
width: SmartLinkWidth.Flexible,
|
|
78
|
+
size: size,
|
|
75
79
|
className: ax([truncateStyles[maxLinesTotal], sizeStyles[size]])
|
|
76
80
|
}, secondaryElements));
|
|
77
81
|
};
|
|
@@ -110,7 +110,9 @@ var TitleBlockNew = function TitleBlockNew(_ref) {
|
|
|
110
110
|
title: title,
|
|
111
111
|
metadataPosition: metadataPosition,
|
|
112
112
|
hideIcon: hideIcon,
|
|
113
|
-
icon: icon
|
|
113
|
+
icon: icon,
|
|
114
|
+
size: props.size,
|
|
115
|
+
theme: theme
|
|
114
116
|
}));
|
|
115
117
|
};
|
|
116
118
|
var TitleBlock = function TitleBlock(props) {
|
|
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
13
13
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
14
14
|
var PACKAGE_DATA = {
|
|
15
15
|
packageName: "@atlaskit/smart-card",
|
|
16
|
-
packageVersion: "34.6.
|
|
16
|
+
packageVersion: "34.6.3",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
._11c81vlj{font:var(--ds-font-body-small,normal 400 11px/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._zulputpp{gap:var(--ds-space-150,9pt)}
|
|
3
|
+
._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
|
|
4
|
+
._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
|
+
import "./index.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
2
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
6
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
7
|
+
import { SmartLinkStatus } from '../../../../constants';
|
|
4
8
|
import { Card, ElementName, SmartLinkPosition, SmartLinkSize, SmartLinkTheme, TitleBlock } from '../../../../index';
|
|
5
9
|
import RelatedLinkItemOld from './RelatedLinkItemOld';
|
|
6
10
|
var hoverStyles = xcss({
|
|
@@ -9,12 +13,9 @@ var hoverStyles = xcss({
|
|
|
9
13
|
borderRadius: 'border.radius.100',
|
|
10
14
|
marginInline: 'space.negative.100',
|
|
11
15
|
paddingInline: 'space.100'
|
|
12
|
-
}
|
|
13
|
-
paddingTop: 'space.100',
|
|
14
|
-
paddingBottom: 'space.100',
|
|
15
|
-
gap: 'space.150',
|
|
16
|
-
font: 'font.body.small'
|
|
16
|
+
}
|
|
17
17
|
});
|
|
18
|
+
var relatedLinkItemStyles = null;
|
|
18
19
|
var RelatedLinkItem = function RelatedLinkItem(_ref) {
|
|
19
20
|
var url = _ref.url,
|
|
20
21
|
testId = _ref.testId;
|
|
@@ -42,7 +43,11 @@ var RelatedLinkItem = function RelatedLinkItem(_ref) {
|
|
|
42
43
|
hideTitleTooltip: true,
|
|
43
44
|
position: SmartLinkPosition.Center,
|
|
44
45
|
subtitle: subtitle,
|
|
45
|
-
anchorTarget: "_blank"
|
|
46
|
+
anchorTarget: "_blank",
|
|
47
|
+
size: ui.size,
|
|
48
|
+
theme: ui.theme,
|
|
49
|
+
status: SmartLinkStatus.Resolved,
|
|
50
|
+
className: ax(["_zulputpp _11c81vlj _ca0qu2gc _n3tdu2gc"])
|
|
46
51
|
})));
|
|
47
52
|
};
|
|
48
53
|
var RelatedLinkItemExported = function RelatedLinkItemExported(props) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import type { ActionBlockProps } from './types';
|
|
3
|
-
declare const ActionBlock: (
|
|
3
|
+
declare const ActionBlock: (props: ActionBlockProps) => JSX.Element;
|
|
4
4
|
export default ActionBlock;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import { type ActionGroupProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a group of Action components. Accepts an array of Actions, in addition to some styling
|
|
5
|
+
* preferences.
|
|
6
|
+
* @internal
|
|
7
|
+
* @param {ActionGroupProps} ActionGroupProps
|
|
8
|
+
* @see Action
|
|
9
|
+
*/
|
|
10
|
+
declare const ActionGroupOld: ({ items, size, appearance, visibleButtonsNum, onDropdownOpenChange, }: ActionGroupProps) => jsx.JSX.Element | null;
|
|
11
|
+
export default ActionGroupOld;
|
package/dist/types/view/FlexibleCard/components/blocks/action-group/action-group-item/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { type Appearance } from '@atlaskit/button';
|
|
3
3
|
import { type SmartLinkSize } from '../../../../../../constants';
|
|
4
4
|
import { type ActionItem } from '../../types';
|
|
@@ -8,5 +8,5 @@ declare const ActionGroupItem: ({ item, size, appearance, asDropDownItems, onAct
|
|
|
8
8
|
appearance?: Appearance | undefined;
|
|
9
9
|
asDropDownItems?: boolean | undefined;
|
|
10
10
|
onActionItemClick?: (() => void) | undefined;
|
|
11
|
-
}) =>
|
|
11
|
+
}) => JSX.Element | null;
|
|
12
12
|
export default ActionGroupItem;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { type ActionGroupProps } from './types';
|
|
3
|
-
|
|
4
|
-
* Creates a group of Action components. Accepts an array of Actions, in addition to some styling
|
|
5
|
-
* preferences.
|
|
6
|
-
* @internal
|
|
7
|
-
* @param {ActionGroupProps} ActionGroupProps
|
|
8
|
-
* @see Action
|
|
9
|
-
*/
|
|
10
|
-
declare const ActionGroup: ({ items, size, appearance, visibleButtonsNum, onDropdownOpenChange, }: ActionGroupProps) => jsx.JSX.Element | null;
|
|
3
|
+
declare const ActionGroup: (props: ActionGroupProps) => JSX.Element;
|
|
11
4
|
export default ActionGroup;
|