@atlaskit/editor-plugin-placeholder 10.2.4 → 10.2.5
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,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-placeholder
|
|
2
2
|
|
|
3
|
+
## 10.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`cd85cdec5ae7e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cd85cdec5ae7e) -
|
|
8
|
+
EDITOR-7170 add transform for panel -> panel_c1
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 10.2.4
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -13,6 +13,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
13
13
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
14
14
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
15
15
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
16
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
17
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
17
18
|
var _placeholderPlugin = require("../placeholderPlugin");
|
|
18
19
|
var _adfBuilders = require("./adf-builders");
|
|
@@ -137,7 +138,7 @@ function createPlaceHolderStateFrom(_ref3) {
|
|
|
137
138
|
}
|
|
138
139
|
}
|
|
139
140
|
if (isEditorFocused && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
140
|
-
var _parentNode$firstChil, _parentNode$firstChil2;
|
|
141
|
+
var _parentNode$type, _parentNode$firstChil, _parentNode$firstChil2;
|
|
141
142
|
var _editorState$selectio2 = editorState.selection,
|
|
142
143
|
$from = _editorState$selectio2.$from,
|
|
143
144
|
_$to = _editorState$selectio2.$to;
|
|
@@ -149,7 +150,7 @@ function createPlaceHolderStateFrom(_ref3) {
|
|
|
149
150
|
});
|
|
150
151
|
}
|
|
151
152
|
var parentNode = $from.node($from.depth - 1);
|
|
152
|
-
var parentType = parentNode === null || parentNode === void 0 ? void 0 :
|
|
153
|
+
var parentType = parentNode !== null && parentNode !== void 0 && parentNode.type && (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? (0, _utils.getBaseNodeTypeName)(parentNode.type) : parentNode === null || parentNode === void 0 || (_parentNode$type = parentNode.type) === null || _parentNode$type === void 0 ? void 0 : _parentNode$type.name;
|
|
153
154
|
if (emptyLinePlaceholder && parentType === 'doc') {
|
|
154
155
|
var isEmptyLine = (0, _utils.isEmptyParagraph)($from.parent);
|
|
155
156
|
if (isEmptyLine) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { placeholderTextMessages as messages } from '@atlaskit/editor-common/messages';
|
|
2
|
-
import { bracketTyped, hasDocAsParent, isEmptyDocument, isEmptyParagraph } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { bracketTyped, getBaseNodeTypeName, hasDocAsParent, isEmptyDocument, isEmptyParagraph } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
|
|
4
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
5
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
5
6
|
import { pluginKey } from '../placeholderPlugin';
|
|
6
7
|
import { createLongEmptyNodePlaceholderADF, createShortEmptyNodePlaceholderADF } from './adf-builders';
|
|
@@ -126,7 +127,7 @@ export function createPlaceHolderStateFrom({
|
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
129
|
if (isEditorFocused && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
129
|
-
var _parentNode$firstChil, _parentNode$firstChil2;
|
|
130
|
+
var _parentNode$type, _parentNode$firstChil, _parentNode$firstChil2;
|
|
130
131
|
const {
|
|
131
132
|
$from,
|
|
132
133
|
$to
|
|
@@ -139,7 +140,7 @@ export function createPlaceHolderStateFrom({
|
|
|
139
140
|
});
|
|
140
141
|
}
|
|
141
142
|
const parentNode = $from.node($from.depth - 1);
|
|
142
|
-
const parentType = parentNode === null || parentNode === void 0 ? void 0 : parentNode.type.name;
|
|
143
|
+
const parentType = parentNode !== null && parentNode !== void 0 && parentNode.type && expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? getBaseNodeTypeName(parentNode.type) : parentNode === null || parentNode === void 0 ? void 0 : (_parentNode$type = parentNode.type) === null || _parentNode$type === void 0 ? void 0 : _parentNode$type.name;
|
|
143
144
|
if (emptyLinePlaceholder && parentType === 'doc') {
|
|
144
145
|
const isEmptyLine = isEmptyParagraph($from.parent);
|
|
145
146
|
if (isEmptyLine) {
|
|
@@ -2,8 +2,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
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; }
|
|
3
3
|
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) { _defineProperty(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; }
|
|
4
4
|
import { placeholderTextMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
|
-
import { bracketTyped, hasDocAsParent, isEmptyDocument, isEmptyParagraph } from '@atlaskit/editor-common/utils';
|
|
5
|
+
import { bracketTyped, getBaseNodeTypeName, hasDocAsParent, isEmptyDocument, isEmptyParagraph } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
|
|
7
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
9
|
import { pluginKey } from '../placeholderPlugin';
|
|
9
10
|
import { createLongEmptyNodePlaceholderADF, createShortEmptyNodePlaceholderADF } from './adf-builders';
|
|
@@ -126,7 +127,7 @@ export function createPlaceHolderStateFrom(_ref3) {
|
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
129
|
if (isEditorFocused && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
129
|
-
var _parentNode$firstChil, _parentNode$firstChil2;
|
|
130
|
+
var _parentNode$type, _parentNode$firstChil, _parentNode$firstChil2;
|
|
130
131
|
var _editorState$selectio2 = editorState.selection,
|
|
131
132
|
$from = _editorState$selectio2.$from,
|
|
132
133
|
_$to = _editorState$selectio2.$to;
|
|
@@ -138,7 +139,7 @@ export function createPlaceHolderStateFrom(_ref3) {
|
|
|
138
139
|
});
|
|
139
140
|
}
|
|
140
141
|
var parentNode = $from.node($from.depth - 1);
|
|
141
|
-
var parentType = parentNode === null || parentNode === void 0 ? void 0 :
|
|
142
|
+
var parentType = parentNode !== null && parentNode !== void 0 && parentNode.type && expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? getBaseNodeTypeName(parentNode.type) : parentNode === null || parentNode === void 0 || (_parentNode$type = parentNode.type) === null || _parentNode$type === void 0 ? void 0 : _parentNode$type.name;
|
|
142
143
|
if (emptyLinePlaceholder && parentType === 'doc') {
|
|
143
144
|
var isEmptyLine = isEmptyParagraph($from.parent);
|
|
144
145
|
if (isEmptyLine) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-placeholder",
|
|
3
|
-
"version": "10.2.
|
|
3
|
+
"version": "10.2.5",
|
|
4
4
|
"description": "Placeholder plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"atlaskit:src": "src/index.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@atlaskit/adf-utils": "^19.
|
|
30
|
+
"@atlaskit/adf-utils": "^19.32.0",
|
|
31
31
|
"@atlaskit/css": "^0.19.0",
|
|
32
32
|
"@atlaskit/editor-plugin-composition": "^9.1.0",
|
|
33
33
|
"@atlaskit/editor-plugin-focus": "^9.1.0",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
38
38
|
"@atlaskit/primitives": "^19.0.0",
|
|
39
39
|
"@atlaskit/spinner": "^19.1.0",
|
|
40
|
-
"@atlaskit/tmp-editor-statsig": "^84.
|
|
40
|
+
"@atlaskit/tmp-editor-statsig": "^84.3.0",
|
|
41
41
|
"@atlaskit/tokens": "^13.0.0",
|
|
42
42
|
"@babel/runtime": "^7.0.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@atlaskit/editor-common": "^114.
|
|
45
|
+
"@atlaskit/editor-common": "^114.49.0",
|
|
46
46
|
"react": "^18.2.0",
|
|
47
47
|
"react-dom": "^18.2.0",
|
|
48
48
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|