@atlaskit/smart-card 43.31.10 → 43.32.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +11 -0
  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 +3 -0
  3. 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 +3 -0
  4. 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 +3 -0
  5. 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 +3 -0
  6. package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-resolved-view-with-rovo-actions-button-treatment---default.png +3 -0
  7. package/dist/cjs/state/hooks/use-inline-action-nudge-experiment/index.js +49 -0
  8. package/dist/cjs/utils/analytics/analytics.js +1 -1
  9. package/dist/cjs/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +61 -3
  10. package/dist/cjs/view/InlineCard/common/rovo-actions-button/index.js +9 -100
  11. package/dist/cjs/view/LinkUrl/index.js +1 -1
  12. 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 +3 -0
  13. 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 +3 -0
  14. 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 +3 -0
  15. 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 +3 -0
  16. package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-resolved-view-with-rovo-actions-button-treatment---default.png +3 -0
  17. package/dist/es2019/state/hooks/use-inline-action-nudge-experiment/index.js +42 -0
  18. package/dist/es2019/utils/analytics/analytics.js +1 -1
  19. package/dist/es2019/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +57 -2
  20. package/dist/es2019/view/InlineCard/common/rovo-actions-button/index.js +9 -74
  21. package/dist/es2019/view/LinkUrl/index.js +1 -1
  22. 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 +3 -0
  23. 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 +3 -0
  24. 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 +3 -0
  25. 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 +3 -0
  26. package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-resolved-view-with-rovo-actions-button-treatment---default.png +3 -0
  27. package/dist/esm/state/hooks/use-inline-action-nudge-experiment/index.js +42 -0
  28. package/dist/esm/utils/analytics/analytics.js +1 -1
  29. package/dist/esm/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +58 -2
  30. package/dist/esm/view/InlineCard/common/rovo-actions-button/index.js +9 -98
  31. package/dist/esm/view/LinkUrl/index.js +1 -1
  32. package/dist/types/state/hooks/use-inline-action-nudge-experiment/index.d.ts +21 -0
  33. package/dist/types/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.d.ts +3 -1
  34. package/dist/types/view/InlineCard/common/rovo-actions-button/index.d.ts +1 -8
  35. package/dist/types-ts4.5/state/hooks/use-inline-action-nudge-experiment/index.d.ts +21 -0
  36. package/dist/types-ts4.5/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.d.ts +3 -1
  37. package/dist/types-ts4.5/view/InlineCard/common/rovo-actions-button/index.d.ts +1 -8
  38. package/package.json +9 -6
  39. package/dist/cjs/view/InlineCard/common/rovo-actions-button/index.compiled.css +0 -15
  40. package/dist/es2019/view/InlineCard/common/rovo-actions-button/index.compiled.css +0 -15
  41. package/dist/esm/view/InlineCard/common/rovo-actions-button/index.compiled.css +0 -15
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 43.32.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`f5b6110e36e79`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f5b6110e36e79) -
8
+ [ux] Enables rovo actions post auth experiment ui and exposures
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
3
14
  ## 43.31.10
4
15
 
