@atlaskit/editor-plugin-expand 13.1.14 → 13.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-expand
|
|
2
2
|
|
|
3
|
+
## 13.1.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4bd3df7dc598e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4bd3df7dc598e) -
|
|
8
|
+
Set contenteditable on the expand body during SSR streaming so the initial render matches CSR (the
|
|
9
|
+
imperative update that normally sets it does not run in SSR)
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 13.1.14
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -12,6 +12,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
var _v = _interopRequireDefault(require("uuid/v4"));
|
|
14
14
|
var _w3cKeyname = require("w3c-keyname");
|
|
15
|
+
var _coreUtils = require("@atlaskit/editor-common/core-utils");
|
|
15
16
|
var _expand = require("@atlaskit/editor-common/expand");
|
|
16
17
|
var _selection = require("@atlaskit/editor-common/selection");
|
|
17
18
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
@@ -494,7 +495,8 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
|
494
495
|
this.isExpanded.expanded = (_expandedState$get = _expand.expandedState.get(_node)) !== null && _expandedState$get !== void 0 ? _expandedState$get : false;
|
|
495
496
|
this.isExpanded.localId = _node.attrs.localId;
|
|
496
497
|
}
|
|
497
|
-
var
|
|
498
|
+
var editorDisabled = api === null || api === void 0 || (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 || (_api$editorDisabled = _api$editorDisabled.sharedState.currentState()) === null || _api$editorDisabled === void 0 ? void 0 : _api$editorDisabled.editorDisabled;
|
|
499
|
+
var _DOMSerializer$render = _model.DOMSerializer.renderSpec(document, (0, _NodeView.toDOM)(_node, this.__livePage, this.intl, editorDisabled, (0, _coreUtils.isSSRStreaming)() ? !editorDisabled && !(0, _expand.isExpandCollapsed)(_node) : undefined)),
|
|
498
500
|
_dom = _DOMSerializer$render.dom,
|
|
499
501
|
contentDOM = _DOMSerializer$render.contentDOM;
|
|
500
502
|
// Ignored via go/ees005
|
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
3
3
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
4
4
|
import uuid from 'uuid/v4';
|
|
5
5
|
import { keyName } from 'w3c-keyname';
|
|
6
|
+
import { isSSRStreaming } from '@atlaskit/editor-common/core-utils';
|
|
6
7
|
import { expandedState, isExpandCollapsed } from '@atlaskit/editor-common/expand';
|
|
7
8
|
import { GapCursorSelection, RelativeSelectionPos, Side } from '@atlaskit/editor-common/selection';
|
|
8
9
|
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
@@ -497,10 +498,11 @@ export class ExpandNodeView {
|
|
|
497
498
|
this.isExpanded.expanded = (_expandedState$get = expandedState.get(_node)) !== null && _expandedState$get !== void 0 ? _expandedState$get : false;
|
|
498
499
|
this.isExpanded.localId = _node.attrs.localId;
|
|
499
500
|
}
|
|
501
|
+
const editorDisabled = api === null || api === void 0 ? void 0 : (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 ? void 0 : (_api$editorDisabled$s = _api$editorDisabled.sharedState.currentState()) === null || _api$editorDisabled$s === void 0 ? void 0 : _api$editorDisabled$s.editorDisabled;
|
|
500
502
|
const {
|
|
501
503
|
dom: _dom,
|
|
502
504
|
contentDOM
|
|
503
|
-
} = DOMSerializer.renderSpec(document, toDOM(_node, this.__livePage, this.intl,
|
|
505
|
+
} = DOMSerializer.renderSpec(document, toDOM(_node, this.__livePage, this.intl, editorDisabled, isSSRStreaming() ? !editorDisabled && !isExpandCollapsed(_node) : undefined));
|
|
504
506
|
// Ignored via go/ees005
|
|
505
507
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
506
508
|
this.dom = _dom;
|
|
@@ -5,6 +5,7 @@ import React from 'react';
|
|
|
5
5
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
6
6
|
import uuid from 'uuid/v4';
|
|
7
7
|
import { keyName } from 'w3c-keyname';
|
|
8
|
+
import { isSSRStreaming } from '@atlaskit/editor-common/core-utils';
|
|
8
9
|
import { expandedState, isExpandCollapsed } from '@atlaskit/editor-common/expand';
|
|
9
10
|
import { GapCursorSelection, RelativeSelectionPos, Side } from '@atlaskit/editor-common/selection';
|
|
10
11
|
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
@@ -486,7 +487,8 @@ export var ExpandNodeView = /*#__PURE__*/function () {
|
|
|
486
487
|
this.isExpanded.expanded = (_expandedState$get = expandedState.get(_node)) !== null && _expandedState$get !== void 0 ? _expandedState$get : false;
|
|
487
488
|
this.isExpanded.localId = _node.attrs.localId;
|
|
488
489
|
}
|
|
489
|
-
var
|
|
490
|
+
var editorDisabled = api === null || api === void 0 || (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 || (_api$editorDisabled = _api$editorDisabled.sharedState.currentState()) === null || _api$editorDisabled === void 0 ? void 0 : _api$editorDisabled.editorDisabled;
|
|
491
|
+
var _DOMSerializer$render = DOMSerializer.renderSpec(document, toDOM(_node, this.__livePage, this.intl, editorDisabled, isSSRStreaming() ? !editorDisabled && !isExpandCollapsed(_node) : undefined)),
|
|
490
492
|
_dom = _DOMSerializer$render.dom,
|
|
491
493
|
contentDOM = _DOMSerializer$render.contentDOM;
|
|
492
494
|
// Ignored via go/ees005
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-expand",
|
|
3
|
-
"version": "13.1.
|
|
3
|
+
"version": "13.1.15",
|
|
4
4
|
"description": "Expand plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@atlaskit/icon-lab": "^7.3.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
42
42
|
"@atlaskit/prosemirror-history": "^1.0.0",
|
|
43
|
-
"@atlaskit/tmp-editor-statsig": "^124.
|
|
43
|
+
"@atlaskit/tmp-editor-statsig": "^124.1.0",
|
|
44
44
|
"@atlaskit/tokens": "^15.5.0",
|
|
45
45
|
"@atlaskit/tooltip": "^23.1.0",
|
|
46
46
|
"@babel/runtime": "^7.0.0",
|