@atlaskit/editor-common 99.6.0 → 99.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/cjs/link/LinkSearch/index.js +1 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +75 -19
- package/dist/cjs/react-node-view/onVisibleObserverFactory.js +48 -0
- package/dist/cjs/safe-plugin/index.js +1 -2
- package/dist/cjs/styles/shared/table.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/WithCreateAnalyticsEvent/index.js +1 -0
- package/dist/cjs/utils/compare-props.js +2 -2
- package/dist/cjs/utils/compareNodes.js +2 -2
- package/dist/cjs/utils/filter/privacy-filter.js +3 -3
- package/dist/cjs/utils/index.js +6 -6
- package/dist/cjs/utils/performance/measure-tti.js +3 -3
- package/dist/cjs/utils/track-unsupported-content.js +2 -2
- package/dist/cjs/utils/validator.js +3 -3
- package/dist/cjs/with-plugin-state/index.js +1 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +79 -20
- package/dist/es2019/react-node-view/onVisibleObserverFactory.js +31 -0
- package/dist/es2019/safe-plugin/index.js +1 -2
- package/dist/es2019/styles/shared/table.js +2 -2
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/link/LinkSearch/index.js +1 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +75 -19
- package/dist/esm/react-node-view/onVisibleObserverFactory.js +41 -0
- package/dist/esm/safe-plugin/index.js +1 -2
- package/dist/esm/styles/shared/table.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/WithCreateAnalyticsEvent/index.js +1 -0
- package/dist/esm/utils/compare-props.js +3 -2
- package/dist/esm/utils/compareNodes.js +2 -2
- package/dist/esm/utils/filter/privacy-filter.js +3 -3
- package/dist/esm/utils/index.js +6 -6
- package/dist/esm/utils/performance/measure-tti.js +3 -3
- package/dist/esm/utils/track-unsupported-content.js +3 -2
- package/dist/esm/utils/validator.js +3 -3
- package/dist/esm/with-plugin-state/index.js +1 -0
- package/dist/types/react-node-view/onVisibleObserverFactory.d.ts +8 -0
- package/dist/types-ts4.5/react-node-view/onVisibleObserverFactory.d.ts +8 -0
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 99.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#106964](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/106964)
|
|
8
|
+
[`996f72bae4986`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/996f72bae4986) -
|
|
9
|
+
[No Issue] Introducing virtualization for inline nodes
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#108797](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/108797)
|
|
14
|
+
[`9a3f165bc940b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9a3f165bc940b) -
|
|
15
|
+
tidy up feature flag confluence_frontend_editor_custom_presets
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
18
|
+
## 99.6.1
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [#106923](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/106923)
|
|
23
|
+
[`5f44122535833`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5f44122535833) -
|
|
24
|
+
ED-26253 Update table css selectors so they don't get applied to table elements not owned by the
|
|
25
|
+
editor and nested inside an editor table
|
|
26
|
+
|
|
3
27
|
## 99.6.0
|
|
4
28
|
|
|
5
29
|
### Minor Changes
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
|
+
var _readOnlyError2 = _interopRequireDefault(require("@babel/runtime/helpers/readOnlyError"));
|
|
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"));
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "99.
|
|
20
|
+
var packageVersion = "99.7.0";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -10,23 +10,30 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
|
+
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
15
|
var _analytics = require("../analytics");
|
|
14
16
|
var _ErrorBoundary = require("../ui/ErrorBoundary");
|
|
15
17
|
var _utils = require("../utils");
|
|
16
18
|
var _whitespace = require("../whitespace");
|
|
17
19
|
var _generateUniqueNodeKey = require("./generateUniqueNodeKey");
|
|
20
|
+
var _onVisibleObserverFactory = require("./onVisibleObserverFactory");
|
|
18
21
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
22
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
|
|
20
23
|
* @jsxRuntime classic
|
|
21
24
|
* @jsx jsx
|
|
22
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
23
26
|
var inlineNodeViewClassname = exports.inlineNodeViewClassname = 'inlineNodeView';
|
|
27
|
+
var canRenderFallback = function canRenderFallback(node) {
|
|
28
|
+
return node.type.isInline && node.type.isAtom && node.type.isLeaf;
|
|
29
|
+
};
|
|
24
30
|
function createNodeView(_ref) {
|
|
25
31
|
var nodeViewParams = _ref.nodeViewParams,
|
|
26
32
|
pmPluginFactoryParams = _ref.pmPluginFactoryParams,
|
|
27
33
|
Component = _ref.Component,
|
|
28
34
|
extraComponentProps = _ref.extraComponentProps,
|
|
29
35
|
extraNodeViewProps = _ref.extraNodeViewProps;
|
|
36
|
+
var shouldVirtualize = (0, _platformFeatureFlags.fg)('platform_editor_lego__inline_node_virtualization');
|
|
30
37
|
// We set a variable for the current node which is
|
|
31
38
|
// used for comparisions when doing updates, before being
|
|
32
39
|
// overwritten to the updated node.
|
|
@@ -70,22 +77,58 @@ function createNodeView(_ref) {
|
|
|
70
77
|
extraComponentProps: extraComponentProps
|
|
71
78
|
}), domRef, key);
|
|
72
79
|
}
|
|
73
|
-
var
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
var didRenderComponentWithIntersectionObserver = false;
|
|
81
|
+
var destroyed = false;
|
|
82
|
+
var removeIntersectionObserver = function removeIntersectionObserver() {};
|
|
83
|
+
function renderFallback() {
|
|
84
|
+
var _currentNode$type;
|
|
85
|
+
if (canRenderFallback(currentNode) && typeof ((_currentNode$type = currentNode.type) === null || _currentNode$type === void 0 || (_currentNode$type = _currentNode$type.spec) === null || _currentNode$type === void 0 ? void 0 : _currentNode$type.toDOM) === 'function') {
|
|
86
|
+
var fallback = _model.DOMSerializer.renderSpec(document, currentNode.type.spec.toDOM(currentNode));
|
|
87
|
+
domRef.replaceChildren(fallback.dom);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function attachNodeViewObserver() {
|
|
91
|
+
var observer = (0, _onVisibleObserverFactory.getOrCreateOnVisibleObserver)(nodeViewParams.view);
|
|
92
|
+
removeIntersectionObserver = observer.observe(domRef, function () {
|
|
93
|
+
if (!didRenderComponentWithIntersectionObserver && !destroyed) {
|
|
94
|
+
domRef.replaceChildren();
|
|
95
|
+
renderComponent();
|
|
96
|
+
didRenderComponentWithIntersectionObserver = true;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
if (shouldVirtualize) {
|
|
101
|
+
renderFallback();
|
|
102
|
+
attachNodeViewObserver();
|
|
103
|
+
} else {
|
|
104
|
+
var _getPerformanceOption = (0, _utils.getPerformanceOptions)(nodeViewParams.view),
|
|
105
|
+
samplingRate = _getPerformanceOption.samplingRate,
|
|
106
|
+
slowThreshold = _getPerformanceOption.slowThreshold,
|
|
107
|
+
trackingEnabled = _getPerformanceOption.trackingEnabled;
|
|
108
|
+
trackingEnabled && (0, _utils.startMeasureReactNodeViewRendered)({
|
|
109
|
+
nodeTypeName: currentNode.type.name
|
|
110
|
+
});
|
|
80
111
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
112
|
+
// We render the component while creating the node view
|
|
113
|
+
renderComponent();
|
|
114
|
+
trackingEnabled && (0, _utils.stopMeasureReactNodeViewRendered)({
|
|
115
|
+
nodeTypeName: currentNode.type.name,
|
|
116
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
117
|
+
samplingRate: samplingRate,
|
|
118
|
+
slowThreshold: slowThreshold
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
var extraNodeViewPropsWithStopEvent = _objectSpread(_objectSpread({}, extraNodeViewProps), (0, _platformFeatureFlags.fg)('platform_editor_lego__inline_node_virtualization') ? {
|
|
122
|
+
// This is not related to virtualization, but it's something we should fix/handle
|
|
123
|
+
// Remove this comment when `platform_editor_lego__inline_node_virtualization` FF is cleaned up
|
|
124
|
+
stopEvent: function stopEvent(event) {
|
|
125
|
+
var maybeStopEvent = extraNodeViewProps === null || extraNodeViewProps === void 0 ? void 0 : extraNodeViewProps.stopEvent;
|
|
126
|
+
if (typeof maybeStopEvent === 'function') {
|
|
127
|
+
return maybeStopEvent(event);
|
|
128
|
+
}
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
} : {});
|
|
89
132
|
|
|
90
133
|
// https://prosemirror.net/docs/ref/#view.NodeView
|
|
91
134
|
var nodeView = _objectSpread({
|
|
@@ -117,10 +160,20 @@ function createNodeView(_ref) {
|
|
|
117
160
|
setDomAttrs(nextNode, domRef);
|
|
118
161
|
}
|
|
119
162
|
currentNode = nextNode;
|
|
120
|
-
|
|
163
|
+
if (shouldVirtualize) {
|
|
164
|
+
if (didRenderComponentWithIntersectionObserver) {
|
|
165
|
+
renderComponent();
|
|
166
|
+
}
|
|
167
|
+
} else {
|
|
168
|
+
renderComponent();
|
|
169
|
+
}
|
|
121
170
|
return true;
|
|
122
171
|
},
|
|
123
172
|
destroy: function destroy() {
|
|
173
|
+
if (shouldVirtualize) {
|
|
174
|
+
removeIntersectionObserver();
|
|
175
|
+
}
|
|
176
|
+
|
|
124
177
|
// When prosemirror destroys the node view, we need to clean up
|
|
125
178
|
// what we have previously rendered using the editor portal
|
|
126
179
|
// provider api.
|
|
@@ -129,8 +182,11 @@ function createNodeView(_ref) {
|
|
|
129
182
|
// of HTMLSpanElement type however once the node view has
|
|
130
183
|
// been destroyed no other consumers should still be using it.
|
|
131
184
|
domRef = undefined;
|
|
185
|
+
if (shouldVirtualize) {
|
|
186
|
+
destroyed = true;
|
|
187
|
+
}
|
|
132
188
|
}
|
|
133
|
-
},
|
|
189
|
+
}, extraNodeViewPropsWithStopEvent);
|
|
134
190
|
return nodeView;
|
|
135
191
|
}
|
|
136
192
|
|
|
@@ -150,7 +206,7 @@ function getPortalChildren(_ref2) {
|
|
|
150
206
|
Component = _ref2.Component,
|
|
151
207
|
extraComponentProps = _ref2.extraComponentProps;
|
|
152
208
|
return function portalChildren() {
|
|
153
|
-
var _currentNode$type$nam, _currentNode$
|
|
209
|
+
var _currentNode$type$nam, _currentNode$type2;
|
|
154
210
|
// All inline nodes use `display: inline` to allow for multi-line
|
|
155
211
|
// wrapping. This does produce an issue in Chrome where it is not
|
|
156
212
|
// possible to click select the position after the node,
|
|
@@ -174,7 +230,7 @@ function getPortalChildren(_ref2) {
|
|
|
174
230
|
|
|
175
231
|
return (0, _react2.jsx)(_ErrorBoundary.ErrorBoundary, {
|
|
176
232
|
component: _analytics.ACTION_SUBJECT.REACT_NODE_VIEW,
|
|
177
|
-
componentId: (_currentNode$type$nam = currentNode === null || currentNode === void 0 || (_currentNode$
|
|
233
|
+
componentId: (_currentNode$type$nam = currentNode === null || currentNode === void 0 || (_currentNode$type2 = currentNode.type) === null || _currentNode$type2 === void 0 ? void 0 : _currentNode$type2.name) !== null && _currentNode$type$nam !== void 0 ? _currentNode$type$nam : _analytics.ACTION_SUBJECT_ID.UNKNOWN_NODE,
|
|
178
234
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
179
235
|
}, (0, _react2.jsx)("span", {
|
|
180
236
|
className: "zeroWidthSpaceContainer"
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getOrCreateOnVisibleObserver = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _memoize = _interopRequireDefault(require("lodash/memoize"));
|
|
10
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
+
// Use this selector to set the intersection observer boundary for editor's inline node views
|
|
13
|
+
// If this does not exist, it will use the IntersectionObserver's default root
|
|
14
|
+
var INTERSECTION_OBSERVER_ROOT_SELECTOR = '[data-editor-scroll-container="true"]';
|
|
15
|
+
var INTERSECTION_OBSERVER_OPTIONS = {
|
|
16
|
+
rootMargin: '0px 0px 100px 0px',
|
|
17
|
+
threshold: 0
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// Parameterized singleton
|
|
21
|
+
var getOrCreateOnVisibleObserver = exports.getOrCreateOnVisibleObserver = (0, _memoize.default)(function (view) {
|
|
22
|
+
var intersectionObserverOptions = _objectSpread({
|
|
23
|
+
root: view.dom.closest(INTERSECTION_OBSERVER_ROOT_SELECTOR)
|
|
24
|
+
}, INTERSECTION_OBSERVER_OPTIONS);
|
|
25
|
+
var callbackMap = new WeakMap();
|
|
26
|
+
var observer = new IntersectionObserver(function (entries) {
|
|
27
|
+
entries.filter(function (entry) {
|
|
28
|
+
return entry.isIntersecting;
|
|
29
|
+
}) // Only process visible entries
|
|
30
|
+
.map(function (entry) {
|
|
31
|
+
return callbackMap.get(entry.target);
|
|
32
|
+
})
|
|
33
|
+
// Invoke callbacks together to group browser rendering
|
|
34
|
+
// Avoiding requestAnimationFrame to reduce visual flickering
|
|
35
|
+
.forEach(function (cb) {
|
|
36
|
+
return cb === null || cb === void 0 ? void 0 : cb();
|
|
37
|
+
});
|
|
38
|
+
}, intersectionObserverOptions);
|
|
39
|
+
return {
|
|
40
|
+
observe: function observe(el, callback) {
|
|
41
|
+
callbackMap.set(el, callback);
|
|
42
|
+
observer.observe(el);
|
|
43
|
+
return function () {
|
|
44
|
+
return observer.unobserve(el);
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
});
|
|
@@ -14,7 +14,6 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
14
14
|
var _toArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toArray"));
|
|
15
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
16
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
17
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
17
|
var _prosemirrorDomMetadata = require("../prosemirror-dom-metadata");
|
|
19
18
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
20
19
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
@@ -69,7 +68,7 @@ var wrapGetPosExceptions = function wrapGetPosExceptions(spec) {
|
|
|
69
68
|
// eslint-disable-next-line no-extra-bind
|
|
70
69
|
}.bind(thisArg);
|
|
71
70
|
var result = Reflect.apply(target, thisArg, [node, view, safeGetPos].concat((0, _toConsumableArray2.default)(more)));
|
|
72
|
-
if ((result === null || result === void 0 ? void 0 : result.dom) instanceof HTMLElement
|
|
71
|
+
if ((result === null || result === void 0 ? void 0 : result.dom) instanceof HTMLElement) {
|
|
73
72
|
attachGenericProseMirrorMetadata({
|
|
74
73
|
nodeOrMark: node,
|
|
75
74
|
dom: result.dom
|
|
@@ -58,7 +58,7 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
|
|
|
58
58
|
|
|
59
59
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Appears safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing
|
|
60
60
|
var tableSharedStyle = exports.tableSharedStyle = function tableSharedStyle() {
|
|
61
|
-
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t", "\n\t.", " {\n\t\tposition: relative;\n\t\tmargin: 0 auto ", ";\n\t\tbox-sizing: border-box;\n\n\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.", "[data-number-column='true'] {\n\t\tpadding-left: ", "px;\n\t\tclear: both;\n\t}\n\n\t.", " {\n\t\twill-change: width, margin-left;\n\t}\n\n\t.", " table {\n\t\twill-change: width;\n\t}\n\n\t.", " > table {\n\t\tmargin: ", " 0 0 0;\n\t}\n\n\t.", " > table,\n\t.", " > table {\n\t\tmargin: ", " ", " 0 0;\n\t}\n\n\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\tborder-collapse: collapse;\n\t\tborder: ", "px solid\n\t\t\t", ";\n\t\ttable-layout: fixed;\n\t\tfont-size: 1em;\n\t\twidth: 100%;\n\n\t\t&[data-autosize='true'] {\n\t\t\ttable-layout: auto;\n\t\t}\n\n\t\t& {\n\t\t\t* {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\thr {\n\t\t\t\tbox-sizing: content-box;\n\t\t\t}\n\n\t\t\ttbody {\n\t\t\t\tborder-bottom: none;\n\t\t\t}\n\t\t\tth td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\
|
|
61
|
+
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t", "\n\t.", " {\n\t\tposition: relative;\n\t\tmargin: 0 auto ", ";\n\t\tbox-sizing: border-box;\n\n\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.", "[data-number-column='true'] {\n\t\tpadding-left: ", "px;\n\t\tclear: both;\n\t}\n\n\t.", " {\n\t\twill-change: width, margin-left;\n\t}\n\n\t.", " table {\n\t\twill-change: width;\n\t}\n\n\t.", " > table {\n\t\tmargin: ", " 0 0 0;\n\t}\n\n\t.", " > table,\n\t.", " > table {\n\t\tmargin: ", " ", " 0 0;\n\t}\n\n\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\tborder-collapse: collapse;\n\t\tborder: ", "px solid\n\t\t\t", ";\n\t\ttable-layout: fixed;\n\t\tfont-size: 1em;\n\t\twidth: 100%;\n\n\t\t&[data-autosize='true'] {\n\t\t\ttable-layout: auto;\n\t\t}\n\n\t\t& {\n\t\t\t* {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\thr {\n\t\t\t\tbox-sizing: content-box;\n\t\t\t}\n\n\t\t\ttbody {\n\t\t\t\tborder-bottom: none;\n\t\t\t}\n\t\t\tth td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\n\t\t\t", " {\n\t\t\t\tmin-width: ", "px;\n\t\t\t\tfont-weight: ", ";\n\t\t\t\tvertical-align: top;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tborder-right-width: 0;\n\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\tpadding: ", ";\n\t\t\t\t/* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n\t\t\t\t", "\n\n\t\t\t\t", "\n\n\t\t\t\tth p:not(:first-of-type),\n\t\t\t\ttd p:not(:first-of-type) {\n\t\t\t\t\tmargin-top: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t\tth {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\ttext-align: left;\n\n\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t&:not([style]):not(.danger) {\n\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* this is only relevant to the element taken care of by renderer */\n\t\t\t\t\t\t> [data-ds--code--code-block] {\n\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t// selector lives inside @atlaskit/code\n\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"])), (0, _tableCell.tableCellBackgroundStyleOverride)(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", TableSharedCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), "var(--ds-background-neutral-subtle, white)", (0, _platformFeatureFlags.fg)('platform_editor_renderer_table_header_styles') ? "> tbody > tr > th, > tbody > tr > td" : 'th, td', tableCellMinWidth, "var(--ds-font-weight-regular, 400)", "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), "var(--ds-space-100, 8px)", _browser.browser.gecko || _browser.browser.ie || _browser.browser.mac && _browser.browser.chrome ? 'background-clip: padding-box;' : '', firstNodeWithNotMarginTop(), "var(--ds-space-150, 12px)", (0, _platformFeatureFlags.fg)('platform_editor_nested_tables_renderer_styles') ? "// Ensures nested tables are compatible with parent table background color - uses specificity to ensure tables nested by extensions are not affected\n\t\t\t> tbody > tr > td {\n\t\t\t\tbackground-color: ".concat("var(--ds-surface, #FFFFFF)", ";\n\t\t\t}") : '', "var(--ds-background-accent-gray-subtlest, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"), _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, rgb(235, 237, 240))", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border, transparent)", _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, (0, _editorSharedStyles.overflowShadow)({
|
|
62
62
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
63
63
|
}), "var(--ds-background-neutral, rgb(235, 237, 240))", _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, rgb(226, 229, 233))", (0, _editorSharedStyles.overflowShadow)({
|
|
64
64
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "99.
|
|
26
|
+
var packageVersion = "99.7.0";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.WithCreateAnalyticsEvent = void 0;
|
|
8
|
+
var _readOnlyError2 = _interopRequireDefault(require("@babel/runtime/helpers/readOnlyError"));
|
|
8
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
11
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
@@ -48,7 +48,7 @@ var serializeValue = exports.serializeValue = function serializeValue(value) {
|
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
var
|
|
51
|
+
var _getPropsDifference = exports.getPropsDifference = function getPropsDifference(object1, object2) {
|
|
52
52
|
var curDepth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
53
53
|
var maxDepth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 2;
|
|
54
54
|
var keysToIgnore = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
|
|
@@ -75,7 +75,7 @@ var getPropsDifference = exports.getPropsDifference = function getPropsDifferenc
|
|
|
75
75
|
});
|
|
76
76
|
} else if (value1Type === 'object' && value2Type === 'object') {
|
|
77
77
|
if (curDepth <= maxDepth) {
|
|
78
|
-
var difference =
|
|
78
|
+
var difference = _getPropsDifference(value1, value2, curDepth + 1, maxDepth);
|
|
79
79
|
changed.push({
|
|
80
80
|
key: key,
|
|
81
81
|
difference: difference
|
|
@@ -39,8 +39,8 @@ function parseLocaleNumber(stringNumber, groupPattern, fractionPattern) {
|
|
|
39
39
|
function createNormalizeTextParser() {
|
|
40
40
|
// Source: https://stackoverflow.com/questions/12004808/does-javascript-take-local-decimal-separators-into-account
|
|
41
41
|
var locale = window.navigator.language;
|
|
42
|
-
var thousandSeparator = Intl.NumberFormat(locale).format(11111).replace(/(?:[0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]|\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2\uDD50-\uDD59]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9\uDF50-\uDF59\uDFC0-\uDFD4]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD839[\uDCF0-\uDCF9]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9])/g, '');
|
|
43
|
-
var decimalSeparator = Intl.NumberFormat(locale).format(1.1).replace(/(?:[0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]|\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2\uDD50-\uDD59]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9\uDF50-\uDF59\uDFC0-\uDFD4]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD839[\uDCF0-\uDCF9]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9])/g, '');
|
|
42
|
+
var thousandSeparator = Intl.NumberFormat(locale).format(11111).replace(/(?:[0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]|\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDD40-\uDD49\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDED0-\uDEE3\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2\uDD50-\uDD59\uDFF0-\uDFF9]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9\uDF50-\uDF59\uDFC0-\uDFD4]|\uD809[\uDC00-\uDC6E]|\uD818[\uDD30-\uDD39]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDD70-\uDD79\uDE80-\uDE96]|\uD833[\uDCF0-\uDCF9]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD839[\uDCF0-\uDCF9\uDDF1-\uDDFA]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9])/g, '');
|
|
43
|
+
var decimalSeparator = Intl.NumberFormat(locale).format(1.1).replace(/(?:[0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]|\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDD40-\uDD49\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDED0-\uDEE3\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2\uDD50-\uDD59\uDFF0-\uDFF9]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9\uDF50-\uDF59\uDFC0-\uDFD4]|\uD809[\uDC00-\uDC6E]|\uD818[\uDD30-\uDD39]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDD70-\uDD79\uDE80-\uDE96]|\uD833[\uDCF0-\uDCF9]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD839[\uDCF0-\uDCF9\uDDF1-\uDDFA]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9])/g, '');
|
|
44
44
|
|
|
45
45
|
// Ignored via go/ees005
|
|
46
46
|
// eslint-disable-next-line require-unicode-regexp
|
|
@@ -38,7 +38,7 @@ function sanitizeNodeForPrivacy(json, providerFactory) {
|
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
if (hasCacheableMentions && providerFactory) {
|
|
41
|
-
var
|
|
41
|
+
var _handler = function handler(_name, providerPromise) {
|
|
42
42
|
if (providerPromise) {
|
|
43
43
|
providerPromise.then(function (provider) {
|
|
44
44
|
if ((0, _resource.isResolvingMentionProvider)(provider)) {
|
|
@@ -46,12 +46,12 @@ function sanitizeNodeForPrivacy(json, providerFactory) {
|
|
|
46
46
|
provider.cacheMentionName(id, name);
|
|
47
47
|
});
|
|
48
48
|
mentionNames.clear();
|
|
49
|
-
providerFactory.unsubscribe('mentionProvider',
|
|
49
|
+
providerFactory.unsubscribe('mentionProvider', _handler);
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
-
providerFactory.subscribe('mentionProvider',
|
|
54
|
+
providerFactory.subscribe('mentionProvider', _handler);
|
|
55
55
|
}
|
|
56
56
|
return sanitizedJSON;
|
|
57
57
|
}
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -1367,7 +1367,7 @@ var isEmptyNode = exports.isEmptyNode = function isEmptyNode(schema) {
|
|
|
1367
1367
|
media = _schema$nodes.media,
|
|
1368
1368
|
mediaGroup = _schema$nodes.mediaGroup,
|
|
1369
1369
|
mediaSingle = _schema$nodes.mediaSingle;
|
|
1370
|
-
var
|
|
1370
|
+
var _innerIsEmptyNode = function innerIsEmptyNode(node) {
|
|
1371
1371
|
switch (node.type) {
|
|
1372
1372
|
case media:
|
|
1373
1373
|
case mediaGroup:
|
|
@@ -1385,28 +1385,28 @@ var isEmptyNode = exports.isEmptyNode = function isEmptyNode(schema) {
|
|
|
1385
1385
|
case listItem:
|
|
1386
1386
|
// Ignored via go/ees005
|
|
1387
1387
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1388
|
-
return node.content.size === 2 &&
|
|
1388
|
+
return node.content.size === 2 && _innerIsEmptyNode(node.content.firstChild);
|
|
1389
1389
|
case bulletList:
|
|
1390
1390
|
case orderedList:
|
|
1391
1391
|
// Ignored via go/ees005
|
|
1392
1392
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1393
|
-
return node.content.size === 4 &&
|
|
1393
|
+
return node.content.size === 4 && _innerIsEmptyNode(node.content.firstChild);
|
|
1394
1394
|
case taskList:
|
|
1395
1395
|
case decisionList:
|
|
1396
1396
|
// Ignored via go/ees005
|
|
1397
1397
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1398
|
-
return node.content.size === 2 &&
|
|
1398
|
+
return node.content.size === 2 && _innerIsEmptyNode(node.content.firstChild);
|
|
1399
1399
|
case doc:
|
|
1400
1400
|
var isEmpty = true;
|
|
1401
1401
|
node.content.forEach(function (child) {
|
|
1402
|
-
isEmpty = isEmpty &&
|
|
1402
|
+
isEmpty = isEmpty && _innerIsEmptyNode(child);
|
|
1403
1403
|
});
|
|
1404
1404
|
return isEmpty;
|
|
1405
1405
|
default:
|
|
1406
1406
|
return isNodeEmpty(node);
|
|
1407
1407
|
}
|
|
1408
1408
|
};
|
|
1409
|
-
return
|
|
1409
|
+
return _innerIsEmptyNode;
|
|
1410
1410
|
};
|
|
1411
1411
|
|
|
1412
1412
|
/**
|
|
@@ -37,7 +37,7 @@ function measureTTI(onMeasureComplete) {
|
|
|
37
37
|
observer.observe({
|
|
38
38
|
entryTypes: ['longtask']
|
|
39
39
|
});
|
|
40
|
-
var
|
|
40
|
+
var _checkIdle = function checkIdle() {
|
|
41
41
|
// 1. There hasn't been any long task in `idleThreshold` time: Interactive from the start.
|
|
42
42
|
// 2. Only 1 long task: Interactive from the end of the only long task.
|
|
43
43
|
// 3. Several long tasks:
|
|
@@ -62,9 +62,9 @@ function measureTTI(onMeasureComplete) {
|
|
|
62
62
|
distortedDurationMonitor.cleanup();
|
|
63
63
|
return onMeasureComplete(lastEnd, lastEnd - start, canceled, distortedDurationMonitor.distortedDuration);
|
|
64
64
|
}
|
|
65
|
-
return setTimeout(
|
|
65
|
+
return setTimeout(_checkIdle, idleThreshold);
|
|
66
66
|
};
|
|
67
|
-
setTimeout(
|
|
67
|
+
setTimeout(_checkIdle, idleThreshold);
|
|
68
68
|
}
|
|
69
69
|
var TTI_SEVERITY_THRESHOLD_DEFAULTS = exports.TTI_SEVERITY_THRESHOLD_DEFAULTS = {
|
|
70
70
|
NORMAL: 40000,
|
|
@@ -58,7 +58,7 @@ var trackUnsupportedContentTooltipActionFor = function trackUnsupportedContentTo
|
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
};
|
|
61
|
-
var
|
|
61
|
+
var _findAndTrackUnsupportedContentNodes = exports.findAndTrackUnsupportedContentNodes = function findAndTrackUnsupportedContentNodes(node, schema, dispatchAnalyticsEvent) {
|
|
62
62
|
var ancestorHierarchy = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
|
|
63
63
|
var nodeType = node.type,
|
|
64
64
|
nodeMarks = node.marks;
|
|
@@ -119,7 +119,7 @@ var findAndTrackUnsupportedContentNodes = exports.findAndTrackUnsupportedContent
|
|
|
119
119
|
} else {
|
|
120
120
|
// Recursive check for nested content
|
|
121
121
|
node.content.forEach(function (childNode) {
|
|
122
|
-
return
|
|
122
|
+
return _findAndTrackUnsupportedContentNodes(childNode, schema, dispatchAnalyticsEvent, concatAncestorHierarchy(node, ancestorHierarchy));
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
125
|
};
|
|
@@ -102,7 +102,7 @@ var RELATIVE_LINK = /^\//;
|
|
|
102
102
|
// Ignored via go/ees005
|
|
103
103
|
// eslint-disable-next-line require-unicode-regexp
|
|
104
104
|
var ANCHOR_LINK = /^#/;
|
|
105
|
-
var
|
|
105
|
+
var _flattenUnknownBlockTree = function flattenUnknownBlockTree(node) {
|
|
106
106
|
var schema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _schemaDefault.defaultSchema;
|
|
107
107
|
var adfStage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'final';
|
|
108
108
|
var output = [];
|
|
@@ -130,7 +130,7 @@ var flattenUnknownBlockTree = function flattenUnknownBlockTree(node) {
|
|
|
130
130
|
if (isLeafNode) {
|
|
131
131
|
output.push(getValidNode(childNode, schema, adfStage));
|
|
132
132
|
} else {
|
|
133
|
-
output.push.apply(output, (0, _toConsumableArray2.default)(
|
|
133
|
+
output.push.apply(output, (0, _toConsumableArray2.default)(_flattenUnknownBlockTree(childNode, schema, adfStage)));
|
|
134
134
|
}
|
|
135
135
|
isPrevLeafNode = isLeafNode;
|
|
136
136
|
}
|
|
@@ -172,7 +172,7 @@ var getValidUnknownNode = exports.getValidUnknownNode = function getValidUnknown
|
|
|
172
172
|
*/
|
|
173
173
|
return {
|
|
174
174
|
type: 'unknownBlock',
|
|
175
|
-
content:
|
|
175
|
+
content: _flattenUnknownBlockTree(node)
|
|
176
176
|
};
|
|
177
177
|
};
|
|
178
178
|
var getValidMarks = function getValidMarks(marks) {
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.WithPluginStateOld = exports.WithPluginStateInner = exports.WithPluginState = void 0;
|
|
8
|
+
var _readOnlyError2 = _interopRequireDefault(require("@babel/runtime/helpers/readOnlyError"));
|
|
8
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "99.
|
|
4
|
+
const packageVersion = "99.7.0";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// TODO: Sanitise the URL instead of just removing it
|