@atlaskit/smart-card 25.4.0 → 25.4.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.
@@ -0,0 +1,161 @@
1
+ import _typeof from "@babel/runtime/helpers/typeof";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
4
+ import { useCallback } from 'react';
5
+ import { addMetadataToExperience } from '../../analytics';
6
+ import { getStatus } from '../../helpers';
7
+ import { ACTION_ERROR, ACTION_ERROR_FALLBACK, ACTION_RELOADING, ACTION_RESOLVED, ACTION_UPDATE_METADATA_STATUS, APIError, cardAction } from '@atlaskit/linking-common';
8
+ import { ERROR_MESSAGE_FATAL, ERROR_MESSAGE_METADATA, ERROR_MESSAGE_OAUTH } from '../../actions/constants';
9
+ import { getUnauthorizedJsonLd } from '../../../utils/jsonld';
10
+ import { SmartLinkStatus } from '../../../constants';
11
+ import { useSmartLinkContext } from '@atlaskit/link-provider';
12
+ var useResolve = function useResolve() {
13
+ // Request JSON-LD data for the card from ORS, if it has extended
14
+ // its cache lifespan OR there is no data for it currently. Once the data
15
+ // has come back asynchronously, dispatch the resolved action for the card.
16
+ var _useSmartLinkContext = useSmartLinkContext(),
17
+ store = _useSmartLinkContext.store,
18
+ connections = _useSmartLinkContext.connections,
19
+ config = _useSmartLinkContext.config;
20
+ var getState = store.getState,
21
+ dispatch = store.dispatch;
22
+ var hasAuthFlowSupported = config.authFlow !== 'disabled';
23
+ var setMetadataStatus = useCallback(function (url, metadataStatus) {
24
+ dispatch(cardAction(ACTION_UPDATE_METADATA_STATUS, {
25
+ url: url
26
+ }, undefined, undefined, metadataStatus));
27
+ }, [dispatch]);
28
+ var handleResolvedLinkError = useCallback(function (url, error, response, isMetadataRequest) {
29
+ var _ref = getState()[url] || {
30
+ status: SmartLinkStatus.Pending,
31
+ details: undefined
32
+ },
33
+ details = _ref.details;
34
+ var hasData = !!(details && details.data);
35
+
36
+ // If metadata request then set metadata status, return and do not alter link status
37
+ if (isMetadataRequest) {
38
+ setMetadataStatus(url, 'errored');
39
+ return;
40
+ }
41
+ if (error.kind === 'fatal') {
42
+ // If there's no previous data in the store for this URL, then bail
43
+ // out and let the editor handle fallbacks (returns to a blue link).
44
+ if (!hasData && status !== 'resolved') {
45
+ dispatch(cardAction(ACTION_ERROR, {
46
+ url: url
47
+ }, details, error));
48
+ throw error;
49
+ }
50
+ // If we already have resolved data for this URL in the store, then
51
+ // simply fallback to the previous data.
52
+ if (hasData) {
53
+ dispatch(cardAction(ACTION_RESOLVED, {
54
+ url: url
55
+ }, details));
56
+ }
57
+ // Handle AuthErrors (user did not have access to resource) -
58
+ // Missing AAID in ASAP claims, or missing UserContext, or 403 from downstream
59
+ } else if (error.kind === 'auth') {
60
+ dispatch(cardAction(ACTION_RESOLVED, {
61
+ url: url
62
+ }, getUnauthorizedJsonLd()));
63
+ } else {
64
+ if (error.kind === 'fallback') {
65
+ // Fallback to blue link with smart link formatting. Not part of reliability.
66
+ dispatch(cardAction(ACTION_ERROR_FALLBACK, {
67
+ url: url
68
+ }, response, error));
69
+ } else {
70
+ // Fallback to blue link with smart link formatting. Part of reliability.
71
+ dispatch(cardAction(ACTION_ERROR, {
72
+ url: url
73
+ }, undefined, error));
74
+ }
75
+ }
76
+ }, [getState, setMetadataStatus, dispatch]);
77
+ var handleResolvedLinkResponse = useCallback(function (resourceUrl, response) {
78
+ var isReloading = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
79
+ var isMetadataRequest = arguments.length > 3 ? arguments[3] : undefined;
80
+ var hostname = new URL(resourceUrl).hostname;
81
+ var nextStatus = response ? getStatus(response) : 'fatal';
82
+
83
+ // If we require authorization & do not have an authFlow available,
84
+ // throw an error and render as a normal blue link.
85
+ if ((nextStatus === 'unauthorized' || nextStatus === 'forbidden') && !hasAuthFlowSupported) {
86
+ handleResolvedLinkError(resourceUrl, new APIError('fallback', hostname, ERROR_MESSAGE_OAUTH), response, isMetadataRequest);
87
+ return;
88
+ }
89
+
90
+ // Handle any other errors
91
+ if (nextStatus === 'fatal') {
92
+ handleResolvedLinkError(resourceUrl, new APIError('fatal', hostname, ERROR_MESSAGE_FATAL), undefined, isMetadataRequest);
93
+ return;
94
+ }
95
+
96
+ // Handle errors of any other kind in the metadata request response
97
+ if (isMetadataRequest && nextStatus !== 'resolved') {
98
+ handleResolvedLinkError(resourceUrl, new APIError('error', hostname, ERROR_MESSAGE_METADATA), response, isMetadataRequest);
99
+ return;
100
+ }
101
+
102
+ //if a link resolves normally, metadata will also always be resolved
103
+ setMetadataStatus(resourceUrl, 'resolved');
104
+ // Dispatch Analytics and resolved card action - including unauthorized states.
105
+ if (isReloading) {
106
+ dispatch(cardAction(ACTION_RELOADING, {
107
+ url: resourceUrl
108
+ }, response));
109
+ } else {
110
+ dispatch(cardAction(ACTION_RESOLVED, {
111
+ url: resourceUrl
112
+ }, response, undefined, undefined, isMetadataRequest));
113
+ }
114
+ }, [dispatch, handleResolvedLinkError, hasAuthFlowSupported, setMetadataStatus]);
115
+ return useCallback( /*#__PURE__*/function () {
116
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(url) {
117
+ var isReloading,
118
+ isMetadataRequest,
119
+ id,
120
+ _ref3,
121
+ details,
122
+ hasData,
123
+ _args = arguments;
124
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
125
+ while (1) {
126
+ switch (_context.prev = _context.next) {
127
+ case 0:
128
+ isReloading = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
129
+ isMetadataRequest = _args.length > 2 && _args[2] !== undefined ? _args[2] : false;
130
+ id = _args.length > 3 && _args[3] !== undefined ? _args[3] : '';
131
+ _ref3 = getState()[url] || {
132
+ status: SmartLinkStatus.Pending,
133
+ details: undefined
134
+ }, details = _ref3.details;
135
+ hasData = !!(details && details.data);
136
+ if (!(isReloading || !hasData || isMetadataRequest)) {
137
+ _context.next = 9;
138
+ break;
139
+ }
140
+ return _context.abrupt("return", connections.client.fetchData(url, isReloading).then(function (response) {
141
+ return handleResolvedLinkResponse(url, response, isReloading, isMetadataRequest);
142
+ }).catch(function (error) {
143
+ return handleResolvedLinkError(url, error, undefined, isMetadataRequest);
144
+ }));
145
+ case 9:
146
+ addMetadataToExperience('smart-link-rendered', id, {
147
+ cached: true
148
+ });
149
+ case 10:
150
+ case "end":
151
+ return _context.stop();
152
+ }
153
+ }
154
+ }, _callee);
155
+ }));
156
+ return function (_x) {
157
+ return _ref2.apply(this, arguments);
158
+ };
159
+ }(), [connections.client, getState, handleResolvedLinkError, handleResolvedLinkResponse]);
160
+ };
161
+ export default useResolve;
@@ -16,9 +16,7 @@ export function getLinkClickOutcome(e, clickType) {
16
16
  var _browser = browser(),
17
17
  mac = _browser.mac,
18
18
  safari = _browser.safari;
19
- if (e.defaultPrevented) {
20
- return 'prevented';
21
- }
19
+
22
20
  /**
23
21
  * If the link/parent is content editable then left click won't have typical effect
24
22
  */
@@ -66,12 +64,13 @@ export function getLinkClickOutcome(e, clickType) {
66
64
  return 'contextMenu';
67
65
  }
68
66
  }