5
16
  ### Patch Changes
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a117559ef83d4ec2bc759d06ad90af7a7ca326aacc551c36f5634750f9bf8bd
3
+ size 223769
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a117559ef83d4ec2bc759d06ad90af7a7ca326aacc551c36f5634750f9bf8bd
3
+ size 223769
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e57281cb358f1e4d45ffc78ba504439918d6e6dd5f02f0610c39baf8ee3e76d
3
+ size 224003
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e57281cb358f1e4d45ffc78ba504439918d6e6dd5f02f0610c39baf8ee3e76d
3
+ size 224003
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f901781bc91abcfbebc9356ffacbb30f381b6be368df26f3ea23b859c300c59f
3
+ size 8391
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _react = require("react");
9
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
10
+ var _rovo = require("../../../utils/rovo");
11
+ var _helpers = require("../../helpers");
12
+ var _store = require("../../store");
13
+ var _useRovoConfig = _interopRequireDefault(require("../use-rovo-config"));
14
+ var EXCLUDED_EXTENSION_KEYS = new Set(['figma-object-provider', 'google-object-provider']);
15
+ var NOT_ENABLED_RESULT = {
16
+ isEnabled: false
17
+ };
18
+
19
+ /**
20
+ * Returns whether the rovogrowth_640_inline_action_nudge experiment
21
+ * is enabled for the current user and link context.
22
+ *
23
+ * All eligibility criteria are consolidated here:
24
+ * 1. Rovo chat must be enabled for the tenant.
25
+ * 2. The extension key must not be excluded (Figma and Google links are excluded).
26
+ * 3. The experiment value must be true (via tmp-editor-statsig).
27
+ *
28
+ * The extension key is derived from the card store via the resolved URL,
29
+ * so callers don't need to thread it as a prop.
30
+ */
31
+ var useInlineActionNudgeExperiment = function useInlineActionNudgeExperiment(url) {
32
+ var rovoConfig = (0, _useRovoConfig.default)();
33
+ var isRovoChatEnabled = (0, _rovo.getIsRovoChatEnabled)(rovoConfig);
34
+ var cardState = (0, _store.useSmartCardState)(url !== null && url !== void 0 ? url : '');
35
+ var extensionKey = (0, _helpers.getExtensionKey)(cardState.details);
36
+ return (0, _react.useMemo)(function () {
37
+ if (!isRovoChatEnabled) {
38
+ return NOT_ENABLED_RESULT;
39
+ }
40
+ if (extensionKey && EXCLUDED_EXTENSION_KEYS.has(extensionKey)) {
41
+ return NOT_ENABLED_RESULT;
42
+ }
43
+ var isEnabled = (0, _experiments.editorExperiment)('rovogrowth_640_inline_action_nudge', true);
44
+ return {
45
+ isEnabled: isEnabled
46
+ };
47
+ }, [isRovoChatEnabled, extensionKey]);
48
+ };
49
+ var _default = exports.default = useInlineActionNudgeExperiment;
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
11
11
  var context = exports.context = {
12
12
  componentName: 'smart-cards',
13
13
  packageName: "@atlaskit/smart-card",
14
- packageVersion: "43.31.9"
14
+ packageVersion: "43.32.0"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -4,13 +4,18 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.InlineCardResolvedViewFunctional = InlineCardResolvedViewFunctional;
7
+ exports.InlineCardResolvedViewBase = InlineCardResolvedViewBase;
8
+ exports.InlineCardResolvedViewFunctional = void 0;
9
+ exports.InlineCardResolvedViewFunctionalWithRovoActionsButton = InlineCardResolvedViewFunctionalWithRovoActionsButton;
8
10
  var _react = _interopRequireDefault(require("react"));
11
+ var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
12
+ var _useInlineActionNudgeExperiment = _interopRequireDefault(require("../../../state/hooks/use-inline-action-nudge-experiment"));
9
13
  var _HoverCard = require("../../HoverCard");
14
+ var _rovoActionsButton = require("../common/rovo-actions-button");
10
15
  var _Frame = require("../Frame");
11
16
  var _IconAndTitleLayout = require("../IconAndTitleLayout");
12
17
  var _renderLozenge = require("./renderLozenge");
13
- function InlineCardResolvedViewFunctional(_ref) {
18
+ function InlineCardResolvedViewBase(_ref) {
14
19
  var id = _ref.id,
15
20
  _ref$title = _ref.title,
16
21
  title = _ref$title === void 0 ? '' : _ref$title,
@@ -55,4 +60,57 @@ function InlineCardResolvedViewFunctional(_ref) {
55
60
  actionOptions: actionOptions,
56
61
  hoverPreviewOptions: hoverPreviewOptions
57
62
  }, frame);
58
- }
63
+ }
64
+ function InlineCardResolvedViewFunctionalWithRovoActionsButton(_ref2) {
65
+ var id = _ref2.id,
66
+ _ref2$title = _ref2.title,
67
+ title = _ref2$title === void 0 ? '' : _ref2$title,
68
+ isSelected = _ref2.isSelected,
69
+ isHovered = _ref2.isHovered,
70
+ onClick = _ref2.onClick,
71
+ icon = _ref2.icon,
72
+ link = _ref2.link,
73
+ _ref2$testId = _ref2.testId,
74
+ testId = _ref2$testId === void 0 ? 'inline-card-resolved-view' : _ref2$testId,
75
+ titleTextColor = _ref2.titleTextColor,
76
+ titlePrefix = _ref2.titlePrefix,
77
+ _ref2$showHoverPrevie = _ref2.showHoverPreview,
78
+ showHoverPreview = _ref2$showHoverPrevie === void 0 ? false : _ref2$showHoverPrevie,
79
+ hoverPreviewOptions = _ref2.hoverPreviewOptions,
80
+ actionOptions = _ref2.actionOptions,
81
+ truncateInline = _ref2.truncateInline,
82
+ type = _ref2.type,
83
+ hideIconLoadingSkeleton = _ref2.hideIconLoadingSkeleton,
84
+ lozenge = _ref2.lozenge;
85
+ var _useInlineActionNudge = (0, _useInlineActionNudgeExperiment.default)(link),
86
+ isEnabled = _useInlineActionNudge.isEnabled;
87
+
88
+ // TODO https://hello.jira.atlassian.cloud/browse/NAVX-4436: fire analytics with cohort
89
+ var frame = /*#__PURE__*/_react.default.createElement(_Frame.Frame, {
90
+ testId: testId,
91
+ link: link,
92
+ isSelected: isSelected,
93
+ isHovered: isHovered,
94
+ onClick: onClick,
95
+ truncateInline: truncateInline
96
+ }, /*#__PURE__*/_react.default.createElement(_IconAndTitleLayout.IconAndTitleLayout, {
97
+ emoji: titlePrefix,
98
+ icon: icon,
99
+ title: title,
100
+ titleTextColor: titleTextColor,
101
+ type: type,
102
+ hideIconLoadingSkeleton: hideIconLoadingSkeleton
103
+ }), (0, _renderLozenge.renderLozenge)(lozenge), isEnabled && link && /*#__PURE__*/_react.default.createElement(_rovoActionsButton.RovoActionsButton, {
104
+ testId: "".concat(testId, "-rovo-actions-button")
105
+ }));
106
+ if (!showHoverPreview || !link) {
107
+ return frame;
108
+ }
109
+ return /*#__PURE__*/_react.default.createElement(_HoverCard.HoverCard, {
110
+ id: id,
111
+ url: link,
112
+ actionOptions: actionOptions,
113
+ hoverPreviewOptions: hoverPreviewOptions
114
+ }, frame);
115
+ }
116
+ var InlineCardResolvedViewFunctional = exports.InlineCardResolvedViewFunctional = (0, _platformFeatureFlagsReact.componentWithFG)('rovogrowth-640-inline-action-nudge-fg', InlineCardResolvedViewFunctionalWithRovoActionsButton, InlineCardResolvedViewBase);
@@ -1,110 +1,19 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
1
  "use strict";
3
2
 
4
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
- var _typeof = require("@babel/runtime/helpers/typeof");
6
4
  Object.defineProperty(exports, "__esModule", {
7
5
  value: true
8
6
  });
9
7
  exports.RovoActionsButton = void 0;
10
- require("./index.compiled.css");
11
- var _runtime = require("@compiled/react/runtime");
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
14
- var _react = _interopRequireWildcard(require("react"));
15
- var _reactIntlNext = require("react-intl-next");
16
- var _css = require("@atlaskit/css");
8
+ var _react = _interopRequireDefault(require("react"));
17
9
  var _rovoChat = _interopRequireDefault(require("@atlaskit/icon/core/rovo-chat"));
