@atlaskit/smart-card 25.9.3 → 25.9.4

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 (141) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/constants.js +70 -70
  3. package/dist/cjs/extractors/index.js +1 -1
  4. package/dist/cjs/i18n/cs.js +2 -1
  5. package/dist/cjs/i18n/da.js +2 -1
  6. package/dist/cjs/i18n/de.js +2 -1
  7. package/dist/cjs/i18n/en.js +5 -0
  8. package/dist/cjs/i18n/en_GB.js +5 -0
  9. package/dist/cjs/i18n/es.js +2 -1
  10. package/dist/cjs/i18n/fr.js +2 -1
  11. package/dist/cjs/i18n/hu.js +2 -1
  12. package/dist/cjs/i18n/it.js +2 -1
  13. package/dist/cjs/i18n/ja.js +1 -0
  14. package/dist/cjs/i18n/ko.js +2 -1
  15. package/dist/cjs/i18n/nb.js +2 -1
  16. package/dist/cjs/i18n/nl.js +1 -0
  17. package/dist/cjs/i18n/pl.js +2 -1
  18. package/dist/cjs/i18n/pt_BR.js +2 -1
  19. package/dist/cjs/i18n/ru.js +2 -1
  20. package/dist/cjs/i18n/sv.js +2 -1
  21. package/dist/cjs/i18n/th.js +2 -1
  22. package/dist/cjs/i18n/tr.js +2 -1
  23. package/dist/cjs/i18n/uk.js +2 -1
  24. package/dist/cjs/i18n/vi.js +2 -1
  25. package/dist/cjs/i18n/zh.js +2 -1
  26. package/dist/cjs/i18n/zh_TW.js +2 -1
  27. package/dist/cjs/state/actions/index.js +68 -72
  28. package/dist/cjs/state/hooks/use-invoke/index.js +13 -16
  29. package/dist/cjs/state/hooks/use-resolve/index.js +29 -32
  30. package/dist/cjs/state/hooks/usePrefetch.js +58 -61
  31. package/dist/cjs/utils/index.js +28 -30
  32. package/dist/cjs/utils/mocks.js +34 -41
  33. package/dist/cjs/version.json +1 -1
  34. package/dist/cjs/view/BlockCard/actions/DownloadAction.js +16 -19
  35. package/dist/cjs/view/BlockCard/actions/PreviewAction.js +31 -33
  36. package/dist/cjs/view/BlockCard/actions/RetryAction.js +9 -12
  37. package/dist/cjs/view/BlockCard/actions/ViewAction.js +16 -19
  38. package/dist/cjs/view/CardWithData/loader.js +1 -1
  39. package/dist/cjs/view/CardWithUrl/loader.js +1 -1
  40. package/dist/cjs/view/EmbedModal/types.js +4 -4
  41. package/dist/cjs/view/EmbedModal/utils.js +33 -35
  42. package/dist/cjs/view/FlexibleCard/components/actions/action/download-action/index.js +33 -36
  43. package/dist/cjs/view/FlexibleCard/components/actions/action/view-action/index.js +16 -19
  44. package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +60 -60
  45. package/dist/cjs/view/FlexibleCard/components/common/lozenge-action/index.js +83 -85
  46. package/dist/cjs/view/FlexibleCard/components/common/lozenge-action/styled.js +1 -1
  47. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +14 -14
  48. package/dist/es2019/constants.js +63 -63
  49. package/dist/es2019/i18n/cs.js +2 -1
  50. package/dist/es2019/i18n/da.js +2 -1
  51. package/dist/es2019/i18n/de.js +2 -1
  52. package/dist/es2019/i18n/en.js +5 -0
  53. package/dist/es2019/i18n/en_GB.js +5 -0
  54. package/dist/es2019/i18n/es.js +2 -1
  55. package/dist/es2019/i18n/fr.js +2 -1
  56. package/dist/es2019/i18n/hu.js +2 -1
  57. package/dist/es2019/i18n/it.js +2 -1
  58. package/dist/es2019/i18n/ja.js +1 -0
  59. package/dist/es2019/i18n/ko.js +2 -1
  60. package/dist/es2019/i18n/nb.js +2 -1
  61. package/dist/es2019/i18n/nl.js +1 -0
  62. package/dist/es2019/i18n/pl.js +2 -1
  63. package/dist/es2019/i18n/pt_BR.js +2 -1
  64. package/dist/es2019/i18n/ru.js +2 -1
  65. package/dist/es2019/i18n/sv.js +2 -1
  66. package/dist/es2019/i18n/th.js +2 -1
  67. package/dist/es2019/i18n/tr.js +2 -1
  68. package/dist/es2019/i18n/uk.js +2 -1
  69. package/dist/es2019/i18n/vi.js +2 -1
  70. package/dist/es2019/i18n/zh.js +2 -1
  71. package/dist/es2019/i18n/zh_TW.js +2 -1
  72. package/dist/es2019/version.json +1 -1
  73. package/dist/es2019/view/EmbedModal/types.js +3 -3
  74. package/dist/es2019/view/FlexibleCard/components/common/lozenge-action/styled.js +3 -0
  75. package/dist/esm/constants.js +63 -63
  76. package/dist/esm/extractors/index.js +1 -1
  77. package/dist/esm/i18n/cs.js +2 -1
  78. package/dist/esm/i18n/da.js +2 -1
  79. package/dist/esm/i18n/de.js +2 -1
  80. package/dist/esm/i18n/en.js +5 -0
  81. package/dist/esm/i18n/en_GB.js +5 -0
  82. package/dist/esm/i18n/es.js +2 -1
  83. package/dist/esm/i18n/fr.js +2 -1
  84. package/dist/esm/i18n/hu.js +2 -1
  85. package/dist/esm/i18n/it.js +2 -1
  86. package/dist/esm/i18n/ja.js +1 -0
  87. package/dist/esm/i18n/ko.js +2 -1
  88. package/dist/esm/i18n/nb.js +2 -1
  89. package/dist/esm/i18n/nl.js +1 -0
  90. package/dist/esm/i18n/pl.js +2 -1
  91. package/dist/esm/i18n/pt_BR.js +2 -1
  92. package/dist/esm/i18n/ru.js +2 -1
  93. package/dist/esm/i18n/sv.js +2 -1
  94. package/dist/esm/i18n/th.js +2 -1
  95. package/dist/esm/i18n/tr.js +2 -1
  96. package/dist/esm/i18n/uk.js +2 -1
  97. package/dist/esm/i18n/vi.js +2 -1
  98. package/dist/esm/i18n/zh.js +2 -1
  99. package/dist/esm/i18n/zh_TW.js +2 -1
  100. package/dist/esm/state/actions/index.js +68 -73
  101. package/dist/esm/state/hooks/use-invoke/index.js +13 -16
  102. package/dist/esm/state/hooks/use-resolve/index.js +29 -32
  103. package/dist/esm/state/hooks/usePrefetch.js +58 -61
  104. package/dist/esm/utils/index.js +28 -31
  105. package/dist/esm/utils/mocks.js +34 -41
  106. package/dist/esm/version.json +1 -1
  107. package/dist/esm/view/BlockCard/actions/DownloadAction.js +16 -19
  108. package/dist/esm/view/BlockCard/actions/PreviewAction.js +29 -32
  109. package/dist/esm/view/BlockCard/actions/RetryAction.js +9 -12
  110. package/dist/esm/view/BlockCard/actions/ViewAction.js +16 -19
  111. package/dist/esm/view/EmbedModal/types.js +3 -3
  112. package/dist/esm/view/EmbedModal/utils.js +31 -34
  113. package/dist/esm/view/FlexibleCard/components/actions/action/download-action/index.js +33 -36
  114. package/dist/esm/view/FlexibleCard/components/actions/action/view-action/index.js +16 -19
  115. package/dist/esm/view/FlexibleCard/components/common/lozenge-action/index.js +81 -86
  116. package/dist/esm/view/FlexibleCard/components/common/lozenge-action/styled.js +1 -1
  117. package/dist/esm/view/HoverCard/components/HoverCardContent.js +12 -15
  118. package/dist/types/i18n/cs.d.ts +1 -0
  119. package/dist/types/i18n/da.d.ts +1 -0
  120. package/dist/types/i18n/de.d.ts +1 -0
  121. package/dist/types/i18n/en.d.ts +5 -0
  122. package/dist/types/i18n/en_GB.d.ts +5 -0
  123. package/dist/types/i18n/es.d.ts +1 -0
  124. package/dist/types/i18n/fr.d.ts +1 -0
  125. package/dist/types/i18n/hu.d.ts +1 -0
  126. package/dist/types/i18n/it.d.ts +1 -0
  127. package/dist/types/i18n/ja.d.ts +1 -0
  128. package/dist/types/i18n/ko.d.ts +1 -0
  129. package/dist/types/i18n/nb.d.ts +1 -0
  130. package/dist/types/i18n/nl.d.ts +1 -0
  131. package/dist/types/i18n/pl.d.ts +1 -0
  132. package/dist/types/i18n/pt_BR.d.ts +1 -0
  133. package/dist/types/i18n/ru.d.ts +1 -0
  134. package/dist/types/i18n/sv.d.ts +1 -0
  135. package/dist/types/i18n/th.d.ts +1 -0
  136. package/dist/types/i18n/tr.d.ts +1 -0
  137. package/dist/types/i18n/uk.d.ts +1 -0
  138. package/dist/types/i18n/vi.d.ts +1 -0
  139. package/dist/types/i18n/zh.d.ts +1 -0
  140. package/dist/types/i18n/zh_TW.d.ts +1 -0
  141. package/package.json +1 -1
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
11
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
12
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
@@ -24,7 +25,8 @@ var _useResolve = _interopRequireDefault(require("../../../../../state/hooks/use
24
25
  var _types = require("./lozenge-action-error/types");
25
26
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
26
27
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
- 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; } /** @jsx jsx */
28
+ /** @jsx jsx */
29
+
28
30
  var validateItems = function validateItems() {
29
31
  var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
30
32
  var text = arguments.length > 1 ? arguments[1] : undefined;
@@ -83,49 +85,47 @@ var LozengeAction = function LozengeAction(_ref) {
83
85
  linkId = _ref2.id,
84
86
  previewData = _ref2.previewData;
85
87
  var handleOpenChange = (0, _react2.useCallback)( /*#__PURE__*/function () {
86
- var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(args) {
88
+ var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(args) {
87
89
  var responseItems, validItems;
88
- return _regeneratorRuntime().wrap(function _callee$(_context) {
89
- while (1) {
90
- switch (_context.prev = _context.next) {
91
- case 0:
92
- setIsOpen(args.isOpen);
93
- if (!(args.isOpen && !isLoaded && action !== null && action !== void 0 && action.read)) {
94
- _context.next = 20;
95
- break;
96
- }
97
- _context.prev = 2;
98
- setIsLoading(true);
99
- _context.next = 6;
100
- return invoke(action.read, _extractLozengeActionItems.default);
101
- case 6:
102
- responseItems = _context.sent;
103
- validItems = typeof text === 'string' ? validateItems(responseItems, text) : responseItems;
104
- setItems(validItems);
105
- setIsLoaded(true);
106
- if ((validItems === null || validItems === void 0 ? void 0 : validItems.length) === 0) {
107
- setErrorMessage(_types.LozengeActionErrorMessages.noData);
108
- setIsLoaded(false);
109
- }
110
- _context.next = 17;
90
+ return _regenerator.default.wrap(function _callee$(_context) {
91
+ while (1) switch (_context.prev = _context.next) {
92
+ case 0:
93
+ setIsOpen(args.isOpen);
94
+ if (!(args.isOpen && !isLoaded && action !== null && action !== void 0 && action.read)) {
95
+ _context.next = 20;
111
96
  break;
112
- case 13:
113
- _context.prev = 13;
114
- _context.t0 = _context["catch"](2);
115
- setErrorMessage(_types.LozengeActionErrorMessages.unknown);
97
+ }
98
+ _context.prev = 2;
99
+ setIsLoading(true);
100
+ _context.next = 6;
101
+ return invoke(action.read, _extractLozengeActionItems.default);
102
+ case 6:
103
+ responseItems = _context.sent;
104
+ validItems = typeof text === 'string' ? validateItems(responseItems, text) : responseItems;
105
+ setItems(validItems);
106
+ setIsLoaded(true);
107
+ if ((validItems === null || validItems === void 0 ? void 0 : validItems.length) === 0) {
108
+ setErrorMessage(_types.LozengeActionErrorMessages.noData);
116
109
  setIsLoaded(false);
117
- case 17:
118
- _context.prev = 17;
119
- setIsLoading(false);
120
- return _context.finish(17);
121
- case 20:
122
- if (!args.isOpen) {
123
- setErrorMessage(undefined);
124
- }
125
- case 21:
126
- case "end":
127
- return _context.stop();
128
- }
110
+ }
111
+ _context.next = 17;
112
+ break;
113
+ case 13:
114
+ _context.prev = 13;
115
+ _context.t0 = _context["catch"](2);
116
+ setErrorMessage(_types.LozengeActionErrorMessages.unknown);
117
+ setIsLoaded(false);
118
+ case 17:
119
+ _context.prev = 17;
120
+ setIsLoading(false);
121
+ return _context.finish(17);
122
+ case 20:
123
+ if (!args.isOpen) {
124
+ setErrorMessage(undefined);
125
+ }
126
+ case 21:
127
+ case "end":
128
+ return _context.stop();
129
129
  }
130
130
  }, _callee, null, [[2, 13, 17, 20]]);
131
131
  }));
@@ -141,53 +141,51 @@ var LozengeAction = function LozengeAction(_ref) {
141
141
  }));
142
142
  }, [testId, selected]);
143
143
  var handleItemClick = (0, _react2.useCallback)( /*#__PURE__*/function () {
144
- var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(id, text, appearance) {
144
+ var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(id, text, appearance) {
145
145
  var updateAction, request;
146
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
147
- while (1) {
148
- switch (_context2.prev = _context2.next) {
149
- case 0:
150
- _context2.prev = 0;
151
- updateAction = action === null || action === void 0 ? void 0 : action.update;
152
- if (!(updateAction && id)) {
153
- _context2.next = 15;
154
- break;
155
- }
156
- setIsLoading(true);
157
- request = (0, _createStatusUpdateRequest.default)(updateAction, id);
158
- _context2.next = 7;
159
- return invoke(request);
160
- case 7:
161
- setSelected({
162
- appearance: appearance,
163
- text: text
164
- });
165
- setIsLoading(false);
166
- setIsLoaded(false);
167
- setIsOpen(false);
168
- setItems([]);
169
- if (!url) {
170
- _context2.next = 15;
171
- break;
172
- }
146
+ return _regenerator.default.wrap(function _callee2$(_context2) {
147
+ while (1) switch (_context2.prev = _context2.next) {
148
+ case 0:
149
+ _context2.prev = 0;
150
+ updateAction = action === null || action === void 0 ? void 0 : action.update;
151
+ if (!(updateAction && id)) {
152
+ _context2.next = 15;
153
+ break;
154
+ }
155
+ setIsLoading(true);
156
+ request = (0, _createStatusUpdateRequest.default)(updateAction, id);
157
+ _context2.next = 7;
158
+ return invoke(request);
159
+ case 7:
160
+ setSelected({
161
+ appearance: appearance,
162
+ text: text
163
+ });
164
+ setIsLoading(false);
165
+ setIsLoaded(false);
166
+ setIsOpen(false);
167
+ setItems([]);
168
+ if (!url) {
173
169
  _context2.next = 15;
174
- return reload(url, true, undefined, linkId);
175
- case 15:
176
- _context2.next = 21;
177
170
  break;
178
- case 17:
179
- _context2.prev = 17;
180
- _context2.t0 = _context2["catch"](0);
181
- setIsLoading(false);
182
- if (isInvokeCustomError(_context2.t0)) {
183
- setErrorMessage(_context2.t0.message);
184
- } else {
185
- setErrorMessage(_types.LozengeActionErrorMessages.updateFailed);
186
- }
187
- case 21:
188
- case "end":
189
- return _context2.stop();
190
- }
171
+ }
172
+ _context2.next = 15;
173
+ return reload(url, true, undefined, linkId);
174
+ case 15:
175
+ _context2.next = 21;
176
+ break;
177
+ case 17:
178
+ _context2.prev = 17;
179
+ _context2.t0 = _context2["catch"](0);
180
+ setIsLoading(false);
181
+ if (isInvokeCustomError(_context2.t0)) {
182
+ setErrorMessage(_context2.t0.message);
183
+ } else {
184
+ setErrorMessage(_types.LozengeActionErrorMessages.updateFailed);
185
+ }
186
+ case 21:
187
+ case "end":
188
+ return _context2.stop();
191
189
  }
192
190
  }, _callee2, null, [[0, 17]]);
193
191
  }));
@@ -12,5 +12,5 @@ var triggerButtonStyles = (0, _react.css)(_templateObject || (_templateObject =
12
12
  exports.triggerButtonStyles = triggerButtonStyles;
13
13
  var triggerLozengeStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n display: flex;\n\n span[role='img'] {\n margin: -4px -8px -4px -1px;\n }\n"])));
14
14
  exports.triggerLozengeStyles = triggerLozengeStyles;
15
- var dropdownItemGroupStyles = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n button {\n padding: 6px 12px;\n min-height: 28px;\n width: 220px;\n\n &:hover {\n background-color: inherit;\n }\n\n &:focus,\n &:focus-visible {\n background-color: ", ";\n box-sizing: border-box;\n box-shadow: inset 2px 0 0 ", ";\n outline: none;\n }\n }\n"])), "var(--ds-background-neutral-subtle-hovered, #091E420F)", "var(--ds-border-selected, #0C66E4)");
15
+ var dropdownItemGroupStyles = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n max-height: 300px;\n overflow-y: auto;\n\n button {\n padding: 6px 12px;\n min-height: 28px;\n width: 220px;\n\n &:hover {\n background-color: inherit;\n }\n\n &:focus,\n &:focus-visible {\n background-color: ", ";\n box-sizing: border-box;\n box-shadow: inset 2px 0 0 ", ";\n outline: none;\n }\n }\n"])), "var(--ds-background-neutral-subtle-hovered, #091E420F)", "var(--ds-border-selected, #0C66E4)");
16
16
  exports.dropdownItemGroupStyles = dropdownItemGroupStyles;
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.hoverCardClassName = exports.getOpenAction = exports.getCopyAction = exports.default = void 0;
9
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
11
  var _react = require("@emotion/react");
11
12
  var _shortcut = _interopRequireDefault(require("@atlaskit/icon/glyph/shortcut"));
@@ -27,7 +28,8 @@ var _actions = require("../../../state/actions");
27
28
  var _click = require("../../../utils/analytics/click");
28
29
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
30
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
30
- 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; } /** @jsx jsx */
31
+ /** @jsx jsx */
32
+
31
33
  var hoverCardClassName = 'smart-links-hover-preview';
32
34
  exports.hoverCardClassName = hoverCardClassName;
33
35
  var getOpenAction = function getOpenAction(url, analytics, onActionClick) {
@@ -61,19 +63,17 @@ var getCopyAction = function getCopyAction(url) {
61
63
  }),
62
64
  iconPosition: 'before',
63
65
  onClick: function () {
64
- var _onClick = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
65
- return _regeneratorRuntime().wrap(function _callee$(_context) {
66
- while (1) {
67
- switch (_context.prev = _context.next) {
68
- case 0:
69
- _context.next = 2;
70
- return navigator.clipboard.writeText(url);
71
- case 2:
72
- return _context.abrupt("return", _context.sent);
73
- case 3:
74
- case "end":
75
- return _context.stop();
76
- }
66
+ var _onClick = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
67
+ return _regenerator.default.wrap(function _callee$(_context) {
68
+ while (1) switch (_context.prev = _context.next) {
69
+ case 0:
70
+ _context.next = 2;
71
+ return navigator.clipboard.writeText(url);
72
+ case 2:
73
+ return _context.abrupt("return", _context.sent);
74
+ case 3:
75
+ case "end":
76
+ return _context.stop();
77
77
  }
78
78
  }, _callee);
79
79
  }));
@@ -3,56 +3,50 @@ export const CONTENT_URL_SECURITY_AND_PERMISSIONS = 'https://support.atlassian.c
3
3
  /**
4
4
  * The alignment of Flexible UI component.
5
5
  */
6
- export let SmartLinkAlignment;
6
+ export let SmartLinkAlignment = /*#__PURE__*/function (SmartLinkAlignment) {
7
+ SmartLinkAlignment["Left"] = "left";
8
+ SmartLinkAlignment["Right"] = "right";
9
+ return SmartLinkAlignment;
10
+ }({});
7
11
 
8
12
  /**
9
13
  * The direction of Flexible UI components. It establish the main-axis
10
14
  * or how the child components laid out inside the parent component.
11
15
  * Similar to flex's flex-direction concept.
12
16
  */
13
- (function (SmartLinkAlignment) {
14
- SmartLinkAlignment["Left"] = "left";
15
- SmartLinkAlignment["Right"] = "right";
16
- })(SmartLinkAlignment || (SmartLinkAlignment = {}));
17
- export let SmartLinkDirection;
17
+ export let SmartLinkDirection = /*#__PURE__*/function (SmartLinkDirection) {
18
+ SmartLinkDirection["Horizontal"] = "horizontal";
19
+ SmartLinkDirection["Vertical"] = "vertical";
20
+ return SmartLinkDirection;
21
+ }({});
18
22
 
19
23
  /**
20
24
  * The positioning of the component within the parent component.
21
25
  * Similar to flex's align-items or align-self concept.
22
26
  */
23
- (function (SmartLinkDirection) {
24
- SmartLinkDirection["Horizontal"] = "horizontal";
25
- SmartLinkDirection["Vertical"] = "vertical";
26
- })(SmartLinkDirection || (SmartLinkDirection = {}));
27
- export let SmartLinkPosition;
27
+ export let SmartLinkPosition = /*#__PURE__*/function (SmartLinkPosition) {
28
+ SmartLinkPosition["Top"] = "top";
29
+ SmartLinkPosition["Center"] = "center";
30
+ return SmartLinkPosition;
31
+ }({});
28
32
 
29
33
  /**
30
34
  * The sizing options of the Flexible UI component. Every component
31
35
  * has or inherits the sizing props. Implementation varies
32
36
  * as per component.
33
37
  */
34
- (function (SmartLinkPosition) {
35
- SmartLinkPosition["Top"] = "top";
36
- SmartLinkPosition["Center"] = "center";
37
- })(SmartLinkPosition || (SmartLinkPosition = {}));
38
- export let SmartLinkSize;
39
-
40
- /**
41
- * Smart Links link request status
42
- */
43
- (function (SmartLinkSize) {
38
+ export let SmartLinkSize = /*#__PURE__*/function (SmartLinkSize) {
44
39
  SmartLinkSize["XLarge"] = "xlarge";
45
40
  SmartLinkSize["Large"] = "large";
46
41
  SmartLinkSize["Medium"] = "medium";
47
42
  SmartLinkSize["Small"] = "small";
48
- })(SmartLinkSize || (SmartLinkSize = {}));
49
- export let SmartLinkStatus;
43
+ return SmartLinkSize;
44
+ }({});
50
45
 
51
46
  /**
52
- * Flexible UI theme available on the Card level.
53
- * This determine the styling of the link.
47
+ * Smart Links link request status
54
48
  */
55
- (function (SmartLinkStatus) {
49
+ export let SmartLinkStatus = /*#__PURE__*/function (SmartLinkStatus) {
56
50
  SmartLinkStatus["Pending"] = "pending";
57
51
  SmartLinkStatus["Resolving"] = "resolving";
58
52
  SmartLinkStatus["Resolved"] = "resolved";
@@ -61,23 +55,33 @@ export let SmartLinkStatus;
61
55
  SmartLinkStatus["NotFound"] = "not_found";
62
56
  SmartLinkStatus["Unauthorized"] = "unauthorized";
63
57
  SmartLinkStatus["Fallback"] = "fallback";
64
- })(SmartLinkStatus || (SmartLinkStatus = {}));
65
- export let SmartLinkTheme;
66
- (function (SmartLinkTheme) {
58
+ return SmartLinkStatus;
59
+ }({});
60
+
61
+ /**
62
+ * Flexible UI theme available on the Card level.
63
+ * This determine the styling of the link.
64
+ */
65
+ export let SmartLinkTheme = /*#__PURE__*/function (SmartLinkTheme) {
67
66
  SmartLinkTheme["Black"] = "black";
68
67
  SmartLinkTheme["Link"] = "link";
69
- })(SmartLinkTheme || (SmartLinkTheme = {}));
70
- export let SmartLinkInternalTheme;
68
+ return SmartLinkTheme;
69
+ }({});
70
+ export let SmartLinkInternalTheme = /*#__PURE__*/function (SmartLinkInternalTheme) {
71
+ SmartLinkInternalTheme["Grey"] = "grey";
72
+ return SmartLinkInternalTheme;
73
+ }({});
71
74
 
72
75
  /**
73
76
  * Determines whether the container size will fit to the content
74
77
  * or expand to the available width or the parent component.
75
78
  * Similar to flex's flex-grow concept.
76
79
  */
77
- (function (SmartLinkInternalTheme) {
78
- SmartLinkInternalTheme["Grey"] = "grey";
79
- })(SmartLinkInternalTheme || (SmartLinkInternalTheme = {}));
80
- export let SmartLinkWidth;
80
+ export let SmartLinkWidth = /*#__PURE__*/function (SmartLinkWidth) {
81
+ SmartLinkWidth["FitToContent"] = "fit-to-content";
82
+ SmartLinkWidth["Flexible"] = "flexible";
83
+ return SmartLinkWidth;
84
+ }({});
81
85
 
82
86
  /**
83
87
  * Flexible UI element name - each reflecting the link data its represented.
@@ -95,16 +99,7 @@ export let SmartLinkWidth;
95
99
  * 6) Update element ElementDisplaySchema for inline/block display
96
100
  * (src/view/FlexibleCard/components/blocks/utils.tsx)
97
101
  */
98
- (function (SmartLinkWidth) {
99
- SmartLinkWidth["FitToContent"] = "fit-to-content";
100
- SmartLinkWidth["Flexible"] = "flexible";
101
- })(SmartLinkWidth || (SmartLinkWidth = {}));
102
- export let ElementName;
103
-
104
- /**
105
- * Flexible UI action (button)
106
- */
107
- (function (ElementName) {
102
+ export let ElementName = /*#__PURE__*/function (ElementName) {
108
103
  ElementName["AttachmentCount"] = "AttachmentCount";
109
104
  ElementName["AuthorGroup"] = "AuthorGroup";
110
105
  ElementName["ChecklistProgress"] = "ChecklistProgress";
@@ -132,26 +127,26 @@ export let ElementName;
132
127
  ElementName["Title"] = "Title";
133
128
  ElementName["ViewCount"] = "ViewCount";
134
129
  ElementName["VoteCount"] = "VoteCount";
135
- })(ElementName || (ElementName = {}));
136
- export let ActionName;
130
+ return ElementName;
131
+ }({});
137
132
 
138
133
  /**
139
- * Flexible UI icons - each mapped to AK icons.
134
+ * Flexible UI action (button)
140
135
  */
141
- (function (ActionName) {
136
+ export let ActionName = /*#__PURE__*/function (ActionName) {
142
137
  ActionName["DeleteAction"] = "DeleteAction";
143
138
  ActionName["EditAction"] = "EditAction";
144
139
  ActionName["PreviewAction"] = "PreviewAction";
145
140
  ActionName["ViewAction"] = "ViewAction";
146
141
  ActionName["DownloadAction"] = "DownloadAction";
147
142
  ActionName["CustomAction"] = "CustomAction";
148
- })(ActionName || (ActionName = {}));
149
- export let IconType;
143
+ return ActionName;
144
+ }({});
150
145
 
151
146
  /**
152
- * Type for Flexible UI's Media element
147
+ * Flexible UI icons - each mapped to AK icons.
153
148
  */
154
- (function (IconType) {
149
+ export let IconType = /*#__PURE__*/function (IconType) {
155
150
  IconType["Archive"] = "FileType:Archive";
156
151
  IconType["Audio"] = "FileType:Audio";
157
152
  IconType["Blog"] = "FileType:Blog";
@@ -214,22 +209,27 @@ export let IconType;
214
209
  IconType["PriorityUndefined"] = "Badge:PriorityUndefined";
215
210
  IconType["ProgrammingLanguage"] = "Badge:ProgrammingLanguage";
216
211
  IconType["Subscriber"] = "Badge:Subscriber";
217
- })(IconType || (IconType = {}));
218
- export let MediaType;
219
- (function (MediaType) {
212
+ return IconType;
213
+ }({});
214
+
215
+ /**
216
+ * Type for Flexible UI's Media element
217
+ */
218
+ export let MediaType = /*#__PURE__*/function (MediaType) {
220
219
  MediaType["Image"] = "image";
221
- })(MediaType || (MediaType = {}));
222
- export let MediaPlacement;
223
- (function (MediaPlacement) {
220
+ return MediaType;
221
+ }({});
222
+ export let MediaPlacement = /*#__PURE__*/function (MediaPlacement) {
224
223
  MediaPlacement["Left"] = "left";
225
224
  MediaPlacement["Right"] = "right";
226
- })(MediaPlacement || (MediaPlacement = {}));
227
- export let CardDisplay;
228
- (function (CardDisplay) {
225
+ return MediaPlacement;
226
+ }({});
227
+ export let CardDisplay = /*#__PURE__*/function (CardDisplay) {
229
228
  CardDisplay["Inline"] = "inline";
230
229
  CardDisplay["Block"] = "block";
231
230
  CardDisplay["Embed"] = "embed";
232
231
  CardDisplay["EmbedPreview"] = "embedPreview";
233
232
  CardDisplay["Flexible"] = "flexible";
234
233
  CardDisplay["HoverCardPreview"] = "hoverCardPreview";
235
- })(CardDisplay || (CardDisplay = {}));
234
+ return CardDisplay;
235
+ }({});
@@ -39,7 +39,7 @@ export default {
39
39
  'fabric.linking.invalid_permissions': 'Omezený obsah',
40
40
  'fabric.linking.invalid_permissions_description': 'Pokud si chcete zobrazit tento náhled, požádejte o přístup nebo vyzkoušejte jiný účet.',
41
41
  'fabric.linking.join_to_view': 'Chcete-li si zobrazit tento požadavek, připojte se ke službě {context}.',
42
- 'fabric.linking.learn_more_about_smart_links': 'Další informace o odkazech Smart Link',
42
+ 'fabric.linking.learn_more_about_smart_links': 'Další informace o chytrých odkazech',
43
43
  'fabric.linking.link_safety_warning_message': 'Odkaz {unsafeLinkText} vás přesměruje na jiný web (<a>actual link here</a>)',
44
44
  'fabric.linking.loading': 'Načítání…',
45
45
  'fabric.linking.modified_on_absolute': 'Aktualizováno: {context}',
@@ -48,6 +48,7 @@ export default {
48
48
  'fabric.linking.not_found_description': 'Odkaz se nepodařilo najít. Zkontrolujte adresu URL a zkuste ji upravit nebo vložit znovu.',
49
49
  'fabric.linking.not_found_title': 'Jejda. Tento odkaz se nepodařilo najít.',
50
50
  'fabric.linking.open_link_in_a_new_tab': 'Otevřít odkaz na nové kartě',
51
+ 'fabric.linking.owned_by': 'Vlastník: {context}',
51
52
  'fabric.linking.pending_request': 'Vaše žádost o přístup čeká na vyřízení.',
52
53
  'fabric.linking.preview': 'Zobrazení na celou obrazovku',
53
54
  'fabric.linking.preview_close': 'Zavřít náhled',
@@ -39,7 +39,7 @@ export default {
39
39
  'fabric.linking.invalid_permissions': 'Begrænset indhold',
40
40
  'fabric.linking.invalid_permissions_description': 'Anmod om adgang, eller prøv med en anden konto for at se denne forhåndsvisning.',
41
41
  'fabric.linking.join_to_view': 'Deltag i {context} for at se denne sag',
42
- 'fabric.linking.learn_more_about_smart_links': 'Få mere at vide om Smart Links.',
42
+ 'fabric.linking.learn_more_about_smart_links': 'Få mere at vide om intelligente links.',
43
43
  'fabric.linking.link_safety_warning_message': 'Linket {unsafeLinkText} fører dig til et andet websted, <a>actual link here</a>',
44
44
  'fabric.linking.loading': 'Indlæser ...',
45
45
  'fabric.linking.modified_on_absolute': 'Opdateret {context}',
@@ -48,6 +48,7 @@ export default {
48
48
  'fabric.linking.not_found_description': 'Vi kunne ikke finde linket. Kontrollér og rediger URL-adressen, eller indsæt den igen.',
49
49
  'fabric.linking.not_found_title': 'Ups. Vi kan ikke finde dette link!',
50
50
  'fabric.linking.open_link_in_a_new_tab': 'Åbn link i en ny fane',
51
+ 'fabric.linking.owned_by': 'Ejet af {context}',
51
52
  'fabric.linking.pending_request': 'Din anmodning om adgang afventer behandling',
52
53
  'fabric.linking.preview': 'Fuldskærmsvisning',
53
54
  'fabric.linking.preview_close': 'Luk forhåndsvisning',
@@ -39,7 +39,7 @@ export default {
39
39
  'fabric.linking.invalid_permissions': 'Inhalt mit Beschränkungen',
40
40
  'fabric.linking.invalid_permissions_description': 'Bitte senden Sie eine Zugriffsanfrage oder versuchen Sie, die Vorschau über ein anderes Konto anzusehen.',
41
41
  'fabric.linking.join_to_view': '{context} beitreten, um diesen Vorgang anzuzeigen',
42
- 'fabric.linking.learn_more_about_smart_links': 'Mehr über Smart Links erfahren',
42
+ 'fabric.linking.learn_more_about_smart_links': 'Mehr über intelligente Links erfahren',
43
43
  'fabric.linking.link_safety_warning_message': 'Über den Link {unsafeLinkText} gelangen Sie zu einer anderen Site, <a>actual link here</a>',
44
44
  'fabric.linking.loading': 'Lädt ...',
45
45
  'fabric.linking.modified_on_absolute': 'Aktualisiert am: {context}',
@@ -48,6 +48,7 @@ export default {
48
48
  'fabric.linking.not_found_description': 'Der Link konnte nicht gefunden werden. Überprüfen Sie die URL und versuchen Sie die Bearbeitung oder das Einfügen erneut.',
49
49
  'fabric.linking.not_found_title': 'Oh! Diese Verknüpfung konnte nicht gefunden werden!',
50
50
  'fabric.linking.open_link_in_a_new_tab': 'Link in neuer Registerkarte öffnen',
51
+ 'fabric.linking.owned_by': 'Besitzer: {context}',
51
52
  'fabric.linking.pending_request': 'Ihre Zugriffsanfrage ist ausstehend.',
52
53
  'fabric.linking.preview': 'Vollbildansicht',
53
54
  'fabric.linking.preview_close': 'Vorschau beenden',
@@ -47,7 +47,9 @@ export default {
47
47
  'fabric.linking.more_actions': 'More actions',
48
48
  'fabric.linking.not_found_description': "We couldn't find the link. Check the url and try editing or paste again.",
49
49
  'fabric.linking.not_found_title': "Uh oh. We can't find this link!",
50
+ 'fabric.linking.open_issue_in_jira': 'Open issue in Jira',
50
51
  'fabric.linking.open_link_in_a_new_tab': 'Open link in a new tab',
52
+ 'fabric.linking.owned_by': 'Owned by {context}',
51
53
  'fabric.linking.pending_request': 'Your access request is pending',
52
54
  'fabric.linking.preview': 'Full screen view',
53
55
  'fabric.linking.preview_close': 'Close preview',
@@ -76,6 +78,9 @@ export default {
76
78
  'fabric.linking.save': 'Save',
77
79
  'fabric.linking.srclink': 'View in',
78
80
  'fabric.linking.srclinkunknown': 'View Original',
81
+ 'fabric.linking.status_change_load_error': 'We couldn’t load the statuses and transitions',
82
+ 'fabric.linking.status_change_permission_error': 'You don’t have permission to transition this issue.',
83
+ 'fabric.linking.status_change_update_error': 'We couldn’t update the status',
79
84
  'fabric.linking.try_again': 'Try again',
80
85
  'fabric.linking.try_another_account': 'Try another account',
81
86
  'fabric.linking.unlink_account': 'Unlink Account',
@@ -47,7 +47,9 @@ export default {
47
47
  'fabric.linking.more_actions': 'More actions',
48
48
  'fabric.linking.not_found_description': "We couldn't find the link. Check the url and try editing or paste again.",
49
49
  'fabric.linking.not_found_title': "Uh oh. We can't find this link!",
50
+ 'fabric.linking.open_issue_in_jira': 'Open issue in Jira',
50
51
  'fabric.linking.open_link_in_a_new_tab': 'Open link in a new tab',
52
+ 'fabric.linking.owned_by': 'Owned by {context}',
51
53
  'fabric.linking.pending_request': 'Your access request is pending',
52
54
  'fabric.linking.preview': 'Full screen view',
53
55
  'fabric.linking.preview_close': 'Close preview',
@@ -76,6 +78,9 @@ export default {
76
78
  'fabric.linking.save': 'Save',
77
79
  'fabric.linking.srclink': 'View in',
78
80
  'fabric.linking.srclinkunknown': 'View Original',
81
+ 'fabric.linking.status_change_load_error': 'We couldn’t load the statuses and transitions',
82
+ 'fabric.linking.status_change_permission_error': 'You don’t have permission to transition this issue.',
83
+ 'fabric.linking.status_change_update_error': 'We couldn’t update the status',
79
84
  'fabric.linking.try_again': 'Try again',
80
85
  'fabric.linking.try_another_account': 'Try another account',
81
86
  'fabric.linking.unlink_account': 'Unlink Account',