@atlaskit/smart-card 25.3.1 → 25.3.3

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.
Files changed (93) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/extractors/action/extract-lozenge-action-items.js +25 -0
  3. package/dist/cjs/state/actions/index.js +5 -5
  4. package/dist/cjs/state/hooks/use-invoke/index.js +16 -10
  5. package/dist/cjs/state/hooks/use-invoke/types.js +1 -6
  6. package/dist/cjs/state/hooks/usePrefetch.js +4 -3
  7. package/dist/cjs/utils/actions/create-status-update-request.js +21 -0
  8. package/dist/cjs/utils/index.js +3 -3
  9. package/dist/cjs/utils/mocks.js +8 -7
  10. package/dist/cjs/version.json +1 -1
  11. package/dist/cjs/view/BlockCard/actions/DownloadAction.js +4 -3
  12. package/dist/cjs/view/BlockCard/actions/PreviewAction.js +3 -3
  13. package/dist/cjs/view/BlockCard/actions/RetryAction.js +4 -3
  14. package/dist/cjs/view/BlockCard/actions/ViewAction.js +4 -3
  15. package/dist/cjs/view/BlockCard/components/ActionList.js +1 -0
  16. package/dist/cjs/view/BlockCard/components/Frame.js +1 -1
  17. package/dist/cjs/view/BlockCard/components/Thumbnail.js +1 -1
  18. package/dist/cjs/view/BlockCard/index.js +1 -0
  19. package/dist/cjs/view/BlockCard/views/ErroredView.js +1 -1
  20. package/dist/cjs/view/BlockCard/views/NotFoundView.js +1 -1
  21. package/dist/cjs/view/BlockCard/views/UnauthorizedView.js +1 -1
  22. package/dist/cjs/view/EmbedCard/components/styled.js +2 -2
  23. package/dist/cjs/view/EmbedModal/components/embed-content/index.js +1 -0
  24. package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +1 -0
  25. package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.js +1 -0
  26. package/dist/cjs/view/FlexibleCard/components/actions/action/download-action/index.js +4 -3
  27. package/dist/cjs/view/FlexibleCard/components/actions/action/preview-action/index.js +3 -3
  28. package/dist/cjs/view/FlexibleCard/components/actions/action/view-action/index.js +4 -3
  29. package/dist/cjs/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +1 -0
  30. package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +1 -0
  31. package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +1 -0
  32. package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +1 -0
  33. package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +1 -0
  34. package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +1 -0
  35. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +1 -0
  36. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +1 -0
  37. package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +2 -0
  38. package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +1 -0
  39. package/dist/cjs/view/FlexibleCard/components/common/lozenge-action/error-boundary/index.js +2 -1
  40. package/dist/cjs/view/FlexibleCard/components/common/lozenge-action/index.js +103 -55
  41. package/dist/cjs/view/FlexibleCard/components/common/lozenge-action/lozenge-action-item/index.js +13 -2
  42. package/dist/cjs/view/FlexibleCard/components/common/lozenge-action/lozenge-action-trigger/index.js +1 -0
  43. package/dist/cjs/view/FlexibleCard/components/container/index.js +1 -0
  44. package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +1 -0
  45. package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +1 -0
  46. package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +1 -0
  47. package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +1 -0
  48. package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +1 -0
  49. package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +1 -0
  50. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +1 -0
  51. package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +1 -0
  52. package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +1 -0
  53. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +3 -5
  54. package/dist/cjs/view/common/Icon.js +1 -0
  55. package/dist/es2019/extractors/action/extract-lozenge-action-items.js +17 -0
  56. package/dist/es2019/state/hooks/use-invoke/index.js +15 -6
  57. package/dist/es2019/state/hooks/use-invoke/types.js +0 -4
  58. package/dist/es2019/utils/actions/create-status-update-request.js +10 -0
  59. package/dist/es2019/version.json +1 -1
  60. package/dist/es2019/view/EmbedCard/components/styled.js +5 -5
  61. package/dist/es2019/view/FlexibleCard/components/actions/index.js +0 -1
  62. package/dist/es2019/view/FlexibleCard/components/common/lozenge-action/error-boundary/index.js +7 -4
  63. package/dist/es2019/view/FlexibleCard/components/common/lozenge-action/index.js +47 -23
  64. package/dist/es2019/view/FlexibleCard/components/common/lozenge-action/lozenge-action-item/index.js +13 -2
  65. package/dist/esm/extractors/action/extract-lozenge-action-items.js +18 -0
  66. package/dist/esm/state/actions/index.js +6 -5
  67. package/dist/esm/state/hooks/use-invoke/index.js +16 -10
  68. package/dist/esm/state/hooks/use-invoke/types.js +0 -4
  69. package/dist/esm/state/hooks/usePrefetch.js +4 -3
  70. package/dist/esm/utils/actions/create-status-update-request.js +13 -0
  71. package/dist/esm/utils/index.js +4 -3
  72. package/dist/esm/utils/mocks.js +8 -7
  73. package/dist/esm/version.json +1 -1
  74. package/dist/esm/view/BlockCard/actions/DownloadAction.js +4 -3
  75. package/dist/esm/view/BlockCard/actions/PreviewAction.js +4 -3
  76. package/dist/esm/view/BlockCard/actions/RetryAction.js +4 -3
  77. package/dist/esm/view/BlockCard/actions/ViewAction.js +4 -3
  78. package/dist/esm/view/EmbedCard/components/styled.js +2 -2
  79. package/dist/esm/view/FlexibleCard/components/actions/action/download-action/index.js +4 -3
  80. package/dist/esm/view/FlexibleCard/components/actions/action/preview-action/index.js +4 -3
  81. package/dist/esm/view/FlexibleCard/components/actions/action/view-action/index.js +4 -3
  82. package/dist/esm/view/FlexibleCard/components/actions/index.js +0 -1
  83. package/dist/esm/view/FlexibleCard/components/common/lozenge-action/error-boundary/index.js +2 -1
  84. package/dist/esm/view/FlexibleCard/components/common/lozenge-action/index.js +104 -53
  85. package/dist/esm/view/FlexibleCard/components/common/lozenge-action/lozenge-action-item/index.js +13 -2
  86. package/dist/esm/view/HoverCard/components/HoverCardContent.js +4 -3
  87. package/dist/types/extractors/action/extract-lozenge-action-items.d.ts +4 -0
  88. package/dist/types/state/hooks/use-invoke/index.d.ts +2 -2
  89. package/dist/types/state/hooks/use-invoke/types.d.ts +6 -5
  90. package/dist/types/utils/actions/create-status-update-request.d.ts +4 -0
  91. package/dist/types/view/FlexibleCard/components/common/lozenge-action/lozenge-action-item/types.d.ts +3 -4
  92. package/dist/types/view/FlexibleCard/components/common/lozenge-action/types.d.ts +3 -2
  93. package/package.json +5 -2