18
- var _popup = _interopRequireDefault(require("@atlaskit/popup"));
19
- var _compiled = require("@atlaskit/primitives/compiled");
20
- var _messages = require("../../../../messages");
21
- var _aiPrism = _interopRequireDefault(require("../../../common/ai-prism"));
22
- var _actionButton = require("../action-button");
23
- var _rovoPostAuthActionsModal = require("../rovo-post-auth-actions-modal");
24
- 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" != _typeof(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); }
25
- var styles = {
26
- wrapper: "_kqswh2mm _1e0c1o8l",
27
- expanded: "_kqswstnw _154iidpf _1xi2idpf _1e0c1nu9 _o5721q9c _1pbykb7n",
28
- expandedText: "_1reo15vq _18m915vq _v564hlhx _1e0c1o8l _p12fidpf _s7n4jp4b _o5721q9c",
29
- expandedTextVisible: "_p12fuuw1 _u5f31b66"
30
- };
31
10
  var RovoActionsButton = exports.RovoActionsButton = function RovoActionsButton(_ref) {
32
- var onClick = _ref.onClick,
33
- testId = _ref.testId,
34
- _ref$title = _ref.title,
35
- title = _ref$title === void 0 ? '' : _ref$title,
36
- _ref$url = _ref.url,
37
- url = _ref$url === void 0 ? '' : _ref$url;
38
- var _useState = (0, _react.useState)(false),
39
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
40
- isHovered = _useState2[0],
41
- setIsHovered = _useState2[1];
42
- var _useState3 = (0, _react.useState)(false),
43
- _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
44
- isPopupOpen = _useState4[0],
45
- setIsPopupOpen = _useState4[1];
46
- var _useIntl = (0, _reactIntlNext.useIntl)(),
47
- formatMessage = _useIntl.formatMessage;
48
- var handleClick = function handleClick(e) {
49
- e.preventDefault();
50
- e.stopPropagation();
51
- setIsPopupOpen(function (prev) {
52
- return !prev;
53
- });
54
- onClick === null || onClick === void 0 || onClick(e);
55
- };
56
- return /*#__PURE__*/_react.default.createElement(_popup.default, {
57
- isOpen: isPopupOpen,
58
- onClose: function onClose() {
59
- return setIsPopupOpen(false);
60
- },
61
- placement: "right-start",
62
- content: function content() {
63
- return /*#__PURE__*/_react.default.createElement(_aiPrism.default, {
64
- isVisible: true,
65
- isMoving: true,
66
- isGlowing: true
67
- }, /*#__PURE__*/_react.default.createElement(_rovoPostAuthActionsModal.RovoPostAuthActionsModal, {
68
- title: title,
69
- url: url,
70
- testId: testId && "".concat(testId, "-popup")
71
- }));
72
- },
73
- trigger: function trigger(triggerProps) {
74
- return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
75
- xcss: styles.wrapper,
76
- onMouseEnter: function onMouseEnter() {
77
- return setIsHovered(true);
78
- },
79
- onMouseLeave: function onMouseLeave() {
80
- return setIsHovered(false);
81
- },
82
- onFocus: function onFocus() {
83
- return setIsHovered(true);
84
- },
85
- onBlur: function onBlur() {
86
- return setIsHovered(false);
87
- }
88
- }, /*#__PURE__*/_react.default.createElement(_actionButton.ActionButton, (0, _extends2.default)({
89
- onClick: handleClick,
90
- viewType: "action",
91
- testId: testId
92
- }, triggerProps), /*#__PURE__*/_react.default.createElement(_rovoChat.default, {
93
- label: "Rovo",
94
- color: "var(--ds-icon-inverse, #FFFFFF)",
95
- size: "small"
96
- })), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
97
- xcss: styles.expanded
98
- }, /*#__PURE__*/_react.default.createElement(_actionButton.ActionButton, (0, _extends2.default)({
99
- onClick: handleClick,
100
- viewType: "action"
101
- }, triggerProps), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
102
- xcss: (0, _css.cx)(styles.expandedText, isHovered && styles.expandedTextVisible)
103
- }, formatMessage(_messages.messages.rovo_actions_explore)), /*#__PURE__*/_react.default.createElement(_rovoChat.default, {
104
- label: "Rovo",
105
- color: "var(--ds-icon-inverse, #FFFFFF)",
106
- size: "small"
107
- }))));
108
- }
109
- });
11
+ var testId = _ref.testId;
12
+ return /*#__PURE__*/_react.default.createElement("span", {
13
+ "data-testid": testId
14
+ }, /*#__PURE__*/_react.default.createElement(_rovoChat.default, {
15
+ label: "Rovo",
16
+ color: "var(--ds-icon-inverse, #FFFFFF)",
17
+ size: "small"
18
+ }));
110
19
  };
@@ -22,7 +22,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
22
22
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
23
23
  var PACKAGE_DATA = {
24
24
  packageName: "@atlaskit/smart-card",
25
- packageVersion: "43.31.9",
25
+ packageVersion: "43.32.0",
26
26
  componentName: 'linkUrl'
27
27
  };