69
- return '_unknown';
67
+ return 'unknown';
70
68
  }
71
69
  var linkClickedEvent = function linkClickedEvent(_ref) {
72
70
  var clickType = _ref.clickType,
73
71
  clickOutcome = _ref.clickOutcome,
74
- keysHeld = _ref.keysHeld;
72
+ keysHeld = _ref.keysHeld,
73
+ defaultPrevented = _ref.defaultPrevented;
75
74
  return {
76
75
  action: 'clicked',
77
76
  actionSubject: 'link',
@@ -79,7 +78,8 @@ var linkClickedEvent = function linkClickedEvent(_ref) {
79
78
  attributes: {
80
79
  clickType: clickType,
81
80
  clickOutcome: clickOutcome,
82
- keysHeld: keysHeld
81
+ keysHeld: keysHeld,
82
+ defaultPrevented: defaultPrevented
83
83
  }
84
84
  };
85
85
  };
@@ -90,10 +90,12 @@ export var createLinkClickedPayload = function createLinkClickedPayload(event) {
90
90
  }
91
91
  var clickOutcome = getLinkClickOutcome(event, clickType);
92
92
  var keysHeld = getKeys(event);
93
+ var defaultPrevented = event.defaultPrevented;
93
94
  return linkClickedEvent({
94
95
  clickType: clickType,
95
96
  clickOutcome: clickOutcome,
96
- keysHeld: keysHeld
97
+ keysHeld: keysHeld,
98
+ defaultPrevented: defaultPrevented
97
99
  });
98
100
  };
