@atlaskit/rovo-triggers 11.2.0 → 11.2.2

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,23 @@
1
1
  # @atlaskit/rovo-triggers
2
2
 
3
+ ## 11.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`d9f55e9a015c8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d9f55e9a015c8) -
8
+ Cleanup feature_gate `rovo_chat_replace_url_param_history`. `updatePageRovoParams` now always
9
+ replaces the current history entry when called with `historyMode: 'replace'`, which was the fully
10
+ rolled out behaviour behind the gate.
11
+ - Updated dependencies
12
+
13
+ ## 11.2.1
14
+
15
+ ### Patch Changes
16
+
17
+ - [`f401be7e92f87`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f401be7e92f87) -
18
+ [ux] Treat null UPDATE_TRANSITION link fields as absent so workflow builder cards do not crash
19
+ when `sprt_hix_9681_workflow_agent_edit_status` is on.
20
+
3
21
  ## 11.2.0
4
22
 
5
23
  ### Minor 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',
@@ -529,16 +529,16 @@ export type UpdateTransitionRovoPayload = {
529
529
  fromStatusId: StatusId;
530
530
  fromStatusName: string;
531
531
  fromStatusCategory: StatusCategory;
532
- }[];
533
- existingName?: string;
534
- existingToStatusId?: StatusId;
535
- existingToStatusName?: string;
536
- existingToStatusCategory?: StatusCategory;
532
+ }[] | null;
533
+ existingName?: string | null;
534
+ existingToStatusId?: StatusId | null;
535
+ existingToStatusName?: string | null;
536
+ existingToStatusCategory?: StatusCategory | null;
537
537
  existingLinks?: {
538
538
  fromStatusId: StatusId;
539
539
  fromStatusName: string;
540
540
  fromStatusCategory: StatusCategory;
541
- }[];
541
+ }[] | null;
542
542
  };
543
543
  export type DeleteTransitionRovoPayloadOld = {
544
544
  transitionId: TransitionId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-triggers",
3
- "version": "11.2.0",
3
+ "version": "11.2.2",
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.1.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
  }