28
28
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a117559ef83d4ec2bc759d06ad90af7a7ca326aacc551c36f5634750f9bf8bd
3
+ size 223769
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a117559ef83d4ec2bc759d06ad90af7a7ca326aacc551c36f5634750f9bf8bd
3
+ size 223769
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e57281cb358f1e4d45ffc78ba504439918d6e6dd5f02f0610c39baf8ee3e76d
3
+ size 224003
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e57281cb358f1e4d45ffc78ba504439918d6e6dd5f02f0610c39baf8ee3e76d
3
+ size 224003
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f901781bc91abcfbebc9356ffacbb30f381b6be368df26f3ea23b859c300c59f
3
+ size 8391
@@ -0,0 +1,42 @@
1
+ import { useMemo } from 'react';
2
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
3
+ import { getIsRovoChatEnabled } from '../../../utils/rovo';
4
+ import { getExtensionKey } from '../../helpers';
5
+ import { useSmartCardState } from '../../store';
6
+ import useRovoConfig from '../use-rovo-config';
7
+ const EXCLUDED_EXTENSION_KEYS = new Set(['figma-object-provider', 'google-object-provider']);
8
+ const NOT_ENABLED_RESULT = {
9
+ isEnabled: false
10
+ };
11
+
12
+ /**
13
+ * Returns whether the rovogrowth_640_inline_action_nudge experiment
14
+ * is enabled for the current user and link context.
15
+ *
16
+ * All eligibility criteria are consolidated here:
17
+ * 1. Rovo chat must be enabled for the tenant.
18
+ * 2. The extension key must not be excluded (Figma and Google links are excluded).
19
+ * 3. The experiment value must be true (via tmp-editor-statsig).
20
+ *
21
+ * The extension key is derived from the card store via the resolved URL,
22
+ * so callers don't need to thread it as a prop.
23
+ */
24
+ const useInlineActionNudgeExperiment = url => {
25
+ const rovoConfig = useRovoConfig();
26
+ const isRovoChatEnabled = getIsRovoChatEnabled(rovoConfig);
27
+ const cardState = useSmartCardState(url !== null && url !== void 0 ? url : '');
28
+ const extensionKey = getExtensionKey(cardState.details);
29
+ return useMemo(() => {
30
+ if (!isRovoChatEnabled) {
31
+ return NOT_ENABLED_RESULT;
32
+ }
33
+ if (extensionKey && EXCLUDED_EXTENSION_KEYS.has(extensionKey)) {
34
+ return NOT_ENABLED_RESULT;
35
+ }
36
+ const isEnabled = editorExperiment('rovogrowth_640_inline_action_nudge', true);
37
+ return {
38
+ isEnabled
39
+ };
40
+ }, [isRovoChatEnabled, extensionKey]);
41
+ };
42
+ export default useInlineActionNudgeExperiment;
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
2
2
  export const context = {
3
3
  componentName: 'smart-cards',
4
4
  packageName: "@atlaskit/smart-card",
5
- packageVersion: "43.31.9"
5
+ packageVersion: "43.32.0"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,9 +1,12 @@
1
1
  import React from 'react';
2
+ import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
3
+ import useInlineActionNudgeExperiment from '../../../state/hooks/use-inline-action-nudge-experiment';
2
4
  import { HoverCard } from '../../HoverCard';
5
+ import { RovoActionsButton } from '../common/rovo-actions-button';
3
6
  import { Frame } from '../Frame';
4
7
  import { IconAndTitleLayout } from '../IconAndTitleLayout';
5
8
  import { renderLozenge } from './renderLozenge';
6
- export function InlineCardResolvedViewFunctional({
9
+ export function InlineCardResolvedViewBase({
7
10
  id,
8
11
  title = '',
9
12
  isSelected,
@@ -46,4 +49,56 @@ export function InlineCardResolvedViewFunctional({
46
49
  actionOptions: actionOptions,
47
50
  hoverPreviewOptions: hoverPreviewOptions
48
51
  }, frame);
49
- }
52
+ }
53
+ export function InlineCardResolvedViewFunctionalWithRovoActionsButton({
54
+ id,
55
+ title = '',
56
+ isSelected,
57
+ isHovered,
58
+ onClick,
59
+ icon,
60
+ link,
61
+ testId = 'inline-card-resolved-view',
62
+ titleTextColor,
63
+ titlePrefix,
64
+ showHoverPreview = false,
65
+ hoverPreviewOptions,
66
+ actionOptions,
67
+ truncateInline,
68
+ type,
69
+ hideIconLoadingSkeleton,
70
+ lozenge
71
+ }) {
72
+ const {
73
+ isEnabled
74
+ } = useInlineActionNudgeExperiment(link);
75
+
76
+ // TODO https://hello.jira.atlassian.cloud/browse/NAVX-4436: fire analytics with cohort
77
+ const frame = /*#__PURE__*/React.createElement(Frame, {
78
+ testId: testId,
79
+ link: link,
80
+ isSelected: isSelected,
81
+ isHovered: isHovered,
82
+ onClick: onClick,
83
+ truncateInline: truncateInline
84
+ }, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
85
+ emoji: titlePrefix,
86
+ icon: icon,
87
+ title: title,
88
+ titleTextColor: titleTextColor,
89
+ type: type,
90
+ hideIconLoadingSkeleton: hideIconLoadingSkeleton
91
+ }), renderLozenge(lozenge), isEnabled && link && /*#__PURE__*/React.createElement(RovoActionsButton, {
92
+ testId: `${testId}-rovo-actions-button`
93
+ }));
94
+ if (!showHoverPreview || !link) {
95
+ return frame;
96
+ }
97
+ return /*#__PURE__*/React.createElement(HoverCard, {
98
+ id: id,
99
+ url: link,
100
+ actionOptions: actionOptions,
101
+ hoverPreviewOptions: hoverPreviewOptions
102
+ }, frame);
103
+ }
104
+ export const InlineCardResolvedViewFunctional = componentWithFG('rovogrowth-640-inline-action-nudge-fg', InlineCardResolvedViewFunctionalWithRovoActionsButton, InlineCardResolvedViewBase);
@@ -1,78 +1,13 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
- import _extends from "@babel/runtime/helpers/extends";
3
- import "./index.compiled.css";
4
- import { ax, ix } from "@compiled/react/runtime";
5
- import React, { useState } from 'react';
6
- import { useIntl } from 'react-intl-next';
7
- import { cx } from '@atlaskit/css';
1
+ import React from 'react';
8
2
  import RovoChatIcon from '@atlaskit/icon/core/rovo-chat';
9
- import Popup from '@atlaskit/popup';
10
- import { Box } from '@atlaskit/primitives/compiled';
11
- import { messages } from '../../../../messages';
12
- import AIPrism from '../../../common/ai-prism';
13
- import { ActionButton } from '../action-button';
14
- import { RovoPostAuthActionsModal } from '../rovo-post-auth-actions-modal';
15
- const styles = {
16
- wrapper: "_kqswh2mm _1e0c1o8l",
17
- expanded: "_kqswstnw _154iidpf _1xi2idpf _1e0c1nu9 _o5721q9c _1pbykb7n",
18
- expandedText: "_1reo15vq _18m915vq _v564hlhx _1e0c1o8l _p12fidpf _s7n4jp4b _o5721q9c",
19
- expandedTextVisible: "_p12fuuw1 _u5f31b66"
20
- };
21
3
  export const RovoActionsButton = ({
22
- onClick,
23
- testId,
24
- title = '',
25
- url = ''
4
+ testId
26
5
  }) => {
27
- const [isHovered, setIsHovered] = useState(false);
28
- const [isPopupOpen, setIsPopupOpen] = useState(false);
29
- const {
30
- formatMessage
31
- } = useIntl();
32
- const handleClick = e => {
33
- e.preventDefault();
34
- e.stopPropagation();
35
- setIsPopupOpen(prev => !prev);
36
- onClick === null || onClick === void 0 ? void 0 : onClick(e);
37
- };
38
- return /*#__PURE__*/React.createElement(Popup, {
39
- isOpen: isPopupOpen,
40
- onClose: () => setIsPopupOpen(false),
41
- placement: "right-start",
42
- content: () => /*#__PURE__*/React.createElement(AIPrism, {
43
- isVisible: true,
44
- isMoving: true,
45
- isGlowing: true
46
- }, /*#__PURE__*/React.createElement(RovoPostAuthActionsModal, {
47
- title: title,
48
- url: url,
49
- testId: testId && `${testId}-popup`
50
- })),
51
- trigger: triggerProps => /*#__PURE__*/React.createElement(Box, {
52
- xcss: styles.wrapper,
53
- onMouseEnter: () => setIsHovered(true),
54
- onMouseLeave: () => setIsHovered(false),
55
- onFocus: () => setIsHovered(true),
56
- onBlur: () => setIsHovered(false)
57
- }, /*#__PURE__*/React.createElement(ActionButton, _extends({
58
- onClick: handleClick,
59
- viewType: "action",
60
- testId: testId
61
- }, triggerProps), /*#__PURE__*/React.createElement(RovoChatIcon, {
62
- label: "Rovo",
63
- color: "var(--ds-icon-inverse, #FFFFFF)",
64
- size: "small"
65
- })), /*#__PURE__*/React.createElement(Box, {
66
- xcss: styles.expanded
67
- }, /*#__PURE__*/React.createElement(ActionButton, _extends({
68
- onClick: handleClick,
69
- viewType: "action"
70
- }, triggerProps), /*#__PURE__*/React.createElement(Box, {
71
- xcss: cx(styles.expandedText, isHovered && styles.expandedTextVisible)
72
- }, formatMessage(messages.rovo_actions_explore)), /*#__PURE__*/React.createElement(RovoChatIcon, {
73
- label: "Rovo",
74
- color: "var(--ds-icon-inverse, #FFFFFF)",
75
- size: "small"
76
- }))))
77
- });
6
+ return /*#__PURE__*/React.createElement("span", {
7
+ "data-testid": testId
8
+ }, /*#__PURE__*/React.createElement(RovoChatIcon, {
9
+ label: "Rovo",
10
+ color: "var(--ds-icon-inverse, #FFFFFF)",
11
+ size: "small"
12
+ }));
78
13
  };
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
12
12
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
13
13
  const PACKAGE_DATA = {
14
14
  packageName: "@atlaskit/smart-card",
15
- packageVersion: "43.31.9",
15
+ packageVersion: "43.32.0",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  const Anchor = withLinkClickedEvent('a');
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a117559ef83d4ec2bc759d06ad90af7a7ca326aacc551c36f5634750f9bf8bd
3
+ size 223769
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a117559ef83d4ec2bc759d06ad90af7a7ca326aacc551c36f5634750f9bf8bd
3
+ size 223769
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e57281cb358f1e4d45ffc78ba504439918d6e6dd5f02f0610c39baf8ee3e76d
3
+ size 224003
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e57281cb358f1e4d45ffc78ba504439918d6e6dd5f02f0610c39baf8ee3e76d
3
+ size 224003
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f901781bc91abcfbebc9356ffacbb30f381b6be368df26f3ea23b859c300c59f
3
+ size 8391
@@ -0,0 +1,42 @@
1
+ import { useMemo } from 'react';
2
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
3
+ import { getIsRovoChatEnabled } from '../../../utils/rovo';
4
+ import { getExtensionKey } from '../../helpers';
5
+ import { useSmartCardState } from '../../store';
6
+ import useRovoConfig from '../use-rovo-config';
7
+ var EXCLUDED_EXTENSION_KEYS = new Set(['figma-object-provider', 'google-object-provider']);
8
+ var NOT_ENABLED_RESULT = {
9
+ isEnabled: false
10
+ };
11
+
12
+ /**
13
+ * Returns whether the rovogrowth_640_inline_action_nudge experiment
14
+ * is enabled for the current user and link context.
15
+ *
16
+ * All eligibility criteria are consolidated here:
17
+ * 1. Rovo chat must be enabled for the tenant.
18
+ * 2. The extension key must not be excluded (Figma and Google links are excluded).
19
+ * 3. The experiment value must be true (via tmp-editor-statsig).
20
+ *
21
+ * The extension key is derived from the card store via the resolved URL,
22
+ * so callers don't need to thread it as a prop.
23
+ */
24
+ var useInlineActionNudgeExperiment = function useInlineActionNudgeExperiment(url) {
25
+ var rovoConfig = useRovoConfig();
26
+ var isRovoChatEnabled = getIsRovoChatEnabled(rovoConfig);
27
+ var cardState = useSmartCardState(url !== null && url !== void 0 ? url : '');
28
+ var extensionKey = getExtensionKey(cardState.details);
29
+ return useMemo(function () {
30
+ if (!isRovoChatEnabled) {
31
+ return NOT_ENABLED_RESULT;
32
+ }
33
+ if (extensionKey && EXCLUDED_EXTENSION_KEYS.has(extensionKey)) {
34
+ return NOT_ENABLED_RESULT;
35
+ }
36
+ var isEnabled = editorExperiment('rovogrowth_640_inline_action_nudge', true);
37
+ return {
38
+ isEnabled: isEnabled
39
+ };
40
+ }, [isRovoChatEnabled, extensionKey]);
41
+ };
42
+ export default useInlineActionNudgeExperiment;
@@ -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: "43.31.9"
7
+ packageVersion: "43.32.0"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,9 +1,12 @@
1
1
  import React from 'react';
2
+ import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
3
+ import useInlineActionNudgeExperiment from '../../../state/hooks/use-inline-action-nudge-experiment';
2
4
  import { HoverCard } from '../../HoverCard';
5
+ import { RovoActionsButton } from '../common/rovo-actions-button';
3
6
  import { Frame } from '../Frame';
4
7
  import { IconAndTitleLayout } from '../IconAndTitleLayout';
5
8
  import { renderLozenge } from './renderLozenge';
6
- export function InlineCardResolvedViewFunctional(_ref) {
9
+ export function InlineCardResolvedViewBase(_ref) {
7
10
  var id = _ref.id,
8
11
  _ref$title = _ref.title,
9
12
  title = _ref$title === void 0 ? '' : _ref$title,
@@ -48,4 +51,57 @@ export function InlineCardResolvedViewFunctional(_ref) {
48
51
  actionOptions: actionOptions,
49
52
  hoverPreviewOptions: hoverPreviewOptions
50
53
  }, frame);
51
- }
54
+ }
55
+ export function InlineCardResolvedViewFunctionalWithRovoActionsButton(_ref2) {
56
+ var id = _ref2.id,
57
+ _ref2$title = _ref2.title,
58
+ title = _ref2$title === void 0 ? '' : _ref2$title,
59
+ isSelected = _ref2.isSelected,
60
+ isHovered = _ref2.isHovered,
61
+ onClick = _ref2.onClick,
62
+ icon = _ref2.icon,
63
+ link = _ref2.link,
64
+ _ref2$testId = _ref2.testId,
65
+ testId = _ref2$testId === void 0 ? 'inline-card-resolved-view' : _ref2$testId,
66
+ titleTextColor = _ref2.titleTextColor,
67
+ titlePrefix = _ref2.titlePrefix,
68
+ _ref2$showHoverPrevie = _ref2.showHoverPreview,
69
+ showHoverPreview = _ref2$showHoverPrevie === void 0 ? false : _ref2$showHoverPrevie,
70
+ hoverPreviewOptions = _ref2.hoverPreviewOptions,
71
+ actionOptions = _ref2.actionOptions,
72
+ truncateInline = _ref2.truncateInline,
73
+ type = _ref2.type,
74
+ hideIconLoadingSkeleton = _ref2.hideIconLoadingSkeleton,
75
+ lozenge = _ref2.lozenge;
76
+ var _useInlineActionNudge = useInlineActionNudgeExperiment(link),
77
+ isEnabled = _useInlineActionNudge.isEnabled;
78
+
79
+ // TODO https://hello.jira.atlassian.cloud/browse/NAVX-4436: fire analytics with cohort
80
+ var frame = /*#__PURE__*/React.createElement(Frame, {
81
+ testId: testId,
82
+ link: link,
83
+ isSelected: isSelected,
84
+ isHovered: isHovered,
85
+ onClick: onClick,
86
+ truncateInline: truncateInline
87
+ }, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
88
+ emoji: titlePrefix,
89
+ icon: icon,
90
+ title: title,
91
+ titleTextColor: titleTextColor,
92
+ type: type,
93
+ hideIconLoadingSkeleton: hideIconLoadingSkeleton
94
+ }), renderLozenge(lozenge), isEnabled && link && /*#__PURE__*/React.createElement(RovoActionsButton, {
95
+ testId: "".concat(testId, "-rovo-actions-button")
96
+ }));
97
+ if (!showHoverPreview || !link) {
98
+ return frame;
99
+ }
100
+ return /*#__PURE__*/React.createElement(HoverCard, {
101
+ id: id,
102
+ url: link,
103
+ actionOptions: actionOptions,
104
+ hoverPreviewOptions: hoverPreviewOptions
105
+ }, frame);
106
+ }
107
+ export var InlineCardResolvedViewFunctional = componentWithFG('rovogrowth-640-inline-action-nudge-fg', InlineCardResolvedViewFunctionalWithRovoActionsButton, InlineCardResolvedViewBase);
@@ -1,101 +1,12 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
- import _extends from "@babel/runtime/helpers/extends";
3
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
- import "./index.compiled.css";
5
- import { ax, ix } from "@compiled/react/runtime";
6
- import React, { useState } from 'react';
7
- import { useIntl } from 'react-intl-next';
8
- import { cx } from '@atlaskit/css';
1
+ import React from 'react';
9
2
  import RovoChatIcon from '@atlaskit/icon/core/rovo-chat';
