@atlaskit/rovo-triggers 5.33.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 +37 -0
- package/dist/cjs/main.js +6 -1
- package/dist/cjs/types.js +6 -1
- package/dist/es2019/main.js +6 -1
- package/dist/es2019/types.js +6 -1
- package/dist/esm/main.js +6 -1
- package/dist/esm/types.js +6 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types.d.ts +22 -2
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +22 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
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
|
+
|
|
28
|
+
## 5.34.0
|
|
29
|
+
|
|
30
|
+
### Minor Changes
|
|
31
|
+
|
|
32
|
+
- [`bb7cdf182433a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bb7cdf182433a) -
|
|
33
|
+
Added `SmartLinksContextPayload` type to rovo-triggers for publishing third-party Smart Card
|
|
34
|
+
connector context from host applications (e.g. Confluence) to Rovo Chat. This enables proactive
|
|
35
|
+
connector recommendation banners when a page contains unconnected 3P app links.
|
|
36
|
+
|
|
37
|
+
Updated conversation-assistant-store to subscribe to `smartlinks-context-payload` events and store
|
|
38
|
+
`pageSmartLinks` data for consumption by the chat UI.
|
|
39
|
+
|
|
3
40
|
## 5.33.0
|
|
4
41
|
|
|
5
42
|
### 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
|
@@ -51,4 +51,9 @@ var Topics = exports.Topics = {
|
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* Fired when a chart is added to an AVP dashboard from a Rovo generated chart
|
|
54
|
-
*/
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
// Not using PayloadCore because `data: type | undefined` is necessary
|
|
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
|
@@ -45,4 +45,9 @@ export const Topics = {
|
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* Fired when a chart is added to an AVP dashboard from a Rovo generated chart
|
|
48
|
-
*/
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
// Not using PayloadCore because `data: type | undefined` is necessary
|
|
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
|
@@ -45,4 +45,9 @@ export var Topics = {
|
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* Fired when a chart is added to an AVP dashboard from a Rovo generated chart
|
|
48
|
-
*/
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
// Not using PayloadCore because `data: type | undefined` is necessary
|
|
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/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { usePublish, useSubscribe, useSubscribeAll, Subscriber } from './main';
|
|
2
|
-
export type { Payload, Callback, Topic, WorkflowContextPayloadData, EditorContextPayloadData, WhiteboardContextPayloadData, SlidesContextPayloadData, BrowserContextPayloadData, DatabaseContextPayloadData, DatabaseContextUpdatePayloadData, DatabaseContextPayload, AddStatusRovoPayload, UpdateStatusRovoPayload, DeleteStatusRovoPayload, AddNewTransitionRovoPayload, UpdateTransitionRovoPayload, DeleteTransitionRovoPayload, DeleteTransitionRovoPayloadOld, AddRuleRovoPayload, UpdateRuleRovoPayload, DeleteRuleRovoPayload, JiraWorkflowWizardAction, DashboardInsightsActionsPayload, DashboardInsightsActionsPayloadData, OpenChatDebugModalPayload, OpenChatFeedbackModalPayload, SelectActionPayload, } from './types';
|
|
2
|
+
export type { Payload, Callback, Topic, WorkflowContextPayloadData, EditorContextPayloadData, WhiteboardContextPayloadData, SlidesContextPayloadData, BrowserContextPayloadData, DatabaseContextPayloadData, DatabaseContextUpdatePayloadData, DatabaseContextPayload, AddStatusRovoPayload, UpdateStatusRovoPayload, DeleteStatusRovoPayload, AddNewTransitionRovoPayload, UpdateTransitionRovoPayload, DeleteTransitionRovoPayload, DeleteTransitionRovoPayloadOld, AddRuleRovoPayload, UpdateRuleRovoPayload, DeleteRuleRovoPayload, JiraWorkflowWizardAction, DashboardInsightsActionsPayload, DashboardInsightsActionsPayloadData, OpenChatDebugModalPayload, OpenChatFeedbackModalPayload, SelectActionPayload, SmartLinksContextPayload, } from './types';
|
|
3
3
|
export type { SolutionArchitectHandoffPayload, AutomationHandoffPayload, AgentHandoffPayload, AppHandoffPayload, SolutionArchitectAgentActivationPayload, StudioAutomationBuildUpdatePayload, } from './common/types/solution-architect';
|
|
4
4
|
export type { JsmJourneyBuilderActionsPayload, JsmJourneyBuilderAgentAction, } from './common/types/jsm-journey-builder';
|
|
5
5
|
export { getRovoParams, updatePageRovoParams, addRovoParamsToUrl, assertOnlySpecificFieldsDefined, encodeRovoParams, getListOfRovoParams, } from './common/utils/params';
|
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>;
|
|
@@ -373,7 +373,27 @@ export type OpenChatDebugModalPayload = PayloadCore<'open-chat-debug-modal'>;
|
|
|
373
373
|
export type OpenChatFeedbackModalPayload = PayloadCore<'open-chat-feedback-modal', {
|
|
374
374
|
answerQuality: 'good' | 'bad' | 'general';
|
|
375
375
|
}>;
|
|
376
|
-
export type
|
|
376
|
+
export type SmartLinksContextPayload = PayloadCore<'smartlinks-context-payload'> & {
|
|
377
|
+
/** Never opens chat — internal signal only. */
|
|
378
|
+
openChat: false;
|
|
379
|
+
data?: Array<{
|
|
380
|
+
/**
|
|
381
|
+
* ORS auth key from meta.auth[0].key (e.g. 'gdrive', 'notion', 'miro').
|
|
382
|
+
* Matches the `serviceKey` query param in Knowledge API outboundAuthUrl,
|
|
383
|
+
* enabling the chat to cross-reference with Knowledge API without a mapping table.
|
|
384
|
+
*/
|
|
385
|
+
orsAuthKey: string;
|
|
386
|
+
/** Number of occurrences on the page — used for ranking in the banner. */
|
|
387
|
+
count: number;
|
|
388
|
+
}>;
|
|
389
|
+
};
|
|
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;
|
|
377
397
|
export type Callback = (payload: Payload) => void;
|
|
378
398
|
export type TopicEvents = {
|
|
379
399
|
[key in Topic]?: Array<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { usePublish, useSubscribe, useSubscribeAll, Subscriber } from './main';
|
|
2
|
-
export type { Payload, Callback, Topic, WorkflowContextPayloadData, EditorContextPayloadData, WhiteboardContextPayloadData, SlidesContextPayloadData, BrowserContextPayloadData, DatabaseContextPayloadData, DatabaseContextUpdatePayloadData, DatabaseContextPayload, AddStatusRovoPayload, UpdateStatusRovoPayload, DeleteStatusRovoPayload, AddNewTransitionRovoPayload, UpdateTransitionRovoPayload, DeleteTransitionRovoPayload, DeleteTransitionRovoPayloadOld, AddRuleRovoPayload, UpdateRuleRovoPayload, DeleteRuleRovoPayload, JiraWorkflowWizardAction, DashboardInsightsActionsPayload, DashboardInsightsActionsPayloadData, OpenChatDebugModalPayload, OpenChatFeedbackModalPayload, SelectActionPayload, } from './types';
|
|
2
|
+
export type { Payload, Callback, Topic, WorkflowContextPayloadData, EditorContextPayloadData, WhiteboardContextPayloadData, SlidesContextPayloadData, BrowserContextPayloadData, DatabaseContextPayloadData, DatabaseContextUpdatePayloadData, DatabaseContextPayload, AddStatusRovoPayload, UpdateStatusRovoPayload, DeleteStatusRovoPayload, AddNewTransitionRovoPayload, UpdateTransitionRovoPayload, DeleteTransitionRovoPayload, DeleteTransitionRovoPayloadOld, AddRuleRovoPayload, UpdateRuleRovoPayload, DeleteRuleRovoPayload, JiraWorkflowWizardAction, DashboardInsightsActionsPayload, DashboardInsightsActionsPayloadData, OpenChatDebugModalPayload, OpenChatFeedbackModalPayload, SelectActionPayload, SmartLinksContextPayload, } from './types';
|
|
3
3
|
export type { SolutionArchitectHandoffPayload, AutomationHandoffPayload, AgentHandoffPayload, AppHandoffPayload, SolutionArchitectAgentActivationPayload, StudioAutomationBuildUpdatePayload, } from './common/types/solution-architect';
|
|
4
4
|
export type { JsmJourneyBuilderActionsPayload, JsmJourneyBuilderAgentAction, } from './common/types/jsm-journey-builder';
|
|
5
5
|
export { getRovoParams, updatePageRovoParams, addRovoParamsToUrl, assertOnlySpecificFieldsDefined, encodeRovoParams, getListOfRovoParams, } from './common/utils/params';
|
|
@@ -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>;
|
|
@@ -373,7 +373,27 @@ export type OpenChatDebugModalPayload = PayloadCore<'open-chat-debug-modal'>;
|
|
|
373
373
|
export type OpenChatFeedbackModalPayload = PayloadCore<'open-chat-feedback-modal', {
|
|
374
374
|
answerQuality: 'good' | 'bad' | 'general';
|
|
375
375
|
}>;
|
|
376
|
-
export type
|
|
376
|
+
export type SmartLinksContextPayload = PayloadCore<'smartlinks-context-payload'> & {
|
|
377
|
+
/** Never opens chat — internal signal only. */
|
|
378
|
+
openChat: false;
|
|
379
|
+
data?: Array<{
|
|
380
|
+
/**
|
|
381
|
+
* ORS auth key from meta.auth[0].key (e.g. 'gdrive', 'notion', 'miro').
|
|
382
|
+
* Matches the `serviceKey` query param in Knowledge API outboundAuthUrl,
|
|
383
|
+
* enabling the chat to cross-reference with Knowledge API without a mapping table.
|
|
384
|
+
*/
|
|
385
|
+
orsAuthKey: string;
|
|
386
|
+
/** Number of occurrences on the page — used for ranking in the banner. */
|
|
387
|
+
count: number;
|
|
388
|
+
}>;
|
|
389
|
+
};
|
|
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;
|
|
377
397
|
export type Callback = (payload: Payload) => void;
|
|
378
398
|
export type TopicEvents = {
|
|
379
399
|
[key in Topic]?: Array<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/rovo-triggers",
|
|
3
|
-
"version": "5.
|
|
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",
|