@atlaskit/renderer 107.3.2 → 107.3.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.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/actions/index.js +3 -4
- package/dist/cjs/analytics/enums.js +16 -16
- package/dist/cjs/analytics/events.js +12 -12
- package/dist/cjs/i18n/cs.js +1 -0
- package/dist/cjs/i18n/da.js +1 -0
- package/dist/cjs/i18n/de.js +1 -0
- package/dist/cjs/i18n/en.js +1 -0
- package/dist/cjs/i18n/en_GB.js +1 -0
- package/dist/cjs/i18n/en_ZZ.js +5 -4
- package/dist/cjs/i18n/es.js +1 -0
- package/dist/cjs/i18n/fi.js +1 -0
- package/dist/cjs/i18n/fr.js +1 -0
- package/dist/cjs/i18n/hu.js +1 -0
- package/dist/cjs/i18n/it.js +1 -0
- package/dist/cjs/i18n/ja.js +1 -0
- package/dist/cjs/i18n/ko.js +1 -0
- package/dist/cjs/i18n/nb.js +1 -0
- package/dist/cjs/i18n/nl.js +1 -0
- package/dist/cjs/i18n/pl.js +1 -0
- package/dist/cjs/i18n/pt_BR.js +1 -0
- package/dist/cjs/i18n/ru.js +1 -0
- package/dist/cjs/i18n/sv.js +1 -0
- package/dist/cjs/i18n/th.js +1 -0
- package/dist/cjs/i18n/tr.js +1 -0
- package/dist/cjs/i18n/uk.js +1 -0
- package/dist/cjs/i18n/vi.js +1 -0
- package/dist/cjs/i18n/zh.js +1 -0
- package/dist/cjs/i18n/zh_TW.js +1 -0
- package/dist/cjs/react/hooks/use-in-viewport.js +1 -1
- package/dist/cjs/react/hooks/use-observed-width.js +1 -1
- package/dist/cjs/react/index.js +8 -9
- package/dist/cjs/react/nodes/codeBlock/windowedCodeBlock.js +12 -13
- package/dist/cjs/react/nodes/heading-anchor.js +21 -24
- package/dist/cjs/react/nodes/index.js +38 -19
- package/dist/cjs/react/nodes/mediaInline.js +17 -19
- package/dist/cjs/react/nodes/table/sticky.js +1 -1
- package/dist/cjs/react/nodes/table.js +3 -3
- package/dist/cjs/react/nodes/task-item-with-providers.js +34 -36
- package/dist/cjs/ui/MediaCard.js +82 -87
- package/dist/cjs/ui/Renderer/index.js +5 -6
- package/dist/cjs/ui/Renderer/style.js +7 -4
- package/dist/cjs/ui/SortingIcon.js +4 -4
- package/dist/cjs/ui/annotations/types.js +4 -4
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +3 -4
- package/dist/es2019/analytics/enums.js +12 -12
- package/dist/es2019/analytics/events.js +9 -9
- package/dist/es2019/i18n/cs.js +1 -0
- package/dist/es2019/i18n/da.js +1 -0
- package/dist/es2019/i18n/de.js +1 -0
- package/dist/es2019/i18n/en.js +1 -0
- package/dist/es2019/i18n/en_GB.js +1 -0
- package/dist/es2019/i18n/en_ZZ.js +5 -4
- package/dist/es2019/i18n/es.js +1 -0
- package/dist/es2019/i18n/fi.js +1 -0
- package/dist/es2019/i18n/fr.js +1 -0
- package/dist/es2019/i18n/hu.js +1 -0
- package/dist/es2019/i18n/it.js +1 -0
- package/dist/es2019/i18n/ja.js +1 -0
- package/dist/es2019/i18n/ko.js +1 -0
- package/dist/es2019/i18n/nb.js +1 -0
- package/dist/es2019/i18n/nl.js +1 -0
- package/dist/es2019/i18n/pl.js +1 -0
- package/dist/es2019/i18n/pt_BR.js +1 -0
- package/dist/es2019/i18n/ru.js +1 -0
- package/dist/es2019/i18n/sv.js +1 -0
- package/dist/es2019/i18n/th.js +1 -0
- package/dist/es2019/i18n/tr.js +1 -0
- package/dist/es2019/i18n/uk.js +1 -0
- package/dist/es2019/i18n/vi.js +1 -0
- package/dist/es2019/i18n/zh.js +1 -0
- package/dist/es2019/i18n/zh_TW.js +1 -0
- package/dist/es2019/react/index.js +8 -9
- package/dist/es2019/react/nodes/table/sticky.js +3 -0
- package/dist/es2019/react/nodes/table.js +3 -4
- package/dist/es2019/ui/MediaCard.js +6 -8
- package/dist/es2019/ui/Renderer/index.js +5 -6
- package/dist/es2019/ui/Renderer/style.js +7 -4
- package/dist/es2019/ui/SortingIcon.js +3 -3
- package/dist/es2019/ui/annotations/types.js +3 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +3 -4
- package/dist/esm/analytics/enums.js +12 -12
- package/dist/esm/analytics/events.js +9 -9
- package/dist/esm/i18n/cs.js +1 -0
- package/dist/esm/i18n/da.js +1 -0
- package/dist/esm/i18n/de.js +1 -0
- package/dist/esm/i18n/en.js +1 -0
- package/dist/esm/i18n/en_GB.js +1 -0
- package/dist/esm/i18n/en_ZZ.js +5 -4
- package/dist/esm/i18n/es.js +1 -0
- package/dist/esm/i18n/fi.js +1 -0
- package/dist/esm/i18n/fr.js +1 -0
- package/dist/esm/i18n/hu.js +1 -0
- package/dist/esm/i18n/it.js +1 -0
- package/dist/esm/i18n/ja.js +1 -0
- package/dist/esm/i18n/ko.js +1 -0
- package/dist/esm/i18n/nb.js +1 -0
- package/dist/esm/i18n/nl.js +1 -0
- package/dist/esm/i18n/pl.js +1 -0
- package/dist/esm/i18n/pt_BR.js +1 -0
- package/dist/esm/i18n/ru.js +1 -0
- package/dist/esm/i18n/sv.js +1 -0
- package/dist/esm/i18n/th.js +1 -0
- package/dist/esm/i18n/tr.js +1 -0
- package/dist/esm/i18n/uk.js +1 -0
- package/dist/esm/i18n/vi.js +1 -0
- package/dist/esm/i18n/zh.js +1 -0
- package/dist/esm/i18n/zh_TW.js +1 -0
- package/dist/esm/react/hooks/use-in-viewport.js +1 -1
- package/dist/esm/react/hooks/use-observed-width.js +1 -1
- package/dist/esm/react/index.js +8 -9
- package/dist/esm/react/nodes/codeBlock/windowedCodeBlock.js +10 -13
- package/dist/esm/react/nodes/heading-anchor.js +21 -24
- package/dist/esm/react/nodes/mediaInline.js +17 -20
- package/dist/esm/react/nodes/table/sticky.js +1 -1
- package/dist/esm/react/nodes/table.js +3 -3
- package/dist/esm/react/nodes/task-item-with-providers.js +34 -37
- package/dist/esm/ui/MediaCard.js +82 -88
- package/dist/esm/ui/Renderer/index.js +5 -6
- package/dist/esm/ui/Renderer/style.js +8 -5
- package/dist/esm/ui/SortingIcon.js +3 -3
- package/dist/esm/ui/annotations/types.js +3 -3
- package/dist/esm/version.json +1 -1
- package/dist/types/i18n/en_ZZ.d.ts +2 -2
- package/package.json +12 -12
- package/report.api.md +1 -1
package/dist/cjs/ui/MediaCard.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.getListOfIdentifiersFromDoc = exports.getClipboardAttrs = exports.MediaCardInternal = exports.MediaCard = void 0;
|
|
9
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
@@ -23,7 +24,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
23
24
|
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; }
|
|
24
25
|
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; }
|
|
25
26
|
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; }
|
|
26
|
-
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; }
|
|
27
27
|
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); }; }
|
|
28
28
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
29
29
|
var mediaIdentifierMap = new Map();
|
|
@@ -68,34 +68,32 @@ var MediaCardInternal = /*#__PURE__*/function (_Component) {
|
|
|
68
68
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
69
69
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {});
|
|
70
70
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "saveFileState", /*#__PURE__*/function () {
|
|
71
|
-
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
71
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(id, mediaClientConfig) {
|
|
72
72
|
var _this$props, collectionName, featureFlags, mediaClient, options, fileState;
|
|
73
|
-
return
|
|
74
|
-
while (1) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
return _context.stop();
|
|
98
|
-
}
|
|
73
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
74
|
+
while (1) switch (_context.prev = _context.next) {
|
|
75
|
+
case 0:
|
|
76
|
+
_this$props = _this.props, collectionName = _this$props.collection, featureFlags = _this$props.featureFlags;
|
|
77
|
+
mediaClient = (0, _mediaClient.getMediaClient)(mediaClientConfig, featureFlags);
|
|
78
|
+
options = {
|
|
79
|
+
collectionName: collectionName
|
|
80
|
+
};
|
|
81
|
+
_context.prev = 3;
|
|
82
|
+
_context.next = 6;
|
|
83
|
+
return mediaClient.file.getCurrentState(id, options);
|
|
84
|
+
case 6:
|
|
85
|
+
fileState = _context.sent;
|
|
86
|
+
_this.setState({
|
|
87
|
+
fileState: fileState
|
|
88
|
+
});
|
|
89
|
+
_context.next = 12;
|
|
90
|
+
break;
|
|
91
|
+
case 10:
|
|
92
|
+
_context.prev = 10;
|
|
93
|
+
_context.t0 = _context["catch"](3);
|
|
94
|
+
case 12:
|
|
95
|
+
case "end":
|
|
96
|
+
return _context.stop();
|
|
99
97
|
}
|
|
100
98
|
}, _callee, null, [[3, 10]]);
|
|
101
99
|
}));
|
|
@@ -109,6 +107,12 @@ var MediaCardInternal = /*#__PURE__*/function (_Component) {
|
|
|
109
107
|
dimensions: cardDimensions
|
|
110
108
|
});
|
|
111
109
|
});
|
|
110
|
+
/**
|
|
111
|
+
* We want to call provided `eventHandlers.media.onClick` when it's provided,
|
|
112
|
+
* but we also don't want to call it when it's a video and inline video player is enabled.
|
|
113
|
+
* This is due to consumers normally process this onClick call by opening media viewer and
|
|
114
|
+
* we don't want that to happened described above text.
|
|
115
|
+
*/
|
|
112
116
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getOnCardClickCallback", function (isInlinePlayer) {
|
|
113
117
|
var eventHandlers = _this.props.eventHandlers;
|
|
114
118
|
if (eventHandlers && eventHandlers.media && eventHandlers.media.onClick) {
|
|
@@ -127,60 +131,58 @@ var MediaCardInternal = /*#__PURE__*/function (_Component) {
|
|
|
127
131
|
(0, _createClass2.default)(MediaCardInternal, [{
|
|
128
132
|
key: "componentDidMount",
|
|
129
133
|
value: function () {
|
|
130
|
-
var _componentDidMount = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
134
|
+
var _componentDidMount = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
131
135
|
var _this$props2, rendererContext, mediaProvider, contextIdentifierProvider, id, url, collectionName, mediaProviderObject, mediaClientConfig, nodeIsInCache;
|
|
132
|
-
return
|
|
133
|
-
while (1) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
_context2.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
this.setState({
|
|
175
|
-
mediaClientConfig: mediaClientConfig
|
|
136
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
137
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
138
|
+
case 0:
|
|
139
|
+
_this$props2 = this.props, rendererContext = _this$props2.rendererContext, mediaProvider = _this$props2.mediaProvider, contextIdentifierProvider = _this$props2.contextIdentifierProvider, id = _this$props2.id, url = _this$props2.url, collectionName = _this$props2.collection;
|
|
140
|
+
if (mediaProvider) {
|
|
141
|
+
_context2.next = 3;
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
return _context2.abrupt("return");
|
|
145
|
+
case 3:
|
|
146
|
+
if (!contextIdentifierProvider) {
|
|
147
|
+
_context2.next = 10;
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
_context2.t0 = this;
|
|
151
|
+
_context2.next = 7;
|
|
152
|
+
return contextIdentifierProvider;
|
|
153
|
+
case 7:
|
|
154
|
+
_context2.t1 = _context2.sent;
|
|
155
|
+
_context2.t2 = {
|
|
156
|
+
contextIdentifierProvider: _context2.t1
|
|
157
|
+
};
|
|
158
|
+
_context2.t0.setState.call(_context2.t0, _context2.t2);
|
|
159
|
+
case 10:
|
|
160
|
+
_context2.next = 12;
|
|
161
|
+
return mediaProvider;
|
|
162
|
+
case 12:
|
|
163
|
+
mediaProviderObject = _context2.sent;
|
|
164
|
+
mediaClientConfig = mediaProviderObject.viewMediaClientConfig;
|
|
165
|
+
nodeIsInCache = id && mediaIdentifierMap.has(id) || url && mediaIdentifierMap.has(url);
|
|
166
|
+
if (rendererContext && rendererContext.adDoc && !nodeIsInCache) {
|
|
167
|
+
getListOfIdentifiersFromDoc(rendererContext.adDoc).forEach(function (identifier) {
|
|
168
|
+
if (identifier.mediaItemType === 'file' && identifier.id === id) {
|
|
169
|
+
mediaIdentifierMap.set(identifier.id, _objectSpread(_objectSpread({}, identifier), {}, {
|
|
170
|
+
collectionName: collectionName
|
|
171
|
+
}));
|
|
172
|
+
} else if (identifier.mediaItemType === 'external-image') {
|
|
173
|
+
mediaIdentifierMap.set(identifier.dataURI, identifier);
|
|
174
|
+
}
|
|
176
175
|
});
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
176
|
+
}
|
|
177
|
+
this.setState({
|
|
178
|
+
mediaClientConfig: mediaClientConfig
|
|
179
|
+
});
|
|
180
|
+
if (id) {
|
|
181
|
+
this.saveFileState(id, mediaClientConfig);
|
|
182
|
+
}
|
|
183
|
+
case 18:
|
|
184
|
+
case "end":
|
|
185
|
+
return _context2.stop();
|
|
184
186
|
}
|
|
185
187
|
}, _callee2, this);
|
|
186
188
|
}));
|
|
@@ -249,13 +251,6 @@ var MediaCardInternal = /*#__PURE__*/function (_Component) {
|
|
|
249
251
|
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode
|
|
250
252
|
});
|
|
251
253
|
}
|
|
252
|
-
|
|
253
|
-
/**
|
|
254
|
-
* We want to call provided `eventHandlers.media.onClick` when it's provided,
|
|
255
|
-
* but we also don't want to call it when it's a video and inline video player is enabled.
|
|
256
|
-
* This is due to consumers normally process this onClick call by opening media viewer and
|
|
257
|
-
* we don't want that to happened described above text.
|
|
258
|
-
*/
|
|
259
254
|
}, {
|
|
260
255
|
key: "render",
|
|
261
256
|
value: function render() {
|
|
@@ -55,19 +55,18 @@ exports.NORMAL_SEVERITY_THRESHOLD = NORMAL_SEVERITY_THRESHOLD;
|
|
|
55
55
|
var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
56
56
|
exports.DEGRADED_SEVERITY_THRESHOLD = DEGRADED_SEVERITY_THRESHOLD;
|
|
57
57
|
var packageName = "@atlaskit/renderer";
|
|
58
|
-
var packageVersion = "107.3.
|
|
58
|
+
var packageVersion = "107.3.4";
|
|
59
59
|
var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
60
60
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
61
61
|
var _super = _createSuper(Renderer);
|
|
62
|
-
/**
|
|
63
|
-
* This is used in measuring the Renderer Mount time and is then
|
|
64
|
-
* deleted once that measurement occurs.
|
|
65
|
-
*/
|
|
66
|
-
|
|
67
62
|
function Renderer(props) {
|
|
68
63
|
var _this;
|
|
69
64
|
(0, _classCallCheck2.default)(this, Renderer);
|
|
70
65
|
_this = _super.call(this, props);
|
|
66
|
+
/**
|
|
67
|
+
* This is used in measuring the Renderer Mount time and is then
|
|
68
|
+
* deleted once that measurement occurs.
|
|
69
|
+
*/
|
|
71
70
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderedMeasurementDistortedDurationMonitor", (0, _utils.getDistortedDurationMonitor)());
|
|
72
71
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "featureFlags", (0, _memoizeOne.default)(function (featureFlags) {
|
|
73
72
|
var normalizedFeatureFlags = (0, _normalizeFeatureFlags.normalizeFeatureFlags)(featureFlags, {
|
|
@@ -97,13 +97,16 @@ var rendererStyles = function rendererStyles(wrapperProps) {
|
|
|
97
97
|
var themeProps = {
|
|
98
98
|
theme: theme
|
|
99
99
|
};
|
|
100
|
-
return (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", "
|
|
100
|
+
return (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", ";\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", "px 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n ", "\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n .", "\n .", " {\n display: flex;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n &\n .", ",\n &\n .", " {\n height: calc(100% - ", "px);\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-of-type {\n height: 100%;\n\n td,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: auto 1fr;\n /* stylelint-enable */\n\n grid-template-columns: minmax(0, 1fr);\n position: relative;\n border-radius: ", ";\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n\n & > span {\n /* stylelint-disable value-no-vendor-prefix */\n -ms-grid-row: 1;\n -ms-grid-column: 2;\n /* stylelint-enable */\n grid-column: 1;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n }\n\n ", "\n\n ", ";\n & [data-layout-section] {\n margin-top: ", "px;\n & > div + div {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n }\n }\n\n & li {\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n }\n\n & :not([data-node-type='decisionList']) > li {\n ", "\n }\n "])), (0, _editorSharedStyles.editorFontSize)(themeProps), (0, _components.themed)({
|
|
101
101
|
light: "var(--ds-text, ".concat(colors.N800, ")"),
|
|
102
102
|
dark: "var(--ds-text, #B8C7E0)"
|
|
103
|
-
})(themeProps), _consts.RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), "var(--ds-link, ".concat(colors.B400, ")"), "var(--ds-link, ".concat(colors.B300, ")"), "var(--ds-link-pressed, ".concat(colors.B500, ")"),
|
|
103
|
+
})(themeProps), _consts.RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), "var(--ds-link, ".concat(colors.B400, ")"), "var(--ds-link, ".concat(colors.B300, ")"), "var(--ds-link-pressed, ".concat(colors.B500, ")"), (0, _components.themed)({
|
|
104
|
+
light: "var(--ds-text-subtlest, ".concat(colors.N200, ")"),
|
|
105
|
+
dark: "var(--ds-text-subtlest, ".concat(colors.DN200, ")")
|
|
106
|
+
})(themeProps), _styles.whitespaceSharedStyles, _styles.blockquoteSharedStyles, (0, _styles.headingsSharedStyles)(themeProps), (0, _styles.ruleSharedStyles)(themeProps), _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.blockMarksSharedStyles, (0, _styles.codeMarkSharedStyles)(themeProps), _styles.shadowSharedStyle, _styles.dateSharedStyle, _styles.textColorStyles, _styles.tasksAndDecisionsStyles, _styles.smartCardSharedStyles, (0, _constants.fontFamily)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _components.themed)({
|
|
104
107
|
light: "var(--ds-background-neutral, ".concat(colors.N30A, ")"),
|
|
105
108
|
dark: "var(--ds-background-neutral, ".concat(colors.DN70, ")")
|
|
106
|
-
})(themeProps), (
|
|
109
|
+
})(themeProps), "var(--ds-radius-100, 3px)", (0, _components.themed)({
|
|
107
110
|
light: "var(--ds-text, ".concat(colors.N800, ")"),
|
|
108
111
|
dark: "var(--ds-text, ".concat(colors.DN600, ")")
|
|
109
112
|
})(themeProps), "var(--ds-background-danger, ".concat(colors.R50, ")"), "var(--ds-text-danger, ".concat(colors.R500, ")"), (0, _constants.gridSize)() * 3, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, alignedHeadingAnchorStyle(wrapperProps), _styles.mediaSingleSharedStyle, _consts.RendererCssClassName.DOCUMENT, breakoutWidthStyle(wrapperProps.useFragmentMarkBreakoutWidthStylingFix), _consts.RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER, _consts.RendererCssClassName.EXTENSION, _consts.RendererCssClassName.DOCUMENT, _consts.RendererCssClassName.EXTENSION, _editorSharedStyles.blockNodesVerticalMargin, _consts.RendererCssClassName.EXTENSION_CENTER_ALIGN, _styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, _ui.shadowObserverClassNames.SHADOW_CONTAINER, _styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, (0, _styles.tableSharedStyle)(themeProps), _consts.RendererCssClassName.DOCUMENT, _styles.TableSharedCssClassName.TABLE_CONTAINER, _ui.shadowClassNames.RIGHT_SHADOW, _ui.shadowClassNames.LEFT_SHADOW, _styles.tableMarginTop - 1, _styles.tableMarginTop, _editorSharedStyles.akEditorStickyHeaderZIndex, _ui.shadowObserverClassNames.SENTINEL_LEFT, _ui.shadowObserverClassNames.SENTINEL_RIGHT, _styles.tableMarginTop, tableSortableColumnStyle(wrapperProps), _consts.RendererCssClassName.NUMBER_COLUMN, (0, _components.themed)({
|
|
@@ -133,7 +136,7 @@ var rendererStyles = function rendererStyles(wrapperProps) {
|
|
|
133
136
|
})(themeProps), (0, _components.themed)({
|
|
134
137
|
light: "var(--ds-border, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"),
|
|
135
138
|
dark: "var(--ds-border, ".concat(_editorSharedStyles.akEditorTableToolbarDark, ")")
|
|
136
|
-
})(themeProps), (
|
|
139
|
+
})(themeProps), "var(--ds-radius-100, 3px)", _editorSharedStyles.blockNodesVerticalMargin, (0, _lightWeightCodeBlock.getLightWeightCodeBlockStylesForRootRendererStyleSheet)(), _styles.columnLayoutSharedStyle, (0, _constants.gridSize)() * 2.5, (0, _constants.gridSize)() * 4, _editorSharedStyles.gridMediumMaxWidth, _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.blockNodesVerticalMargin, _utils.browser.safari ? _styles.codeBlockInListSafariFix : '');
|
|
137
140
|
};
|
|
138
141
|
};
|
|
139
142
|
exports.rendererStyles = rendererStyles;
|
|
@@ -16,14 +16,14 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
16
16
|
var _consts = require("../consts");
|
|
17
17
|
var _templateObject, _templateObject2, _templateObject3;
|
|
18
18
|
/** @jsx jsx */
|
|
19
|
-
var StatusClassNames
|
|
20
|
-
exports.StatusClassNames = StatusClassNames;
|
|
21
|
-
(function (StatusClassNames) {
|
|
19
|
+
var StatusClassNames = /*#__PURE__*/function (StatusClassNames) {
|
|
22
20
|
StatusClassNames["ASC"] = "sorting-icon-svg__asc";
|
|
23
21
|
StatusClassNames["DESC"] = "sorting-icon-svg__desc";
|
|
24
22
|
StatusClassNames["NO_ORDER"] = "sorting-icon-svg__no_order";
|
|
25
23
|
StatusClassNames["SORTING_NOT_ALLOWED"] = "sorting-icon-svg__not-allowed";
|
|
26
|
-
|
|
24
|
+
return StatusClassNames;
|
|
25
|
+
}({});
|
|
26
|
+
exports.StatusClassNames = StatusClassNames;
|
|
27
27
|
var buttonStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n display: flex;\n height: 28px;\n width: 28px;\n margin: 6px;\n right: 0;\n top: 0;\n border: 2px solid ", ";\n border-radius: ", "px;\n background-color: ", ";\n justify-content: center;\n align-items: center;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n\n &.", "__not-allowed {\n cursor: not-allowed;\n }\n"])), "var(--ds-border, #fff)", (0, _constants.gridSize)() / 2, "var(--ds-surface-overlay, ".concat(_colors.N20, ")"), "var(--ds-surface-overlay-hovered, ".concat(_colors.N30, ")"), "var(--ds-surface-overlay-pressed, rgba(179, 212, 255, 0.6))", _consts.RendererCssClassName.SORTABLE_COLUMN_ICON);
|
|
28
28
|
var iconWrapperStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n width: 8px;\n height: 12px;\n transition: transform 0.3s cubic-bezier(0.15, 1, 0.3, 1);\n transform-origin: 50% 50%;\n display: flex;\n justify-content: center;\n\n &.", " {\n transform: rotate(-180deg);\n }\n\n &.", "-inactive {\n opacity: 0.7;\n }\n"])), StatusClassNames.DESC, _consts.RendererCssClassName.SORTABLE_COLUMN_ICON);
|
|
29
29
|
|
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.InsertDraftPosition = void 0;
|
|
7
|
-
var InsertDraftPosition
|
|
8
|
-
exports.InsertDraftPosition = InsertDraftPosition;
|
|
9
|
-
(function (InsertDraftPosition) {
|
|
7
|
+
var InsertDraftPosition = /*#__PURE__*/function (InsertDraftPosition) {
|
|
10
8
|
InsertDraftPosition["AROUND_TEXT"] = "AROUND_TEXT";
|
|
11
9
|
InsertDraftPosition["START"] = "START";
|
|
12
10
|
InsertDraftPosition["END"] = "END";
|
|
13
11
|
InsertDraftPosition["INSIDE"] = "INSIDE";
|
|
14
|
-
|
|
12
|
+
return InsertDraftPosition;
|
|
13
|
+
}({});
|
|
14
|
+
exports.InsertDraftPosition = InsertDraftPosition;
|
package/dist/cjs/version.json
CHANGED
|
@@ -7,13 +7,12 @@ import { createAnnotationStep, getPosFromRange } from '../steps';
|
|
|
7
7
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import { getIndexMatch } from './matches-utils';
|
|
9
9
|
export default class RendererActions {
|
|
10
|
-
// This is our psuedo feature flag for now
|
|
11
|
-
// This module can only be used when wrapped with
|
|
12
|
-
// the <RendererContext> component for now.
|
|
13
|
-
|
|
14
10
|
// Any kind of refence is allowed
|
|
15
11
|
|
|
16
12
|
constructor(initFromContext = false) {
|
|
13
|
+
// This is our psuedo feature flag for now
|
|
14
|
+
// This module can only be used when wrapped with
|
|
15
|
+
// the <RendererContext> component for now.
|
|
17
16
|
_defineProperty(this, "initFromContext", false);
|
|
18
17
|
this.initFromContext = initFromContext;
|
|
19
18
|
this.transformer = new JSONTransformer();
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
export let EVENT_TYPE
|
|
2
|
-
(function (EVENT_TYPE) {
|
|
1
|
+
export let EVENT_TYPE = /*#__PURE__*/function (EVENT_TYPE) {
|
|
3
2
|
EVENT_TYPE["OPERATIONAL"] = "operational";
|
|
4
3
|
EVENT_TYPE["SCREEN"] = "screen";
|
|
5
4
|
EVENT_TYPE["TRACK"] = "track";
|
|
6
5
|
EVENT_TYPE["UI"] = "ui";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
return EVENT_TYPE;
|
|
7
|
+
}({});
|
|
8
|
+
export let ACTION = /*#__PURE__*/function (ACTION) {
|
|
10
9
|
ACTION["STARTED"] = "started";
|
|
11
10
|
ACTION["RENDERED"] = "rendered";
|
|
12
11
|
ACTION["RE_RENDERED"] = "reRendered";
|
|
@@ -31,9 +30,9 @@ export let ACTION;
|
|
|
31
30
|
ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED"] = "unsupportedContentLevelsTrackingSucceeded";
|
|
32
31
|
ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED"] = "unsupportedContentLevelsTrackingErrored";
|
|
33
32
|
ACTION["MEDIA_LINK_TRANSFORMED"] = "mediaLinkTransformed";
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
return ACTION;
|
|
34
|
+
}({});
|
|
35
|
+
export let ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
|
|
37
36
|
ACTION_SUBJECT["RENDERER"] = "renderer";
|
|
38
37
|
ACTION_SUBJECT["BUTTON"] = "button";
|
|
39
38
|
ACTION_SUBJECT["ANCHOR_LINK"] = "anchorLink";
|
|
@@ -44,12 +43,13 @@ export let ACTION_SUBJECT;
|
|
|
44
43
|
ACTION_SUBJECT["LINK"] = "link";
|
|
45
44
|
ACTION_SUBJECT["ANNOTATION"] = "annotation";
|
|
46
45
|
ACTION_SUBJECT["MEDIA"] = "media";
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
return ACTION_SUBJECT;
|
|
47
|
+
}({});
|
|
48
|
+
export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
50
49
|
ACTION_SUBJECT_ID["HEADING_ANCHOR_LINK"] = "headingAnchorLink";
|
|
51
50
|
ACTION_SUBJECT_ID["LINK"] = "link";
|
|
52
51
|
ACTION_SUBJECT_ID["INLINE_COMMENT"] = "inlineComment";
|
|
53
52
|
ACTION_SUBJECT_ID["CODEBLOCK_COPY"] = "codeBlockCopy";
|
|
54
53
|
ACTION_SUBJECT_ID["CODEBLOCK_WRAP"] = "codeBlockWrap";
|
|
55
|
-
|
|
54
|
+
return ACTION_SUBJECT_ID;
|
|
55
|
+
}({});
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export let PLATFORM
|
|
2
|
-
(function (PLATFORM) {
|
|
1
|
+
export let PLATFORM = /*#__PURE__*/function (PLATFORM) {
|
|
3
2
|
PLATFORM["NATIVE"] = "mobileNative";
|
|
4
3
|
PLATFORM["HYBRID"] = "mobileHybrid";
|
|
5
4
|
PLATFORM["WEB"] = "web";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
return PLATFORM;
|
|
6
|
+
}({});
|
|
7
|
+
export let MODE = /*#__PURE__*/function (MODE) {
|
|
9
8
|
MODE["RENDERER"] = "renderer";
|
|
10
9
|
MODE["EDITOR"] = "editor";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
return MODE;
|
|
11
|
+
}({});
|
|
12
|
+
export let RESOLVE_METHOD = /*#__PURE__*/function (RESOLVE_METHOD) {
|
|
14
13
|
RESOLVE_METHOD["COMPONENT"] = "component";
|
|
15
14
|
RESOLVE_METHOD["CONSUMER"] = "consumer";
|
|
16
15
|
RESOLVE_METHOD["ORPHANED"] = "orphaned";
|
|
17
|
-
|
|
16
|
+
return RESOLVE_METHOD;
|
|
17
|
+
}({});
|
package/dist/es2019/i18n/cs.js
CHANGED
package/dist/es2019/i18n/da.js
CHANGED
package/dist/es2019/i18n/de.js
CHANGED
package/dist/es2019/i18n/en.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* prettier-ignore */
|
|
1
2
|
/**
|
|
2
3
|
* NOTE:
|
|
3
4
|
*
|
|
@@ -6,15 +7,15 @@
|
|
|
6
7
|
*/
|
|
7
8
|
//
|
|
8
9
|
export default {
|
|
9
|
-
'fabric.editor.codeBlockCopyButton.copiedToClipboard': 'Copied!',
|
|
10
|
-
'fabric.editor.codeBlockCopyButton.copyToClipboard': 'Copy',
|
|
11
10
|
'fabric.editor.headingLink.ascOrderLabel': 'Sort column Z to A',
|
|
12
11
|
'fabric.editor.headingLink.ascSortingLabel': 'ascending',
|
|
13
12
|
'fabric.editor.headingLink.copied': 'Copied!',
|
|
14
13
|
'fabric.editor.headingLink.copyAnchorLink': 'Copy link to heading',
|
|
15
14
|
'fabric.editor.headingLink.copyAriaLabel': 'Copy',
|
|
16
|
-
'fabric.editor.headingLink.descOrderLabel':
|
|
15
|
+
'fabric.editor.headingLink.descOrderLabel': 'Clear sorting',
|
|
16
|
+
'fabric.editor.headingLink.descSortingLabel': 'descending',
|
|
17
17
|
'fabric.editor.headingLink.failedToCopy': 'Copy failed',
|
|
18
|
+
'fabric.editor.headingLink.invalidLabel': "⚠️ You can't sort a table with merged cells",
|
|
18
19
|
'fabric.editor.headingLink.noOrderLabel': 'Sort column A to Z',
|
|
19
|
-
'fabric.editor.headingLink.noneSortingLabel': '
|
|
20
|
+
'fabric.editor.headingLink.noneSortingLabel': 'none'
|
|
20
21
|
};
|
package/dist/es2019/i18n/es.js
CHANGED
package/dist/es2019/i18n/fi.js
CHANGED
package/dist/es2019/i18n/fr.js
CHANGED
package/dist/es2019/i18n/hu.js
CHANGED
package/dist/es2019/i18n/it.js
CHANGED
package/dist/es2019/i18n/ja.js
CHANGED
package/dist/es2019/i18n/ko.js
CHANGED
package/dist/es2019/i18n/nb.js
CHANGED
package/dist/es2019/i18n/nl.js
CHANGED
package/dist/es2019/i18n/pl.js
CHANGED