@atlaskit/rovo-triggers 5.34.0 → 5.34.1
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 +25 -0
- package/dist/cjs/main.js +6 -1
- package/dist/cjs/types.js +3 -1
- package/dist/es2019/main.js +6 -1
- package/dist/es2019/types.js +3 -1
- package/dist/esm/main.js +6 -1
- package/dist/esm/types.js +3 -1
- package/dist/types/types.d.ts +10 -2
- package/dist/types-ts4.5/types.d.ts +10 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @atlaskit/rovo-triggers
|
|
2
2
|
|
|
3
|
+
## 5.34.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`5844c8aac60ea`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5844c8aac60ea) -
|
|
8
|
+
Added proactive connector recommendation banner to Rovo Chat for Confluence page view mode.
|
|
9
|
+
|
|
10
|
+
When a user adds a Confluence page as context in Rovo Chat, and that page contains Smart Links to
|
|
11
|
+
unconnected third-party apps (e.g. GitHub, Google Drive), a non-intrusive banner is shown inside
|
|
12
|
+
the context banner prompting the user to connect the relevant app.
|
|
13
|
+
|
|
14
|
+
Changes:
|
|
15
|
+
- `@confluence/content-smartlinks`: Added `RovoSmartLinksContextPublisher` — a subscription-driven
|
|
16
|
+
component that fetches SmartLink URLs via direct GraphQL (bypassing Apollo cache) and publishes
|
|
17
|
+
connector context. Scoped to view mode only; edit mode and Live page support deferred to
|
|
18
|
+
follow-up.
|
|
19
|
+
- `@atlaskit/rovo-triggers`: Added `SmartlinksSubscriptionChangedPayload` and
|
|
20
|
+
`SmartlinksContextPayload` types with `openChat: false` enforced to prevent chat from reopening.
|
|
21
|
+
- `@atlassian/conversation-assistant-store`: Added `pageSmartLinks` state, `setPageSmartLinks`
|
|
22
|
+
action, and `useChatContextPageSmartLinks` selector. `ChatContextSubscriber` now handles
|
|
23
|
+
`smartlinks-context-payload` events.
|
|
24
|
+
- `@atlassian/conversation-assistant-chat-prompt-input`: Added `useSmartLinkConnectionTip` hook
|
|
25
|
+
and `SmartLinkContextBanner` component. Banner renders inside the shared context banner wrapper
|
|
26
|
+
with CSS slide-in animation and uses `useAppOAuth` for the connect flow.
|
|
27
|
+
|
|
3
28
|
## 5.34.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
package/dist/cjs/main.js
CHANGED
|
@@ -10,7 +10,12 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
10
10
|
var _react = require("react");
|
|
11
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
-
var ignoredTriggerLatestEvents = new Set(['editor-context-payload', 'agent-changed'
|
|
13
|
+
var ignoredTriggerLatestEvents = new Set(['editor-context-payload', 'agent-changed',
|
|
14
|
+
// Internal signals that must never overwrite the publish queue — they would
|
|
15
|
+
// cause `triggerLatest` subscribers (e.g. PubSubListener) to replay them
|
|
16
|
+
// instead of the real action event (e.g. open-browse-agent-modal) that
|
|
17
|
+
// originally opened the chat.
|
|
18
|
+
'smartlinks-subscription-changed', 'smartlinks-context-payload']);
|
|
14
19
|
var createPubSub = function createPubSub() {
|
|
15
20
|
var subscribedEvents = {};
|
|
16
21
|
var publishQueue = {};
|
package/dist/cjs/types.js
CHANGED
|
@@ -54,4 +54,6 @@ var Topics = exports.Topics = {
|
|
|
54
54
|
*/
|
|
55
55
|
|
|
56
56
|
// Not using PayloadCore because `data: type | undefined` is necessary
|
|
57
|
-
// but `| undefined` will cause `data` to be removed by PayloadCore
|
|
57
|
+
// but `| undefined` will cause `data` to be removed by PayloadCore
|
|
58
|
+
|
|
59
|
+
/** Published by the consumer hook to notify the publisher whether it should fetch SmartLinks. */
|
package/dist/es2019/main.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { useCallback, useEffect, useLayoutEffect, useRef } from 'react';
|
|
2
|
-
const ignoredTriggerLatestEvents = new Set(['editor-context-payload', 'agent-changed'
|
|
2
|
+
const ignoredTriggerLatestEvents = new Set(['editor-context-payload', 'agent-changed',
|
|
3
|
+
// Internal signals that must never overwrite the publish queue — they would
|
|
4
|
+
// cause `triggerLatest` subscribers (e.g. PubSubListener) to replay them
|
|
5
|
+
// instead of the real action event (e.g. open-browse-agent-modal) that
|
|
6
|
+
// originally opened the chat.
|
|
7
|
+
'smartlinks-subscription-changed', 'smartlinks-context-payload']);
|
|
3
8
|
const createPubSub = () => {
|
|
4
9
|
let subscribedEvents = {};
|
|
5
10
|
let publishQueue = {};
|
package/dist/es2019/types.js
CHANGED
|
@@ -48,4 +48,6 @@ export const Topics = {
|
|
|
48
48
|
*/
|
|
49
49
|
|
|
50
50
|
// Not using PayloadCore because `data: type | undefined` is necessary
|
|
51
|
-
// but `| undefined` will cause `data` to be removed by PayloadCore
|
|
51
|
+
// but `| undefined` will cause `data` to be removed by PayloadCore
|
|
52
|
+
|
|
53
|
+
/** Published by the consumer hook to notify the publisher whether it should fetch SmartLinks. */
|
package/dist/esm/main.js
CHANGED
|
@@ -3,7 +3,12 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
import { useCallback, useEffect, useLayoutEffect, useRef } from 'react';
|
|
6
|
-
var ignoredTriggerLatestEvents = new Set(['editor-context-payload', 'agent-changed'
|
|
6
|
+
var ignoredTriggerLatestEvents = new Set(['editor-context-payload', 'agent-changed',
|
|
7
|
+
// Internal signals that must never overwrite the publish queue — they would
|
|
8
|
+
// cause `triggerLatest` subscribers (e.g. PubSubListener) to replay them
|
|
9
|
+
// instead of the real action event (e.g. open-browse-agent-modal) that
|
|
10
|
+
// originally opened the chat.
|
|
11
|
+
'smartlinks-subscription-changed', 'smartlinks-context-payload']);
|
|
7
12
|
var createPubSub = function createPubSub() {
|
|
8
13
|
var subscribedEvents = {};
|
|
9
14
|
var publishQueue = {};
|
package/dist/esm/types.js
CHANGED
|
@@ -48,4 +48,6 @@ export var Topics = {
|
|
|
48
48
|
*/
|
|
49
49
|
|
|
50
50
|
// Not using PayloadCore because `data: type | undefined` is necessary
|
|
51
|
-
// but `| undefined` will cause `data` to be removed by PayloadCore
|
|
51
|
+
// but `| undefined` will cause `data` to be removed by PayloadCore
|
|
52
|
+
|
|
53
|
+
/** Published by the consumer hook to notify the publisher whether it should fetch SmartLinks. */
|
package/dist/types/types.d.ts
CHANGED
|
@@ -95,8 +95,8 @@ export type EditorContextPayloadData = {
|
|
|
95
95
|
startIndex?: number;
|
|
96
96
|
endIndex?: number;
|
|
97
97
|
fragmentAdf?: string;
|
|
98
|
-
fullAdf?: any;
|
|
99
98
|
};
|
|
99
|
+
dynamicUiType?: string;
|
|
100
100
|
isViewMode?: boolean;
|
|
101
101
|
useGenericEditorSkill?: boolean;
|
|
102
102
|
additionalContext?: Record<string, unknown>;
|
|
@@ -374,6 +374,8 @@ export type OpenChatFeedbackModalPayload = PayloadCore<'open-chat-feedback-modal
|
|
|
374
374
|
answerQuality: 'good' | 'bad' | 'general';
|
|
375
375
|
}>;
|
|
376
376
|
export type SmartLinksContextPayload = PayloadCore<'smartlinks-context-payload'> & {
|
|
377
|
+
/** Never opens chat — internal signal only. */
|
|
378
|
+
openChat: false;
|
|
377
379
|
data?: Array<{
|
|
378
380
|
/**
|
|
379
381
|
* ORS auth key from meta.auth[0].key (e.g. 'gdrive', 'notion', 'miro').
|
|
@@ -385,7 +387,13 @@ export type SmartLinksContextPayload = PayloadCore<'smartlinks-context-payload'>
|
|
|
385
387
|
count: number;
|
|
386
388
|
}>;
|
|
387
389
|
};
|
|
388
|
-
|
|
390
|
+
/** Published by the consumer hook to notify the publisher whether it should fetch SmartLinks. */
|
|
391
|
+
export type SmartlinksSubscriptionChangedPayload = PayloadCore<'smartlinks-subscription-changed'> & {
|
|
392
|
+
/** Never opens chat — internal signal only. */
|
|
393
|
+
openChat: false;
|
|
394
|
+
isActive: boolean;
|
|
395
|
+
};
|
|
396
|
+
export type Payload = MessageSendPayload | ChatClosePayload | SmartCreationModalOpenPayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | SmartlinksSubscriptionChangedPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | WhiteboardContextPayload | JiraCreateContextPayload | DatabaseContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | DashboardInsightsActionsPayload | SetChatContextPayload | InsertUrlsPayload | SelectActionPayload | AddChartToDashboardPayload | GenericExternalActionErrorPayload | OpenChatDebugModalPayload | OpenChatFeedbackModalPayload | JsmJourneyBuilderActionsPayload | StudioAutomationBuildUpdatePayload | SolutionArchitectHandoffPayload | SolutionPlanStateUpdatePayload | SolutionDraftAgentUpdatePayload | SolutionArchitectAgentActivationPayload | UpdateAgentConfigurationPayload | StudioLandingPageRedirectPayload | UploadAndInsertMediaPayload | SmartLinksContextPayload;
|
|
389
397
|
export type Callback = (payload: Payload) => void;
|
|
390
398
|
export type TopicEvents = {
|
|
391
399
|
[key in Topic]?: Array<{
|
|
@@ -95,8 +95,8 @@ export type EditorContextPayloadData = {
|
|
|
95
95
|
startIndex?: number;
|
|
96
96
|
endIndex?: number;
|
|
97
97
|
fragmentAdf?: string;
|
|
98
|
-
fullAdf?: any;
|
|
99
98
|
};
|
|
99
|
+
dynamicUiType?: string;
|
|
100
100
|
isViewMode?: boolean;
|
|
101
101
|
useGenericEditorSkill?: boolean;
|
|
102
102
|
additionalContext?: Record<string, unknown>;
|
|
@@ -374,6 +374,8 @@ export type OpenChatFeedbackModalPayload = PayloadCore<'open-chat-feedback-modal
|
|
|
374
374
|
answerQuality: 'good' | 'bad' | 'general';
|
|
375
375
|
}>;
|
|
376
376
|
export type SmartLinksContextPayload = PayloadCore<'smartlinks-context-payload'> & {
|
|
377
|
+
/** Never opens chat — internal signal only. */
|
|
378
|
+
openChat: false;
|
|
377
379
|
data?: Array<{
|
|
378
380
|
/**
|
|
379
381
|
* ORS auth key from meta.auth[0].key (e.g. 'gdrive', 'notion', 'miro').
|
|
@@ -385,7 +387,13 @@ export type SmartLinksContextPayload = PayloadCore<'smartlinks-context-payload'>
|
|
|
385
387
|
count: number;
|
|
386
388
|
}>;
|
|
387
389
|
};
|
|
388
|
-
|
|
390
|
+
/** Published by the consumer hook to notify the publisher whether it should fetch SmartLinks. */
|
|
391
|
+
export type SmartlinksSubscriptionChangedPayload = PayloadCore<'smartlinks-subscription-changed'> & {
|
|
392
|
+
/** Never opens chat — internal signal only. */
|
|
393
|
+
openChat: false;
|
|
394
|
+
isActive: boolean;
|
|
395
|
+
};
|
|
396
|
+
export type Payload = MessageSendPayload | ChatClosePayload | SmartCreationModalOpenPayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | SmartlinksSubscriptionChangedPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | WhiteboardContextPayload | JiraCreateContextPayload | DatabaseContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | DashboardInsightsActionsPayload | SetChatContextPayload | InsertUrlsPayload | SelectActionPayload | AddChartToDashboardPayload | GenericExternalActionErrorPayload | OpenChatDebugModalPayload | OpenChatFeedbackModalPayload | JsmJourneyBuilderActionsPayload | StudioAutomationBuildUpdatePayload | SolutionArchitectHandoffPayload | SolutionPlanStateUpdatePayload | SolutionDraftAgentUpdatePayload | SolutionArchitectAgentActivationPayload | UpdateAgentConfigurationPayload | StudioLandingPageRedirectPayload | UploadAndInsertMediaPayload | SmartLinksContextPayload;
|
|
389
397
|
export type Callback = (payload: Payload) => void;
|
|
390
398
|
export type TopicEvents = {
|
|
391
399
|
[key in Topic]?: Array<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/rovo-triggers",
|
|
3
|
-
"version": "5.34.
|
|
3
|
+
"version": "5.34.1",
|
|
4
4
|
"description": "Provides various trigger events to drive Rovo Chat functionality, such as a publish-subscribe and URL parameter hooks",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@atlaskit/css": "^0.19.0",
|
|
44
44
|
"@atlaskit/primitives": "^18.1.0",
|
|
45
45
|
"@atlaskit/ssr": "workspace:^",
|
|
46
|
-
"@atlassian/a11y-jest-testing": "^0.
|
|
46
|
+
"@atlassian/a11y-jest-testing": "^0.11.0",
|
|
47
47
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
48
48
|
"@testing-library/react": "^16.3.0",
|
|
49
49
|
"react-dom": "^18.2.0",
|