@atlaskit/editor-plugin-placeholder-text 3.0.0 → 3.0.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
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-placeholder-text
|
|
2
2
|
|
|
3
|
+
## 3.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#187144](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/187144)
|
|
8
|
+
[`a16147d8fbdfe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a16147d8fbdfe) -
|
|
9
|
+
Bump @atlaskit/adf-schema to v49.0.5
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 3.0.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#183158](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/183158)
|
|
17
|
+
[`d6096ec5c8ad9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d6096ec5c8ad9) -
|
|
18
|
+
Migrate to useSharedPluginStateWithSelector
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 3.0.0
|
|
4
22
|
|
|
5
23
|
### Major Changes
|
|
@@ -12,7 +12,6 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
12
12
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
13
13
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
14
14
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
15
|
-
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
16
15
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
17
16
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
18
17
|
var _text = _interopRequireDefault(require("@atlaskit/icon/core/text"));
|
|
@@ -135,13 +134,19 @@ function createPlugin(dispatch, options, api) {
|
|
|
135
134
|
});
|
|
136
135
|
}
|
|
137
136
|
var useSharedPlaceholderTextState = (0, _hooks.sharedPluginStateHookMigratorFactory)(function (api) {
|
|
138
|
-
var
|
|
137
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['placeholderText'], function (states) {
|
|
138
|
+
var _states$placeholderTe;
|
|
139
|
+
return {
|
|
140
|
+
showInsertPanelAt: (_states$placeholderTe = states.placeholderTextState) === null || _states$placeholderTe === void 0 ? void 0 : _states$placeholderTe.showInsertPanelAt
|
|
141
|
+
};
|
|
142
|
+
}),
|
|
143
|
+
showInsertPanelAt = _useSharedPluginState.showInsertPanelAt;
|
|
139
144
|
return {
|
|
140
145
|
showInsertPanelAt: showInsertPanelAt
|
|
141
146
|
};
|
|
142
147
|
}, function (api) {
|
|
143
|
-
var
|
|
144
|
-
placeholderTextState =
|
|
148
|
+
var _useSharedPluginState2 = (0, _hooks.useSharedPluginState)(api, ['placeholderText']),
|
|
149
|
+
placeholderTextState = _useSharedPluginState2.placeholderTextState;
|
|
145
150
|
return {
|
|
146
151
|
showInsertPanelAt: placeholderTextState === null || placeholderTextState === void 0 ? void 0 : placeholderTextState.showInsertPanelAt
|
|
147
152
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { placeholder } from '@atlaskit/adf-schema';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { useSharedPluginState, sharedPluginStateHookMigratorFactory } from '@atlaskit/editor-common/hooks';
|
|
4
|
+
import { useSharedPluginState, sharedPluginStateHookMigratorFactory, useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
5
5
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
|
-
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
8
7
|
import { isNodeEmpty } from '@atlaskit/editor-common/utils';
|
|
9
8
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
10
9
|
import TextIcon from '@atlaskit/icon/core/text';
|
|
@@ -128,7 +127,14 @@ export function createPlugin(dispatch, options, api) {
|
|
|
128
127
|
});
|
|
129
128
|
}
|
|
130
129
|
const useSharedPlaceholderTextState = sharedPluginStateHookMigratorFactory(api => {
|
|
131
|
-
const
|
|
130
|
+
const {
|
|
131
|
+
showInsertPanelAt
|
|
132
|
+
} = useSharedPluginStateWithSelector(api, ['placeholderText'], states => {
|
|
133
|
+
var _states$placeholderTe;
|
|
134
|
+
return {
|
|
135
|
+
showInsertPanelAt: (_states$placeholderTe = states.placeholderTextState) === null || _states$placeholderTe === void 0 ? void 0 : _states$placeholderTe.showInsertPanelAt
|
|
136
|
+
};
|
|
137
|
+
});
|
|
132
138
|
return {
|
|
133
139
|
showInsertPanelAt
|
|
134
140
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { placeholder } from '@atlaskit/adf-schema';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { useSharedPluginState, sharedPluginStateHookMigratorFactory } from '@atlaskit/editor-common/hooks';
|
|
4
|
+
import { useSharedPluginState, sharedPluginStateHookMigratorFactory, useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
5
5
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
|
-
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
8
7
|
import { isNodeEmpty } from '@atlaskit/editor-common/utils';
|
|
9
8
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
10
9
|
import TextIcon from '@atlaskit/icon/core/text';
|
|
@@ -127,13 +126,19 @@ export function createPlugin(dispatch, options, api) {
|
|
|
127
126
|
});
|
|
128
127
|
}
|
|
129
128
|
var useSharedPlaceholderTextState = sharedPluginStateHookMigratorFactory(function (api) {
|
|
130
|
-
var
|
|
129
|
+
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['placeholderText'], function (states) {
|
|
130
|
+
var _states$placeholderTe;
|
|
131
|
+
return {
|
|
132
|
+
showInsertPanelAt: (_states$placeholderTe = states.placeholderTextState) === null || _states$placeholderTe === void 0 ? void 0 : _states$placeholderTe.showInsertPanelAt
|
|
133
|
+
};
|
|
134
|
+
}),
|
|
135
|
+
showInsertPanelAt = _useSharedPluginState.showInsertPanelAt;
|
|
131
136
|
return {
|
|
132
137
|
showInsertPanelAt: showInsertPanelAt
|
|
133
138
|
};
|
|
134
139
|
}, function (api) {
|
|
135
|
-
var
|
|
136
|
-
placeholderTextState =
|
|
140
|
+
var _useSharedPluginState2 = useSharedPluginState(api, ['placeholderText']),
|
|
141
|
+
placeholderTextState = _useSharedPluginState2.placeholderTextState;
|
|
137
142
|
return {
|
|
138
143
|
showInsertPanelAt: placeholderTextState === null || placeholderTextState === void 0 ? void 0 : placeholderTextState.showInsertPanelAt
|
|
139
144
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-placeholder-text",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "placeholder text plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -27,19 +27,19 @@
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@atlaskit/adf-schema": "^
|
|
30
|
+
"@atlaskit/adf-schema": "^49.0.6",
|
|
31
31
|
"@atlaskit/editor-plugin-analytics": "^3.0.0",
|
|
32
32
|
"@atlaskit/editor-plugin-type-ahead": "^3.0.0",
|
|
33
33
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
34
34
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
35
|
-
"@atlaskit/icon": "^27.
|
|
36
|
-
"@atlaskit/theme": "^
|
|
37
|
-
"@atlaskit/tokens": "^5.
|
|
35
|
+
"@atlaskit/icon": "^27.3.0",
|
|
36
|
+
"@atlaskit/theme": "^19.0.0",
|
|
37
|
+
"@atlaskit/tokens": "^5.5.0",
|
|
38
38
|
"@babel/runtime": "^7.0.0",
|
|
39
39
|
"@emotion/react": "^11.7.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@atlaskit/editor-common": "^107.
|
|
42
|
+
"@atlaskit/editor-common": "^107.8.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"
|