99
101
  export var fireLinkClickedEvent = function fireLinkClickedEvent(createAnalyticsEvent) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "25.4.0",
3
+ "version": "25.4.2",
4
4
  "sideEffects": false
5
5
  }
@@ -16,6 +16,7 @@ import useInvoke from '../../../../../state/hooks/use-invoke';
16
16
  import { InvokeActionError } from '../../../../../state/hooks/use-invoke/types';
17
17
  import extractLozengeActionItems from '../../../../../extractors/action/extract-lozenge-action-items';
18
18
  import createStatusUpdateRequest from '../../../../../utils/actions/create-status-update-request';
19
+ import useResolve from '../../../../../state/hooks/use-resolve';
19
20
  var validateItems = function validateItems() {
20
21
  var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
21
22
  var text = arguments.length > 1 ? arguments[1] : undefined;
@@ -50,6 +51,7 @@ var LozengeAction = function LozengeAction(_ref) {
50
51
  errorCode = _useState10[0],
51
52
  setErrorCode = _useState10[1];
52
53
  var invoke = useInvoke();
54
+ var reload = useResolve();
53
55
  var handleOpenChange = useCallback( /*#__PURE__*/function () {
54
56
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(args) {
55
57
  var responseItems, validItems;
@@ -109,43 +111,51 @@ var LozengeAction = function LozengeAction(_ref) {
109
111
  }, [appearance, testId, text]);
110
112
  var handleItemClick = useCallback( /*#__PURE__*/function () {
111
113
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(id) {
112
- var request;
114
+ var updateAction, request, _ref4, url, linkId;
113
115
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
114
116
  while (1) {
115
117
  switch (_context2.prev = _context2.next) {
116
118
  case 0:
117
119
  _context2.prev = 0;
118
- if (!(action !== null && action !== void 0 && action.update && id)) {
119
- _context2.next = 8;
120
+ updateAction = action === null || action === void 0 ? void 0 : action.update;
121
+ if (!(updateAction && id)) {
122
+ _context2.next = 13;
120
123
  break;
121
124
  }
122
125
  setIsLoading(true);
123
- request = createStatusUpdateRequest(action.update, id);
124
- _context2.next = 6;
126
+ request = createStatusUpdateRequest(updateAction, id);
127
+ _context2.next = 7;
125
128
  return invoke(request);
126
- case 6:
129
+ case 7:
127
130
  setIsLoading(false);
128
131
  setIsOpen(false);
129
- case 8:
130
- _context2.next = 14;
132
+ _ref4 = updateAction.details || {}, url = _ref4.url, linkId = _ref4.id;
133
+ if (!url) {
134
+ _context2.next = 13;
135
+ break;
136
+ }
137
+ _context2.next = 13;
138
+ return reload(url, true, undefined, linkId);
139
+ case 13:
140
+ _context2.next = 19;
131
141
  break;
132
- case 10:
133
- _context2.prev = 10;
142
+ case 15:
143
+ _context2.prev = 15;
134
144
  _context2.t0 = _context2["catch"](0);
135
145
  // TODO: EDM-6261: Error state
136
146
  setIsLoading(false);
137
147
  setErrorCode(InvokeActionError.Unknown);
138
- case 14:
148
+ case 19:
139
149
  case "end":
140
150
  return _context2.stop();
141
151
  }
142
152
  }
143
- }, _callee2, null, [[0, 10]]);
153
+ }, _callee2, null, [[0, 15]]);
144
154
  }));
145
155
  return function (_x2) {
146
156
  return _ref3.apply(this, arguments);
147
157
  };
148
- }(), [action === null || action === void 0 ? void 0 : action.update, invoke]);
158
+ }(), [action === null || action === void 0 ? void 0 : action.update, invoke, reload]);
149
159
  var dropdownItemGroup = useMemo(function () {
150
160
  if (errorCode) {
151
161
  return jsx(LozengeActionError, {
@@ -29,230 +29,10 @@ export declare const TEST_UNDEFINED_LINK: JsonLd.Data.UndefinedLinkDocument;
29
29
  export declare const TEST_ASSIGN_ACTION: JsonLd.Data.BaseData['schema:potentialAction'];
30
30
  export declare const TEST_NO_ID_ACTION: JsonLd.Data.BaseData['schema:potentialAction'];
31
31
  export declare const TEST_VIEW_ACTION: JsonLd.Data.BaseData['schema:potentialAction'];
32
- export declare const TEST_DOCUMENT_WITH_ACTIONS: {
33
- 'schema:potentialAction': any[];
34
- '@type': "Collection" | "Document" | "schema:BlogPosting" | "schema:TextDigitalDocument" | "schema:DigitalDocument" | "schema:PresentationDigitalDocument" | "schema:SpreadsheetDigitalDocument" | "atlassian:UndefinedLink" | ("Object" | "Document")[] | (JsonLd.Data.DocumentChildType | JsonLd.Data.DocumentParentType)[] | ("Document" | "schema:DigitalDocument")[];
35
- 'schema:fileFormat'?: string | undefined;
36
- 'atlassian:fileSize'?: number | undefined;
37
- 'schema:commentCount'?: number | undefined;
38
- 'atlassian:isDeleted'?: boolean | undefined;
39
- 'atlassian:attachmentCount'?: number | undefined;
40
- 'atlassian:dateViewed'?: string | undefined;
41
- 'atlassian:checkItems'?: JsonLd.Primitives.CheckItemProgress | undefined;
42
- 'atlassian:reactCount'?: number | undefined;
43
- 'atlassian:state'?: string | JsonLd.Primitives.Object<any> | undefined;
44
- 'atlassian:viewCount'?: number | undefined;
45
- 'atlassian:voteCount'?: number | undefined;
46
- '@context': JsonLd.Primitives.Context;
47
- 'atlassian:downloadUrl'?: string | undefined;
48
- 'atlassian:visitUrl'?: string | undefined;
49
- 'atlassian:titlePrefix'?: JsonLd.Data.TitlePrefix | undefined;
50
- 'atlassian:updatedBy'?: JsonLd.Primitives.Link | JsonLd.Primitives.Person<any> | JsonLd.Primitives.Collection<JsonLd.Primitives.Link | JsonLd.Primitives.Person<any>> | undefined;
51
- 'schema:dateCreated'?: string | undefined;
52
- '@id'?: string | undefined;
53
- attachment?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
54
- attributedTo?: JsonLd.Primitives.Property<(JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link) & {
55
- actor?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
56
- }> | undefined;
57
- audience?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
58
- bcc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
59
- bto?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
60
- cc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
61
- context?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
62
- generator?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
63
- icon?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
64
- image?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
65
- inReplyTo?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
66
- location?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
67
- oneOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
68
- anyOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
69
- closed?: boolean | JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
70
- preview?: string | ((JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel) & JsonLd.Primitives.PreviewExtension) | undefined;
71
- replies?: JsonLd.Primitives.Collection<any> | undefined;
72
- tag?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
73
- to?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
74
- url?: JsonLd.Primitives.Property<JsonLd.Primitives.Link> | undefined;
75
- content?: string | undefined;
76
- contentMap?: Record<string, string> | undefined;
77
- name?: string | undefined;
78
- nameMap?: Record<string, string> | undefined;
79
- duration?: string | undefined;
80
- mediaType?: string | undefined;
81
- endTime?: string | undefined;
82
- published?: string | undefined;
83
- startTime?: string | undefined;
84
- summary?: string | undefined;
85
- summaryMap?: Record<string, string> | undefined;
86
- updated?: string | undefined;
87
- };
88
- export declare const TEST_DOCUMENT_WITH_DOWNLOAD_ACTION: {
89
- 'atlassian:downloadUrl': string;
90
- 'schema:potentialAction': import("schema-dts").DownloadAction[];
91
- '@type': "Collection" | "Document" | "schema:BlogPosting" | "schema:TextDigitalDocument" | "schema:DigitalDocument" | "schema:PresentationDigitalDocument" | "schema:SpreadsheetDigitalDocument" | "atlassian:UndefinedLink" | ("Object" | "Document")[] | (JsonLd.Data.DocumentChildType | JsonLd.Data.DocumentParentType)[] | ("Document" | "schema:DigitalDocument")[];
92
- 'schema:fileFormat'?: string | undefined;
93
- 'atlassian:fileSize'?: number | undefined;
94
- 'schema:commentCount'?: number | undefined;
95
- 'atlassian:isDeleted'?: boolean | undefined;
96
- 'atlassian:attachmentCount'?: number | undefined;
97
- 'atlassian:dateViewed'?: string | undefined;
98
- 'atlassian:checkItems'?: JsonLd.Primitives.CheckItemProgress | undefined;
99
- 'atlassian:reactCount'?: number | undefined;
100
- 'atlassian:state'?: string | JsonLd.Primitives.Object<any> | undefined;
101
- 'atlassian:viewCount'?: number | undefined;
102
- 'atlassian:voteCount'?: number | undefined;
103
- '@context': JsonLd.Primitives.Context;
104
- 'atlassian:visitUrl'?: string | undefined;
105
- 'atlassian:titlePrefix'?: JsonLd.Data.TitlePrefix | undefined;
106
- 'atlassian:updatedBy'?: JsonLd.Primitives.Link | JsonLd.Primitives.Person<any> | JsonLd.Primitives.Collection<JsonLd.Primitives.Link | JsonLd.Primitives.Person<any>> | undefined;
107
- 'schema:dateCreated'?: string | undefined;
108
- '@id'?: string | undefined;
109
- attachment?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
110
- attributedTo?: JsonLd.Primitives.Property<(JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link) & {
111
- actor?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
112
- }> | undefined;
113
- audience?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
114
- bcc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
115
- bto?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
116
- cc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
117
- context?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
118
- generator?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
119
- icon?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
120
- image?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
121
- inReplyTo?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
122
- location?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
123
- oneOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
124
- anyOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
125
- closed?: boolean | JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
126
- preview?: string | ((JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel) & JsonLd.Primitives.PreviewExtension) | undefined;
127
- replies?: JsonLd.Primitives.Collection<any> | undefined;
128
- tag?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
129
- to?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
130
- url?: JsonLd.Primitives.Property<JsonLd.Primitives.Link> | undefined;
131
- content?: string | undefined;
132
- contentMap?: Record<string, string> | undefined;
133
- name?: string | undefined;
134
- nameMap?: Record<string, string> | undefined;
135
- duration?: string | undefined;
136
- mediaType?: string | undefined;
137
- endTime?: string | undefined;
138
- published?: string | undefined;
139
- startTime?: string | undefined;
140
- summary?: string | undefined;
141
- summaryMap?: Record<string, string> | undefined;
142
- updated?: string | undefined;
143
- };
144
- export declare const TEST_DOCUMENT_WITH_VIEW_ACTION: {
145
- 'schema:potentialAction': import("schema-dts").ViewAction[];
146
- '@type': "Collection" | "Document" | "schema:BlogPosting" | "schema:TextDigitalDocument" | "schema:DigitalDocument" | "schema:PresentationDigitalDocument" | "schema:SpreadsheetDigitalDocument" | "atlassian:UndefinedLink" | ("Object" | "Document")[] | (JsonLd.Data.DocumentChildType | JsonLd.Data.DocumentParentType)[] | ("Document" | "schema:DigitalDocument")[];
147
- 'schema:fileFormat'?: string | undefined;
148
- 'atlassian:fileSize'?: number | undefined;
149
- 'schema:commentCount'?: number | undefined;
150
- 'atlassian:isDeleted'?: boolean | undefined;
151
- 'atlassian:attachmentCount'?: number | undefined;
152
- 'atlassian:dateViewed'?: string | undefined;
153
- 'atlassian:checkItems'?: JsonLd.Primitives.CheckItemProgress | undefined;
154
- 'atlassian:reactCount'?: number | undefined;
155
- 'atlassian:state'?: string | JsonLd.Primitives.Object<any> | undefined;
156
- 'atlassian:viewCount'?: number | undefined;
157
- 'atlassian:voteCount'?: number | undefined;
158
- '@context': JsonLd.Primitives.Context;
159
- 'atlassian:downloadUrl'?: string | undefined;
160
- 'atlassian:visitUrl'?: string | undefined;
161
- 'atlassian:titlePrefix'?: JsonLd.Data.TitlePrefix | undefined;
162
- 'atlassian:updatedBy'?: JsonLd.Primitives.Link | JsonLd.Primitives.Person<any> | JsonLd.Primitives.Collection<JsonLd.Primitives.Link | JsonLd.Primitives.Person<any>> | undefined;
163
- 'schema:dateCreated'?: string | undefined;
164
- '@id'?: string | undefined;
165
- attachment?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
166
- attributedTo?: JsonLd.Primitives.Property<(JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link) & {
167
- actor?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
168
- }> | undefined;
169
- audience?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
170
- bcc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
171
- bto?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
172
- cc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
173
- context?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
174
- generator?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
175
- icon?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
176
- image?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
177
- inReplyTo?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
178
- location?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
179
- oneOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
180
- anyOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
181
- closed?: boolean | JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
182
- preview?: string | ((JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel) & JsonLd.Primitives.PreviewExtension) | undefined;
183
- replies?: JsonLd.Primitives.Collection<any> | undefined;
184
- tag?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
185
- to?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
186
- url?: JsonLd.Primitives.Property<JsonLd.Primitives.Link> | undefined;
187
- content?: string | undefined;
188
- contentMap?: Record<string, string> | undefined;
189
- name?: string | undefined;
190
- nameMap?: Record<string, string> | undefined;
191
- duration?: string | undefined;
192
- mediaType?: string | undefined;
193
- endTime?: string | undefined;
194
- published?: string | undefined;
195
- startTime?: string | undefined;
196
- summary?: string | undefined;
197
- summaryMap?: Record<string, string> | undefined;
198
- updated?: string | undefined;
199
- };
32
+ export declare const TEST_DOCUMENT_WITH_ACTIONS: JsonLd.Data.BaseData;
33
+ export declare const TEST_DOCUMENT_WITH_DOWNLOAD_ACTION: JsonLd.Data.BaseData;
34
+ export declare const TEST_DOCUMENT_WITH_VIEW_ACTION: JsonLd.Data.BaseData;
200
35
  export declare const PREVIEW: JsonLd.Data.BaseData['preview'];
201
- export declare const TEST_DOCUMENT_WITH_PREVIEW: {
202
- preview: JsonLd.Primitives.LinkModel & JsonLd.Primitives.PreviewExtension;
203
- '@type': "Collection" | "Document" | "schema:BlogPosting" | "schema:TextDigitalDocument" | "schema:DigitalDocument" | "schema:PresentationDigitalDocument" | "schema:SpreadsheetDigitalDocument" | "atlassian:UndefinedLink" | ("Object" | "Document")[] | (JsonLd.Data.DocumentChildType | JsonLd.Data.DocumentParentType)[] | ("Document" | "schema:DigitalDocument")[];
204
- 'schema:fileFormat'?: string | undefined;
205
- 'atlassian:fileSize'?: number | undefined;
206
- 'schema:commentCount'?: number | undefined;
207
- 'atlassian:isDeleted'?: boolean | undefined;
208
- 'schema:potentialAction'?: JsonLd.Primitives.Property<JsonLd.Data.DocumentAction> | undefined;
209
- 'atlassian:attachmentCount'?: number | undefined;
210
- 'atlassian:dateViewed'?: string | undefined;
211
- 'atlassian:checkItems'?: JsonLd.Primitives.CheckItemProgress | undefined;
212
- 'atlassian:reactCount'?: number | undefined;
213
- 'atlassian:state'?: string | JsonLd.Primitives.Object<any> | undefined;
214
- 'atlassian:viewCount'?: number | undefined;
215
- 'atlassian:voteCount'?: number | undefined;
216
- '@context': JsonLd.Primitives.Context;
217
- 'atlassian:downloadUrl'?: string | undefined;
218
- 'atlassian:visitUrl'?: string | undefined;
219
- 'atlassian:titlePrefix'?: JsonLd.Data.TitlePrefix | undefined;
220
- 'atlassian:updatedBy'?: JsonLd.Primitives.Link | JsonLd.Primitives.Person<any> | JsonLd.Primitives.Collection<JsonLd.Primitives.Link | JsonLd.Primitives.Person<any>> | undefined;
221
- 'schema:dateCreated'?: string | undefined;
222
- '@id'?: string | undefined;
223
- attachment?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
224
- attributedTo?: JsonLd.Primitives.Property<(JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link) & {
225
- actor?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
226
- }> | undefined;
227
- audience?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
228
- bcc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
229
- bto?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
230
- cc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
231
- context?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
232
- generator?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
233
- icon?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
234
- image?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
235
- inReplyTo?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
236
- location?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
237
- oneOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
238
- anyOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
239
- closed?: boolean | JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
240
- replies?: JsonLd.Primitives.Collection<any> | undefined;
241
- tag?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
242
- to?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
243
- url?: JsonLd.Primitives.Property<JsonLd.Primitives.Link> | undefined;
244
- content?: string | undefined;
245
- contentMap?: Record<string, string> | undefined;
246
- name?: string | undefined;
247
- nameMap?: Record<string, string> | undefined;
248
- duration?: string | undefined;
249
- mediaType?: string | undefined;
250
- endTime?: string | undefined;
251
- published?: string | undefined;
252
- startTime?: string | undefined;
253
- summary?: string | undefined;
254
- summaryMap?: Record<string, string> | undefined;
255
- updated?: string | undefined;
256
- };
36
+ export declare const TEST_DOCUMENT_WITH_PREVIEW: JsonLd.Data.BaseData;
257
37
  export declare const TEST_DATA_WITH_LATEST_COMMIT_OBJ: JsonLd.Data.SourceCodeRepository;
258
38
  export declare const TEST_DATA_WITH_LATEST_COMMIT_TEXT: JsonLd.Data.SourceCodeRepository;
@@ -6,6 +6,8 @@ export declare enum InvokeActionError {
6
6
  export declare type InvokeActions = {
7
7
  create?: InvokeRequest;
8
8
  read?: InvokeRequest;
9
- update?: InvokeRequest;
9
+ update?: InvokeRequest & {
10
+ details?: Record<string, any>;
11
+ };
10
12
  delete?: InvokeRequest;
11
13
  };
@@ -0,0 +1,2 @@
1
+ declare const useResolve: () => (url: string, isReloading?: any, isMetadataRequest?: any, id?: any) => Promise<void>;
2
+ export default useResolve;
@@ -16,6 +16,7 @@ export declare const fireLinkClickedEvent: (createAnalyticsEvent: (payload: Anal
16
16
  clickType?: ClickType | undefined;
17
17
  clickOutcome?: ClickOutcome | undefined;
18
18
  keysHeld?: ("meta" | "alt" | "shift" | "ctrl" | undefined)[] | undefined;
19
+ defaultPrevented?: boolean | undefined;
19
20
  } | undefined;
20
21
  } | undefined) => void;
21
22
  export {};
@@ -106,7 +106,7 @@ export declare type InstrumentEventProps = CommonEventProps & {
106
106
  id: string;
107
107
  };
108
108
  export declare type ClickType = 'left' | 'middle' | 'right' | 'none';
109
- export declare type ClickOutcome = 'prevented' | 'clickThrough' | 'clickThroughNewTabOrWindow' | 'contextMenu' | 'alt' | 'contentEditable' | '_unknown';
109
+ export declare type ClickOutcome = 'prevented' | 'clickThrough' | 'clickThroughNewTabOrWindow' | 'contextMenu' | 'alt' | 'contentEditable' | 'unknown';
110
110
  export declare type UiLinkClickedEventProps = {
111
111
  /**
112
112
  * Whether the click occurred with the left, middle or right mouse button
@@ -114,10 +114,16 @@ export declare type UiLinkClickedEventProps = {
114
114
  clickType: ClickType;
115
115
  /**
116
116
  * The user outcome for clicking the link as far as can be reasonably be determined
117
+ * This ignores any programmatic cancellation of the outcome (ie e.preventDefault()) and
118
+ * thus this represents the user intent, not necessarily the actual outcome
117
119
  */
118
120
  clickOutcome: ClickOutcome;
119
121
  /**
120
122
  * The keys held by the user at the time of clicking the link (which influence `clickOutcome`)
121
123
  */
122
124
  keysHeld: ('alt' | 'ctrl' | 'meta' | 'shift')[];
125
+ /**
126
+ * Whether the browser's default behaviour was prevented programmatically
127
+ */
128
+ defaultPrevented: boolean;
123
129
  };