@atlaskit/editor-plugin-placeholder 7.0.0 → 7.1.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 +19 -0
- package/dist/cjs/pm-plugins/main.js +7 -0
- package/dist/cjs/pm-plugins/placeholderPluginLegacy.js +1 -1
- package/dist/cjs/pm-plugins/utils.js +1 -1
- package/dist/es2019/pm-plugins/main.js +7 -0
- package/dist/es2019/pm-plugins/placeholderPluginLegacy.js +1 -1
- package/dist/es2019/pm-plugins/utils.js +1 -1
- package/dist/esm/pm-plugins/main.js +7 -0
- package/dist/esm/pm-plugins/placeholderPluginLegacy.js +1 -1
- package/dist/esm/pm-plugins/utils.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-placeholder
|
|
2
2
|
|
|
3
|
+
## 7.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`38c83ce57623b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/38c83ce57623b) -
|
|
8
|
+
[ux] [EDITOR-3853] Update copy for sync block placeholder and copy flag
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 7.1.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`7b39652e2fb7e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7b39652e2fb7e) -
|
|
16
|
+
Updates editor to only show placeholder once collab has connected.
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 7.0.0
|
|
4
23
|
|
|
5
24
|
### 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,
|
|
@@ -393,7 +393,7 @@ function createPlaceHolderStateFrom(_ref5) {
|
|
|
393
393
|
}
|
|
394
394
|
if (nodeTypesWithSyncBlockPlaceholderText.includes(parentType) && isEmptyNode && (0, _experiments.editorExperiment)('platform_synced_block', true)) {
|
|
395
395
|
return setPlaceHolderState({
|
|
396
|
-
placeholderText: intl.formatMessage(_messages.placeholderTextMessages.
|
|
396
|
+
placeholderText: intl.formatMessage(_messages.placeholderTextMessages.sourceSyncBlockPlaceholderText),
|
|
397
397
|
pos: $from.pos,
|
|
398
398
|
placeholderPrompts: placeholderPrompts,
|
|
399
399
|
typedAndDeleted: typedAndDeleted,
|
|
@@ -220,7 +220,7 @@ function createPlaceHolderStateFrom(_ref3) {
|
|
|
220
220
|
}
|
|
221
221
|
if (_constants.nodeTypesWithSyncBlockPlaceholderText.includes(parentType) && isEmptyNode && (0, _experiments.editorExperiment)('platform_synced_block', true)) {
|
|
222
222
|
return setPlaceHolderState({
|
|
223
|
-
placeholderText: intl.formatMessage(_messages.placeholderTextMessages.
|
|
223
|
+
placeholderText: intl.formatMessage(_messages.placeholderTextMessages.sourceSyncBlockPlaceholderText),
|
|
224
224
|
pos: $from.pos,
|
|
225
225
|
placeholderPrompts: placeholderPrompts,
|
|
226
226
|
typedAndDeleted: typedAndDeleted,
|
|
@@ -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,
|
|
@@ -373,7 +373,7 @@ function createPlaceHolderStateFrom({
|
|
|
373
373
|
}
|
|
374
374
|
if (nodeTypesWithSyncBlockPlaceholderText.includes(parentType) && isEmptyNode && editorExperiment('platform_synced_block', true)) {
|
|
375
375
|
return setPlaceHolderState({
|
|
376
|
-
placeholderText: intl.formatMessage(messages.
|
|
376
|
+
placeholderText: intl.formatMessage(messages.sourceSyncBlockPlaceholderText),
|
|
377
377
|
pos: $from.pos,
|
|
378
378
|
placeholderPrompts,
|
|
379
379
|
typedAndDeleted,
|
|
@@ -208,7 +208,7 @@ export function createPlaceHolderStateFrom({
|
|
|
208
208
|
}
|
|
209
209
|
if (nodeTypesWithSyncBlockPlaceholderText.includes(parentType) && isEmptyNode && editorExperiment('platform_synced_block', true)) {
|
|
210
210
|
return setPlaceHolderState({
|
|
211
|
-
placeholderText: intl.formatMessage(messages.
|
|
211
|
+
placeholderText: intl.formatMessage(messages.sourceSyncBlockPlaceholderText),
|
|
212
212
|
pos: $from.pos,
|
|
213
213
|
placeholderPrompts,
|
|
214
214
|
typedAndDeleted,
|
|
@@ -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,
|
|
@@ -383,7 +383,7 @@ function createPlaceHolderStateFrom(_ref5) {
|
|
|
383
383
|
}
|
|
384
384
|
if (nodeTypesWithSyncBlockPlaceholderText.includes(parentType) && isEmptyNode && editorExperiment('platform_synced_block', true)) {
|
|
385
385
|
return setPlaceHolderState({
|
|
386
|
-
placeholderText: intl.formatMessage(messages.
|
|
386
|
+
placeholderText: intl.formatMessage(messages.sourceSyncBlockPlaceholderText),
|
|
387
387
|
pos: $from.pos,
|
|
388
388
|
placeholderPrompts: placeholderPrompts,
|
|
389
389
|
typedAndDeleted: typedAndDeleted,
|
|
@@ -209,7 +209,7 @@ export function createPlaceHolderStateFrom(_ref3) {
|
|
|
209
209
|
}
|
|
210
210
|
if (nodeTypesWithSyncBlockPlaceholderText.includes(parentType) && isEmptyNode && editorExperiment('platform_synced_block', true)) {
|
|
211
211
|
return setPlaceHolderState({
|
|
212
|
-
placeholderText: intl.formatMessage(messages.
|
|
212
|
+
placeholderText: intl.formatMessage(messages.sourceSyncBlockPlaceholderText),
|
|
213
213
|
pos: $from.pos,
|
|
214
214
|
placeholderPrompts: placeholderPrompts,
|
|
215
215
|
typedAndDeleted: typedAndDeleted,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-placeholder",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.1",
|
|
4
4
|
"description": "Placeholder plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
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.15.0",
|
|
38
|
+
"@atlaskit/tokens": "^9.1.0",
|
|
39
39
|
"@babel/runtime": "^7.0.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@atlaskit/editor-common": "^111.
|
|
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"
|