@atlaskit/share 4.1.1 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @atlaskit/share
2
2
 
3
+ ## 4.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
3
13
  ## 4.1.1
4
14
 
5
15
  ### Patch Changes
@@ -1,15 +1,14 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.AtlassianUrlShortenerClient = void 0;
8
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
10
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
11
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
12
- 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; }
13
12
  var AtlassianUrlShortenerClient = /*#__PURE__*/function () {
14
13
  function AtlassianUrlShortenerClient() {
15
14
  (0, _classCallCheck2.default)(this, AtlassianUrlShortenerClient);
@@ -17,51 +16,49 @@ var AtlassianUrlShortenerClient = /*#__PURE__*/function () {
17
16
  (0, _createClass2.default)(AtlassianUrlShortenerClient, [{
18
17
  key: "shorten",
19
18
  value: function () {
20
- var _shorten = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
19
+ var _shorten = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {
21
20
  var response, result;
22
- return _regeneratorRuntime().wrap(function _callee$(_context) {
23
- while (1) {
24
- switch (_context.prev = _context.next) {
25
- case 0:
26
- _context.prev = 0;
27
- _context.next = 3;
28
- return fetch('/gateway/api/atl-link/create', {
29
- method: 'POST',
30
- headers: {
31
- 'Content-Type': 'application/json'
32
- },
33
- body: JSON.stringify(data)
34
- });
35
- case 3:
36
- response = _context.sent;
37
- if (response.ok) {
38
- _context.next = 6;
39
- break;
40
- }
41
- throw new Error("status=\"".concat(response.status, "\""));
42
- case 6:
43
- _context.next = 8;
44
- return response.json();
45
- case 8:
46
- result = _context.sent;
47
- if (result.shortUrl) {
48
- _context.next = 11;
49
- break;
50
- }
51
- throw new Error('Breach of contract!');
52
- case 11:
53
- return _context.abrupt("return", result);
54
- case 14:
55
- _context.prev = 14;
56
- _context.t0 = _context["catch"](0);
57
- if (_context.t0 instanceof Error) {
58
- _context.t0.message = "While shortening URL: ".concat(_context.t0.message, "!");
59
- }
60
- throw _context.t0;
61
- case 18:
62
- case "end":
63
- return _context.stop();
64
- }
21
+ return _regenerator.default.wrap(function _callee$(_context) {
22
+ while (1) switch (_context.prev = _context.next) {
23
+ case 0:
24
+ _context.prev = 0;
25
+ _context.next = 3;
26
+ return fetch('/gateway/api/atl-link/create', {
27
+ method: 'POST',
28
+ headers: {
29
+ 'Content-Type': 'application/json'
30
+ },
31
+ body: JSON.stringify(data)
32
+ });
33
+ case 3:
34
+ response = _context.sent;
35
+ if (response.ok) {
36
+ _context.next = 6;
37
+ break;
38
+ }
39
+ throw new Error("status=\"".concat(response.status, "\""));
40
+ case 6:
41
+ _context.next = 8;
42
+ return response.json();
43
+ case 8:
44
+ result = _context.sent;
45
+ if (result.shortUrl) {
46
+ _context.next = 11;
47
+ break;
48
+ }
49
+ throw new Error('Breach of contract!');
50
+ case 11:
51
+ return _context.abrupt("return", result);
52
+ case 14:
53
+ _context.prev = 14;
54
+ _context.t0 = _context["catch"](0);
55
+ if (_context.t0 instanceof Error) {
56
+ _context.t0.message = "While shortening URL: ".concat(_context.t0.message, "!");
57
+ }
58
+ throw _context.t0;
59
+ case 18:
60
+ case "end":
61
+ return _context.stop();
65
62
  }
66
63
  }, _callee, null, [[0, 14]]);
67
64
  }));
@@ -15,7 +15,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
15
15
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || (0, _typeof2.default)(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; } /** @jsx jsx */
16
16
  var LazyShareFormLazy = (0, _reactLooselyLazy.lazyForPaint)(function () {
17
17
  return Promise.resolve().then(function () {
18
- return _interopRequireWildcard(require('./LazyShareForm'));
18
+ return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_share-form" */
19
+ './LazyShareForm'));
19
20
  });
20
21
  }, {
21
22
  ssr: false
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.defaultConfig = exports.ShareDialogContainerInternal = exports.ShareDialogContainer = void 0;
8
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
+ var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime/helpers/objectDestructuringEmpty"));
9
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
11
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
12
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
@@ -31,7 +32,6 @@ var _ErrorBoundary = _interopRequireDefault(require("./ErrorBoundary"));
31
32
  var _MessagesIntlProvider = _interopRequireDefault(require("./MessagesIntlProvider"));
32
33
  var _ShareDialogWithTrigger = require("./ShareDialogWithTrigger");
33
34
  var _utils = require("./utils");
34
- 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; }
35
35
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
36
36
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
37
37
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
@@ -74,47 +74,45 @@ var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Component) {
74
74
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "fetchConfig", function () {
75
75
  _this.setState({
76
76
  isFetchingConfig: true
77
- }, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
77
+ }, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
78
78
  var config, errObj;
79
- return _regeneratorRuntime().wrap(function _callee$(_context) {
80
- while (1) {
81
- switch (_context.prev = _context.next) {
82
- case 0:
83
- _context.prev = 0;
84
- _ufoExperiences.renderShareDialogExp.start();
85
- _context.next = 4;
86
- return _this.shareClient.getConfig(_this.props.cloudId);
87
- case 4:
88
- config = _context.sent;
89
- if (_this._isMounted) {
90
- _this.setState({
91
- config: config,
92
- isFetchingConfig: false
93
- });
94
- }
95
- _ufoExperiences.renderShareDialogExp.success();
96
- _context.next = 15;
97
- break;
98
- case 9:
99
- _context.prev = 9;
100
- _context.t0 = _context["catch"](0);
101
- if (_this._isMounted) {
102
- _this.setState({
103
- config: defaultConfig,
104
- isFetchingConfig: false
105
- });
106
- }
107
- errObj = (0, _extends2.default)({}, _context.t0);
108
- if (_context.t0 instanceof Error) {
109
- errObj = _objectSpread(_objectSpread({}, errObj), {}, {
110
- className: _context.t0.constructor.name
111
- });
112
- }
113
- (0, _ufoExperienceHelper.isValidFailedExperience)(_ufoExperiences.renderShareDialogExp, errObj);
114
- case 15:
115
- case "end":
116
- return _context.stop();
117
- }
79
+ return _regenerator.default.wrap(function _callee$(_context) {
80
+ while (1) switch (_context.prev = _context.next) {
81
+ case 0:
82
+ _context.prev = 0;
83
+ _ufoExperiences.renderShareDialogExp.start();
84
+ _context.next = 4;
85
+ return _this.shareClient.getConfig(_this.props.cloudId);
86
+ case 4:
87
+ config = _context.sent;
88
+ if (_this._isMounted) {
89
+ _this.setState({
90
+ config: config,
91
+ isFetchingConfig: false
92
+ });
93
+ }
94
+ _ufoExperiences.renderShareDialogExp.success();
95
+ _context.next = 15;
96
+ break;
97
+ case 9:
98
+ _context.prev = 9;
99
+ _context.t0 = _context["catch"](0);
100
+ if (_this._isMounted) {
101
+ _this.setState({
102
+ config: defaultConfig,
103
+ isFetchingConfig: false
104
+ });
105
+ }
106
+ errObj = (0, _extends2.default)({}, ((0, _objectDestructuringEmpty2.default)(_context.t0), _context.t0));
107
+ if (_context.t0 instanceof Error) {
108
+ errObj = _objectSpread(_objectSpread({}, errObj), {}, {
109
+ className: _context.t0.constructor.name
110
+ });
111
+ }
112
+ (0, _ufoExperienceHelper.isValidFailedExperience)(_ufoExperiences.renderShareDialogExp, errObj);
113
+ case 15:
114
+ case "end":
115
+ return _context.stop();
118
116
  }
119
117
  }, _callee, null, [[0, 9]]);
120
118
  })));
@@ -153,26 +151,24 @@ var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Component) {
153
151
  });
154
152
  });
155
153
  });
156
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleDialogOpen", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
157
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
158
- while (1) {
159
- switch (_context2.prev = _context2.next) {
160
- case 0:
161
- if (_this.props.onDialogOpen) {
162
- _this.props.onDialogOpen();
163
- }
164
- _this.setState({
165
- currentPageUrl: getCurrentPageUrl()
166
- }, function () {
167
- _this.updateShortCopyLink();
168
- });
154
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleDialogOpen", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
155
+ return _regenerator.default.wrap(function _callee2$(_context2) {
156
+ while (1) switch (_context2.prev = _context2.next) {
157
+ case 0:
158
+ if (_this.props.onDialogOpen) {
159
+ _this.props.onDialogOpen();
160
+ }
161
+ _this.setState({
162
+ currentPageUrl: getCurrentPageUrl()
163
+ }, function () {
164
+ _this.updateShortCopyLink();
165
+ });
169
166
 
170
- // always refetch the config when modal is re-opened
171
- _this.fetchConfig();
172
- case 3:
173
- case "end":
174
- return _context2.stop();
175
- }
167
+ // always refetch the config when modal is re-opened
168
+ _this.fetchConfig();
169
+ case 3:
170
+ case "end":
171
+ return _context2.stop();
176
172
  }
177
173
  }, _callee2);
178
174
  })));