10
- import Popup from '@atlaskit/popup';
11
- import { Box } from '@atlaskit/primitives/compiled';
12
- import { messages } from '../../../../messages';
13
- import AIPrism from '../../../common/ai-prism';
14
- import { ActionButton } from '../action-button';
15
- import { RovoPostAuthActionsModal } from '../rovo-post-auth-actions-modal';
16
- var styles = {
17
- wrapper: "_kqswh2mm _1e0c1o8l",
18
- expanded: "_kqswstnw _154iidpf _1xi2idpf _1e0c1nu9 _o5721q9c _1pbykb7n",
19
- expandedText: "_1reo15vq _18m915vq _v564hlhx _1e0c1o8l _p12fidpf _s7n4jp4b _o5721q9c",
20
- expandedTextVisible: "_p12fuuw1 _u5f31b66"
21
- };
22
3
  export var RovoActionsButton = function RovoActionsButton(_ref) {
23
- var onClick = _ref.onClick,
24
- testId = _ref.testId,
25
- _ref$title = _ref.title,
26
- title = _ref$title === void 0 ? '' : _ref$title,
27
- _ref$url = _ref.url,
28
- url = _ref$url === void 0 ? '' : _ref$url;
29
- var _useState = useState(false),
30
- _useState2 = _slicedToArray(_useState, 2),
31
- isHovered = _useState2[0],
32
- setIsHovered = _useState2[1];
33
- var _useState3 = useState(false),
34
- _useState4 = _slicedToArray(_useState3, 2),
35
- isPopupOpen = _useState4[0],
36
- setIsPopupOpen = _useState4[1];
37
- var _useIntl = useIntl(),
38
- formatMessage = _useIntl.formatMessage;
39
- var handleClick = function handleClick(e) {
40
- e.preventDefault();
41
- e.stopPropagation();
42
- setIsPopupOpen(function (prev) {
43
- return !prev;
44
- });
45
- onClick === null || onClick === void 0 || onClick(e);
46
- };
47
- return /*#__PURE__*/React.createElement(Popup, {
48
- isOpen: isPopupOpen,
49
- onClose: function onClose() {
50
- return setIsPopupOpen(false);
51
- },
52
- placement: "right-start",
53
- content: function content() {
54
- return /*#__PURE__*/React.createElement(AIPrism, {
55
- isVisible: true,
56
- isMoving: true,
57
- isGlowing: true
58
- }, /*#__PURE__*/React.createElement(RovoPostAuthActionsModal, {
59
- title: title,
60
- url: url,
61
- testId: testId && "".concat(testId, "-popup")
62
- }));
63
- },
64
- trigger: function trigger(triggerProps) {
65
- return /*#__PURE__*/React.createElement(Box, {
66
- xcss: styles.wrapper,
67
- onMouseEnter: function onMouseEnter() {
68
- return setIsHovered(true);
69
- },
70
- onMouseLeave: function onMouseLeave() {
71
- return setIsHovered(false);
72
- },
73
- onFocus: function onFocus() {
74
- return setIsHovered(true);
75
- },
76
- onBlur: function onBlur() {
77
- return setIsHovered(false);
78
- }
79
- }, /*#__PURE__*/React.createElement(ActionButton, _extends({
80
- onClick: handleClick,
81
- viewType: "action",
82
- testId: testId
83
- }, triggerProps), /*#__PURE__*/React.createElement(RovoChatIcon, {
84
- label: "Rovo",
85
- color: "var(--ds-icon-inverse, #FFFFFF)",
86
- size: "small"
87
- })), /*#__PURE__*/React.createElement(Box, {
88
- xcss: styles.expanded
89
- }, /*#__PURE__*/React.createElement(ActionButton, _extends({
90
- onClick: handleClick,
91
- viewType: "action"
92
- }, triggerProps), /*#__PURE__*/React.createElement(Box, {
93
- xcss: cx(styles.expandedText, isHovered && styles.expandedTextVisible)
94
- }, formatMessage(messages.rovo_actions_explore)), /*#__PURE__*/React.createElement(RovoChatIcon, {
95
- label: "Rovo",
96
- color: "var(--ds-icon-inverse, #FFFFFF)",
97
- size: "small"
98
- }))));
99
- }
100
- });
4
+ var testId = _ref.testId;
5
+ return /*#__PURE__*/React.createElement("span", {
6
+ "data-testid": testId
7
+ }, /*#__PURE__*/React.createElement(RovoChatIcon, {
8
+ label: "Rovo",
9
+ color: "var(--ds-icon-inverse, #FFFFFF)",
10
+ size: "small"
11
+ }));
101
12
  };
