@atlaskit/editor-common 72.7.1 → 72.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/analytics/types/general-events.js +1 -1
- package/dist/cjs/analytics/types/table-events.js +3 -1
- package/dist/cjs/extensions/default-extension-provider.js +8 -7
- package/dist/cjs/extensions/extension-fields-helpers.js +12 -11
- package/dist/cjs/extensions/extension-handlers.js +6 -5
- package/dist/cjs/extensions/manifest-helpers.js +4 -3
- package/dist/cjs/extensions/module-helpers.js +8 -7
- package/dist/cjs/icons/index.js +7 -0
- package/dist/cjs/icons/shared/BorderIcon.js +33 -0
- package/dist/cjs/keymaps/index.js +1 -0
- package/dist/cjs/preset/builder.js +2 -1
- package/dist/cjs/provider-helpers/combine-providers.js +10 -9
- package/dist/cjs/styles/shared/panel.js +1 -0
- package/dist/cjs/styles/shared/shadow.js +1 -0
- package/dist/cjs/styles/shared/table.js +1 -0
- package/dist/cjs/styles/shared/tableCell.js +1 -0
- package/dist/cjs/ui/Caption/index.js +1 -0
- package/dist/cjs/ui/DropList/index.js +3 -2
- package/dist/cjs/ui/Expand/index.js +1 -0
- package/dist/cjs/ui/Layer/index.js +1 -1
- package/dist/cjs/ui/MediaSingle/styled.js +1 -0
- package/dist/cjs/ui/Messages/index.js +1 -0
- package/dist/cjs/ui/Popup/index.js +4 -0
- package/dist/cjs/ui/UnsupportedBlock/index.js +1 -0
- package/dist/cjs/ui/UnsupportedInline/index.js +1 -0
- package/dist/cjs/ui/WidthProvider/index.js +1 -1
- package/dist/cjs/ui-color/ColorPalette/Color/index.js +1 -1
- package/dist/cjs/ui-color/ColorPalette/Palettes/paletteMessages.js +10 -0
- package/dist/cjs/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +2 -1
- package/dist/cjs/ui-menu/DropdownMenu/index.js +1 -0
- package/dist/cjs/ui-menu/ToolbarButton/index.js +1 -0
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +1 -0
- package/dist/cjs/utils/validator.js +22 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/with-plugin-state/index.js +9 -0
- package/dist/es2019/analytics/types/general-events.js +1 -1
- package/dist/es2019/analytics/types/table-events.js +3 -1
- package/dist/es2019/extensions/types/field-definitions.js +0 -1
- package/dist/es2019/icons/index.js +1 -0
- package/dist/es2019/icons/shared/BorderIcon.js +25 -0
- package/dist/es2019/preset/builder.js +2 -1
- package/dist/es2019/ui/DropList/index.js +2 -1
- package/dist/es2019/ui/Popup/index.js +5 -0
- package/dist/es2019/ui-color/ColorPalette/Palettes/paletteMessages.js +10 -0
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +3 -0
- package/dist/es2019/utils/dom.js +0 -1
- package/dist/es2019/utils/validator.js +23 -0
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/with-plugin-state/index.js +10 -0
- package/dist/esm/analytics/types/general-events.js +1 -1
- package/dist/esm/analytics/types/table-events.js +3 -1
- package/dist/esm/extensions/default-extension-provider.js +8 -7
- package/dist/esm/extensions/extension-fields-helpers.js +12 -11
- package/dist/esm/extensions/extension-handlers.js +6 -5
- package/dist/esm/extensions/manifest-helpers.js +4 -3
- package/dist/esm/extensions/module-helpers.js +8 -7
- package/dist/esm/extensions/types/field-definitions.js +0 -1
- package/dist/esm/icons/index.js +1 -0
- package/dist/esm/icons/shared/BorderIcon.js +25 -0
- package/dist/esm/preset/builder.js +2 -1
- package/dist/esm/provider-helpers/combine-providers.js +10 -9
- package/dist/esm/ui/DropList/index.js +2 -1
- package/dist/esm/ui/Popup/index.js +4 -0
- package/dist/esm/ui-color/ColorPalette/Palettes/paletteMessages.js +10 -0
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +2 -0
- package/dist/esm/utils/dom.js +0 -1
- package/dist/esm/utils/validator.js +23 -0
- package/dist/esm/version.json +1 -1
- package/dist/esm/with-plugin-state/index.js +9 -0
- package/dist/types/icons/index.d.ts +1 -0
- package/dist/types/icons/shared/BorderIcon.d.ts +3 -0
- package/dist/types/ui-color/ColorPalette/Palettes/paletteMessages.d.ts +10 -0
- package/package.json +3 -3
|
@@ -20,6 +20,7 @@ var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
|
20
20
|
var _components = require("@atlaskit/theme/components");
|
|
21
21
|
var _constants = require("@atlaskit/theme/constants");
|
|
22
22
|
var _templateObject, _templateObject2;
|
|
23
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
23
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
24
25
|
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; }
|
|
25
26
|
var lightPanelColors = {
|
|
@@ -12,6 +12,7 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
12
12
|
var _OverflowShadow = require("../../ui/OverflowShadow");
|
|
13
13
|
var _shadowObserver = require("../../ui/OverflowShadow/shadowObserver");
|
|
14
14
|
var _templateObject;
|
|
15
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
15
16
|
var shadowWidth = 8;
|
|
16
17
|
|
|
17
18
|
/**
|
|
@@ -16,6 +16,7 @@ var _browser = _interopRequireDefault(require("../../utils/browser"));
|
|
|
16
16
|
var _codeBlock = require("./code-block");
|
|
17
17
|
var _tableCell = require("./tableCell");
|
|
18
18
|
var _templateObject;
|
|
19
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
19
20
|
var tableMarginTop = 24;
|
|
20
21
|
exports.tableMarginTop = tableMarginTop;
|
|
21
22
|
var tableMarginBottom = 16;
|
|
@@ -10,6 +10,7 @@ var _react = require("@emotion/react");
|
|
|
10
10
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
11
11
|
var _editorPalette = require("@atlaskit/editor-palette");
|
|
12
12
|
var _templateObject;
|
|
13
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
13
14
|
// This is used in order to support usage of DS tokens. Table cell background-color
|
|
14
15
|
// is set inline in '@atlaskit/adf-schema' and the color value is stored in ADF so
|
|
15
16
|
// it is not possible to use tokens there without polluting ADF.
|
|
@@ -18,6 +18,7 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
18
18
|
var _colors = require("@atlaskit/theme/colors");
|
|
19
19
|
var _messages = require("./messages");
|
|
20
20
|
var _templateObject, _templateObject2;
|
|
21
|
+
/** @jsx jsx */
|
|
21
22
|
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); }; }
|
|
22
23
|
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; } }
|
|
23
24
|
var captionWrapperStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n margin-top: 8px;\n text-align: center;\n position: relative;\n color: ", ";\n"])), "var(--ds-text-subtle, ".concat(_colors.N400, ")"));
|
|
@@ -22,9 +22,9 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
22
22
|
var _Layer = _interopRequireDefault(require("../Layer"));
|
|
23
23
|
var _templateObject, _templateObject2, _templateObject3;
|
|
24
24
|
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); }; }
|
|
25
|
-
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; } }
|
|
25
|
+
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; } } /** @jsx jsx */
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "72.7.
|
|
27
|
+
var packageVersion = "72.7.3";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = "0, ".concat((0, _constants.gridSize)(), "px");
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -118,6 +118,7 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
118
118
|
});
|
|
119
119
|
return _this;
|
|
120
120
|
}
|
|
121
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
121
122
|
(0, _createClass2.default)(DropList, [{
|
|
122
123
|
key: "getChildContext",
|
|
123
124
|
value: /* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
@@ -18,6 +18,7 @@ var _components = require("@atlaskit/theme/components");
|
|
|
18
18
|
var _constants = require("@atlaskit/theme/constants");
|
|
19
19
|
var _excluded = ["children"];
|
|
20
20
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
21
|
+
/** @jsx jsx */
|
|
21
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
22
23
|
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; }
|
|
23
24
|
var messages = (0, _reactIntlNext.defineMessages)({
|
|
@@ -22,7 +22,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
22
22
|
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; }
|
|
23
23
|
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; }
|
|
24
24
|
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); }; }
|
|
25
|
-
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; } }
|
|
25
|
+
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; } } // eslint-disable-line import/extensions
|
|
26
26
|
var defaultState = {
|
|
27
27
|
hasExtractedStyles: false,
|
|
28
28
|
// We set these default offsets to prevent a flash of popper content in the wrong position
|
|
@@ -16,6 +16,7 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
16
16
|
var _breakout = require("../../utils/breakout");
|
|
17
17
|
var _excluded = ["children"];
|
|
18
18
|
var _templateObject, _templateObject2, _templateObject3;
|
|
19
|
+
/** @jsx jsx */
|
|
19
20
|
function float(layout) {
|
|
20
21
|
switch (layout) {
|
|
21
22
|
case 'wrap-right':
|
|
@@ -13,6 +13,7 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
13
13
|
var _constants = require("@atlaskit/theme/constants");
|
|
14
14
|
var _typography = require("@atlaskit/theme/typography");
|
|
15
15
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
16
|
+
/** @jsx jsx */
|
|
16
17
|
var errorColor = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), "var(--ds-text-danger, ".concat(_colors.R400, ")"));
|
|
17
18
|
var validColor = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), "var(--ds-text-success, ".concat(_colors.G400, ")"));
|
|
18
19
|
var messageStyle = function messageStyle(props) {
|
|
@@ -190,6 +190,10 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
190
190
|
// get rendered and we end up with a wrong position
|
|
191
191
|
this.scheduledUpdatePosition(newProps);
|
|
192
192
|
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Raf scheduled so that it also occurs after the initial update position
|
|
196
|
+
*/
|
|
193
197
|
}, {
|
|
194
198
|
key: "destroyFocusTrap",
|
|
195
199
|
value:
|
|
@@ -20,6 +20,7 @@ var _unsupportedContent = require("../../messages/unsupportedContent");
|
|
|
20
20
|
var _trackUnsupportedContent = require("../../utils/track-unsupported-content");
|
|
21
21
|
var _unsupportedContentHelper = require("../unsupported-content-helper");
|
|
22
22
|
var _templateObject;
|
|
23
|
+
/** @jsx jsx */
|
|
23
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
24
25
|
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; }
|
|
25
26
|
var blockNodeStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n border: 1px dashed ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n cursor: default;\n display: flex;\n font-size: ", ";\n margin: 10px 0;\n min-height: 24px;\n padding: 10px;\n text-align: center;\n vertical-align: text-bottom;\n min-width: 120px;\n align-items: center;\n justify-content: center;\n"])), "var(--ds-background-disabled, ".concat(_colors.N30, ")"), "var(--ds-border-disabled, ".concat(_colors.N50, ")"), (0, _constants.borderRadius)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()));
|
|
@@ -20,6 +20,7 @@ var _unsupportedContent = require("../../messages/unsupportedContent");
|
|
|
20
20
|
var _trackUnsupportedContent = require("../../utils/track-unsupported-content");
|
|
21
21
|
var _unsupportedContentHelper = require("../unsupported-content-helper");
|
|
22
22
|
var _templateObject;
|
|
23
|
+
/** @jsx jsx */
|
|
23
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
24
25
|
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; }
|
|
25
26
|
var inlineNodeStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n background: ", ";\n border: 1px dashed ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n cursor: default;\n display: inline-flex;\n font-size: ", ";\n margin: 0 2px;\n min-height: 24px;\n padding: 0 10px;\n vertical-align: middle;\n white-space: nowrap;\n"])), "var(--ds-background-disabled, ".concat(_colors.N30, ")"), "var(--ds-border-disabled, ".concat(_colors.N50, ")"), (0, _constants.borderRadius)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()));
|
|
@@ -21,7 +21,7 @@ var _rafSchd = _interopRequireDefault(require("raf-schd"));
|
|
|
21
21
|
var _widthDetector = require("@atlaskit/width-detector");
|
|
22
22
|
var _templateObject;
|
|
23
23
|
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); }; }
|
|
24
|
-
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; } }
|
|
24
|
+
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; } } /** @jsx jsx */
|
|
25
25
|
var SCROLLBAR_WIDTH = 30;
|
|
26
26
|
function getBreakpoint() {
|
|
27
27
|
var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
@@ -22,7 +22,7 @@ var _styles = require("./styles");
|
|
|
22
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
23
|
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
24
|
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); }; }
|
|
25
|
-
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; } }
|
|
25
|
+
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; } } /** @jsx jsx */
|
|
26
26
|
var Color = /*#__PURE__*/function (_PureComponent) {
|
|
27
27
|
(0, _inherits2.default)(Color, _PureComponent);
|
|
28
28
|
var _super = _createSuper(Color);
|
|
@@ -115,6 +115,16 @@ var _default = (0, _reactIntlNext.defineMessages)({
|
|
|
115
115
|
id: 'fabric.theme.dark-purple',
|
|
116
116
|
defaultMessage: 'Dark purple',
|
|
117
117
|
description: 'Name of a color'
|
|
118
|
+
},
|
|
119
|
+
'subtle-gray': {
|
|
120
|
+
id: 'fabric.theme.subtle-gray',
|
|
121
|
+
defaultMessage: 'Subtle gray',
|
|
122
|
+
description: 'Name of a color'
|
|
123
|
+
},
|
|
124
|
+
'bold-gray': {
|
|
125
|
+
id: 'fabric.theme.bold-gray',
|
|
126
|
+
defaultMessage: 'Bold gray',
|
|
127
|
+
description: 'Name of a color'
|
|
118
128
|
}
|
|
119
129
|
});
|
|
120
130
|
exports.default = _default;
|
|
@@ -10,7 +10,8 @@ var _theme = require("@atlaskit/theme");
|
|
|
10
10
|
var _panel = require("../../../panel");
|
|
11
11
|
var _common = require("./common");
|
|
12
12
|
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; }
|
|
13
|
-
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; }
|
|
13
|
+
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; } // AFP-2532 TODO: Fix automatic suppressions below
|
|
14
|
+
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
14
15
|
/** this is not new usage - old code extracted from editor-core */
|
|
15
16
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
16
17
|
var panelBackgroundPalette = [{
|
|
@@ -32,6 +32,7 @@ var _ArrowKeyNavigationProvider = require("../ArrowKeyNavigationProvider");
|
|
|
32
32
|
var _types = require("../ArrowKeyNavigationProvider/types");
|
|
33
33
|
var _excluded = ["children"];
|
|
34
34
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
35
|
+
/** @jsx jsx */
|
|
35
36
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
36
37
|
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; }
|
|
37
38
|
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; }
|
|
@@ -15,6 +15,7 @@ var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
|
15
15
|
var _analytics = require("../../analytics");
|
|
16
16
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
17
17
|
var _templateObject;
|
|
18
|
+
/** @jsx jsx */
|
|
18
19
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
20
|
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; }
|
|
20
21
|
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; }
|
|
@@ -22,6 +22,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
22
22
|
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; }
|
|
23
23
|
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); }; }
|
|
24
24
|
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; } }
|
|
25
|
+
// This needs exporting to be used alongisde `withReactEditorViewOuterListeners`
|
|
25
26
|
var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
26
27
|
(0, _inherits2.default)(WithOutsideClick, _PureComponent);
|
|
27
28
|
var _super = _createSuper(WithOutsideClick);
|
|
@@ -15,6 +15,28 @@ var ADFStages = {
|
|
|
15
15
|
FINAL: 'final',
|
|
16
16
|
STAGE_0: 'stage0'
|
|
17
17
|
};
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* An ADF Document JSON object. The document is the root node and documents are
|
|
21
|
+
* composed of nodes. This type accepts an array of ADNode types as content.
|
|
22
|
+
*
|
|
23
|
+
* It is basically the same as the JSONNodeDoc interface from editor-json-transformer.
|
|
24
|
+
*
|
|
25
|
+
* Do not use this type for content nodes as they require additional attributes.
|
|
26
|
+
*
|
|
27
|
+
* Use ADNode instead for content nodes (any node other than the doc).
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/*
|
|
31
|
+
* An ADF Node object. This type is used as content for the ADDoc interface.
|
|
32
|
+
|
|
33
|
+
* It is basically the same as the JSONNode type from editor-json-transformer
|
|
34
|
+
* but the types are a little more strict.
|
|
35
|
+
*
|
|
36
|
+
* It is a serialisable form of ADFEntity.
|
|
37
|
+
*
|
|
38
|
+
* Do not use this for ADF documents - they should use the ADDoc interface.
|
|
39
|
+
*/
|
|
18
40
|
exports.ADFStages = ADFStages;
|
|
19
41
|
/*
|
|
20
42
|
* It's important that this order follows the marks rank defined here:
|
package/dist/cjs/version.json
CHANGED
|
@@ -24,6 +24,11 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
24
24
|
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; } }
|
|
25
25
|
var DEFAULT_SAMPLING_RATE = 100;
|
|
26
26
|
var DEFAULT_SLOW_THRESHOLD = 4;
|
|
27
|
+
|
|
28
|
+
// That context was exctract from the old WithPluginState from editor-core
|
|
29
|
+
// It was using some private types from
|
|
30
|
+
// - EditorAction: packages/editor/editor-core/src/actions/index.ts
|
|
31
|
+
// - EditorSharedConfig: packages/editor/editor-core/src/labs/next/internal/context/shared-config.tsx
|
|
27
32
|
/**
|
|
28
33
|
* Wraps component in a high order component that watches state changes of given plugins
|
|
29
34
|
* and passes those states to the wrapped component.
|
|
@@ -133,6 +138,10 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
|
133
138
|
var props = maybeProps || this.props;
|
|
134
139
|
return props.eventDispatcher || this.context && this.context.editorActions && this.context.editorActions._privateGetEventDispatcher() || this.context && this.context.editorSharedConfig && this.context.editorSharedConfig.eventDispatcher;
|
|
135
140
|
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Debounces setState calls in order to reduce number of re-renders caused by several plugin state changes.
|
|
144
|
+
*/
|
|
136
145
|
}, {
|
|
137
146
|
key: "getPluginsStates",
|
|
138
147
|
value: function getPluginsStates(plugins, editorView) {
|
|
@@ -20,4 +20,4 @@ export let BROWSER_FREEZE_INTERACTION_TYPE;
|
|
|
20
20
|
BROWSER_FREEZE_INTERACTION_TYPE["TYPING"] = "typing";
|
|
21
21
|
BROWSER_FREEZE_INTERACTION_TYPE["CLICKING"] = "clicking";
|
|
22
22
|
BROWSER_FREEZE_INTERACTION_TYPE["PASTING"] = "pasting";
|
|
23
|
-
})(BROWSER_FREEZE_INTERACTION_TYPE || (BROWSER_FREEZE_INTERACTION_TYPE = {}));
|
|
23
|
+
})(BROWSER_FREEZE_INTERACTION_TYPE || (BROWSER_FREEZE_INTERACTION_TYPE = {})); // TODO: https://product-fabric.atlassian.net/browse/AFP-1418
|
|
@@ -31,4 +31,6 @@ export let TABLE_BREAKOUT;
|
|
|
31
31
|
TABLE_BREAKOUT["WIDE"] = "wide";
|
|
32
32
|
TABLE_BREAKOUT["FULL_WIDTH"] = "fullWidth";
|
|
33
33
|
TABLE_BREAKOUT["NORMAL"] = "normal";
|
|
34
|
-
})(TABLE_BREAKOUT || (TABLE_BREAKOUT = {}));
|
|
34
|
+
})(TABLE_BREAKOUT || (TABLE_BREAKOUT = {})); //#endregion
|
|
35
|
+
//#region Analytic Event Payloads
|
|
36
|
+
//#endregion
|
|
@@ -4,6 +4,7 @@ export { PanelWarningIcon } from './shared/PanelWarningIcon';
|
|
|
4
4
|
export { PanelErrorIcon } from './shared/PanelErrorIcon';
|
|
5
5
|
export { PanelSuccessIcon } from './shared/PanelSuccessIcon';
|
|
6
6
|
export { PanelNoteIcon } from './shared/PanelNoteIcon';
|
|
7
|
+
export { BorderIcon } from './shared/BorderIcon';
|
|
7
8
|
export const IconTable = Loadable({
|
|
8
9
|
loader: () => import( /* webpackChunkName: "@atlaskit-internal_editor-icon-table" */'../icons/shared/table').then(module => module.default),
|
|
9
10
|
loading: () => null
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Icon from '@atlaskit/icon';
|
|
4
|
+
const BorderIconGlyph = props => {
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
6
|
+
width: "24",
|
|
7
|
+
height: "24",
|
|
8
|
+
viewBox: "0 0 24 24",
|
|
9
|
+
fill: "none",
|
|
10
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
11
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
12
|
+
d: "M8.33333 8C8.15267 8 8 8.14933 8 8.33333V15.6667C8.0007 15.7549 8.03604 15.8392 8.0984 15.9016C8.16076 15.964 8.24514 15.9993 8.33333 16H15.6667C15.8473 16 16 15.8507 16 15.6667V8.33333C16 8.15267 15.8507 8 15.6667 8H8.33333Z",
|
|
13
|
+
fill: "currentColor"
|
|
14
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
15
|
+
fillRule: "evenodd",
|
|
16
|
+
clipRule: "evenodd",
|
|
17
|
+
d: "M4 7C4 5.34315 5.34315 4 7 4H17C18.6569 4 20 5.34315 20 7V17C20 18.6569 18.6569 20 17 20H7C5.34315 20 4 18.6569 4 17V7ZM7 6C6.44772 6 6 6.44772 6 7V17C6 17.5523 6.44772 18 7 18H17C17.5523 18 18 17.5523 18 17V7C18 6.44772 17.5523 6 17 6H7Z",
|
|
18
|
+
fill: "currentColor"
|
|
19
|
+
}));
|
|
20
|
+
};
|
|
21
|
+
export const BorderIcon = props => {
|
|
22
|
+
return /*#__PURE__*/React.createElement(Icon, _extends({
|
|
23
|
+
glyph: BorderIconGlyph
|
|
24
|
+
}, props));
|
|
25
|
+
};
|
|
@@ -71,7 +71,8 @@ export class EditorPresetBuilder {
|
|
|
71
71
|
}) {
|
|
72
72
|
this.verifyDuplicatedPlugins();
|
|
73
73
|
const seen = new Set();
|
|
74
|
-
const
|
|
74
|
+
const pluginsDataCopy = this.data.slice();
|
|
75
|
+
const plugins = pluginsDataCopy.reverse().map(entry => {
|
|
75
76
|
const [fn, config] = this.safeEntry(entry);
|
|
76
77
|
if (seen.has(fn)) {
|
|
77
78
|
return null;
|
|
@@ -8,7 +8,7 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
8
8
|
import { borderRadius, gridSize } from '@atlaskit/theme/constants';
|
|
9
9
|
import Layer from '../Layer';
|
|
10
10
|
const packageName = "@atlaskit/editor-common";
|
|
11
|
-
const packageVersion = "72.7.
|
|
11
|
+
const packageVersion = "72.7.3";
|
|
12
12
|
const halfFocusRing = 1;
|
|
13
13
|
const dropOffset = `0, ${gridSize()}px`;
|
|
14
14
|
class DropList extends Component {
|
|
@@ -115,6 +115,7 @@ class DropList extends Component {
|
|
|
115
115
|
this.triggerRef = ref;
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
118
119
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
119
120
|
|
|
120
121
|
getChildContext() {
|
|
@@ -151,6 +151,11 @@ export default class Popup extends React.Component {
|
|
|
151
151
|
// get rendered and we end up with a wrong position
|
|
152
152
|
this.scheduledUpdatePosition(newProps);
|
|
153
153
|
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Raf scheduled so that it also occurs after the initial update position
|
|
157
|
+
*/
|
|
158
|
+
|
|
154
159
|
/**
|
|
155
160
|
* Cancels the initialisation of the focus trap if it has not yet occured
|
|
156
161
|
* Deactivates the focus trap if it exists
|
|
@@ -109,5 +109,15 @@ export default defineMessages({
|
|
|
109
109
|
id: 'fabric.theme.dark-purple',
|
|
110
110
|
defaultMessage: 'Dark purple',
|
|
111
111
|
description: 'Name of a color'
|
|
112
|
+
},
|
|
113
|
+
'subtle-gray': {
|
|
114
|
+
id: 'fabric.theme.subtle-gray',
|
|
115
|
+
defaultMessage: 'Subtle gray',
|
|
116
|
+
description: 'Name of a color'
|
|
117
|
+
},
|
|
118
|
+
'bold-gray': {
|
|
119
|
+
id: 'fabric.theme.bold-gray',
|
|
120
|
+
defaultMessage: 'Bold gray',
|
|
121
|
+
description: 'Name of a color'
|
|
112
122
|
}
|
|
113
123
|
});
|
|
@@ -2,6 +2,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import React, { PureComponent } from 'react';
|
|
3
3
|
import ReactDOM from 'react-dom';
|
|
4
4
|
import ReactEditorViewContext from './ReactEditorViewContext';
|
|
5
|
+
|
|
6
|
+
// This needs exporting to be used alongisde `withReactEditorViewOuterListeners`
|
|
7
|
+
|
|
5
8
|
class WithOutsideClick extends PureComponent {
|
|
6
9
|
constructor(...args) {
|
|
7
10
|
super(...args);
|
package/dist/es2019/utils/dom.js
CHANGED
|
@@ -4,6 +4,29 @@ export const ADFStages = {
|
|
|
4
4
|
FINAL: 'final',
|
|
5
5
|
STAGE_0: 'stage0'
|
|
6
6
|
};
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* An ADF Document JSON object. The document is the root node and documents are
|
|
10
|
+
* composed of nodes. This type accepts an array of ADNode types as content.
|
|
11
|
+
*
|
|
12
|
+
* It is basically the same as the JSONNodeDoc interface from editor-json-transformer.
|
|
13
|
+
*
|
|
14
|
+
* Do not use this type for content nodes as they require additional attributes.
|
|
15
|
+
*
|
|
16
|
+
* Use ADNode instead for content nodes (any node other than the doc).
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* An ADF Node object. This type is used as content for the ADDoc interface.
|
|
21
|
+
|
|
22
|
+
* It is basically the same as the JSONNode type from editor-json-transformer
|
|
23
|
+
* but the types are a little more strict.
|
|
24
|
+
*
|
|
25
|
+
* It is a serialisable form of ADFEntity.
|
|
26
|
+
*
|
|
27
|
+
* Do not use this for ADF documents - they should use the ADDoc interface.
|
|
28
|
+
*/
|
|
29
|
+
|
|
7
30
|
/*
|
|
8
31
|
* It's important that this order follows the marks rank defined here:
|
|
9
32
|
* https://product-fabric.atlassian.net/wiki/spaces/E/pages/11174043/Document+structure#Documentstructure-Rank
|
package/dist/es2019/version.json
CHANGED
|
@@ -7,6 +7,11 @@ import { analyticsEventKey, startMeasure, stopMeasure } from '../utils';
|
|
|
7
7
|
import { getParticipantsCount } from '../utils/collab';
|
|
8
8
|
const DEFAULT_SAMPLING_RATE = 100;
|
|
9
9
|
const DEFAULT_SLOW_THRESHOLD = 4;
|
|
10
|
+
|
|
11
|
+
// That context was exctract from the old WithPluginState from editor-core
|
|
12
|
+
// It was using some private types from
|
|
13
|
+
// - EditorAction: packages/editor/editor-core/src/actions/index.ts
|
|
14
|
+
// - EditorSharedConfig: packages/editor/editor-core/src/labs/next/internal/context/shared-config.tsx
|
|
10
15
|
/**
|
|
11
16
|
* Wraps component in a high order component that watches state changes of given plugins
|
|
12
17
|
* and passes those states to the wrapped component.
|
|
@@ -104,6 +109,11 @@ class WithPluginState extends React.Component {
|
|
|
104
109
|
const props = maybeProps || this.props;
|
|
105
110
|
return props.eventDispatcher || this.context && this.context.editorActions && this.context.editorActions._privateGetEventDispatcher() || this.context && this.context.editorSharedConfig && this.context.editorSharedConfig.eventDispatcher;
|
|
106
111
|
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Debounces setState calls in order to reduce number of re-renders caused by several plugin state changes.
|
|
115
|
+
*/
|
|
116
|
+
|
|
107
117
|
getPluginsStates(plugins, editorView) {
|
|
108
118
|
if (!editorView || !plugins) {
|
|
109
119
|
return {};
|
|
@@ -20,4 +20,4 @@ export var BROWSER_FREEZE_INTERACTION_TYPE;
|
|
|
20
20
|
BROWSER_FREEZE_INTERACTION_TYPE["TYPING"] = "typing";
|
|
21
21
|
BROWSER_FREEZE_INTERACTION_TYPE["CLICKING"] = "clicking";
|
|
22
22
|
BROWSER_FREEZE_INTERACTION_TYPE["PASTING"] = "pasting";
|
|
23
|
-
})(BROWSER_FREEZE_INTERACTION_TYPE || (BROWSER_FREEZE_INTERACTION_TYPE = {}));
|
|
23
|
+
})(BROWSER_FREEZE_INTERACTION_TYPE || (BROWSER_FREEZE_INTERACTION_TYPE = {})); // TODO: https://product-fabric.atlassian.net/browse/AFP-1418
|
|
@@ -31,4 +31,6 @@ export var TABLE_BREAKOUT;
|
|
|
31
31
|
TABLE_BREAKOUT["WIDE"] = "wide";
|
|
32
32
|
TABLE_BREAKOUT["FULL_WIDTH"] = "fullWidth";
|
|
33
33
|
TABLE_BREAKOUT["NORMAL"] = "normal";
|
|
34
|
-
})(TABLE_BREAKOUT || (TABLE_BREAKOUT = {}));
|
|
34
|
+
})(TABLE_BREAKOUT || (TABLE_BREAKOUT = {})); //#endregion
|
|
35
|
+
//#region Analytic Event Payloads
|
|
36
|
+
//#endregion
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
1
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
+
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; }
|
|
5
6
|
import { getAutoConvertPatternsFromModule } from './module-helpers';
|
|
6
7
|
var DefaultExtensionProvider = /*#__PURE__*/function () {
|
|
7
8
|
function DefaultExtensionProvider(manifests,
|
|
@@ -24,9 +25,9 @@ var DefaultExtensionProvider = /*#__PURE__*/function () {
|
|
|
24
25
|
}, {
|
|
25
26
|
key: "getExtension",
|
|
26
27
|
value: function () {
|
|
27
|
-
var _getExtension = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(type, key) {
|
|
28
|
+
var _getExtension = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(type, key) {
|
|
28
29
|
var extension;
|
|
29
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
30
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
30
31
|
while (1) {
|
|
31
32
|
switch (_context.prev = _context.next) {
|
|
32
33
|
case 0:
|
|
@@ -58,9 +59,9 @@ var DefaultExtensionProvider = /*#__PURE__*/function () {
|
|
|
58
59
|
}, {
|
|
59
60
|
key: "search",
|
|
60
61
|
value: function () {
|
|
61
|
-
var _search = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(keyword) {
|
|
62
|
+
var _search = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(keyword) {
|
|
62
63
|
var extensions;
|
|
63
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
64
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
64
65
|
while (1) {
|
|
65
66
|
switch (_context2.prev = _context2.next) {
|
|
66
67
|
case 0:
|
|
@@ -86,9 +87,9 @@ var DefaultExtensionProvider = /*#__PURE__*/function () {
|
|
|
86
87
|
}, {
|
|
87
88
|
key: "getAutoConverter",
|
|
88
89
|
value: function () {
|
|
89
|
-
var _getAutoConverter = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
90
|
+
var _getAutoConverter = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
90
91
|
var autoConverters;
|
|
91
|
-
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
92
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
92
93
|
while (1) {
|
|
93
94
|
switch (_context3.prev = _context3.next) {
|
|
94
95
|
case 0:
|