@atlaskit/editor-plugin-placeholder 6.6.7 → 7.1.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
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-placeholder
|
|
2
2
|
|
|
3
|
+
## 7.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`7b39652e2fb7e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7b39652e2fb7e) -
|
|
8
|
+
Updates editor to only show placeholder once collab has connected.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 7.0.0
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 6.6.7
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = createPlugin;
|
|
7
7
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
8
8
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
9
10
|
var _placeholderPlugin = require("../placeholderPlugin");
|
|
10
11
|
var _constants = require("./constants");
|
|
11
12
|
var _decorations = require("./decorations");
|
|
@@ -92,6 +93,12 @@ function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderText, empt
|
|
|
92
93
|
props: {
|
|
93
94
|
decorations: function decorations(editorState) {
|
|
94
95
|
var _api$composition, _api$showDiff;
|
|
96
|
+
if ((0, _expValEquals.expValEquals)('cc_editor_placeholder_collab_wait', 'isEnabled', true)) {
|
|
97
|
+
// @ts-ignore quick fix which needs follow up to use standard apis
|
|
98
|
+
if (editorState.collabEditPlugin$ && editorState.collabEditPlugin$.isReady !== true) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
95
102
|
var _getPlaceholderState = (0, _utils.getPlaceholderState)(editorState),
|
|
96
103
|
hasPlaceholder = _getPlaceholderState.hasPlaceholder,
|
|
97
104
|
placeholderText = _getPlaceholderState.placeholderText,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
4
|
import { pluginKey, EMPTY_PARAGRAPH_TIMEOUT_DELAY } from '../placeholderPlugin';
|
|
4
5
|
import { TYPEWRITER_TYPED_AND_DELETED_DELAY } from './constants';
|
|
5
6
|
import { createPlaceholderDecoration } from './decorations';
|
|
@@ -85,6 +86,12 @@ export default function createPlugin(intl, defaultPlaceholderText, bracketPlaceh
|
|
|
85
86
|
props: {
|
|
86
87
|
decorations(editorState) {
|
|
87
88
|
var _api$composition, _api$showDiff, _api$showDiff$sharedS;
|
|
89
|
+
if (expValEquals('cc_editor_placeholder_collab_wait', 'isEnabled', true)) {
|
|
90
|
+
// @ts-ignore quick fix which needs follow up to use standard apis
|
|
91
|
+
if (editorState.collabEditPlugin$ && editorState.collabEditPlugin$.isReady !== true) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
88
95
|
const {
|
|
89
96
|
hasPlaceholder,
|
|
90
97
|
placeholderText,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
4
|
import { pluginKey, EMPTY_PARAGRAPH_TIMEOUT_DELAY } from '../placeholderPlugin';
|
|
4
5
|
import { TYPEWRITER_TYPED_AND_DELETED_DELAY } from './constants';
|
|
5
6
|
import { createPlaceholderDecoration } from './decorations';
|
|
@@ -86,6 +87,12 @@ export default function createPlugin(intl, defaultPlaceholderText, bracketPlaceh
|
|
|
86
87
|
props: {
|
|
87
88
|
decorations: function decorations(editorState) {
|
|
88
89
|
var _api$composition, _api$showDiff;
|
|
90
|
+
if (expValEquals('cc_editor_placeholder_collab_wait', 'isEnabled', true)) {
|
|
91
|
+
// @ts-ignore quick fix which needs follow up to use standard apis
|
|
92
|
+
if (editorState.collabEditPlugin$ && editorState.collabEditPlugin$.isReady !== true) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
89
96
|
var _getPlaceholderState = getPlaceholderState(editorState),
|
|
90
97
|
hasPlaceholder = _getPlaceholderState.hasPlaceholder,
|
|
91
98
|
placeholderText = _getPlaceholderState.placeholderText,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-placeholder",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"description": "Placeholder plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,18 +28,18 @@
|
|
|
28
28
|
"atlaskit:src": "src/index.ts",
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@atlaskit/adf-utils": "^19.26.0",
|
|
31
|
-
"@atlaskit/editor-plugin-composition": "^
|
|
32
|
-
"@atlaskit/editor-plugin-focus": "^
|
|
33
|
-
"@atlaskit/editor-plugin-show-diff": "^
|
|
34
|
-
"@atlaskit/editor-plugin-type-ahead": "^
|
|
31
|
+
"@atlaskit/editor-plugin-composition": "^6.0.0",
|
|
32
|
+
"@atlaskit/editor-plugin-focus": "^6.0.0",
|
|
33
|
+
"@atlaskit/editor-plugin-show-diff": "^4.0.0",
|
|
34
|
+
"@atlaskit/editor-plugin-type-ahead": "^7.0.0",
|
|
35
35
|
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
36
36
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
37
|
-
"@atlaskit/tmp-editor-statsig": "^16.
|
|
38
|
-
"@atlaskit/tokens": "^9.
|
|
37
|
+
"@atlaskit/tmp-editor-statsig": "^16.12.0",
|
|
38
|
+
"@atlaskit/tokens": "^9.1.0",
|
|
39
39
|
"@babel/runtime": "^7.0.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@atlaskit/editor-common": "^
|
|
42
|
+
"@atlaskit/editor-common": "^111.7.0",
|
|
43
43
|
"react": "^18.2.0",
|
|
44
44
|
"react-dom": "^18.2.0",
|
|
45
45
|
"react-intl-next": "npm:react-intl@^5.18.1"
|