@@ -15,7 +15,7 @@ import LinkWarningModal from './LinkWarningModal';
15
15
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
16
16
  var PACKAGE_DATA = {
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "43.31.9",
18
+ packageVersion: "43.32.0",
19
19
  componentName: 'linkUrl'
20
20
  };
21
21
  var Anchor = withLinkClickedEvent('a');
@@ -0,0 +1,21 @@
1
+ export interface InlineActionNudgeExperiment {
2
+ /**
3
+ * True when the user is in the treatment cohort and should see the
4
+ * inline action nudge UI. All treatment surfaces should gate on this.
5
+ */
6
+ isEnabled: boolean;
7
+ }
8
+ /**
9
+ * Returns whether the rovogrowth_640_inline_action_nudge experiment
10
+ * is enabled for the current user and link context.
11
+ *
12
+ * All eligibility criteria are consolidated here:
13
+ * 1. Rovo chat must be enabled for the tenant.
14
+ * 2. The extension key must not be excluded (Figma and Google links are excluded).
15
+ * 3. The experiment value must be true (via tmp-editor-statsig).
16
+ *
17
+ * The extension key is derived from the card store via the resolved URL,
18
+ * so callers don't need to thread it as a prop.
19
+ */
20
+ declare const useInlineActionNudgeExperiment: (url?: string) => InlineActionNudgeExperiment;
21
+ export default useInlineActionNudgeExperiment;
@@ -1,3 +1,5 @@
1
1
  import React from 'react';
