@atlaskit/editor-plugin-placeholder 1.3.0 → 1.3.2
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
|
@@ -57,6 +57,9 @@ function setPlaceHolderState(placeholderText, pos) {
|
|
|
57
57
|
var emptyPlaceholder = {
|
|
58
58
|
hasPlaceholder: false
|
|
59
59
|
};
|
|
60
|
+
|
|
61
|
+
// Ignored via go/ees005
|
|
62
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
60
63
|
function createPlaceHolderStateFrom(isEditorFocused, editorState, isTypeAheadOpen, defaultPlaceholderText, bracketPlaceholderText) {
|
|
61
64
|
if (isTypeAheadOpen !== null && isTypeAheadOpen !== void 0 && isTypeAheadOpen(editorState)) {
|
|
62
65
|
return emptyPlaceholder;
|
|
@@ -83,6 +86,8 @@ function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api) {
|
|
|
83
86
|
var _api$focus, _api$typeAhead;
|
|
84
87
|
return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 || (_api$focus = api.focus) === null || _api$focus === void 0 || (_api$focus = _api$focus.sharedState.currentState()) === null || _api$focus === void 0 ? void 0 : _api$focus.hasFocus), state, api === null || api === void 0 || (_api$typeAhead = api.typeAhead) === null || _api$typeAhead === void 0 ? void 0 : _api$typeAhead.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
85
88
|
},
|
|
89
|
+
// Ignored via go/ees005
|
|
90
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
86
91
|
apply: function apply(tr, _oldPluginState, _oldEditorState, newEditorState) {
|
|
87
92
|
var _api$focus2, _api$typeAhead3;
|
|
88
93
|
var meta = tr.getMeta(pluginKey);
|
|
@@ -48,6 +48,9 @@ function setPlaceHolderState(placeholderText, pos) {
|
|
|
48
48
|
const emptyPlaceholder = {
|
|
49
49
|
hasPlaceholder: false
|
|
50
50
|
};
|
|
51
|
+
|
|
52
|
+
// Ignored via go/ees005
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
51
54
|
function createPlaceHolderStateFrom(isEditorFocused, editorState, isTypeAheadOpen, defaultPlaceholderText, bracketPlaceholderText) {
|
|
52
55
|
if (isTypeAheadOpen !== null && isTypeAheadOpen !== void 0 && isTypeAheadOpen(editorState)) {
|
|
53
56
|
return emptyPlaceholder;
|
|
@@ -76,6 +79,8 @@ export function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api
|
|
|
76
79
|
var _api$focus, _api$focus$sharedStat, _api$typeAhead;
|
|
77
80
|
return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 ? void 0 : (_api$focus = api.focus) === null || _api$focus === void 0 ? void 0 : (_api$focus$sharedStat = _api$focus.sharedState.currentState()) === null || _api$focus$sharedStat === void 0 ? void 0 : _api$focus$sharedStat.hasFocus), state, api === null || api === void 0 ? void 0 : (_api$typeAhead = api.typeAhead) === null || _api$typeAhead === void 0 ? void 0 : _api$typeAhead.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
78
81
|
},
|
|
82
|
+
// Ignored via go/ees005
|
|
83
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
79
84
|
apply: (tr, _oldPluginState, _oldEditorState, newEditorState) => {
|
|
80
85
|
var _api$focus2, _api$focus2$sharedSta, _api$typeAhead3;
|
|
81
86
|
const meta = tr.getMeta(pluginKey);
|
|
@@ -49,6 +49,9 @@ function setPlaceHolderState(placeholderText, pos) {
|
|
|
49
49
|
var emptyPlaceholder = {
|
|
50
50
|
hasPlaceholder: false
|
|
51
51
|
};
|
|
52
|
+
|
|
53
|
+
// Ignored via go/ees005
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
52
55
|
function createPlaceHolderStateFrom(isEditorFocused, editorState, isTypeAheadOpen, defaultPlaceholderText, bracketPlaceholderText) {
|
|
53
56
|
if (isTypeAheadOpen !== null && isTypeAheadOpen !== void 0 && isTypeAheadOpen(editorState)) {
|
|
54
57
|
return emptyPlaceholder;
|
|
@@ -75,6 +78,8 @@ export function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api
|
|
|
75
78
|
var _api$focus, _api$typeAhead;
|
|
76
79
|
return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 || (_api$focus = api.focus) === null || _api$focus === void 0 || (_api$focus = _api$focus.sharedState.currentState()) === null || _api$focus === void 0 ? void 0 : _api$focus.hasFocus), state, api === null || api === void 0 || (_api$typeAhead = api.typeAhead) === null || _api$typeAhead === void 0 ? void 0 : _api$typeAhead.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
77
80
|
},
|
|
81
|
+
// Ignored via go/ees005
|
|
82
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
78
83
|
apply: function apply(tr, _oldPluginState, _oldEditorState, newEditorState) {
|
|
79
84
|
var _api$focus2, _api$typeAhead3;
|
|
80
85
|
var meta = tr.getMeta(pluginKey);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-placeholder",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Placeholder plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/editor-common": "^
|
|
34
|
+
"@atlaskit/editor-common": "^99.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-composition": "^1.2.0",
|
|
36
36
|
"@atlaskit/editor-plugin-focus": "^1.4.0",
|
|
37
37
|
"@atlaskit/editor-plugin-type-ahead": "^1.11.0",
|