@atlaskit/editor-plugin-date 2.4.19 → 2.4.20
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 +8 -0
- package/dist/cjs/datePlugin.js +6 -4
- package/dist/es2019/datePlugin.js +6 -4
- package/dist/es2019/index.js +3 -0
- package/dist/esm/datePlugin.js +6 -4
- package/dist/esm/index.js +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-date
|
|
2
2
|
|
|
3
|
+
## 2.4.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#178163](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/178163)
|
|
8
|
+
[`b838eba8d205f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b838eba8d205f) -
|
|
9
|
+
ED-26030-hide-comment-toolbar-when-user-switch-back-to-edit-mode
|
|
10
|
+
|
|
3
11
|
## 2.4.19
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/cjs/datePlugin.js
CHANGED
|
@@ -203,9 +203,11 @@ var datePlugin = function datePlugin(_ref3) {
|
|
|
203
203
|
}];
|
|
204
204
|
},
|
|
205
205
|
floatingToolbar: function floatingToolbar(state, intl) {
|
|
206
|
-
var
|
|
207
|
-
|
|
208
|
-
|
|
206
|
+
var isViewMode = function isViewMode() {
|
|
207
|
+
var _api$editorViewMode;
|
|
208
|
+
return (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'view';
|
|
209
|
+
};
|
|
210
|
+
if (!isViewMode() || !(0, _platformFeatureFlags.fg)('platform_inline_node_as_valid_annotation_selection')) {
|
|
209
211
|
return undefined;
|
|
210
212
|
}
|
|
211
213
|
var onClick = function onClick(stateFromClickEvent, dispatch) {
|
|
@@ -256,7 +258,7 @@ var datePlugin = function datePlugin(_ref3) {
|
|
|
256
258
|
var activeCommentMark = node.marks.find(function (mark) {
|
|
257
259
|
return mark.type.name === 'annotation' && (annotationState === null || annotationState === void 0 ? void 0 : annotationState.annotations[mark.attrs.id]) === false;
|
|
258
260
|
});
|
|
259
|
-
var showAnnotation = annotationState && annotationState.isVisible && !annotationState.bookmark && !annotationState.mouseData.isSelecting && !activeCommentMark;
|
|
261
|
+
var showAnnotation = annotationState && annotationState.isVisible && isViewMode() && !annotationState.bookmark && !annotationState.mouseData.isSelecting && !activeCommentMark;
|
|
260
262
|
if (showAnnotation) {
|
|
261
263
|
return [{
|
|
262
264
|
type: 'button',
|
|
@@ -190,9 +190,11 @@ const datePlugin = ({
|
|
|
190
190
|
}
|
|
191
191
|
}],
|
|
192
192
|
floatingToolbar: (state, intl) => {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
193
|
+
const isViewMode = () => {
|
|
194
|
+
var _api$editorViewMode, _api$editorViewMode$s;
|
|
195
|
+
return (api === null || api === void 0 ? void 0 : (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : (_api$editorViewMode$s = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode$s === void 0 ? void 0 : _api$editorViewMode$s.mode) === 'view';
|
|
196
|
+
};
|
|
197
|
+
if (!isViewMode() || !fg('platform_inline_node_as_valid_annotation_selection')) {
|
|
196
198
|
return undefined;
|
|
197
199
|
}
|
|
198
200
|
const onClick = (stateFromClickEvent, dispatch) => {
|
|
@@ -241,7 +243,7 @@ const datePlugin = ({
|
|
|
241
243
|
var _api$annotation2;
|
|
242
244
|
const annotationState = api === null || api === void 0 ? void 0 : (_api$annotation2 = api.annotation) === null || _api$annotation2 === void 0 ? void 0 : _api$annotation2.sharedState.currentState();
|
|
243
245
|
const activeCommentMark = node.marks.find(mark => mark.type.name === 'annotation' && (annotationState === null || annotationState === void 0 ? void 0 : annotationState.annotations[mark.attrs.id]) === false);
|
|
244
|
-
const showAnnotation = annotationState && annotationState.isVisible && !annotationState.bookmark && !annotationState.mouseData.isSelecting && !activeCommentMark;
|
|
246
|
+
const showAnnotation = annotationState && annotationState.isVisible && isViewMode() && !annotationState.bookmark && !annotationState.mouseData.isSelecting && !activeCommentMark;
|
|
245
247
|
if (showAnnotation) {
|
|
246
248
|
return [{
|
|
247
249
|
type: 'button',
|
package/dist/es2019/index.js
CHANGED
package/dist/esm/datePlugin.js
CHANGED
|
@@ -191,9 +191,11 @@ var datePlugin = function datePlugin(_ref3) {
|
|
|
191
191
|
}];
|
|
192
192
|
},
|
|
193
193
|
floatingToolbar: function floatingToolbar(state, intl) {
|
|
194
|
-
var
|
|
195
|
-
|
|
196
|
-
|
|
194
|
+
var isViewMode = function isViewMode() {
|
|
195
|
+
var _api$editorViewMode;
|
|
196
|
+
return (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'view';
|
|
197
|
+
};
|
|
198
|
+
if (!isViewMode() || !fg('platform_inline_node_as_valid_annotation_selection')) {
|
|
197
199
|
return undefined;
|
|
198
200
|
}
|
|
199
201
|
var onClick = function onClick(stateFromClickEvent, dispatch) {
|
|
@@ -244,7 +246,7 @@ var datePlugin = function datePlugin(_ref3) {
|
|
|
244
246
|
var activeCommentMark = node.marks.find(function (mark) {
|
|
245
247
|
return mark.type.name === 'annotation' && (annotationState === null || annotationState === void 0 ? void 0 : annotationState.annotations[mark.attrs.id]) === false;
|
|
246
248
|
});
|
|
247
|
-
var showAnnotation = annotationState && annotationState.isVisible && !annotationState.bookmark && !annotationState.mouseData.isSelecting && !activeCommentMark;
|
|
249
|
+
var showAnnotation = annotationState && annotationState.isVisible && isViewMode() && !annotationState.bookmark && !annotationState.mouseData.isSelecting && !activeCommentMark;
|
|
248
250
|
if (showAnnotation) {
|
|
249
251
|
return [{
|
|
250
252
|
type: 'button',
|
package/dist/esm/index.js
CHANGED