@atlaskit/editor-common 99.6.1 → 99.7.1
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/i18n/cs.js +5 -0
- package/dist/cjs/i18n/da.js +5 -0
- package/dist/cjs/i18n/de.js +6 -0
- package/dist/cjs/i18n/en.js +80 -0
- package/dist/cjs/i18n/en_GB.js +80 -0
- package/dist/cjs/i18n/en_ZZ.js +80 -0
- package/dist/cjs/i18n/es.js +10 -0
- package/dist/cjs/i18n/fi.js +5 -0
- package/dist/cjs/i18n/fr.js +6 -0
- package/dist/cjs/i18n/hu.js +6 -0
- package/dist/cjs/i18n/it.js +5 -0
- package/dist/cjs/i18n/ja.js +5 -0
- package/dist/cjs/i18n/ko.js +5 -0
- package/dist/cjs/i18n/nb.js +5 -0
- package/dist/cjs/i18n/nl.js +5 -0
- package/dist/cjs/i18n/pl.js +6 -0
- package/dist/cjs/i18n/pt_BR.js +5 -0
- package/dist/cjs/i18n/ru.js +9 -0
- package/dist/cjs/i18n/sv.js +5 -0
- package/dist/cjs/i18n/th.js +5 -0
- package/dist/cjs/i18n/tr.js +5 -0
- package/dist/cjs/i18n/uk.js +9 -0
- package/dist/cjs/i18n/vi.js +6 -0
- package/dist/cjs/i18n/zh.js +5 -0
- package/dist/cjs/i18n/zh_TW.js +5 -0
- package/dist/cjs/link/LinkSearch/index.js +1 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/node-width/index.js +41 -4
- 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/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/i18n/cs.js +5 -0
- package/dist/es2019/i18n/da.js +5 -0
- package/dist/es2019/i18n/de.js +6 -0
- package/dist/es2019/i18n/en.js +80 -0
- package/dist/es2019/i18n/en_GB.js +80 -0
- package/dist/es2019/i18n/en_ZZ.js +80 -0
- package/dist/es2019/i18n/es.js +10 -0
- package/dist/es2019/i18n/fi.js +5 -0
- package/dist/es2019/i18n/fr.js +6 -0
- package/dist/es2019/i18n/hu.js +6 -0
- package/dist/es2019/i18n/it.js +5 -0
- package/dist/es2019/i18n/ja.js +5 -0
- package/dist/es2019/i18n/ko.js +5 -0
- package/dist/es2019/i18n/nb.js +5 -0
- package/dist/es2019/i18n/nl.js +5 -0
- package/dist/es2019/i18n/pl.js +6 -0
- package/dist/es2019/i18n/pt_BR.js +5 -0
- package/dist/es2019/i18n/ru.js +9 -0
- package/dist/es2019/i18n/sv.js +5 -0
- package/dist/es2019/i18n/th.js +5 -0
- package/dist/es2019/i18n/tr.js +5 -0
- package/dist/es2019/i18n/uk.js +9 -0
- package/dist/es2019/i18n/vi.js +6 -0
- package/dist/es2019/i18n/zh.js +5 -0
- package/dist/es2019/i18n/zh_TW.js +5 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/node-width/index.js +39 -4
- 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/ui/DropList/index.js +1 -1
- package/dist/esm/i18n/cs.js +5 -0
- package/dist/esm/i18n/da.js +5 -0
- package/dist/esm/i18n/de.js +6 -0
- package/dist/esm/i18n/en.js +80 -0
- package/dist/esm/i18n/en_GB.js +80 -0
- package/dist/esm/i18n/en_ZZ.js +80 -0
- package/dist/esm/i18n/es.js +10 -0
- package/dist/esm/i18n/fi.js +5 -0
- package/dist/esm/i18n/fr.js +6 -0
- package/dist/esm/i18n/hu.js +6 -0
- package/dist/esm/i18n/it.js +5 -0
- package/dist/esm/i18n/ja.js +5 -0
- package/dist/esm/i18n/ko.js +5 -0
- package/dist/esm/i18n/nb.js +5 -0
- package/dist/esm/i18n/nl.js +5 -0
- package/dist/esm/i18n/pl.js +6 -0
- package/dist/esm/i18n/pt_BR.js +5 -0
- package/dist/esm/i18n/ru.js +9 -0
- package/dist/esm/i18n/sv.js +5 -0
- package/dist/esm/i18n/th.js +5 -0
- package/dist/esm/i18n/tr.js +5 -0
- package/dist/esm/i18n/uk.js +9 -0
- package/dist/esm/i18n/vi.js +6 -0
- package/dist/esm/i18n/zh.js +5 -0
- package/dist/esm/i18n/zh_TW.js +5 -0
- package/dist/esm/link/LinkSearch/index.js +1 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/node-width/index.js +41 -4
- 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/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/i18n/cs.d.ts +5 -0
- package/dist/types/i18n/da.d.ts +5 -0
- package/dist/types/i18n/de.d.ts +6 -0
- package/dist/types/i18n/en.d.ts +80 -0
- package/dist/types/i18n/en_GB.d.ts +80 -0
- package/dist/types/i18n/en_ZZ.d.ts +80 -0
- package/dist/types/i18n/es.d.ts +10 -0
- package/dist/types/i18n/fi.d.ts +5 -0
- package/dist/types/i18n/fr.d.ts +6 -0
- package/dist/types/i18n/hu.d.ts +6 -0
- package/dist/types/i18n/it.d.ts +5 -0
- package/dist/types/i18n/ja.d.ts +5 -0
- package/dist/types/i18n/ko.d.ts +5 -0
- package/dist/types/i18n/nb.d.ts +5 -0
- package/dist/types/i18n/nl.d.ts +5 -0
- package/dist/types/i18n/pl.d.ts +6 -0
- package/dist/types/i18n/pt_BR.d.ts +5 -0
- package/dist/types/i18n/ru.d.ts +9 -0
- package/dist/types/i18n/sv.d.ts +5 -0
- package/dist/types/i18n/th.d.ts +5 -0
- package/dist/types/i18n/tr.d.ts +5 -0
- package/dist/types/i18n/uk.d.ts +9 -0
- package/dist/types/i18n/vi.d.ts +6 -0
- package/dist/types/i18n/zh.d.ts +5 -0
- package/dist/types/i18n/zh_TW.d.ts +5 -0
- package/dist/types/react-node-view/onVisibleObserverFactory.d.ts +8 -0
- package/dist/types-ts4.5/i18n/cs.d.ts +5 -0
- package/dist/types-ts4.5/i18n/da.d.ts +5 -0
- package/dist/types-ts4.5/i18n/de.d.ts +6 -0
- package/dist/types-ts4.5/i18n/en.d.ts +80 -0
- package/dist/types-ts4.5/i18n/en_GB.d.ts +80 -0
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +80 -0
- package/dist/types-ts4.5/i18n/es.d.ts +10 -0
- package/dist/types-ts4.5/i18n/fi.d.ts +5 -0
- package/dist/types-ts4.5/i18n/fr.d.ts +6 -0
- package/dist/types-ts4.5/i18n/hu.d.ts +6 -0
- package/dist/types-ts4.5/i18n/it.d.ts +5 -0
- package/dist/types-ts4.5/i18n/ja.d.ts +5 -0
- package/dist/types-ts4.5/i18n/ko.d.ts +5 -0
- package/dist/types-ts4.5/i18n/nb.d.ts +5 -0
- package/dist/types-ts4.5/i18n/nl.d.ts +5 -0
- package/dist/types-ts4.5/i18n/pl.d.ts +6 -0
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +5 -0
- package/dist/types-ts4.5/i18n/ru.d.ts +9 -0
- package/dist/types-ts4.5/i18n/sv.d.ts +5 -0
- package/dist/types-ts4.5/i18n/th.d.ts +5 -0
- package/dist/types-ts4.5/i18n/tr.d.ts +5 -0
- package/dist/types-ts4.5/i18n/uk.d.ts +9 -0
- package/dist/types-ts4.5/i18n/vi.d.ts +6 -0
- package/dist/types-ts4.5/i18n/zh.d.ts +5 -0
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +5 -0
- package/dist/types-ts4.5/react-node-view/onVisibleObserverFactory.d.ts +8 -0
- package/package.json +13 -10
package/dist/cjs/i18n/zh_TW.js
CHANGED
|
@@ -92,6 +92,7 @@ var _default = exports.default = {
|
|
|
92
92
|
'fabric.editor.columnMovedRight': '直欄已右移至第 {index} 欄,總共有 {total} 欄',
|
|
93
93
|
'fabric.editor.columnSelected': '已選取第 {index} 欄,總共有 {total} 欄',
|
|
94
94
|
'fabric.editor.columns': '版面配置',
|
|
95
|
+
'fabric.editor.columns.advanced.layout.description': '{numberOfColumns, plural, other {插入 {numberOfColumns} 個相等的欄}}',
|
|
95
96
|
'fabric.editor.columns.description': '使用區段建立頁面的結構',
|
|
96
97
|
'fabric.editor.columnsAreInserted': '{count, plural, other {已插入 {count} 欄}}',
|
|
97
98
|
'fabric.editor.columnsAreRemoved': '{count, plural, other {已移除 {count} 欄}}',
|
|
@@ -302,6 +303,7 @@ var _default = exports.default = {
|
|
|
302
303
|
'fabric.editor.keyboardShortcuts': '鍵盤快速鍵',
|
|
303
304
|
'fabric.editor.layout.columnOption': '{count, plural, other {{count} 欄}}',
|
|
304
305
|
'fabric.editor.layout.placeholder': '新增內容',
|
|
306
|
+
'fabric.editor.layout.resizeLayout': '重新調整版面配置的大小',
|
|
305
307
|
'fabric.editor.layoutFixedWidth': '返回中央',
|
|
306
308
|
'fabric.editor.layoutFullWidth': '採用完整寬度',
|
|
307
309
|
'fabric.editor.layoutWide': '採用寬版',
|
|
@@ -369,6 +371,8 @@ var _default = exports.default = {
|
|
|
369
371
|
'fabric.editor.notePanel.description': '以彩色面板新增附註',
|
|
370
372
|
'fabric.editor.numberedColumn': '編號直欄',
|
|
371
373
|
'fabric.editor.off': '{formattingType} 關閉',
|
|
374
|
+
'fabric.editor.offlineErrorFallbackDescription': '請嘗試重新載入頁面。',
|
|
375
|
+
'fabric.editor.offlineErrorFallbackHeading': '發生錯誤!',
|
|
372
376
|
'fabric.editor.on': '{formattingType} 開啟',
|
|
373
377
|
'fabric.editor.openCellOptions': '開啟儲存格選項',
|
|
374
378
|
'fabric.editor.openLink': '在新的索引標籤中開啟連結',
|
|
@@ -507,6 +511,7 @@ var _default = exports.default = {
|
|
|
507
511
|
'fabric.editor.unableToOpenLink': '無法開啟此連結',
|
|
508
512
|
'fabric.editor.underline': '底線',
|
|
509
513
|
'fabric.editor.undo': '復原',
|
|
514
|
+
'fabric.editor.unknown.label': '未知',
|
|
510
515
|
'fabric.editor.unlink': '取消連結',
|
|
511
516
|
'fabric.editor.unorderedList': '項目符號清單',
|
|
512
517
|
'fabric.editor.unorderedList.description': '建立未排序的清單',
|
|
@@ -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.1";
|
|
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
|
|
@@ -6,8 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.layoutToWidth = exports.getTableWidthWithNumberColumn = exports.getTableContainerWidth = exports.getParentNodeWidth = void 0;
|
|
7
7
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
8
8
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
9
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
10
|
var _extension = require("../styles/shared/extension");
|
|
10
11
|
var _layout = require("../styles/shared/layout");
|
|
12
|
+
var _table = require("../styles/shared/table");
|
|
11
13
|
var _breakout = require("../utils/breakout");
|
|
12
14
|
var GRID_SIZE = 8;
|
|
13
15
|
var layoutToWidth = exports.layoutToWidth = {
|
|
@@ -50,7 +52,7 @@ var getParentNodeWidth = exports.getParentNodeWidth = function getParentNodeWidt
|
|
|
50
52
|
return state['contextPanelPluginKey$'];
|
|
51
53
|
}
|
|
52
54
|
};
|
|
53
|
-
if (node.type === schema.nodes.layoutSection) {
|
|
55
|
+
if (node.type === schema.nodes.layoutSection && !(0, _platformFeatureFlags.fg)('platform_editor_nested_tables_resizing')) {
|
|
54
56
|
var _contextPanelPluginKe, _contextPanelPluginKe2;
|
|
55
57
|
parentWidth += _editorSharedStyles.akLayoutGutterOffset * 2; // extra width that gets added to layout
|
|
56
58
|
|
|
@@ -67,10 +69,27 @@ var getParentNodeWidth = exports.getParentNodeWidth = function getParentNodeWidt
|
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
|
-
|
|
71
|
-
// account for the padding of the parent node
|
|
72
72
|
switch (node.type) {
|
|
73
73
|
case schema.nodes.layoutSection:
|
|
74
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_nested_tables_resizing')) {
|
|
75
|
+
var _contextPanelPluginKe3, _contextPanelPluginKe4;
|
|
76
|
+
parentWidth += _editorSharedStyles.akLayoutGutterOffset * 2; // extra width that gets added to layout
|
|
77
|
+
|
|
78
|
+
// Calculate width of parent layout column when
|
|
79
|
+
// Parallel layout with viewport greater than 1024px
|
|
80
|
+
// OR side panel of an extension is open and change the node width to smaller than containerWidth
|
|
81
|
+
if (containerWidth.width > _editorSharedStyles.gridMediumMaxWidth || ((_contextPanelPluginKe3 = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe3 === void 0 ? void 0 : _contextPanelPluginKe3.contents.length) > 0 && ((_contextPanelPluginKe4 = contextPanelPluginKey.getState(state)) === null || _contextPanelPluginKe4 === void 0 ? void 0 : _contextPanelPluginKe4.contents[0]) !== undefined) {
|
|
82
|
+
parentWidth -= (_layout.LAYOUT_SECTION_MARGIN + 2) * (node.childCount - 1); // margin between sections
|
|
83
|
+
var _$pos = state.doc.resolve(pos);
|
|
84
|
+
var _column = (0, _utils.findParentNodeOfTypeClosestToPos)(_$pos, [state.schema.nodes.layoutColumn]);
|
|
85
|
+
if (_column && _column.node && !isNaN(_column.node.attrs.width)) {
|
|
86
|
+
// get exact width of parent layout column using node attrs
|
|
87
|
+
parentWidth = Math.round(parentWidth * _column.node.attrs.width * 0.01);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// account for the padding of the parent node
|
|
74
93
|
parentWidth -= _layout.LAYOUT_COLUMN_PADDING * 2;
|
|
75
94
|
break;
|
|
76
95
|
case schema.nodes.bodiedExtension:
|
|
@@ -89,6 +108,19 @@ var getParentNodeWidth = exports.getParentNodeWidth = function getParentNodeWidt
|
|
|
89
108
|
// padding left
|
|
90
109
|
parentWidth -= GRID_SIZE * 4 - GRID_SIZE / 2;
|
|
91
110
|
break;
|
|
111
|
+
case schema.nodes.tableCell:
|
|
112
|
+
case schema.nodes.tableHeader:
|
|
113
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_nested_tables_resizing')) {
|
|
114
|
+
// Calculate the available column width
|
|
115
|
+
if (Array.isArray(node.attrs.colwidth)) {
|
|
116
|
+
parentWidth = node.attrs.colwidth.slice(0, node.attrs.colspan).reduce(function (sum, width) {
|
|
117
|
+
return sum + width;
|
|
118
|
+
}, 0);
|
|
119
|
+
}
|
|
120
|
+
// Compensate for padding
|
|
121
|
+
parentWidth -= _table.tableCellPadding * 2;
|
|
122
|
+
}
|
|
123
|
+
break;
|
|
92
124
|
}
|
|
93
125
|
parentWidth -= 2; // border
|
|
94
126
|
|
|
@@ -99,7 +131,12 @@ var getNestedParentNode = function getNestedParentNode(tablePos, state) {
|
|
|
99
131
|
return null;
|
|
100
132
|
}
|
|
101
133
|
var $pos = state.doc.resolve(tablePos);
|
|
102
|
-
var parent
|
|
134
|
+
var parent;
|
|
135
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_nested_tables_resizing')) {
|
|
136
|
+
parent = (0, _utils.findParentNodeOfTypeClosestToPos)($pos, [state.schema.nodes.bodiedExtension, state.schema.nodes.extensionFrame, state.schema.nodes.layoutSection, state.schema.nodes.expand, state.schema.nodes.tableCell, state.schema.nodes.tableHeader]);
|
|
137
|
+
} else {
|
|
138
|
+
parent = (0, _utils.findParentNodeOfTypeClosestToPos)($pos, [state.schema.nodes.bodiedExtension, state.schema.nodes.extensionFrame, state.schema.nodes.layoutSection, state.schema.nodes.expand]);
|
|
139
|
+
}
|
|
103
140
|
return parent ? parent.node : null;
|
|
104
141
|
};
|
|
105
142
|
var calcBreakoutNodeWidth = function calcBreakoutNodeWidth(layout, containerWidth, isFullWidthModeEnabled) {
|
|
@@ -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
|
|
@@ -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.1";
|
|
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"));
|
package/dist/es2019/i18n/cs.js
CHANGED
|
@@ -86,6 +86,7 @@ export default {
|
|
|
86
86
|
'fabric.editor.columnMovedRight': 'Sloupec byl přesunut doprava na pozici {index} z {total}',
|
|
87
87
|
'fabric.editor.columnSelected': 'Je vybrán sloupec {index} z {total}',
|
|
88
88
|
'fabric.editor.columns': 'Rozvržení',
|
|
89
|
+
'fabric.editor.columns.advanced.layout.description': '{numberOfColumns, plural, one {Vložit {numberOfColumns} stejný sloupec} few {Vložit {numberOfColumns} stejné sloupce} many {Vložit {numberOfColumns} stejného sloupce} other {Vložit {numberOfColumns} stejných sloupců}}',
|
|
89
90
|
'fabric.editor.columns.description': 'Uspořádejte svou stránku pomocí oddílů',
|
|
90
91
|
'fabric.editor.columnsAreInserted': '{count, plural, one {Byl vložen sloupec.} few {Byly vloženy {count} sloupce.} many {Bylo vloženo {count} sloupce.} other {Bylo vloženo {count} sloupců.}}',
|
|
91
92
|
'fabric.editor.columnsAreRemoved': '{count, plural, one {Sloupec byl odebrán.} few {Byly odebrány {count} sloupce.} many {Bylo odebráno {count} sloupce.} other {Bylo odebráno {count} sloupců.}}',
|
|
@@ -296,6 +297,7 @@ export default {
|
|
|
296
297
|
'fabric.editor.keyboardShortcuts': 'Klávesové zkratky',
|
|
297
298
|
'fabric.editor.layout.columnOption': '{count, plural, one {Sloupec} few {{count} sloupce} many {{count} sloupce} other {{count} sloupců}}',
|
|
298
299
|
'fabric.editor.layout.placeholder': 'Přidat obsah',
|
|
300
|
+
'fabric.editor.layout.resizeLayout': 'Změnit velikost rozvržení',
|
|
299
301
|
'fabric.editor.layoutFixedWidth': 'Zpět na zobrazení standardní šířky',
|
|
300
302
|
'fabric.editor.layoutFullWidth': 'Přepnout do zobrazení na celou šířku',
|
|
301
303
|
'fabric.editor.layoutWide': 'Přepnout do zobrazení na šířku',
|
|
@@ -363,6 +365,8 @@ export default {
|
|
|
363
365
|
'fabric.editor.notePanel.description': 'Přidat poznámku do barevného panelu',
|
|
364
366
|
'fabric.editor.numberedColumn': 'Číslovaný sloupec',
|
|
365
367
|
'fabric.editor.off': 'Formátování {formattingType} vypnuto',
|
|
368
|
+
'fabric.editor.offlineErrorFallbackDescription': 'Zkuste stránku načíst znovu.',
|
|
369
|
+
'fabric.editor.offlineErrorFallbackHeading': 'Něco se pokazilo',
|
|
366
370
|
'fabric.editor.on': '{formattingType} zapnuto',
|
|
367
371
|
'fabric.editor.openCellOptions': 'Otevřít možnosti buňky',
|
|
368
372
|
'fabric.editor.openLink': 'Otevřít odkaz na nové kartě',
|
|
@@ -501,6 +505,7 @@ export default {
|
|
|
501
505
|
'fabric.editor.unableToOpenLink': 'Tento odkaz nelze otevřít',
|
|
502
506
|
'fabric.editor.underline': 'Podtržení',
|
|
503
507
|
'fabric.editor.undo': 'Vrátit',
|
|
508
|
+
'fabric.editor.unknown.label': 'Neznámý',
|
|
504
509
|
'fabric.editor.unlink': 'Zrušit propojení',
|
|
505
510
|
'fabric.editor.unorderedList': 'Seznam s odrážkami',
|
|
506
511
|
'fabric.editor.unorderedList.description': 'Vytvořit neseřazený seznam',
|