@@ -3,15 +3,26 @@ import { DropdownItem } from '@atlaskit/dropdown-menu';
3
3
  import Lozenge from '@atlaskit/lozenge';
4
4
  var LozengeActionItem = function LozengeActionItem(_ref) {
5
5
  var appearance = _ref.appearance,
6
+ id = _ref.id,
7
+ onClick = _ref.onClick,
6
8
  testId = _ref.testId,
7
9
  text = _ref.text;
8
- var onMouseEnter = useCallback(function (e) {
10
+ var handleClick = useCallback(function (e) {
11
+ // Prevent dropdown to close on select item.
12
+ // We want to show loading screen.
13
+ e.stopPropagation();
14
+ if (onClick) {
15
+ onClick(id);
16
+ }
17
+ }, [id, onClick]);
18
+ var handleMouseEnter = useCallback(function (e) {
9
19
  var _e$currentTarget, _e$currentTarget$firs;
10
20
  (_e$currentTarget = e.currentTarget) === null || _e$currentTarget === void 0 ? void 0 : (_e$currentTarget$firs = _e$currentTarget.firstElementChild) === null || _e$currentTarget$firs === void 0 ? void 0 : _e$currentTarget$firs.focus();
11
21
  }, []);
12
22
  return /*#__PURE__*/React.createElement("span", {
13
- onMouseEnter: onMouseEnter
23
+ onMouseEnter: handleMouseEnter
14
24
  }, /*#__PURE__*/React.createElement(DropdownItem, {
25
+ onClick: handleClick,
15
26
  testId: testId
16
27
  }, /*#__PURE__*/React.createElement(Lozenge, {
17
28
  appearance: appearance
@@ -1,5 +1,6 @@
1
+ import _typeof from "@babel/runtime/helpers/typeof";
1
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
- import _regeneratorRuntime from "@babel/runtime/regenerator";
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; }
3
4
  /** @jsx jsx */
4
5
  import { jsx } from '@emotion/react';
5
6
  import ShortcutIcon from '@atlaskit/icon/glyph/shortcut';
@@ -51,8 +52,8 @@ export var getCopyAction = function getCopyAction(url) {
51
52
  }),
52
53
  iconPosition: 'before',
53
54
  onClick: function () {
54
- var _onClick = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
55
- return _regeneratorRuntime.wrap(function _callee$(_context) {
55
+ var _onClick = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
56
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
56
57
  while (1) {
57
58
  switch (_context.prev = _context.next) {
58
59
  case 0:
@@ -0,0 +1,4 @@
1
+ import type { GetStatusTransitionsInvokeResponse } from '@atlaskit/linking-types/smart-link-actions';
2
+ import { LozengeItem } from '../../view/FlexibleCard/components/common/lozenge-action/types';
3
+ declare const extractLozengeActionItems: (response: GetStatusTransitionsInvokeResponse) => LozengeItem[];
4
+ export default extractLozengeActionItems;
@@ -1,3 +1,3 @@
1
- import { InvokeAction } from './types';
2
- declare const useInvoke: () => <T>(action: InvokeAction) => Promise<void | T>;
1
+ import type { InvokeRequest } from '@atlaskit/linking-types/smart-link-actions';
2
+ declare const useInvoke: () => (req: InvokeRequest, cb?: Function | undefined) => Promise<any>;
3
3
  export default useInvoke;
@@ -1,10 +1,11 @@
1
- export declare enum InvokeActionName {
2
- UpdateAction = "UpdateAction"
3
- }
1
+ import type { InvokeRequest } from '@atlaskit/linking-types/smart-link-actions';
4
2
  export declare enum InvokeActionError {
5
3
  NoData = "NoData",
6
4
  Unknown = "Unknown"
7
5
  }
8
- export declare type InvokeAction = {
9
- name: InvokeActionName;
6
+ export declare type InvokeActions = {
7
+ create?: InvokeRequest;
8
+ read?: InvokeRequest;
9
+ update?: InvokeRequest;
10
+ delete?: InvokeRequest;
10
11
  };
@@ -0,0 +1,4 @@
1
+ import type { InvokeRequest } from '@atlaskit/linking-types/smart-link-actions';
2
+ import { StatusUpdateActionPayload } from '@atlaskit/linking-types/smart-link-actions';
3
+ declare const createStatusUpdateRequest: (request: InvokeRequest, id: string) => InvokeRequest<StatusUpdateActionPayload>;
4
+ export default createStatusUpdateRequest;
@@ -1,6 +1,5 @@
1
- import type { ThemeAppearance } from '@atlaskit/lozenge';
2
- export declare type LozengeActionItemProps = {
3
- appearance?: ThemeAppearance;
1
+ import { LozengeItem } from '../types';
2
+ export declare type LozengeActionItemProps = LozengeItem & {
3
+ onClick?: (id: string) => void;
4
4
  testId?: string;
5
- text: string;
6
5
  };
@@ -1,11 +1,12 @@
1
1
  import type { ThemeAppearance } from '@atlaskit/lozenge';
2
- import type { InvokeAction } from '../../../../../state/hooks/use-invoke/types';
2
+ import type { InvokeActions } from '../../../../../state/hooks/use-invoke/types';
3
3
  export declare type LozengeItem = {
4
4
  appearance?: ThemeAppearance;
5
+ id: string;
5
6
  text: string;
6
7
  };
7
8
  export declare type LozengeActionProps = {
8
- action?: InvokeAction;
9
+ action?: InvokeActions;
9
10
  appearance?: ThemeAppearance;
10
11
  testId?: string;
11
12
  text: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "25.3.1",
3
+ "version": "25.3.3",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -33,8 +33,10 @@
33
33
  "@atlaskit/icon-object": "^6.2.0",
34
34
  "@atlaskit/icon-priority": "^6.3.0",
35
35
  "@atlaskit/in-product-testing": "^0.1.0",
36
+ "@atlaskit/link-client-extension": "^0.3.0",
36
37
  "@atlaskit/linking-common": "^2.4.0",
37
- "@atlaskit/logo": "^13.11.0",
38
+ "@atlaskit/linking-types": "^0.3.0",
39
+ "@atlaskit/logo": "^13.12.0",
38
40
  "@atlaskit/lozenge": "^11.3.0",
39
41
  "@atlaskit/media-common": "^4.0.0",
40
42
  "@atlaskit/modal-dialog": "^12.4.0",
@@ -98,6 +100,7 @@
98
100
  "@types/react-loadable": "^5.4.1",
99
101
  "abortcontroller-polyfill": "^1.1.9",
100
102
  "brace": "^0.11.1",
103
+ "fetch-mock": "^8.0.0",
101
104
  "jest-emotion": "^10.0.32",
102
105
  "jest-extended": "^0.11.2",
103
106
  "jsdom": "^16.2.2",