2
2
  import { type InlineCardResolvedViewFunctionalProps } from './types';
3
- export declare function InlineCardResolvedViewFunctional({ id, title, isSelected, isHovered, onClick, icon, link, testId, titleTextColor, titlePrefix, showHoverPreview, hoverPreviewOptions, actionOptions, truncateInline, type, hideIconLoadingSkeleton, lozenge, }: InlineCardResolvedViewFunctionalProps): React.JSX.Element;
3
+ export declare function InlineCardResolvedViewBase({ id, title, isSelected, isHovered, onClick, icon, link, testId, titleTextColor, titlePrefix, showHoverPreview, hoverPreviewOptions, actionOptions, truncateInline, type, hideIconLoadingSkeleton, lozenge, }: InlineCardResolvedViewFunctionalProps): React.JSX.Element;
4
+ export declare function InlineCardResolvedViewFunctionalWithRovoActionsButton({ id, title, isSelected, isHovered, onClick, icon, link, testId, titleTextColor, titlePrefix, showHoverPreview, hoverPreviewOptions, actionOptions, truncateInline, type, hideIconLoadingSkeleton, lozenge, }: InlineCardResolvedViewFunctionalProps): React.JSX.Element;
5
+ export declare const InlineCardResolvedViewFunctional: React.FC<InlineCardResolvedViewFunctionalProps>;
@@ -1,12 +1,5 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
1
  import React from 'react';
6
2
  export interface RovoActionsButtonProps {
7
- onClick?: (e: React.MouseEvent<HTMLElement>) => void;
8
3
  testId?: string;
9
- title?: string;
10
- url?: string;
11
4
  }
12
- export declare const RovoActionsButton: ({ onClick, testId, title, url, }: RovoActionsButtonProps) => JSX.Element;
5
+ export declare const RovoActionsButton: ({ testId }: RovoActionsButtonProps) => React.JSX.Element;
@@ -0,0 +1,21 @@
1
+ export interface InlineActionNudgeExperiment {
2
+ /**
3
+ * True when the user is in the treatment cohort and should see the
4
+ * inline action nudge UI. All treatment surfaces should gate on this.
5
+ */
6
+ isEnabled: boolean;
7
+ }
8
+ /**
9
+ * Returns whether the rovogrowth_640_inline_action_nudge experiment
10
+ * is enabled for the current user and link context.
11
+ *
12
+ * All eligibility criteria are consolidated here:
13
+ * 1. Rovo chat must be enabled for the tenant.
14
+ * 2. The extension key must not be excluded (Figma and Google links are excluded).
15
+ * 3. The experiment value must be true (via tmp-editor-statsig).
16
+ *
17
+ * The extension key is derived from the card store via the resolved URL,
18
+ * so callers don't need to thread it as a prop.
19
+ */
20
+ declare const useInlineActionNudgeExperiment: (url?: string) => InlineActionNudgeExperiment;
21
+ export default useInlineActionNudgeExperiment;
@@ -1,3 +1,5 @@
1
1
  import React from 'react';
2
2
  import { type InlineCardResolvedViewFunctionalProps } from './types';
