@atlaskit/editor-plugin-placeholder 6.6.1 → 6.6.3
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 +13 -0
- package/dist/cjs/pm-plugins/main.js +2 -1
- package/dist/cjs/pm-plugins/placeholderPluginLegacy.js +4 -2
- package/dist/cjs/pm-plugins/utils.js +2 -1
- package/dist/es2019/pm-plugins/main.js +2 -1
- package/dist/es2019/pm-plugins/placeholderPluginLegacy.js +4 -2
- package/dist/es2019/pm-plugins/utils.js +2 -1
- package/dist/esm/pm-plugins/main.js +2 -1
- package/dist/esm/pm-plugins/placeholderPluginLegacy.js +4 -2
- package/dist/esm/pm-plugins/utils.js +2 -1
- package/package.json +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-placeholder
|
|
2
2
|
|
|
3
|
+
## 6.6.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a6bb2551e12c5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a6bb2551e12c5) -
|
|
8
|
+
[ux] EDITOR-3970 fixed bug where placeholder is showing when ai modal is open in comment editor
|
|
9
|
+
|
|
10
|
+
## 6.6.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 6.6.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -55,7 +55,8 @@ function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderText, empt
|
|
|
55
55
|
userHadTyped = _calculateUserInterac.userHadTyped,
|
|
56
56
|
typedAndDeleted = _calculateUserInterac.typedAndDeleted;
|
|
57
57
|
var isPlaceholderHidden = (_placeholderState$isP = placeholderState === null || placeholderState === void 0 ? void 0 : placeholderState.isPlaceholderHidden) !== null && _placeholderState$isP !== void 0 ? _placeholderState$isP : false;
|
|
58
|
-
|
|
58
|
+
var shouldUpdatePlaceholderHidden = (0, _platformFeatureFlags.fg)('platform_editor_ai_aifc_patch_ga_blockers') ? (meta === null || meta === void 0 ? void 0 : meta.isPlaceholderHidden) !== undefined : (meta === null || meta === void 0 ? void 0 : meta.isPlaceholderHidden) !== undefined && withEmptyParagraph;
|
|
59
|
+
if (shouldUpdatePlaceholderHidden) {
|
|
59
60
|
isPlaceholderHidden = meta.isPlaceholderHidden;
|
|
60
61
|
}
|
|
61
62
|
if ((meta === null || meta === void 0 ? void 0 : meta.placeholderText) !== undefined && withEmptyParagraph) {
|
|
@@ -249,7 +249,8 @@ function createPlaceHolderStateFrom(_ref5) {
|
|
|
249
249
|
isPlaceholderHidden = _ref5.isPlaceholderHidden,
|
|
250
250
|
withEmptyParagraph = _ref5.withEmptyParagraph,
|
|
251
251
|
showOnEmptyParagraph = _ref5.showOnEmptyParagraph;
|
|
252
|
-
|
|
252
|
+
var shouldHidePlaceholder = (0, _platformFeatureFlags.fg)('platform_editor_ai_aifc_patch_ga_blockers') ? isPlaceholderHidden : isPlaceholderHidden && withEmptyParagraph;
|
|
253
|
+
if (shouldHidePlaceholder) {
|
|
253
254
|
return _objectSpread(_objectSpread({}, emptyPlaceholder({
|
|
254
255
|
placeholderText: defaultPlaceholderText,
|
|
255
256
|
placeholderPrompts: placeholderPrompts,
|
|
@@ -457,7 +458,8 @@ function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderText, empt
|
|
|
457
458
|
userHadTyped = _calculateUserInterac.userHadTyped,
|
|
458
459
|
typedAndDeleted = _calculateUserInterac.typedAndDeleted;
|
|
459
460
|
var isPlaceholderHidden = (_placeholderState$isP = placeholderState === null || placeholderState === void 0 ? void 0 : placeholderState.isPlaceholderHidden) !== null && _placeholderState$isP !== void 0 ? _placeholderState$isP : false;
|
|
460
|
-
|
|
461
|
+
var shouldUpdatePlaceholderHidden = (0, _platformFeatureFlags.fg)('platform_editor_ai_aifc_patch_ga_blockers') ? (meta === null || meta === void 0 ? void 0 : meta.isPlaceholderHidden) !== undefined : (meta === null || meta === void 0 ? void 0 : meta.isPlaceholderHidden) !== undefined && withEmptyParagraph;
|
|
462
|
+
if (shouldUpdatePlaceholderHidden) {
|
|
461
463
|
isPlaceholderHidden = meta.isPlaceholderHidden;
|
|
462
464
|
}
|
|
463
465
|
if ((meta === null || meta === void 0 ? void 0 : meta.placeholderText) !== undefined && withEmptyParagraph) {
|
|
@@ -78,7 +78,8 @@ function createPlaceHolderStateFrom(_ref3) {
|
|
|
78
78
|
isPlaceholderHidden = _ref3.isPlaceholderHidden,
|
|
79
79
|
withEmptyParagraph = _ref3.withEmptyParagraph,
|
|
80
80
|
showOnEmptyParagraph = _ref3.showOnEmptyParagraph;
|
|
81
|
-
|
|
81
|
+
var shouldHidePlaceholder = (0, _platformFeatureFlags.fg)('platform_editor_ai_aifc_patch_ga_blockers') ? isPlaceholderHidden : isPlaceholderHidden && withEmptyParagraph;
|
|
82
|
+
if (shouldHidePlaceholder) {
|
|
82
83
|
return _objectSpread(_objectSpread({}, emptyPlaceholder({
|
|
83
84
|
placeholderText: defaultPlaceholderText,
|
|
84
85
|
placeholderPrompts: placeholderPrompts,
|
|
@@ -48,7 +48,8 @@ export default function createPlugin(intl, defaultPlaceholderText, bracketPlaceh
|
|
|
48
48
|
newEditorState
|
|
49
49
|
});
|
|
50
50
|
let isPlaceholderHidden = (_placeholderState$isP = placeholderState === null || placeholderState === void 0 ? void 0 : placeholderState.isPlaceholderHidden) !== null && _placeholderState$isP !== void 0 ? _placeholderState$isP : false;
|
|
51
|
-
|
|
51
|
+
const shouldUpdatePlaceholderHidden = fg('platform_editor_ai_aifc_patch_ga_blockers') ? (meta === null || meta === void 0 ? void 0 : meta.isPlaceholderHidden) !== undefined : (meta === null || meta === void 0 ? void 0 : meta.isPlaceholderHidden) !== undefined && withEmptyParagraph;
|
|
52
|
+
if (shouldUpdatePlaceholderHidden) {
|
|
52
53
|
isPlaceholderHidden = meta.isPlaceholderHidden;
|
|
53
54
|
}
|
|
54
55
|
if ((meta === null || meta === void 0 ? void 0 : meta.placeholderText) !== undefined && withEmptyParagraph) {
|
|
@@ -229,7 +229,8 @@ function createPlaceHolderStateFrom({
|
|
|
229
229
|
withEmptyParagraph,
|
|
230
230
|
showOnEmptyParagraph
|
|
231
231
|
}) {
|
|
232
|
-
|
|
232
|
+
const shouldHidePlaceholder = fg('platform_editor_ai_aifc_patch_ga_blockers') ? isPlaceholderHidden : isPlaceholderHidden && withEmptyParagraph;
|
|
233
|
+
if (shouldHidePlaceholder) {
|
|
233
234
|
return {
|
|
234
235
|
...emptyPlaceholder({
|
|
235
236
|
placeholderText: defaultPlaceholderText,
|
|
@@ -440,7 +441,8 @@ export function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderTex
|
|
|
440
441
|
newEditorState
|
|
441
442
|
});
|
|
442
443
|
let isPlaceholderHidden = (_placeholderState$isP = placeholderState === null || placeholderState === void 0 ? void 0 : placeholderState.isPlaceholderHidden) !== null && _placeholderState$isP !== void 0 ? _placeholderState$isP : false;
|
|
443
|
-
|
|
444
|
+
const shouldUpdatePlaceholderHidden = fg('platform_editor_ai_aifc_patch_ga_blockers') ? (meta === null || meta === void 0 ? void 0 : meta.isPlaceholderHidden) !== undefined : (meta === null || meta === void 0 ? void 0 : meta.isPlaceholderHidden) !== undefined && withEmptyParagraph;
|
|
445
|
+
if (shouldUpdatePlaceholderHidden) {
|
|
444
446
|
isPlaceholderHidden = meta.isPlaceholderHidden;
|
|
445
447
|
}
|
|
446
448
|
if ((meta === null || meta === void 0 ? void 0 : meta.placeholderText) !== undefined && withEmptyParagraph) {
|
|
@@ -65,7 +65,8 @@ export function createPlaceHolderStateFrom({
|
|
|
65
65
|
withEmptyParagraph,
|
|
66
66
|
showOnEmptyParagraph
|
|
67
67
|
}) {
|
|
68
|
-
|
|
68
|
+
const shouldHidePlaceholder = fg('platform_editor_ai_aifc_patch_ga_blockers') ? isPlaceholderHidden : isPlaceholderHidden && withEmptyParagraph;
|
|
69
|
+
if (shouldHidePlaceholder) {
|
|
69
70
|
return {
|
|
70
71
|
...emptyPlaceholder({
|
|
71
72
|
placeholderText: defaultPlaceholderText,
|
|
@@ -49,7 +49,8 @@ export default function createPlugin(intl, defaultPlaceholderText, bracketPlaceh
|
|
|
49
49
|
userHadTyped = _calculateUserInterac.userHadTyped,
|
|
50
50
|
typedAndDeleted = _calculateUserInterac.typedAndDeleted;
|
|
51
51
|
var isPlaceholderHidden = (_placeholderState$isP = placeholderState === null || placeholderState === void 0 ? void 0 : placeholderState.isPlaceholderHidden) !== null && _placeholderState$isP !== void 0 ? _placeholderState$isP : false;
|
|
52
|
-
|
|
52
|
+
var shouldUpdatePlaceholderHidden = fg('platform_editor_ai_aifc_patch_ga_blockers') ? (meta === null || meta === void 0 ? void 0 : meta.isPlaceholderHidden) !== undefined : (meta === null || meta === void 0 ? void 0 : meta.isPlaceholderHidden) !== undefined && withEmptyParagraph;
|
|
53
|
+
if (shouldUpdatePlaceholderHidden) {
|
|
53
54
|
isPlaceholderHidden = meta.isPlaceholderHidden;
|
|
54
55
|
}
|
|
55
56
|
if ((meta === null || meta === void 0 ? void 0 : meta.placeholderText) !== undefined && withEmptyParagraph) {
|
|
@@ -239,7 +239,8 @@ function createPlaceHolderStateFrom(_ref5) {
|
|
|
239
239
|
isPlaceholderHidden = _ref5.isPlaceholderHidden,
|
|
240
240
|
withEmptyParagraph = _ref5.withEmptyParagraph,
|
|
241
241
|
showOnEmptyParagraph = _ref5.showOnEmptyParagraph;
|
|
242
|
-
|
|
242
|
+
var shouldHidePlaceholder = fg('platform_editor_ai_aifc_patch_ga_blockers') ? isPlaceholderHidden : isPlaceholderHidden && withEmptyParagraph;
|
|
243
|
+
if (shouldHidePlaceholder) {
|
|
243
244
|
return _objectSpread(_objectSpread({}, emptyPlaceholder({
|
|
244
245
|
placeholderText: defaultPlaceholderText,
|
|
245
246
|
placeholderPrompts: placeholderPrompts,
|
|
@@ -447,7 +448,8 @@ export function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderTex
|
|
|
447
448
|
userHadTyped = _calculateUserInterac.userHadTyped,
|
|
448
449
|
typedAndDeleted = _calculateUserInterac.typedAndDeleted;
|
|
449
450
|
var isPlaceholderHidden = (_placeholderState$isP = placeholderState === null || placeholderState === void 0 ? void 0 : placeholderState.isPlaceholderHidden) !== null && _placeholderState$isP !== void 0 ? _placeholderState$isP : false;
|
|
450
|
-
|
|
451
|
+
var shouldUpdatePlaceholderHidden = fg('platform_editor_ai_aifc_patch_ga_blockers') ? (meta === null || meta === void 0 ? void 0 : meta.isPlaceholderHidden) !== undefined : (meta === null || meta === void 0 ? void 0 : meta.isPlaceholderHidden) !== undefined && withEmptyParagraph;
|
|
452
|
+
if (shouldUpdatePlaceholderHidden) {
|
|
451
453
|
isPlaceholderHidden = meta.isPlaceholderHidden;
|
|
452
454
|
}
|
|
453
455
|
if ((meta === null || meta === void 0 ? void 0 : meta.placeholderText) !== undefined && withEmptyParagraph) {
|
|
@@ -67,7 +67,8 @@ export function createPlaceHolderStateFrom(_ref3) {
|
|
|
67
67
|
isPlaceholderHidden = _ref3.isPlaceholderHidden,
|
|
68
68
|
withEmptyParagraph = _ref3.withEmptyParagraph,
|
|
69
69
|
showOnEmptyParagraph = _ref3.showOnEmptyParagraph;
|
|
70
|
-
|
|
70
|
+
var shouldHidePlaceholder = fg('platform_editor_ai_aifc_patch_ga_blockers') ? isPlaceholderHidden : isPlaceholderHidden && withEmptyParagraph;
|
|
71
|
+
if (shouldHidePlaceholder) {
|
|
71
72
|
return _objectSpread(_objectSpread({}, emptyPlaceholder({
|
|
72
73
|
placeholderText: defaultPlaceholderText,
|
|
73
74
|
placeholderPrompts: placeholderPrompts,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-placeholder",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.3",
|
|
4
4
|
"description": "Placeholder plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,25 +32,28 @@
|
|
|
32
32
|
"@atlaskit/editor-plugin-focus": "^5.0.0",
|
|
33
33
|
"@atlaskit/editor-plugin-show-diff": "^3.3.0",
|
|
34
34
|
"@atlaskit/editor-plugin-type-ahead": "^6.5.0",
|
|
35
|
-
"@atlaskit/editor-prosemirror": "7.
|
|
35
|
+
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
36
36
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
37
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
38
|
-
"@atlaskit/tokens": "^8.
|
|
37
|
+
"@atlaskit/tmp-editor-statsig": "^15.12.0",
|
|
38
|
+
"@atlaskit/tokens": "^8.6.0",
|
|
39
39
|
"@babel/runtime": "^7.0.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@atlaskit/editor-common": "^110.
|
|
42
|
+
"@atlaskit/editor-common": "^110.45.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"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@testing-library/react": "^
|
|
48
|
+
"@testing-library/react": "^16.3.0"
|
|
49
49
|
},
|
|
50
50
|
"platform-feature-flags": {
|
|
51
51
|
"platform_editor_ai_aifc_patch_ga": {
|
|
52
52
|
"type": "boolean"
|
|
53
53
|
},
|
|
54
|
+
"platform_editor_ai_aifc_patch_ga_blockers": {
|
|
55
|
+
"type": "boolean"
|
|
56
|
+
},
|
|
54
57
|
"platform_editor_placeholder_plugin_tidying": {
|
|
55
58
|
"type": "boolean"
|
|
56
59
|
}
|