@atlaskit/editor-plugin-placeholder 2.0.18 → 2.0.20
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,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-placeholder
|
|
2
2
|
|
|
3
|
+
## 2.0.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#173379](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173379)
|
|
8
|
+
[`99e2b882f5cf0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/99e2b882f5cf0) -
|
|
9
|
+
Clean up platform_editor_controls_patch_3
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 2.0.19
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 2.0.18
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -12,7 +12,6 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
12
12
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
13
13
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
14
14
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
15
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
15
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
17
16
|
var pluginKey = exports.pluginKey = new _state.PluginKey('placeholderPlugin');
|
|
18
17
|
function getPlaceholderState(editorState) {
|
|
@@ -106,9 +105,6 @@ function createPlaceHolderStateFrom(_ref) {
|
|
|
106
105
|
var isEmptyNode = (parentNode === null || parentNode === void 0 ? void 0 : parentNode.childCount) === 1 && ((_parentNode$firstChil = parentNode.firstChild) === null || _parentNode$firstChil === void 0 ? void 0 : _parentNode$firstChil.content.size) === 0 && ((_parentNode$firstChil2 = parentNode.firstChild) === null || _parentNode$firstChil2 === void 0 ? void 0 : _parentNode$firstChil2.type.name) === 'paragraph';
|
|
107
106
|
if (nodeTypesWithShortPlaceholderText.includes(parentType) && isEmptyNode) {
|
|
108
107
|
var _table$node$firstChil;
|
|
109
|
-
if (!(0, _platformFeatureFlags.fg)('platform_editor_controls_patch_3')) {
|
|
110
|
-
return setPlaceHolderState(intl.formatMessage(_messages.placeholderTextMessages.shortEmptyNodePlaceholderText), $from.pos);
|
|
111
|
-
}
|
|
112
108
|
var table = (0, _utils2.findParentNode)(function (node) {
|
|
113
109
|
return node.type === editorState.schema.nodes.table;
|
|
114
110
|
})(editorState.selection);
|
|
@@ -4,7 +4,6 @@ import { bracketTyped, browser, isEmptyDocument, isEmptyParagraph } from '@atlas
|
|
|
4
4
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
|
|
6
6
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
8
|
export const pluginKey = new PluginKey('placeholderPlugin');
|
|
10
9
|
function getPlaceholderState(editorState) {
|
|
@@ -97,9 +96,6 @@ function createPlaceHolderStateFrom({
|
|
|
97
96
|
const isEmptyNode = (parentNode === null || parentNode === void 0 ? void 0 : parentNode.childCount) === 1 && ((_parentNode$firstChil = parentNode.firstChild) === null || _parentNode$firstChil === void 0 ? void 0 : _parentNode$firstChil.content.size) === 0 && ((_parentNode$firstChil2 = parentNode.firstChild) === null || _parentNode$firstChil2 === void 0 ? void 0 : _parentNode$firstChil2.type.name) === 'paragraph';
|
|
98
97
|
if (nodeTypesWithShortPlaceholderText.includes(parentType) && isEmptyNode) {
|
|
99
98
|
var _table$node$firstChil;
|
|
100
|
-
if (!fg('platform_editor_controls_patch_3')) {
|
|
101
|
-
return setPlaceHolderState(intl.formatMessage(messages.shortEmptyNodePlaceholderText), $from.pos);
|
|
102
|
-
}
|
|
103
99
|
const table = findParentNode(node => node.type === editorState.schema.nodes.table)(editorState.selection);
|
|
104
100
|
if (!table) {
|
|
105
101
|
return emptyPlaceholder(defaultPlaceholderText);
|
|
@@ -4,7 +4,6 @@ import { bracketTyped, browser, isEmptyDocument, isEmptyParagraph } from '@atlas
|
|
|
4
4
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
|
|
6
6
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
8
|
export var pluginKey = new PluginKey('placeholderPlugin');
|
|
10
9
|
function getPlaceholderState(editorState) {
|
|
@@ -98,9 +97,6 @@ function createPlaceHolderStateFrom(_ref) {
|
|
|
98
97
|
var isEmptyNode = (parentNode === null || parentNode === void 0 ? void 0 : parentNode.childCount) === 1 && ((_parentNode$firstChil = parentNode.firstChild) === null || _parentNode$firstChil === void 0 ? void 0 : _parentNode$firstChil.content.size) === 0 && ((_parentNode$firstChil2 = parentNode.firstChild) === null || _parentNode$firstChil2 === void 0 ? void 0 : _parentNode$firstChil2.type.name) === 'paragraph';
|
|
99
98
|
if (nodeTypesWithShortPlaceholderText.includes(parentType) && isEmptyNode) {
|
|
100
99
|
var _table$node$firstChil;
|
|
101
|
-
if (!fg('platform_editor_controls_patch_3')) {
|
|
102
|
-
return setPlaceHolderState(intl.formatMessage(messages.shortEmptyNodePlaceholderText), $from.pos);
|
|
103
|
-
}
|
|
104
100
|
var table = findParentNode(function (node) {
|
|
105
101
|
return node.type === editorState.schema.nodes.table;
|
|
106
102
|
})(editorState.selection);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-placeholder",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.20",
|
|
4
4
|
"description": "Placeholder plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/editor-common": "^
|
|
34
|
+
"@atlaskit/editor-common": "^107.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-composition": "^1.3.0",
|
|
36
36
|
"@atlaskit/editor-plugin-focus": "^1.5.0",
|
|
37
37
|
"@atlaskit/editor-plugin-type-ahead": "^2.7.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
|
-
"@atlaskit/tmp-editor-statsig": "^7.
|
|
40
|
+
"@atlaskit/tmp-editor-statsig": "^7.2.0",
|
|
41
41
|
"@babel/runtime": "^7.0.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
@@ -84,10 +84,5 @@
|
|
|
84
84
|
"import-no-extraneous-disable-for-examples-and-docs"
|
|
85
85
|
]
|
|
86
86
|
}
|
|
87
|
-
},
|
|
88
|
-
"platform-feature-flags": {
|
|
89
|
-
"platform_editor_controls_patch_3": {
|
|
90
|
-
"type": "boolean"
|
|
91
|
-
}
|
|
92
87
|
}
|
|
93
88
|
}
|