3
- export declare function InlineCardResolvedViewFunctional({ id, title, isSelected, isHovered, onClick, icon, link, testId, titleTextColor, titlePrefix, showHoverPreview, hoverPreviewOptions, actionOptions, truncateInline, type, hideIconLoadingSkeleton, lozenge, }: InlineCardResolvedViewFunctionalProps): React.JSX.Element;
3
+ export declare function InlineCardResolvedViewBase({ id, title, isSelected, isHovered, onClick, icon, link, testId, titleTextColor, titlePrefix, showHoverPreview, hoverPreviewOptions, actionOptions, truncateInline, type, hideIconLoadingSkeleton, lozenge, }: InlineCardResolvedViewFunctionalProps): React.JSX.Element;
4
+ export declare function InlineCardResolvedViewFunctionalWithRovoActionsButton({ id, title, isSelected, isHovered, onClick, icon, link, testId, titleTextColor, titlePrefix, showHoverPreview, hoverPreviewOptions, actionOptions, truncateInline, type, hideIconLoadingSkeleton, lozenge, }: InlineCardResolvedViewFunctionalProps): React.JSX.Element;
5
+ export declare const InlineCardResolvedViewFunctional: React.FC<InlineCardResolvedViewFunctionalProps>;
@@ -1,12 +1,5 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
1
  import React from 'react';
6
2
  export interface RovoActionsButtonProps {
7
- onClick?: (e: React.MouseEvent<HTMLElement>) => void;
8
3
  testId?: string;
9
- title?: string;
10
- url?: string;
11
4
  }
12
- export declare const RovoActionsButton: ({ onClick, testId, title, url, }: RovoActionsButtonProps) => JSX.Element;
5
+ export declare const RovoActionsButton: ({ testId }: RovoActionsButtonProps) => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "43.31.10",
3
+ "version": "43.32.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -72,9 +72,9 @@
72
72
  "@atlaskit/platform-feature-flags": "^1.1.0",
73
73
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
74
74
  "@atlaskit/popup": "^4.16.0",
75
- "@atlaskit/primitives": "^18.1.0",
76
- "@atlaskit/react-ufo": "^5.12.0",
77
- "@atlaskit/rovo-triggers": "^5.35.0",
75
+ "@atlaskit/primitives": "^19.0.0",
76
+ "@atlaskit/react-ufo": "^5.13.0",
77
+ "@atlaskit/rovo-triggers": "^5.37.0",
78
78
  "@atlaskit/section-message": "^8.12.0",
79
79
  "@atlaskit/select": "^21.10.0",
80
80
  "@atlaskit/spinner": "^19.1.0",
@@ -83,8 +83,8 @@
83
83
  "@atlaskit/textfield": "^8.3.0",
84
84
  "@atlaskit/theme": "^23.0.0",
85
85
  "@atlaskit/tile": "^1.0.0",
86
- "@atlaskit/tmp-editor-statsig": "^58.0.0",
87
- "@atlaskit/tokens": "^12.0.0",
86
+ "@atlaskit/tmp-editor-statsig": "^59.1.0",
87
+ "@atlaskit/tokens": "^13.0.0",
88
88
  "@atlaskit/tooltip": "^21.1.0",
89
89
  "@atlaskit/ufo": "^0.4.0",
90
90
  "@babel/runtime": "^7.0.0",
@@ -251,6 +251,9 @@
251
251
  },
252
252
  "smart-card-inline-resolved-view-refactor": {
253
253
  "type": "boolean"
254
+ },
255
+ "rovogrowth-640-inline-action-nudge-fg": {
256
+ "type": "boolean"
254
257
  }
255
258
  },
256
259
  "compassUnitTestMetricSourceId": "ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:metric-source/c5751cc6-3513-4070-9deb-af31e86aed34/f74ef1bc-7240-4aac-9dc8-9dc43b502089"
@@ -1,15 +0,0 @@
1
-
2
- ._v564hlhx{transition:max-width .3s ease-in-out,padding-right .3s ease-in-out}._154iidpf{top:0}
3
- ._18m915vq{overflow-y:hidden}
4
- ._1e0c1nu9{display:inline}
5
- ._1e0c1o8l{display:inline-block}
6
- ._1pbykb7n{z-index:1}
7
- ._1reo15vq{overflow-x:hidden}
8
- ._1xi2idpf{right:0}
9
- ._kqswh2mm{position:relative}
10
- ._kqswstnw{position:absolute}
11
- ._o5721q9c{white-space:nowrap}
12
- ._p12fidpf{max-width:0}
13
- ._p12fuuw1{max-width:200px}
14
- ._s7n4jp4b{vertical-align:top}
15
- ._u5f31b66{padding-right:var(--ds-space-050,4px)}
@@ -1,15 +0,0 @@
1
-
2
- ._v564hlhx{transition:max-width .3s ease-in-out,padding-right .3s ease-in-out}._154iidpf{top:0}
3
- ._18m915vq{overflow-y:hidden}
4
- ._1e0c1nu9{display:inline}
5
- ._1e0c1o8l{display:inline-block}
6
- ._1pbykb7n{z-index:1}
7
- ._1reo15vq{overflow-x:hidden}
8
- ._1xi2idpf{right:0}
9
- ._kqswh2mm{position:relative}
10
- ._kqswstnw{position:absolute}
11
- ._o5721q9c{white-space:nowrap}
12
- ._p12fidpf{max-width:0}
13
- ._p12fuuw1{max-width:200px}
14
- ._s7n4jp4b{vertical-align:top}
15
- ._u5f31b66{padding-right:var(--ds-space-050,4px)}
@@ -1,15 +0,0 @@
1
-
2
- ._v564hlhx{transition:max-width .3s ease-in-out,padding-right .3s ease-in-out}._154iidpf{top:0}
3
- ._18m915vq{overflow-y:hidden}
4
- ._1e0c1nu9{display:inline}
5
- ._1e0c1o8l{display:inline-block}
6
- ._1pbykb7n{z-index:1}
7
- ._1reo15vq{overflow-x:hidden}
8
- ._1xi2idpf{right:0}
9
- ._kqswh2mm{position:relative}
10
- ._kqswstnw{position:absolute}
11
- ._o5721q9c{white-space:nowrap}
12
- ._p12fidpf{max-width:0}
13
- ._p12fuuw1{max-width:200px}
14
- ._s7n4jp4b{vertical-align:top}
15
- ._u5f31b66{padding-right:var(--ds-space-050,4px)}