@atlaskit/rovo-triggers 11.2.1 → 11.3.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 CHANGED
@@ -1,5 +1,27 @@
1
1
  # @atlaskit/rovo-triggers
2
2
 
3
+ ## 11.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`e01fbdcbce7be`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e01fbdcbce7be) -
8
+ Behind the finalized-destination gate, publish the existing Confluence finalized-content event
9
+ after resolution so consumers can receive the canonical destination.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 11.2.2
16
+
17
+ ### Patch Changes
18
+
19
+ - [`d9f55e9a015c8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d9f55e9a015c8) -
20
+ Cleanup feature_gate `rovo_chat_replace_url_param_history`. `updatePageRovoParams` now always
21
+ replaces the current history entry when called with `historyMode: 'replace'`, which was the fully
22
+ rolled out behaviour behind the gate.
23
+ - Updated dependencies
24
+
3
25
  ## 11.2.1
4
26
 
5
27
  ### Patch Changes
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.updatePageRovoParams = exports.removePrefix = exports.getRovoParams = exports.getListOfRovoParams = exports.firstCharUpper = exports.firstCharLower = exports.encodeRovoParams = exports.assertOnlySpecificFieldsDefined = exports.addRovoParamsToUrl = exports.addPrefix = void 0;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
- var _fg = require("@atlaskit/platform-feature-flags/fg");
11
10
  var _constants = require("./constants");
12
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; }
13
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; }
@@ -92,7 +91,7 @@ var updatePageRovoParams = exports.updatePageRovoParams = function updatePageRov
92
91
  _ref$historyMode = _ref.historyMode,
93
92
  historyMode = _ref$historyMode === void 0 ? 'push' : _ref$historyMode;
94
93
  var updatedUrl = addRovoParamsToUrl(window.location.pathname, params);
95
- if (historyMode === 'replace' && (0, _fg.fg)('rovo_chat_replace_url_param_history')) {
94
+ if (historyMode === 'replace') {
96
95
  window.history.replaceState({}, '', updatedUrl);
97
96
  return;
98
97
  }
@@ -1,4 +1,3 @@
1
- import { fg } from '@atlaskit/platform-feature-flags/fg';
2
1
  import { ROVO_PARAM_PREFIX, ROVO_VALID_PARAMS } from './constants';
3
2
  export const firstCharUpper = str => str.charAt(0).toUpperCase() + str.slice(1);
4
3
  export const firstCharLower = str => str.charAt(0).toLowerCase() + str.slice(1);
@@ -69,7 +68,7 @@ export const updatePageRovoParams = (params, {
69
68
  historyMode = 'push'
70
69
  } = {}) => {
71
70
  const updatedUrl = addRovoParamsToUrl(window.location.pathname, params);
72
- if (historyMode === 'replace' && fg('rovo_chat_replace_url_param_history')) {
71
+ if (historyMode === 'replace') {
73
72
  window.history.replaceState({}, '', updatedUrl);
74
73
  return;
75
74
  }
@@ -1,4 +1,5 @@
1
1
  /* eslint-disable @atlaskit/platform/one-value-export-per-file -- command callers cannot use hooks */
2
+
2
3
  import { useCallback, useEffect, useLayoutEffect, useRef } from 'react';
3
4
  const MAX_CONSUMED_EVENT_KEYS = 5000;
4
5
  const ignoredTriggerLatestEvents = new Set(['editor-context-payload', 'agent-changed',
@@ -2,7 +2,6 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  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
- import { fg } from '@atlaskit/platform-feature-flags/fg';
6
5
  import { ROVO_PARAM_PREFIX, ROVO_VALID_PARAMS } from './constants';
7
6
  export var firstCharUpper = function firstCharUpper(str) {
8
7
  return str.charAt(0).toUpperCase() + str.slice(1);
@@ -85,7 +84,7 @@ export var updatePageRovoParams = function updatePageRovoParams(params) {
85
84
  _ref$historyMode = _ref.historyMode,
86
85
  historyMode = _ref$historyMode === void 0 ? 'push' : _ref$historyMode;
87
86
  var updatedUrl = addRovoParamsToUrl(window.location.pathname, params);
88
- if (historyMode === 'replace' && fg('rovo_chat_replace_url_param_history')) {
87
+ if (historyMode === 'replace') {
89
88
  window.history.replaceState({}, '', updatedUrl);
90
89
  return;
91
90
  }
package/dist/esm/main.js CHANGED
@@ -5,6 +5,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
5
5
  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; }
6
6
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
7
7
  /* eslint-disable @atlaskit/platform/one-value-export-per-file -- command callers cannot use hooks */
8
+
8
9
  import { useCallback, useEffect, useLayoutEffect, useRef } from 'react';
9
10
  var MAX_CONSUMED_EVENT_KEYS = 5000;
10
11
  var ignoredTriggerLatestEvents = new Set(['editor-context-payload', 'agent-changed',
@@ -801,6 +801,14 @@ export type ConfluenceContentFinalizedPayload = PayloadCore<typeof CONFLUENCE_CO
801
801
  * Content ids are unique across sites, so subscribers match on this alone.
802
802
  */
803
803
  contentIds: string[];
804
+ /**
805
+ * The final destination returned after Convo AI resolves a finalized page.
806
+ * Present when the destination-ready finalized-content gate is enabled.
807
+ */
808
+ finalizedDestination?: {
809
+ baseUrl: string;
810
+ path: string;
811
+ };
804
812
  }> & {
805
813
  /** Never opens chat — internal signal only. */
806
814
  openChat: false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-triggers",
3
- "version": "11.2.1",
3
+ "version": "11.3.0",
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": {
@@ -33,9 +33,8 @@
33
33
  ],
34
34
  "atlaskit:src": "src/index.ts",
35
35
  "dependencies": {
36
- "@atlaskit/adf-schema": "^57.5.0",
36
+ "@atlaskit/adf-schema": "^57.6.0",
37
37
  "@atlaskit/platform-feature-experiments": "^0.3.0",
38
- "@atlaskit/platform-feature-flags": "^2.2.0",
39
38
  "@atlaskit/react-compiler-gating": "^0.2.0",
40
39
  "@babel/runtime": "^7.0.0",
41
40
  "bind-event-listener": "^3.0.0"
@@ -50,19 +49,13 @@
50
49
  "@atlaskit/primitives": "^22.5.0",
51
50
  "@atlaskit/ssr": "workspace:^",
52
51
  "@atlassian/a11y-jest-testing": "^0.17.0",
53
- "@atlassian/conversation-assistant-service-api": "^19.2.0",
52
+ "@atlassian/conversation-assistant-service-api": "^19.3.0",
54
53
  "@atlassian/experiment-test-utils": "^0.2.0",
55
- "@atlassian/feature-flags-test-utils": "^1.3.0",
56
54
  "@atlassian/testing-library": "^0.11.0",
57
55
  "@atlassian/workbench": "workspace:*",
58
56
  "@testing-library/react": "^16.3.0",
59
57
  "react": "^18.2.0",
60
58
  "react-dom": "^18.2.0",
61
59
  "wait-for-expect": "^1.2.0"
62
- },
63
- "platform-feature-flags": {
64
- "rovo_chat_replace_url_param_history": {
65
- "type": "boolean"
66
- }
67
60
  }
68
61
  }