@atlaskit/rovo-agent-components 3.27.1 → 3.29.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 +21 -0
- package/dist/cjs/ui/agent-profile-info/index.compiled.css +2 -4
- package/dist/cjs/ui/agent-profile-info/index.js +6 -9
- package/dist/cjs/ui/agent-verification-dropdown-item/index.js +24 -18
- package/dist/cjs/ui/agent-verified/agent-verified.stories.js +19 -3
- package/dist/cjs/ui/agent-verified/index.compiled.css +3 -0
- package/dist/cjs/ui/agent-verified/index.js +21 -7
- package/dist/es2019/ui/agent-profile-info/index.compiled.css +2 -4
- package/dist/es2019/ui/agent-profile-info/index.js +6 -9
- package/dist/es2019/ui/agent-verification-dropdown-item/index.js +24 -18
- package/dist/es2019/ui/agent-verified/agent-verified.stories.js +14 -2
- package/dist/es2019/ui/agent-verified/index.compiled.css +3 -0
- package/dist/es2019/ui/agent-verified/index.js +20 -5
- package/dist/esm/ui/agent-profile-info/index.compiled.css +2 -4
- package/dist/esm/ui/agent-profile-info/index.js +6 -9
- package/dist/esm/ui/agent-verification-dropdown-item/index.js +24 -18
- package/dist/esm/ui/agent-verified/agent-verified.stories.js +18 -2
- package/dist/esm/ui/agent-verified/index.compiled.css +3 -0
- package/dist/esm/ui/agent-verified/index.js +21 -7
- package/dist/types/ui/agent-verified/index.d.ts +8 -6
- package/dist/types-ts4.5/ui/agent-verified/index.d.ts +8 -6
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/rovo-agent-components
|
|
2
2
|
|
|
3
|
+
## 3.29.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`de588876854b6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/de588876854b6) -
|
|
8
|
+
Improved horizontal alignment of verified icon badge
|
|
9
|
+
|
|
10
|
+
## 3.28.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [`8ca108f4ddc19`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8ca108f4ddc19) -
|
|
15
|
+
Improved alignment of verified icon badge
|
|
16
|
+
- [`e93d0946c0929`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e93d0946c0929) -
|
|
17
|
+
Auto sort for export path for last remaining ai-mate packages. Part of de-barreling effort of
|
|
18
|
+
TREX-67
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 3.27.1
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
3
|
-
._1mouze3t{margin-block:var(--ds-space-0,0)}
|
|
2
|
+
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
3
|
+
._1mouze3t{margin-block:var(--ds-space-0,0)}._19pkv77o{margin-top:var(--ds-space-025,2px)}
|
|
4
4
|
._19pkze3t{margin-top:var(--ds-space-0,0)}
|
|
5
5
|
._1bah1yb4{justify-content:space-between}
|
|
6
|
-
._1e0c116y{display:inline-flex}
|
|
7
6
|
._1e0c1txw{display:flex}
|
|
8
7
|
._1i4qfg65{overflow-wrap:anywhere}
|
|
9
8
|
._1nmz1hna{word-break:break-word}
|
|
10
9
|
._4cvr1h6o{align-items:center}
|
|
11
10
|
._4cvr1y6m{align-items:flex-start}
|
|
12
|
-
._94n5v77o{bottom:var(--ds-space-025,2px)}
|
|
13
11
|
._kqswh2mm{position:relative}
|
|
14
12
|
._otyru2gc{margin-bottom:var(--ds-space-100,8px)}
|
|
@@ -26,9 +26,8 @@ var styles = {
|
|
|
26
26
|
description: "_19pkze3t _otyru2gc _1i4qfg65 _1nmz1hna",
|
|
27
27
|
descriptionRefresh: "_1mouze3t _1i4qfg65 _1nmz1hna",
|
|
28
28
|
wrapper: "_otyru2gc",
|
|
29
|
-
tooltipWrapper: "_195gu2gc _1e0c116y _kqswh2mm _94n5v77o",
|
|
30
29
|
headingWrapper: "_kqswh2mm",
|
|
31
|
-
|
|
30
|
+
hiddenIconWrapper: "_19pkv77o"
|
|
32
31
|
};
|
|
33
32
|
var getAgentCreator = exports.getAgentCreator = function getAgentCreator(_ref) {
|
|
34
33
|
var creatorType = _ref.creatorType,
|
|
@@ -165,21 +164,19 @@ var AgentProfileInfo = exports.AgentProfileInfo = function AgentProfileInfo(_ref
|
|
|
165
164
|
space: "space.100",
|
|
166
165
|
alignBlock: "center"
|
|
167
166
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
space: "space.075",
|
|
168
|
+
xcss: styles.headingWrapper
|
|
170
169
|
}, /*#__PURE__*/_react.default.createElement(_heading.default, {
|
|
171
170
|
as: "h2",
|
|
172
171
|
size: (0, _platformFeatureFlags.fg)('rovo_agent_empty_state_refresh') ? 'medium' : 'xlarge'
|
|
173
|
-
}, agentName), isHidden && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
174
|
-
xcss: styles.
|
|
172
|
+
}, agentName), headingRender, isHidden && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
173
|
+
xcss: styles.hiddenIconWrapper
|
|
175
174
|
}, /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
176
175
|
content: formatMessage(_messages.messages.hiddenTooltip),
|
|
177
176
|
position: "top"
|
|
178
177
|
}, /*#__PURE__*/_react.default.createElement(_hiddenIcon.HiddenIcon, {
|
|
179
178
|
label: formatMessage(_messages.messages.hiddenIcon)
|
|
180
|
-
}))),
|
|
181
|
-
xcss: styles.headingContentWrapper
|
|
182
|
-
}, headingRender)), showStarButton && /*#__PURE__*/_react.default.createElement(_starIconButton.StarIconButton, {
|
|
179
|
+
})))), showStarButton && /*#__PURE__*/_react.default.createElement(_starIconButton.StarIconButton, {
|
|
183
180
|
isStarred: isStarred,
|
|
184
181
|
handleToggle: onStarToggle
|
|
185
182
|
})), creatorRender, !!agentDescription && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
@@ -64,32 +64,38 @@ var AgentVerificationDropdownItem = exports.AgentVerificationDropdownItem = func
|
|
|
64
64
|
});
|
|
65
65
|
}, [formatMessage, showFlag]);
|
|
66
66
|
var handleUpdateVerification = (0, _react.useCallback)(function (verified) {
|
|
67
|
-
if (!agentId)
|
|
67
|
+
if (!agentId) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
68
70
|
onClick === null || onClick === void 0 || onClick();
|
|
69
71
|
commitUpdateVerification({
|
|
70
72
|
variables: {
|
|
71
73
|
id: agentId,
|
|
72
74
|
verified: verified
|
|
73
75
|
},
|
|
74
|
-
onCompleted: function onCompleted(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
onCompleted: function onCompleted(response) {
|
|
77
|
+
var payload = response === null || response === void 0 ? void 0 : response.agentStudio_updateAgentVerification;
|
|
78
|
+
if (payload !== null && payload !== void 0 && payload.success) {
|
|
79
|
+
trackAgentAction(verified ? _actions.AgentActions.VERIFY : _actions.AgentActions.UNVERIFY, {});
|
|
80
|
+
showFlag({
|
|
81
|
+
title: formatMessage(verified ? _messages.default.verifySuccessTitle : _messages.default.unverifySuccessTitle),
|
|
82
|
+
appearance: 'success',
|
|
83
|
+
isAutoDismiss: true,
|
|
84
|
+
icon: /*#__PURE__*/_react.default.createElement(_statusSuccess.default, {
|
|
85
|
+
spacing: "spacious",
|
|
86
|
+
label: ""
|
|
87
|
+
})
|
|
79
88
|
});
|
|
80
|
-
|
|
81
|
-
|
|
89
|
+
} else {
|
|
90
|
+
var _payload$errors;
|
|
91
|
+
var errorMessage = payload === null || payload === void 0 || (_payload$errors = payload.errors) === null || _payload$errors === void 0 || (_payload$errors = _payload$errors[0]) === null || _payload$errors === void 0 ? void 0 : _payload$errors.message;
|
|
92
|
+
if (errorMessage) {
|
|
93
|
+
trackAgentActionError(verified ? _actions.AgentActions.VERIFY : _actions.AgentActions.UNVERIFY, new Error(errorMessage), {
|
|
94
|
+
agentId: agentId
|
|
95
|
+
});
|
|
96
|
+
handleError(verified, errorMessage);
|
|
97
|
+
}
|
|
82
98
|
}
|
|
83
|
-
trackAgentAction(verified ? _actions.AgentActions.VERIFY : _actions.AgentActions.UNVERIFY, {});
|
|
84
|
-
showFlag({
|
|
85
|
-
title: formatMessage(verified ? _messages.default.verifySuccessTitle : _messages.default.unverifySuccessTitle),
|
|
86
|
-
appearance: 'success',
|
|
87
|
-
isAutoDismiss: true,
|
|
88
|
-
icon: /*#__PURE__*/_react.default.createElement(_statusSuccess.default, {
|
|
89
|
-
spacing: "spacious",
|
|
90
|
-
label: ""
|
|
91
|
-
})
|
|
92
|
-
});
|
|
93
99
|
},
|
|
94
100
|
onError: function onError(error) {
|
|
95
101
|
trackAgentActionError(verified ? _actions.AgentActions.VERIFY : _actions.AgentActions.UNVERIFY, error, {
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.default = exports.
|
|
7
|
+
exports.default = exports.TextLarge = exports.HeadingMedium = exports.HeadingLarge = exports.Default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactMagneticDi = require("react-magnetic-di");
|
|
10
10
|
var _reactRelay = require("react-relay");
|
|
@@ -26,11 +26,27 @@ var Default = exports.Default = {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
-
var
|
|
29
|
+
var TextLarge = exports.TextLarge = {
|
|
30
30
|
render: function render() {
|
|
31
31
|
return /*#__PURE__*/_react.default.createElement(_index.AgentVerified, {
|
|
32
32
|
agentRef: {},
|
|
33
|
-
|
|
33
|
+
adjacentTextSize: "textLarge"
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var HeadingMedium = exports.HeadingMedium = {
|
|
38
|
+
render: function render() {
|
|
39
|
+
return /*#__PURE__*/_react.default.createElement(_index.AgentVerified, {
|
|
40
|
+
agentRef: {},
|
|
41
|
+
adjacentTextSize: "headingMedium"
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var HeadingLarge = exports.HeadingLarge = {
|
|
46
|
+
render: function render() {
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_index.AgentVerified, {
|
|
48
|
+
agentRef: {},
|
|
49
|
+
adjacentTextSize: "headingLarge"
|
|
34
50
|
});
|
|
35
51
|
}
|
|
36
52
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -5,35 +6,48 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.AgentVerifiedIcon = exports.AgentVerified = void 0;
|
|
9
|
+
require("./index.compiled.css");
|
|
10
|
+
var _runtime = require("@compiled/react/runtime");
|
|
8
11
|
var _agentVerified_AtlaskitRovoAgentComponents2 = _interopRequireDefault(require("./__generated__/agentVerified_AtlaskitRovoAgentComponents.graphql"));
|
|
9
12
|
var _react = _interopRequireDefault(require("react"));
|
|
10
13
|
var _reactIntlNext = require("react-intl-next");
|
|
11
14
|
var _reactRelay = require("react-relay");
|
|
15
|
+
var _css = require("@atlaskit/css");
|
|
12
16
|
var _statusVerified = _interopRequireDefault(require("@atlaskit/icon/core/status-verified"));
|
|
17
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
13
18
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
14
19
|
var _messages = _interopRequireDefault(require("./messages"));
|
|
15
20
|
var AgentVerified = exports.AgentVerified = function AgentVerified(_ref) {
|
|
16
21
|
var agentRef = _ref.agentRef,
|
|
17
|
-
|
|
18
|
-
size = _ref$size === void 0 ? 'small' : _ref$size;
|
|
22
|
+
adjacentTextSize = _ref.adjacentTextSize;
|
|
19
23
|
var data = (0, _reactRelay.useFragment)(_agentVerified_AtlaskitRovoAgentComponents2.default, agentRef);
|
|
20
24
|
if (!(data !== null && data !== void 0 && data.isVerified)) {
|
|
21
25
|
return null;
|
|
22
26
|
}
|
|
23
27
|
return /*#__PURE__*/_react.default.createElement(AgentVerifiedIcon, {
|
|
24
|
-
|
|
28
|
+
adjacentTextSize: adjacentTextSize
|
|
25
29
|
});
|
|
26
30
|
};
|
|
31
|
+
var styles = {
|
|
32
|
+
body: "_4t3igktf",
|
|
33
|
+
textLarge: "_4t3i1tcg",
|
|
34
|
+
headingMedium: "_4t3i1tcg",
|
|
35
|
+
headingLarge: "_4t3i1f4h"
|
|
36
|
+
};
|
|
27
37
|
var AgentVerifiedIcon = exports.AgentVerifiedIcon = function AgentVerifiedIcon(_ref2) {
|
|
28
|
-
var _ref2$
|
|
29
|
-
|
|
38
|
+
var _ref2$adjacentTextSiz = _ref2.adjacentTextSize,
|
|
39
|
+
adjacentTextSize = _ref2$adjacentTextSiz === void 0 ? 'body' : _ref2$adjacentTextSiz;
|
|
30
40
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
31
41
|
formatMessage = _useIntl.formatMessage;
|
|
32
42
|
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
33
43
|
content: formatMessage(_messages.default.verifiedAgentTooltip)
|
|
44
|
+
}, /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
45
|
+
justifyContent: "center",
|
|
46
|
+
alignItems: "center",
|
|
47
|
+
xcss: (0, _css.cx)(adjacentTextSize === 'body' && styles['body'], adjacentTextSize === 'headingMedium' && styles['headingMedium'], adjacentTextSize === 'headingLarge' && styles['headingLarge'], adjacentTextSize === 'textLarge' && styles['textLarge'])
|
|
34
48
|
}, /*#__PURE__*/_react.default.createElement(_statusVerified.default, {
|
|
35
49
|
color: "var(--ds-icon-accent-blue, #357DE8)",
|
|
36
50
|
label: formatMessage(_messages.default.verifiedIconLabel),
|
|
37
|
-
size:
|
|
38
|
-
}));
|
|
51
|
+
size: "small"
|
|
52
|
+
})));
|
|
39
53
|
};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
3
|
-
._1mouze3t{margin-block:var(--ds-space-0,0)}
|
|
2
|
+
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
3
|
+
._1mouze3t{margin-block:var(--ds-space-0,0)}._19pkv77o{margin-top:var(--ds-space-025,2px)}
|
|
4
4
|
._19pkze3t{margin-top:var(--ds-space-0,0)}
|
|
5
5
|
._1bah1yb4{justify-content:space-between}
|
|
6
|
-
._1e0c116y{display:inline-flex}
|
|
7
6
|
._1e0c1txw{display:flex}
|
|
8
7
|
._1i4qfg65{overflow-wrap:anywhere}
|
|
9
8
|
._1nmz1hna{word-break:break-word}
|
|
10
9
|
._4cvr1h6o{align-items:center}
|
|
11
10
|
._4cvr1y6m{align-items:flex-start}
|
|
12
|
-
._94n5v77o{bottom:var(--ds-space-025,2px)}
|
|
13
11
|
._kqswh2mm{position:relative}
|
|
14
12
|
._otyru2gc{margin-bottom:var(--ds-space-100,8px)}
|
|
@@ -19,9 +19,8 @@ const styles = {
|
|
|
19
19
|
description: "_19pkze3t _otyru2gc _1i4qfg65 _1nmz1hna",
|
|
20
20
|
descriptionRefresh: "_1mouze3t _1i4qfg65 _1nmz1hna",
|
|
21
21
|
wrapper: "_otyru2gc",
|
|
22
|
-
tooltipWrapper: "_195gu2gc _1e0c116y _kqswh2mm _94n5v77o",
|
|
23
22
|
headingWrapper: "_kqswh2mm",
|
|
24
|
-
|
|
23
|
+
hiddenIconWrapper: "_19pkv77o"
|
|
25
24
|
};
|
|
26
25
|
export const getAgentCreator = ({
|
|
27
26
|
creatorType,
|
|
@@ -158,21 +157,19 @@ export const AgentProfileInfo = ({
|
|
|
158
157
|
space: "space.100",
|
|
159
158
|
alignBlock: "center"
|
|
160
159
|
}, /*#__PURE__*/React.createElement(Inline, {
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
space: "space.075",
|
|
161
|
+
xcss: styles.headingWrapper
|
|
163
162
|
}, /*#__PURE__*/React.createElement(Heading, {
|
|
164
163
|
as: "h2",
|
|
165
164
|
size: fg('rovo_agent_empty_state_refresh') ? 'medium' : 'xlarge'
|
|
166
|
-
}, agentName), isHidden && /*#__PURE__*/React.createElement(Box, {
|
|
167
|
-
xcss: styles.
|
|
165
|
+
}, agentName), headingRender, isHidden && /*#__PURE__*/React.createElement(Box, {
|
|
166
|
+
xcss: styles.hiddenIconWrapper
|
|
168
167
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
169
168
|
content: formatMessage(messages.hiddenTooltip),
|
|
170
169
|
position: "top"
|
|
171
170
|
}, /*#__PURE__*/React.createElement(HiddenIcon, {
|
|
172
171
|
label: formatMessage(messages.hiddenIcon)
|
|
173
|
-
}))),
|
|
174
|
-
xcss: styles.headingContentWrapper
|
|
175
|
-
}, headingRender)), showStarButton && /*#__PURE__*/React.createElement(StarIconButton, {
|
|
172
|
+
})))), showStarButton && /*#__PURE__*/React.createElement(StarIconButton, {
|
|
176
173
|
isStarred: isStarred,
|
|
177
174
|
handleToggle: onStarToggle
|
|
178
175
|
})), creatorRender, !!agentDescription && /*#__PURE__*/React.createElement(Box, {
|
|
@@ -56,32 +56,38 @@ export const AgentVerificationDropdownItem = ({
|
|
|
56
56
|
});
|
|
57
57
|
}, [formatMessage, showFlag]);
|
|
58
58
|
const handleUpdateVerification = useCallback(verified => {
|
|
59
|
-
if (!agentId)
|
|
59
|
+
if (!agentId) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
60
62
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
61
63
|
commitUpdateVerification({
|
|
62
64
|
variables: {
|
|
63
65
|
id: agentId,
|
|
64
66
|
verified
|
|
65
67
|
},
|
|
66
|
-
onCompleted:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
onCompleted: response => {
|
|
69
|
+
const payload = response === null || response === void 0 ? void 0 : response.agentStudio_updateAgentVerification;
|
|
70
|
+
if (payload !== null && payload !== void 0 && payload.success) {
|
|
71
|
+
trackAgentAction(verified ? AgentActions.VERIFY : AgentActions.UNVERIFY, {});
|
|
72
|
+
showFlag({
|
|
73
|
+
title: formatMessage(verified ? messages.verifySuccessTitle : messages.unverifySuccessTitle),
|
|
74
|
+
appearance: 'success',
|
|
75
|
+
isAutoDismiss: true,
|
|
76
|
+
icon: /*#__PURE__*/React.createElement(SuccessIcon, {
|
|
77
|
+
spacing: "spacious",
|
|
78
|
+
label: ""
|
|
79
|
+
})
|
|
71
80
|
});
|
|
72
|
-
|
|
73
|
-
|
|
81
|
+
} else {
|
|
82
|
+
var _payload$errors, _payload$errors$;
|
|
83
|
+
const errorMessage = payload === null || payload === void 0 ? void 0 : (_payload$errors = payload.errors) === null || _payload$errors === void 0 ? void 0 : (_payload$errors$ = _payload$errors[0]) === null || _payload$errors$ === void 0 ? void 0 : _payload$errors$.message;
|
|
84
|
+
if (errorMessage) {
|
|
85
|
+
trackAgentActionError(verified ? AgentActions.VERIFY : AgentActions.UNVERIFY, new Error(errorMessage), {
|
|
86
|
+
agentId
|
|
87
|
+
});
|
|
88
|
+
handleError(verified, errorMessage);
|
|
89
|
+
}
|
|
74
90
|
}
|
|
75
|
-
trackAgentAction(verified ? AgentActions.VERIFY : AgentActions.UNVERIFY, {});
|
|
76
|
-
showFlag({
|
|
77
|
-
title: formatMessage(verified ? messages.verifySuccessTitle : messages.unverifySuccessTitle),
|
|
78
|
-
appearance: 'success',
|
|
79
|
-
isAutoDismiss: true,
|
|
80
|
-
icon: /*#__PURE__*/React.createElement(SuccessIcon, {
|
|
81
|
-
spacing: "spacious",
|
|
82
|
-
label: ""
|
|
83
|
-
})
|
|
84
|
-
});
|
|
85
91
|
},
|
|
86
92
|
onError: error => {
|
|
87
93
|
trackAgentActionError(verified ? AgentActions.VERIFY : AgentActions.UNVERIFY, error, {
|
|
@@ -15,9 +15,21 @@ export const Default = {
|
|
|
15
15
|
agentRef: {}
|
|
16
16
|
})
|
|
17
17
|
};
|
|
18
|
-
export const
|
|
18
|
+
export const TextLarge = {
|
|
19
19
|
render: () => /*#__PURE__*/React.createElement(AgentVerified, {
|
|
20
20
|
agentRef: {},
|
|
21
|
-
|
|
21
|
+
adjacentTextSize: "textLarge"
|
|
22
|
+
})
|
|
23
|
+
};
|
|
24
|
+
export const HeadingMedium = {
|
|
25
|
+
render: () => /*#__PURE__*/React.createElement(AgentVerified, {
|
|
26
|
+
agentRef: {},
|
|
27
|
+
adjacentTextSize: "headingMedium"
|
|
28
|
+
})
|
|
29
|
+
};
|
|
30
|
+
export const HeadingLarge = {
|
|
31
|
+
render: () => /*#__PURE__*/React.createElement(AgentVerified, {
|
|
32
|
+
agentRef: {},
|
|
33
|
+
adjacentTextSize: "headingLarge"
|
|
22
34
|
})
|
|
23
35
|
};
|
|
@@ -1,33 +1,48 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
|
+
import "./index.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
1
4
|
import _agentVerified_AtlaskitRovoAgentComponents from "./__generated__/agentVerified_AtlaskitRovoAgentComponents.graphql";
|
|
2
5
|
import React from 'react';
|
|
3
6
|
import { useIntl } from 'react-intl-next';
|
|
4
7
|
import { graphql, useFragment } from 'react-relay';
|
|
8
|
+
import { cx } from '@atlaskit/css';
|
|
5
9
|
import VerifiedIcon from '@atlaskit/icon/core/status-verified';
|
|
10
|
+
import { Flex } from '@atlaskit/primitives/compiled';
|
|
6
11
|
import Tooltip from '@atlaskit/tooltip';
|
|
7
12
|
import messages from './messages';
|
|
8
13
|
export const AgentVerified = ({
|
|
9
14
|
agentRef,
|
|
10
|
-
|
|
15
|
+
adjacentTextSize
|
|
11
16
|
}) => {
|
|
12
17
|
const data = useFragment(_agentVerified_AtlaskitRovoAgentComponents, agentRef);
|
|
13
18
|
if (!(data !== null && data !== void 0 && data.isVerified)) {
|
|
14
19
|
return null;
|
|
15
20
|
}
|
|
16
21
|
return /*#__PURE__*/React.createElement(AgentVerifiedIcon, {
|
|
17
|
-
|
|
22
|
+
adjacentTextSize: adjacentTextSize
|
|
18
23
|
});
|
|
19
24
|
};
|
|
25
|
+
const styles = {
|
|
26
|
+
body: "_4t3igktf",
|
|
27
|
+
textLarge: "_4t3i1tcg",
|
|
28
|
+
headingMedium: "_4t3i1tcg",
|
|
29
|
+
headingLarge: "_4t3i1f4h"
|
|
30
|
+
};
|
|
20
31
|
export const AgentVerifiedIcon = ({
|
|
21
|
-
|
|
32
|
+
adjacentTextSize = 'body'
|
|
22
33
|
}) => {
|
|
23
34
|
const {
|
|
24
35
|
formatMessage
|
|
25
36
|
} = useIntl();
|
|
26
37
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
27
38
|
content: formatMessage(messages.verifiedAgentTooltip)
|
|
39
|
+
}, /*#__PURE__*/React.createElement(Flex, {
|
|
40
|
+
justifyContent: "center",
|
|
41
|
+
alignItems: "center",
|
|
42
|
+
xcss: cx(adjacentTextSize === 'body' && styles['body'], adjacentTextSize === 'headingMedium' && styles['headingMedium'], adjacentTextSize === 'headingLarge' && styles['headingLarge'], adjacentTextSize === 'textLarge' && styles['textLarge'])
|
|
28
43
|
}, /*#__PURE__*/React.createElement(VerifiedIcon, {
|
|
29
44
|
color: "var(--ds-icon-accent-blue, #357DE8)",
|
|
30
45
|
label: formatMessage(messages.verifiedIconLabel),
|
|
31
|
-
size:
|
|
32
|
-
}));
|
|
46
|
+
size: "small"
|
|
47
|
+
})));
|
|
33
48
|
};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
3
|
-
._1mouze3t{margin-block:var(--ds-space-0,0)}
|
|
2
|
+
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
3
|
+
._1mouze3t{margin-block:var(--ds-space-0,0)}._19pkv77o{margin-top:var(--ds-space-025,2px)}
|
|
4
4
|
._19pkze3t{margin-top:var(--ds-space-0,0)}
|
|
5
5
|
._1bah1yb4{justify-content:space-between}
|
|
6
|
-
._1e0c116y{display:inline-flex}
|
|
7
6
|
._1e0c1txw{display:flex}
|
|
8
7
|
._1i4qfg65{overflow-wrap:anywhere}
|
|
9
8
|
._1nmz1hna{word-break:break-word}
|
|
10
9
|
._4cvr1h6o{align-items:center}
|
|
11
10
|
._4cvr1y6m{align-items:flex-start}
|
|
12
|
-
._94n5v77o{bottom:var(--ds-space-025,2px)}
|
|
13
11
|
._kqswh2mm{position:relative}
|
|
14
12
|
._otyru2gc{margin-bottom:var(--ds-space-100,8px)}
|
|
@@ -19,9 +19,8 @@ var styles = {
|
|
|
19
19
|
description: "_19pkze3t _otyru2gc _1i4qfg65 _1nmz1hna",
|
|
20
20
|
descriptionRefresh: "_1mouze3t _1i4qfg65 _1nmz1hna",
|
|
21
21
|
wrapper: "_otyru2gc",
|
|
22
|
-
tooltipWrapper: "_195gu2gc _1e0c116y _kqswh2mm _94n5v77o",
|
|
23
22
|
headingWrapper: "_kqswh2mm",
|
|
24
|
-
|
|
23
|
+
hiddenIconWrapper: "_19pkv77o"
|
|
25
24
|
};
|
|
26
25
|
export var getAgentCreator = function getAgentCreator(_ref) {
|
|
27
26
|
var creatorType = _ref.creatorType,
|
|
@@ -158,21 +157,19 @@ export var AgentProfileInfo = function AgentProfileInfo(_ref3) {
|
|
|
158
157
|
space: "space.100",
|
|
159
158
|
alignBlock: "center"
|
|
160
159
|
}, /*#__PURE__*/React.createElement(Inline, {
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
space: "space.075",
|
|
161
|
+
xcss: styles.headingWrapper
|
|
163
162
|
}, /*#__PURE__*/React.createElement(Heading, {
|
|
164
163
|
as: "h2",
|
|
165
164
|
size: fg('rovo_agent_empty_state_refresh') ? 'medium' : 'xlarge'
|
|
166
|
-
}, agentName), isHidden && /*#__PURE__*/React.createElement(Box, {
|
|
167
|
-
xcss: styles.
|
|
165
|
+
}, agentName), headingRender, isHidden && /*#__PURE__*/React.createElement(Box, {
|
|
166
|
+
xcss: styles.hiddenIconWrapper
|
|
168
167
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
169
168
|
content: formatMessage(messages.hiddenTooltip),
|
|
170
169
|
position: "top"
|
|
171
170
|
}, /*#__PURE__*/React.createElement(HiddenIcon, {
|
|
172
171
|
label: formatMessage(messages.hiddenIcon)
|
|
173
|
-
}))),
|
|
174
|
-
xcss: styles.headingContentWrapper
|
|
175
|
-
}, headingRender)), showStarButton && /*#__PURE__*/React.createElement(StarIconButton, {
|
|
172
|
+
})))), showStarButton && /*#__PURE__*/React.createElement(StarIconButton, {
|
|
176
173
|
isStarred: isStarred,
|
|
177
174
|
handleToggle: onStarToggle
|
|
178
175
|
})), creatorRender, !!agentDescription && /*#__PURE__*/React.createElement(Box, {
|
|
@@ -55,32 +55,38 @@ export var AgentVerificationDropdownItem = function AgentVerificationDropdownIte
|
|
|
55
55
|
});
|
|
56
56
|
}, [formatMessage, showFlag]);
|
|
57
57
|
var handleUpdateVerification = useCallback(function (verified) {
|
|
58
|
-
if (!agentId)
|
|
58
|
+
if (!agentId) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
59
61
|
onClick === null || onClick === void 0 || onClick();
|
|
60
62
|
commitUpdateVerification({
|
|
61
63
|
variables: {
|
|
62
64
|
id: agentId,
|
|
63
65
|
verified: verified
|
|
64
66
|
},
|
|
65
|
-
onCompleted: function onCompleted(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
onCompleted: function onCompleted(response) {
|
|
68
|
+
var payload = response === null || response === void 0 ? void 0 : response.agentStudio_updateAgentVerification;
|
|
69
|
+
if (payload !== null && payload !== void 0 && payload.success) {
|
|
70
|
+
trackAgentAction(verified ? AgentActions.VERIFY : AgentActions.UNVERIFY, {});
|
|
71
|
+
showFlag({
|
|
72
|
+
title: formatMessage(verified ? messages.verifySuccessTitle : messages.unverifySuccessTitle),
|
|
73
|
+
appearance: 'success',
|
|
74
|
+
isAutoDismiss: true,
|
|
75
|
+
icon: /*#__PURE__*/React.createElement(SuccessIcon, {
|
|
76
|
+
spacing: "spacious",
|
|
77
|
+
label: ""
|
|
78
|
+
})
|
|
70
79
|
});
|
|
71
|
-
|
|
72
|
-
|
|
80
|
+
} else {
|
|
81
|
+
var _payload$errors;
|
|
82
|
+
var errorMessage = payload === null || payload === void 0 || (_payload$errors = payload.errors) === null || _payload$errors === void 0 || (_payload$errors = _payload$errors[0]) === null || _payload$errors === void 0 ? void 0 : _payload$errors.message;
|
|
83
|
+
if (errorMessage) {
|
|
84
|
+
trackAgentActionError(verified ? AgentActions.VERIFY : AgentActions.UNVERIFY, new Error(errorMessage), {
|
|
85
|
+
agentId: agentId
|
|
86
|
+
});
|
|
87
|
+
handleError(verified, errorMessage);
|
|
88
|
+
}
|
|
73
89
|
}
|
|
74
|
-
trackAgentAction(verified ? AgentActions.VERIFY : AgentActions.UNVERIFY, {});
|
|
75
|
-
showFlag({
|
|
76
|
-
title: formatMessage(verified ? messages.verifySuccessTitle : messages.unverifySuccessTitle),
|
|
77
|
-
appearance: 'success',
|
|
78
|
-
isAutoDismiss: true,
|
|
79
|
-
icon: /*#__PURE__*/React.createElement(SuccessIcon, {
|
|
80
|
-
spacing: "spacious",
|
|
81
|
-
label: ""
|
|
82
|
-
})
|
|
83
|
-
});
|
|
84
90
|
},
|
|
85
91
|
onError: function onError(error) {
|
|
86
92
|
trackAgentActionError(verified ? AgentActions.VERIFY : AgentActions.UNVERIFY, error, {
|
|
@@ -19,11 +19,27 @@ export var Default = {
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
export var
|
|
22
|
+
export var TextLarge = {
|
|
23
23
|
render: function render() {
|
|
24
24
|
return /*#__PURE__*/React.createElement(AgentVerified, {
|
|
25
25
|
agentRef: {},
|
|
26
|
-
|
|
26
|
+
adjacentTextSize: "textLarge"
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
export var HeadingMedium = {
|
|
31
|
+
render: function render() {
|
|
32
|
+
return /*#__PURE__*/React.createElement(AgentVerified, {
|
|
33
|
+
agentRef: {},
|
|
34
|
+
adjacentTextSize: "headingMedium"
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
export var HeadingLarge = {
|
|
39
|
+
render: function render() {
|
|
40
|
+
return /*#__PURE__*/React.createElement(AgentVerified, {
|
|
41
|
+
agentRef: {},
|
|
42
|
+
adjacentTextSize: "headingLarge"
|
|
27
43
|
});
|
|
28
44
|
}
|
|
29
45
|
};
|
|
@@ -1,32 +1,46 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
|
+
import "./index.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
1
4
|
import _agentVerified_AtlaskitRovoAgentComponents from "./__generated__/agentVerified_AtlaskitRovoAgentComponents.graphql";
|
|
2
5
|
import React from 'react';
|
|
3
6
|
import { useIntl } from 'react-intl-next';
|
|
4
7
|
import { graphql, useFragment } from 'react-relay';
|
|
8
|
+
import { cx } from '@atlaskit/css';
|
|
5
9
|
import VerifiedIcon from '@atlaskit/icon/core/status-verified';
|
|
10
|
+
import { Flex } from '@atlaskit/primitives/compiled';
|
|
6
11
|
import Tooltip from '@atlaskit/tooltip';
|
|
7
12
|
import messages from './messages';
|
|
8
13
|
export var AgentVerified = function AgentVerified(_ref) {
|
|
9
14
|
var agentRef = _ref.agentRef,
|
|
10
|
-
|
|
11
|
-
size = _ref$size === void 0 ? 'small' : _ref$size;
|
|
15
|
+
adjacentTextSize = _ref.adjacentTextSize;
|
|
12
16
|
var data = useFragment(_agentVerified_AtlaskitRovoAgentComponents, agentRef);
|
|
13
17
|
if (!(data !== null && data !== void 0 && data.isVerified)) {
|
|
14
18
|
return null;
|
|
15
19
|
}
|
|
16
20
|
return /*#__PURE__*/React.createElement(AgentVerifiedIcon, {
|
|
17
|
-
|
|
21
|
+
adjacentTextSize: adjacentTextSize
|
|
18
22
|
});
|
|
19
23
|
};
|
|
24
|
+
var styles = {
|
|
25
|
+
body: "_4t3igktf",
|
|
26
|
+
textLarge: "_4t3i1tcg",
|
|
27
|
+
headingMedium: "_4t3i1tcg",
|
|
28
|
+
headingLarge: "_4t3i1f4h"
|
|
29
|
+
};
|
|
20
30
|
export var AgentVerifiedIcon = function AgentVerifiedIcon(_ref2) {
|
|
21
|
-
var _ref2$
|
|
22
|
-
|
|
31
|
+
var _ref2$adjacentTextSiz = _ref2.adjacentTextSize,
|
|
32
|
+
adjacentTextSize = _ref2$adjacentTextSiz === void 0 ? 'body' : _ref2$adjacentTextSiz;
|
|
23
33
|
var _useIntl = useIntl(),
|
|
24
34
|
formatMessage = _useIntl.formatMessage;
|
|
25
35
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
26
36
|
content: formatMessage(messages.verifiedAgentTooltip)
|
|
37
|
+
}, /*#__PURE__*/React.createElement(Flex, {
|
|
38
|
+
justifyContent: "center",
|
|
39
|
+
alignItems: "center",
|
|
40
|
+
xcss: cx(adjacentTextSize === 'body' && styles['body'], adjacentTextSize === 'headingMedium' && styles['headingMedium'], adjacentTextSize === 'headingLarge' && styles['headingLarge'], adjacentTextSize === 'textLarge' && styles['textLarge'])
|
|
27
41
|
}, /*#__PURE__*/React.createElement(VerifiedIcon, {
|
|
28
42
|
color: "var(--ds-icon-accent-blue, #357DE8)",
|
|
29
43
|
label: formatMessage(messages.verifiedIconLabel),
|
|
30
|
-
size:
|
|
31
|
-
}));
|
|
44
|
+
size: "small"
|
|
45
|
+
})));
|
|
32
46
|
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { IconSize } from '@atlaskit/icon';
|
|
3
2
|
import type { agentVerified_AtlaskitRovoAgentComponents$key } from './__generated__/agentVerified_AtlaskitRovoAgentComponents.graphql';
|
|
4
|
-
export type AgentVerifiedProps = {
|
|
3
|
+
export type AgentVerifiedProps = AgentVerifiedIconProps & {
|
|
5
4
|
agentRef: agentVerified_AtlaskitRovoAgentComponents$key | null;
|
|
6
|
-
size?: IconSize;
|
|
7
5
|
};
|
|
8
|
-
export declare const AgentVerified: ({ agentRef,
|
|
6
|
+
export declare const AgentVerified: ({ agentRef, adjacentTextSize }: AgentVerifiedProps) => React.JSX.Element | null;
|
|
9
7
|
export type AgentVerifiedIconProps = {
|
|
10
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Height matches line-height of adjacent text for proper vertical alignment
|
|
10
|
+
* when inline content wraps to multiple lines.
|
|
11
|
+
*/
|
|
12
|
+
adjacentTextSize?: 'body' | 'textLarge' | 'headingMedium' | 'headingLarge';
|
|
11
13
|
};
|
|
12
|
-
export declare const AgentVerifiedIcon: ({
|
|
14
|
+
export declare const AgentVerifiedIcon: ({ adjacentTextSize }: AgentVerifiedIconProps) => React.JSX.Element;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { IconSize } from '@atlaskit/icon';
|
|
3
2
|
import type { agentVerified_AtlaskitRovoAgentComponents$key } from './__generated__/agentVerified_AtlaskitRovoAgentComponents.graphql';
|
|
4
|
-
export type AgentVerifiedProps = {
|
|
3
|
+
export type AgentVerifiedProps = AgentVerifiedIconProps & {
|
|
5
4
|
agentRef: agentVerified_AtlaskitRovoAgentComponents$key | null;
|
|
6
|
-
size?: IconSize;
|
|
7
5
|
};
|
|
8
|
-
export declare const AgentVerified: ({ agentRef,
|
|
6
|
+
export declare const AgentVerified: ({ agentRef, adjacentTextSize }: AgentVerifiedProps) => React.JSX.Element | null;
|
|
9
7
|
export type AgentVerifiedIconProps = {
|
|
10
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Height matches line-height of adjacent text for proper vertical alignment
|
|
10
|
+
* when inline content wraps to multiple lines.
|
|
11
|
+
*/
|
|
12
|
+
adjacentTextSize?: 'body' | 'textLarge' | 'headingMedium' | 'headingLarge';
|
|
11
13
|
};
|
|
12
|
-
export declare const AgentVerifiedIcon: ({
|
|
14
|
+
export declare const AgentVerifiedIcon: ({ adjacentTextSize }: AgentVerifiedIconProps) => React.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/rovo-agent-components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.29.0",
|
|
4
4
|
"description": "This package host public components related to rovo agents, the components here are needed for other public atlaskit packages",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@atlaskit/logo": "^19.10.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
47
47
|
"@atlaskit/primitives": "^18.0.0",
|
|
48
|
-
"@atlaskit/rovo-agent-analytics": "^0.
|
|
48
|
+
"@atlaskit/rovo-agent-analytics": "^0.10.0",
|
|
49
49
|
"@atlaskit/skeleton": "^2.1.0",
|
|
50
50
|
"@atlaskit/tokens": "^11.0.0",
|
|
51
51
|
"@atlaskit/tooltip": "^20.14.0",
|