@@ -190,9 +186,12 @@ var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Component) {
190
186
  }
191
187
  return payload;
192
188
  });
189
+ // ensure origin is re-generated if the link or the factory changes
190
+ // separate memoization is needed since copy != form
193
191
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getUniqueCopyLinkOriginTracing", (0, _memoizeOne.default)(function (link, originTracingFactory) {
194
192
  return originTracingFactory();
195
193
  }));
194
+ // form origin must furthermore be regenerated after each form share
196
195
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getUniqueFormShareOriginTracing", (0, _memoizeOne.default)(function (link, originTracingFactory, shareCount) {
197
196
  return originTracingFactory();
198
197
  }));
@@ -244,10 +243,6 @@ var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Component) {
244
243
  this.updateShortCopyLink();
245
244
  }
246
245
  }
247
-
248
- // ensure origin is re-generated if the link or the factory changes
249
- // separate memoization is needed since copy != form
250
- // form origin must furthermore be regenerated after each form share
251
246
  }, {
252
247
  key: "getRawLink",
253
248
  value: function getRawLink() {
@@ -60,6 +60,11 @@ var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent
60
60
  }
61
61
  _this = _super.call.apply(_super, [this].concat(args));
62
62
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "containerRef", /*#__PURE__*/_react.default.createRef());
63
+ /**
64
+ * Because the PopUp component has a higher zIndex it causes
65
+ * the select to be rendered within it, and add scrollbars.
66
+ * We will render the select options the PopUp outside,
67
+ */
63
68
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "selectPortalRef", /*#__PURE__*/_react.default.createRef());
64
69
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "start", 0);
65
70
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
@@ -367,11 +372,6 @@ var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent
367
372
  });
