@atlaskit/editor-plugin-placeholder 7.3.2 → 7.4.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 +17 -0
- package/dist/cjs/placeholderPlugin.js +1 -1
- package/dist/cjs/pm-plugins/main.js +4 -1
- package/dist/es2019/placeholderPlugin.js +1 -1
- package/dist/es2019/pm-plugins/main.js +4 -1
- package/dist/esm/placeholderPlugin.js +1 -1
- package/dist/esm/pm-plugins/main.js +4 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-placeholder
|
|
2
2
|
|
|
3
|
+
## 7.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`a567137003ae6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a567137003ae6) -
|
|
8
|
+
Add in Create with Rovo blank object experience functionality
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 7.3.3
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 7.3.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -7,6 +7,7 @@ exports.default = createPlugin;
|
|
|
7
7
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
8
8
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
9
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
10
|
+
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
10
11
|
var _placeholderPlugin = require("../placeholderPlugin");
|
|
11
12
|
var _constants = require("./constants");
|
|
12
13
|
var _decorations = require("./decorations");
|
|
@@ -62,8 +63,10 @@ function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderText, empt
|
|
|
62
63
|
isPlaceholderHidden = meta.isPlaceholderHidden;
|
|
63
64
|
}
|
|
64
65
|
if ((meta === null || meta === void 0 ? void 0 : meta.placeholderText) !== undefined && withEmptyParagraph) {
|
|
66
|
+
var isCreateWithRovoOverride = !!meta.placeholderText && (0, _expVal.expVal)('cwr_blank_object_experiment', 'isEnabled', false);
|
|
65
67
|
// Only update defaultPlaceholderText from meta if we're not using ADF placeholder
|
|
66
|
-
|
|
68
|
+
// OR when the create-with-rovo experiment is active to allow intentional non-empty placeholder overrides
|
|
69
|
+
if (!((0, _platformFeatureFlags.fg)('platform_editor_ai_aifc_patch_ga') && placeholderADF) || isCreateWithRovoOverride) {
|
|
67
70
|
defaultPlaceholderText = meta.placeholderText;
|
|
68
71
|
}
|
|
69
72
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
3
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
4
5
|
import { pluginKey, EMPTY_PARAGRAPH_TIMEOUT_DELAY } from '../placeholderPlugin';
|
|
5
6
|
import { TYPEWRITER_TYPED_AND_DELETED_DELAY } from './constants';
|
|
6
7
|
import { createPlaceholderDecoration } from './decorations';
|
|
@@ -55,8 +56,10 @@ export default function createPlugin(intl, defaultPlaceholderText, bracketPlaceh
|
|
|
55
56
|
isPlaceholderHidden = meta.isPlaceholderHidden;
|
|
56
57
|
}
|
|
57
58
|
if ((meta === null || meta === void 0 ? void 0 : meta.placeholderText) !== undefined && withEmptyParagraph) {
|
|
59
|
+
const isCreateWithRovoOverride = !!meta.placeholderText && expVal('cwr_blank_object_experiment', 'isEnabled', false);
|
|
58
60
|
// Only update defaultPlaceholderText from meta if we're not using ADF placeholder
|
|
59
|
-
|
|
61
|
+
// OR when the create-with-rovo experiment is active to allow intentional non-empty placeholder overrides
|
|
62
|
+
if (!(fg('platform_editor_ai_aifc_patch_ga') && placeholderADF) || isCreateWithRovoOverride) {
|
|
60
63
|
defaultPlaceholderText = meta.placeholderText;
|
|
61
64
|
}
|
|
62
65
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
3
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
4
5
|
import { pluginKey, EMPTY_PARAGRAPH_TIMEOUT_DELAY } from '../placeholderPlugin';
|
|
5
6
|
import { TYPEWRITER_TYPED_AND_DELETED_DELAY } from './constants';
|
|
6
7
|
import { createPlaceholderDecoration } from './decorations';
|
|
@@ -56,8 +57,10 @@ export default function createPlugin(intl, defaultPlaceholderText, bracketPlaceh
|
|
|
56
57
|
isPlaceholderHidden = meta.isPlaceholderHidden;
|
|
57
58
|
}
|
|
58
59
|
if ((meta === null || meta === void 0 ? void 0 : meta.placeholderText) !== undefined && withEmptyParagraph) {
|
|
60
|
+
var isCreateWithRovoOverride = !!meta.placeholderText && expVal('cwr_blank_object_experiment', 'isEnabled', false);
|
|
59
61
|
// Only update defaultPlaceholderText from meta if we're not using ADF placeholder
|
|
60
|
-
|
|
62
|
+
// OR when the create-with-rovo experiment is active to allow intentional non-empty placeholder overrides
|
|
63
|
+
if (!(fg('platform_editor_ai_aifc_patch_ga') && placeholderADF) || isCreateWithRovoOverride) {
|
|
61
64
|
defaultPlaceholderText = meta.placeholderText;
|
|
62
65
|
}
|
|
63
66
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-placeholder",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0",
|
|
4
4
|
"description": "Placeholder plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
38
38
|
"@atlaskit/primitives": "^18.0.0",
|
|
39
39
|
"@atlaskit/spinner": "^19.0.0",
|
|
40
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
40
|
+
"@atlaskit/tmp-editor-statsig": "^33.3.0",
|
|
41
41
|
"@atlaskit/tokens": "^11.0.0",
|
|
42
42
|
"@babel/runtime": "^7.0.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@atlaskit/editor-common": "^111.
|
|
45
|
+
"@atlaskit/editor-common": "^111.28.0",
|
|
46
46
|
"react": "^18.2.0",
|
|
47
47
|
"react-dom": "^18.2.0",
|
|
48
48
|
"react-intl-next": "npm:react-intl@^5.18.1"
|