@atlaskit/smart-card 43.6.0 → 43.6.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 43.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 43.6.0
4
10
 
5
11
  ### Minor Changes
package/dist/cjs/ssr.js CHANGED
@@ -18,11 +18,12 @@ var _component = require("./view/CardWithUrl/component");
18
18
  var _LoadingCardLink = require("./view/CardWithUrl/component-lazy/LoadingCardLink");
19
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
20
  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; }
21
- 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; }
21
+ 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; } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
22
22
  // SSR friendly version of smart-card
23
23
  // simplifies the logic around rendering and loading placeholders and
24
24
  // only contains whats necessary to render the card on SSR mode
25
25
  var CardSSR = exports.CardSSR = function CardSSR(props) {
26
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
26
27
  var _useState = (0, _react.useState)(function () {
27
28
  var _props$id;
28
29
  return (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : (0, _uuid.default)();
@@ -21,7 +21,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
21
21
  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; }
22
22
  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; }
23
23
  function _asyncIterator(r) { var n, t, o, e = 2; for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { if (t && null != (n = r[t])) return n.call(r); if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); t = "@@asyncIterator", o = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
24
- function AsyncFromSyncIterator(r) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var n = r.done; return Promise.resolve(r.value).then(function (r) { return { value: r, done: n }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { this.s = r, this.n = r.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, return: function _return(r) { var n = this.s.return; return void 0 === n ? Promise.resolve({ value: r, done: !0 }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); }, throw: function _throw(r) { var n = this.s.return; return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(r); }
24
+ function AsyncFromSyncIterator(r) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var n = r.done; return Promise.resolve(r.value).then(function (r) { return { value: r, done: n }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { this.s = r, this.n = r.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, return: function _return(r) { var n = this.s.return; return void 0 === n ? Promise.resolve({ value: r, done: !0 }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); }, throw: function _throw(r) { var n = this.s.return; return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(r); } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
25
25
  var CONVO_AI_ENDPOINT = 'assist/api/ai/v2/ai-feature/smartlinksummary/stream';
26
26
  var AISummaryService = exports.AISummaryService = /*#__PURE__*/function () {
27
27
  function AISummaryService(props) {
@@ -117,6 +117,8 @@ var AISummaryService = exports.AISummaryService = /*#__PURE__*/function () {
117
117
  _subscriber = _step2.value;
118
118
  _subscriber(this.state);
119
119
  }
120
+
121
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
120
122
  } catch (err) {
121
123
  _iterator2.e(err);
122
124
  } finally {
@@ -14,6 +14,8 @@ var _useAnalyticsEvents2 = require("../../../common/analytics/generated/use-anal
14
14
  var measure = _interopRequireWildcard(require("../../../utils/performance"));
15
15
  var _analytics = require("../../analytics");
16
16
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
17
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
18
+
17
19
  var ACTION_EXPERIENCE_NAME = 'smart-link-action-invocation';
18
20
 
19
21
  /**
@@ -31,6 +33,7 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
31
33
  while (1) switch (_context.prev = _context.next) {
32
34
  case 0:
33
35
  actionSubjectId = _ref2.actionSubjectId, actionType = _ref2.actionType, actionFn = _ref2.actionFn, _ref2$definitionId = _ref2.definitionId, definitionId = _ref2$definitionId === void 0 ? null : _ref2$definitionId, extensionKey = _ref2.extensionKey, display = _ref2.display, id = _ref2.id, _ref2$resourceType = _ref2.resourceType, resourceType = _ref2$resourceType === void 0 ? null : _ref2$resourceType;
36
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
34
37
  experienceId = (0, _uuid.default)(); // Begin performance instrumentation.
35
38
  markName = "".concat(experienceId, "-").concat(actionType);
36
39
  measure.mark(markName, 'pending');
@@ -16,8 +16,11 @@ var _helpers = require("../../helpers");
16
16
  var _store = require("../../store");
17
17
  var _useScheduledRegister = require("./useScheduledRegister");
18
18
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
19
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
20
+
19
21
  var useResolveHyperlink = function useResolveHyperlink(_ref) {
20
22
  var href = _ref.href;
23
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
21
24
  var _useState = (0, _react.useState)(function () {
22
25
  return (0, _uuid.default)();
23
26
  }),
@@ -20,13 +20,14 @@ var _useInvokeClientAction = _interopRequireDefault(require("../hooks/use-invoke
20
20
  var _useResolve = _interopRequireDefault(require("../hooks/use-resolve"));
21
21
  var _store = require("../store");
22
22
  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; }
23
- 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; }
23
+ 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; } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
24
24
  function useSmartLinkActions(_ref) {
25
25
  var url = _ref.url,
26
26
  appearance = _ref.appearance,
27
27
  origin = _ref.origin,
28
28
  actionOptions = _ref.actionOptions,
29
29
  prefetch = _ref.prefetch;
30
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
30
31
  var id = (0, _react.useMemo)(function () {
31
32
  return (0, _uuid.default)();
32
33
  }, []);
@@ -8,6 +8,8 @@ exports.useSmartLinkReload = useSmartLinkReload;
8
8
  var _react = require("react");
9
9
  var _uuid = _interopRequireDefault(require("uuid"));
10
10
  var _actions = require("../actions");
11
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
12
+
11
13
  /**
12
14
  * Exposes a programmatic way to reload the data being used to render a Smart Link.
13
15
  * @param
@@ -15,6 +17,7 @@ var _actions = require("../actions");
15
17
  */
16
18
  function useSmartLinkReload(_ref) {
17
19
  var url = _ref.url;
20
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
18
21
  var id = (0, _react.useMemo)(function () {
19
22
  return (0, _uuid.default)();
20
23
  }, []);
@@ -22,7 +22,7 @@ var _performance = require("../../utils/performance");
22
22
  var _LoadingCardLink = require("./component-lazy/LoadingCardLink");
23
23
  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; }
24
24
  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; }
25
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
25
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
26
26
  var LazyCardWithUrlContent = exports.LazyCardWithUrlContent = /*#__PURE__*/(0, _react.lazy)(function () {
27
27
  return (0, _utils.importWithRetry)(function () {
28
28
  return Promise.resolve().then(function () {
@@ -31,6 +31,7 @@ var LazyCardWithUrlContent = exports.LazyCardWithUrlContent = /*#__PURE__*/(0, _
31
31
  });
32
32
  });
33
33
  function CardWithURLRenderer(props) {
34
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
34
35
  var _useState = (0, _react.useState)(function () {
35
36
  return props.id ? props.id : (0, _uuid.default)();
36
37
  }),
@@ -1,5 +1,6 @@
1
1
  import React, { useState } from 'react';
2
2
  import { ErrorBoundary } from 'react-error-boundary';
3
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
3
4
  import uuid from 'uuid';
4
5
  import { AnalyticsContext } from '@atlaskit/analytics-next';
5
6
  import { fg } from '@atlaskit/platform-feature-flags';
@@ -10,6 +11,7 @@ import { LoadingCardLink } from './view/CardWithUrl/component-lazy/LoadingCardLi
10
11
  // simplifies the logic around rendering and loading placeholders and
11
12
  // only contains whats necessary to render the card on SSR mode
12
13
  export const CardSSR = props => {
14
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
13
15
  const [id] = useState(() => {
14
16
  var _props$id;
15
17
  return (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : uuid();
@@ -1,4 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
2
3
  import uuid from 'uuid';
3
4
  import { getBaseUrl } from '@atlaskit/linking-common';
4
5
  import { readStream } from './readStream';
@@ -74,6 +75,8 @@ export class AISummaryService {
74
75
  for (const subscriber of this.subscribedStateSetters) {
75
76
  subscriber(this.state);
76
77
  }
78
+
79
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
77
80
  const id = uuid();
78
81
  try {
79
82
  var _this$onStart, _this$onSuccess;
@@ -1,4 +1,6 @@
1
1
  import { useCallback } from 'react';
2
+
3
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
2
4
  import uuid from 'uuid';
3
5
  import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
4
6
  import * as measure from '../../../utils/performance';
@@ -25,6 +27,7 @@ const useInvokeClientAction = ({
25
27
  id,
26
28
  resourceType = null
27
29
  }) => {
30
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
28
31
  const experienceId = uuid();
29
32
 
30
33
  // Begin performance instrumentation.
@@ -1,4 +1,6 @@
1
1
  import { useEffect, useState } from 'react';
2
+
3
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
2
4
  import uuid from 'uuid';
3
5
  import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
4
6
  import * as measure from '../../../utils/performance';
@@ -9,6 +11,7 @@ import { useScheduledRegister } from './useScheduledRegister';
9
11
  const useResolveHyperlink = ({
10
12
  href
11
13
  }) => {
14
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
12
15
  const [id] = useState(() => uuid());
13
16
  const state = useSmartCardState(href);
14
17
  const definitionId = getDefinitionId(state.details);
@@ -1,4 +1,6 @@
1
1
  import { useMemo } from 'react';
2
+
3
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
2
4
  import uuid from 'uuid';
3
5
  import { useSmartLinkContext } from '@atlaskit/link-provider';
4
6
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -18,6 +20,7 @@ export function useSmartLinkActions({
18
20
  actionOptions,
19
21
  prefetch
20
22
  }) {
23
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
21
24
  const id = useMemo(() => uuid(), []);
22
25
  const linkState = useLinkState(url);
23
26
  const {
@@ -1,4 +1,6 @@
1
1
  import { useMemo } from 'react';
2
+
3
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
2
4
  import uuid from 'uuid';
3
5
  import { useSmartCardActions as useLinkActions } from '../actions';
4
6
  /**
@@ -9,6 +11,7 @@ import { useSmartCardActions as useLinkActions } from '../actions';
9
11
  export function useSmartLinkReload({
10
12
  url
11
13
  }) {
14
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
12
15
  const id = useMemo(() => uuid(), []);
13
16
  const linkActions = useLinkActions(id, url);
14
17
  return linkActions.reload;
@@ -1,6 +1,7 @@
1
1
  import React, { lazy, Suspense, useCallback, useEffect, useState } from 'react';
2
2
  import { ErrorBoundary } from 'react-error-boundary';
3
3
  import { di } from 'react-magnetic-di';
4
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
4
5
  import uuid from 'uuid';
5
6
  import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
6
7
  import { failUfoExperience, startUfoExperience } from '../../state/analytics';
@@ -11,6 +12,7 @@ import { clearMarks, clearMeasures } from '../../utils/performance';
11
12
  import { LoadingCardLink } from './component-lazy/LoadingCardLink';
12
13
  export const LazyCardWithUrlContent = /*#__PURE__*/lazy(() => importWithRetry(() => import( /* webpackChunkName: "@atlaskit-internal_smartcard-urlcardcontent" */'./component-lazy/index')));
13
14
  export function CardWithURLRenderer(props) {
15
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
14
16
  const [id] = useState(() => props.id ? props.id : uuid());
15
17
  const {
16
18
  fireEvent
package/dist/esm/ssr.js CHANGED
@@ -4,6 +4,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
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 React, { useState } from 'react';
6
6
  import { ErrorBoundary } from 'react-error-boundary';
7
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
7
8
  import uuid from 'uuid';
8
9
  import { AnalyticsContext } from '@atlaskit/analytics-next';
9
10
  import { fg } from '@atlaskit/platform-feature-flags';
@@ -14,6 +15,7 @@ import { LoadingCardLink } from './view/CardWithUrl/component-lazy/LoadingCardLi
14
15
  // simplifies the logic around rendering and loading placeholders and
15
16
  // only contains whats necessary to render the card on SSR mode
16
17
  export var CardSSR = function CardSSR(props) {
18
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
17
19
  var _useState = useState(function () {
18
20
  var _props$id;
19
21
  return (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : uuid();
@@ -10,6 +10,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
10
10
  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; }
11
11
  function _asyncIterator(r) { var n, t, o, e = 2; for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { if (t && null != (n = r[t])) return n.call(r); if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); t = "@@asyncIterator", o = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
12
12
  function AsyncFromSyncIterator(r) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var n = r.done; return Promise.resolve(r.value).then(function (r) { return { value: r, done: n }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { this.s = r, this.n = r.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, return: function _return(r) { var n = this.s.return; return void 0 === n ? Promise.resolve({ value: r, done: !0 }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); }, throw: function _throw(r) { var n = this.s.return; return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(r); }
13
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
13
14
  import uuid from 'uuid';
14
15
  import { getBaseUrl } from '@atlaskit/linking-common';
15
16
  import { readStream } from './readStream';
@@ -110,6 +111,8 @@ export var AISummaryService = /*#__PURE__*/function () {
110
111
  _subscriber = _step2.value;
111
112
  _subscriber(this.state);
112
113
  }
114
+
115
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
113
116
  } catch (err) {
114
117
  _iterator2.e(err);
115
118
  } finally {
@@ -1,6 +1,8 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  import { useCallback } from 'react';
4
+
5
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
4
6
  import uuid from 'uuid';
5
7
  import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
6
8
  import * as measure from '../../../utils/performance';
@@ -22,6 +24,7 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
22
24
  while (1) switch (_context.prev = _context.next) {
23
25
  case 0:
24
26
  actionSubjectId = _ref2.actionSubjectId, actionType = _ref2.actionType, actionFn = _ref2.actionFn, _ref2$definitionId = _ref2.definitionId, definitionId = _ref2$definitionId === void 0 ? null : _ref2$definitionId, extensionKey = _ref2.extensionKey, display = _ref2.display, id = _ref2.id, _ref2$resourceType = _ref2.resourceType, resourceType = _ref2$resourceType === void 0 ? null : _ref2$resourceType;
27
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
25
28
  experienceId = uuid(); // Begin performance instrumentation.
26
29
  markName = "".concat(experienceId, "-").concat(actionType);
27
30
  measure.mark(markName, 'pending');
@@ -1,5 +1,7 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import { useEffect, useState } from 'react';
3
+
4
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
3
5
  import uuid from 'uuid';
4
6
  import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
5
7
  import * as measure from '../../../utils/performance';
@@ -9,6 +11,7 @@ import { useSmartCardState } from '../../store';
9
11
  import { useScheduledRegister } from './useScheduledRegister';
10
12
  var useResolveHyperlink = function useResolveHyperlink(_ref) {
11
13
  var href = _ref.href;
14
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
12
15
  var _useState = useState(function () {
13
16
  return uuid();
14
17
  }),
@@ -2,6 +2,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  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; }
3
3
  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; }
4
4
  import { useMemo } from 'react';
5
+
6
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
5
7
  import uuid from 'uuid';
6
8
  import { useSmartLinkContext } from '@atlaskit/link-provider';
7
9
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -20,6 +22,7 @@ export function useSmartLinkActions(_ref) {
20
22
  origin = _ref.origin,
21
23
  actionOptions = _ref.actionOptions,
22
24
  prefetch = _ref.prefetch;
25
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
23
26
  var id = useMemo(function () {
24
27
  return uuid();
25
28
  }, []);
@@ -1,4 +1,6 @@
1
1
  import { useMemo } from 'react';
2
+
3
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
2
4
  import uuid from 'uuid';
3
5
  import { useSmartCardActions as useLinkActions } from '../actions';
4
6
  /**
@@ -8,6 +10,7 @@ import { useSmartCardActions as useLinkActions } from '../actions';
8
10
  */
9
11
  export function useSmartLinkReload(_ref) {
10
12
  var url = _ref.url;
13
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
11
14
  var id = useMemo(function () {
12
15
  return uuid();
13
16
  }, []);
@@ -5,6 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
5
5
  import React, { lazy, Suspense, useCallback, useEffect, useState } from 'react';
6
6
  import { ErrorBoundary } from 'react-error-boundary';
7
7
  import { di } from 'react-magnetic-di';
8
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
8
9
  import uuid from 'uuid';
9
10
  import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
10
11
  import { failUfoExperience, startUfoExperience } from '../../state/analytics';
@@ -19,6 +20,7 @@ export var LazyCardWithUrlContent = /*#__PURE__*/lazy(function () {
19
20
  });
20
21
  });
21
22
  export function CardWithURLRenderer(props) {
23
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
22
24
  var _useState = useState(function () {
23
25
  return props.id ? props.id : uuid();
24
26
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "43.6.0",
3
+ "version": "43.6.1",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -32,7 +32,7 @@
32
32
  "@atlaskit/avatar": "^25.5.0",
33
33
  "@atlaskit/avatar-group": "^12.4.0",
34
34
  "@atlaskit/badge": "^18.2.0",
35
- "@atlaskit/button": "^23.5.0",
35
+ "@atlaskit/button": "^23.6.0",
36
36
  "@atlaskit/checkbox": "^17.1.0",
37
37
  "@atlaskit/css": "^0.15.0",
38
38
  "@atlaskit/dropdown-menu": "^16.3.0",
@@ -57,7 +57,7 @@
57
57
  "@atlaskit/linking-common": "^9.8.0",
58
58
  "@atlaskit/linking-types": "^14.1.0",
59
59
  "@atlaskit/logo": "^19.9.0",
60
- "@atlaskit/lozenge": "^13.0.0",
60
+ "@atlaskit/lozenge": "^13.1.0",
61
61
  "@atlaskit/menu": "^8.4.0",
62
62
  "@atlaskit/modal-dialog": "^14.6.0",
63
63
  "@atlaskit/outbound-auth-flow-client": "^3.4.0",
@@ -70,9 +70,9 @@
70
70
  "@atlaskit/textarea": "^8.0.0",
71
71
  "@atlaskit/textfield": "^8.0.0",
72
72
  "@atlaskit/theme": "^21.0.0",
73
- "@atlaskit/tmp-editor-statsig": "^13.28.0",
74
- "@atlaskit/tokens": "^7.1.0",
75
- "@atlaskit/tooltip": "^20.7.0",
73
+ "@atlaskit/tmp-editor-statsig": "^13.32.0",
74
+ "@atlaskit/tokens": "^8.0.0",
75
+ "@atlaskit/tooltip": "^20.8.0",
76
76
  "@atlaskit/ufo": "^0.4.0",
77
77
  "@babel/runtime": "^7.0.0",
78
78
  "@compiled/react": "^0.18.6",
@@ -102,7 +102,7 @@
102
102
  "@atlaskit/media-test-helpers": "^39.0.0",
103
103
  "@atlaskit/react-ufo": "^4.14.0",
104
104
  "@atlaskit/ssr": "workspace:^",
105
- "@atlassian/analytics-tooling": "^0.5.0",
105
+ "@atlassian/analytics-tooling": "workspace:^",
106
106
  "@atlassian/feature-flags-test-utils": "^1.0.0",
107
107
  "@atlassian/gemini": "^1.20.0",
108
108
  "@testing-library/dom": "^10.1.0",