368
373
  return _this;
369
374
  }
370
- /**
371
- * Because the PopUp component has a higher zIndex it causes
372
- * the select to be rendered within it, and add scrollbars.
373
- * We will render the select options the PopUp outside,
374
- */
375
375
  (0, _createClass2.default)(ShareDialogWithTriggerInternal, [{
376
376
  key: "componentDidMount",
377
377
  value: function componentDidMount() {
@@ -13,7 +13,7 @@ var buildAttributes = function buildAttributes() {
13
13
  var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
14
14
  return _objectSpread({
15
15
  packageName: "@atlaskit/share",
16
- packageVersion: "4.1.1"
16
+ packageVersion: "4.2.0"
17
17
  }, attributes);
18
18
  };
19
19
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.TabType = void 0;
7
7
  // Third party integrations
8
- var TabType;
9
- exports.TabType = TabType;
10
- (function (TabType) {
8
+ var TabType = /*#__PURE__*/function (TabType) {
11
9
  TabType[TabType["default"] = 0] = "default";
12
10
  TabType[TabType["Slack"] = 1] = "Slack";
13
- })(TabType || (exports.TabType = TabType = {}));
11
+ return TabType;
12
+ }({});
13
+ exports.TabType = TabType;
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "4.1.1"
3
+ "version": "4.2.0"
4
4
  }
@@ -142,9 +142,12 @@ export class ShareDialogContainerInternal extends React.Component {
142
142
  }
143
143
  return payload;
144
144
  });
145
+ // ensure origin is re-generated if the link or the factory changes
146
+ // separate memoization is needed since copy != form
145
147
  _defineProperty(this, "getUniqueCopyLinkOriginTracing", memoizeOne((link, originTracingFactory) => {
146
148
  return originTracingFactory();
147
149
  }));
150
+ // form origin must furthermore be regenerated after each form share
148
151
  _defineProperty(this, "getUniqueFormShareOriginTracing", memoizeOne((link, originTracingFactory, shareCount) => {
149
152
  return originTracingFactory();
150
153
  }));
@@ -190,10 +193,6 @@ export class ShareDialogContainerInternal extends React.Component {
190
193
  this.updateShortCopyLink();
191
194
  }
192
195
  }
193
-
194
- // ensure origin is re-generated if the link or the factory changes
195
- // separate memoization is needed since copy != form
196
- // form origin must furthermore be regenerated after each form share
197
196
  getRawLink() {
198
197
  const {
199
198
  shareLink
@@ -39,6 +39,11 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
39
39
  constructor(...args) {
40
40
  super(...args);
41
41
  _defineProperty(this, "containerRef", /*#__PURE__*/React.createRef());
42
+ /**
43
+ * Because the PopUp component has a higher zIndex it causes
44
+ * the select to be rendered within it, and add scrollbars.
45
+ * We will render the select options the PopUp outside,
46
+ */
42
47
  _defineProperty(this, "selectPortalRef", /*#__PURE__*/React.createRef());
43
48
  _defineProperty(this, "start", 0);
44
49
  _defineProperty(this, "state", {
@@ -365,11 +370,6 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
365
370
  });
366
371
  });
367
372
  }
368
- /**
369
- * Because the PopUp component has a higher zIndex it causes
370
- * the select to be rendered within it, and add scrollbars.
371
- * We will render the select options the PopUp outside,
372
- */
373
373
  componentDidMount() {
374
374
  if (this.props.isAutoOpenDialog) {
375
375
  this.handleDialogOpen();
@@ -1,7 +1,7 @@
1
1
  import { isEmail, isTeam, isUser } from '@atlaskit/smart-user-picker';
2
2
  const buildAttributes = (attributes = {}) => ({
3
3
  packageName: "@atlaskit/share",
4
- packageVersion: "4.1.1",
4
+ packageVersion: "4.2.0",
5
5
  ...attributes
6
6
  });
7
7
  const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
@@ -1,7 +1,7 @@
1
1
  // Third party integrations
2
2
 
3
- export let TabType;
4
- (function (TabType) {
3
+ export let TabType = /*#__PURE__*/function (TabType) {
5
4
  TabType[TabType["default"] = 0] = "default";
6
5
  TabType[TabType["Slack"] = 1] = "Slack";
7
- })(TabType || (TabType = {}));
6
+ return TabType;
7
+ }({});
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "4.1.1"
3
+ "version": "4.2.0"
4
4
  }