@atlaskit/editor-plugin-help-dialog 1.8.13 → 1.9.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 +8 -0
- package/dist/cjs/helpDialogPlugin.js +15 -0
- package/dist/cjs/pm-plugins/actions.js +13 -0
- package/dist/es2019/helpDialogPlugin.js +13 -0
- package/dist/es2019/pm-plugins/actions.js +7 -0
- package/dist/esm/helpDialogPlugin.js +15 -0
- package/dist/esm/pm-plugins/actions.js +7 -0
- package/dist/types/helpDialogPluginType.d.ts +4 -0
- package/dist/types/pm-plugins/actions.d.ts +3 -0
- package/dist/types-ts4.5/helpDialogPluginType.d.ts +4 -0
- package/dist/types-ts4.5/pm-plugins/actions.d.ts +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-help-dialog
|
|
2
2
|
|
|
3
|
+
## 1.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#154461](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/154461)
|
|
8
|
+
[`ed3b12d7f1092`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ed3b12d7f1092) -
|
|
9
|
+
Remove WithHelpTrigger from Confluence and deprecate
|
|
10
|
+
|
|
3
11
|
## 1.8.13
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -10,6 +10,7 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
10
10
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
11
11
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
12
12
|
var _questionCircle = _interopRequireDefault(require("@atlaskit/icon/core/migration/question-circle"));
|
|
13
|
+
var _actions = require("./pm-plugins/actions");
|
|
13
14
|
var _commands = require("./pm-plugins/commands");
|
|
14
15
|
var _keymap = require("./pm-plugins/keymap");
|
|
15
16
|
var _main = require("./pm-plugins/main");
|
|
@@ -83,6 +84,20 @@ var helpDialogPlugin = exports.helpDialogPlugin = function helpDialogPlugin(_ref
|
|
|
83
84
|
return null;
|
|
84
85
|
}
|
|
85
86
|
return _pluginKey.pluginKey.getState(editorState) || null;
|
|
87
|
+
},
|
|
88
|
+
actions: {
|
|
89
|
+
openHelp: function openHelp() {
|
|
90
|
+
return api === null || api === void 0 ? void 0 : api.core.actions.execute(function (_ref5) {
|
|
91
|
+
var tr = _ref5.tr;
|
|
92
|
+
return (0, _actions.openHelpAction)(tr);
|
|
93
|
+
});
|
|
94
|
+
},
|
|
95
|
+
closeHelp: function closeHelp() {
|
|
96
|
+
return api === null || api === void 0 ? void 0 : api.core.actions.execute(function (_ref6) {
|
|
97
|
+
var tr = _ref6.tr;
|
|
98
|
+
return (0, _actions.closeHelpAction)(tr);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
86
101
|
}
|
|
87
102
|
};
|
|
88
103
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.openHelpAction = exports.closeHelpAction = void 0;
|
|
7
|
+
var _pluginKey = require("./plugin-key");
|
|
8
|
+
var openHelpAction = exports.openHelpAction = function openHelpAction(tr) {
|
|
9
|
+
return tr.setMeta(_pluginKey.pluginKey, true);
|
|
10
|
+
};
|
|
11
|
+
var closeHelpAction = exports.closeHelpAction = function closeHelpAction(tr) {
|
|
12
|
+
return tr.setMeta(_pluginKey.pluginKey, false);
|
|
13
|
+
};
|
|
@@ -3,6 +3,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
|
|
|
3
3
|
import { openHelp, tooltip } from '@atlaskit/editor-common/keymaps';
|
|
4
4
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import QuestionCircleIcon from '@atlaskit/icon/core/migration/question-circle';
|
|
6
|
+
import { closeHelpAction, openHelpAction } from './pm-plugins/actions';
|
|
6
7
|
import { openHelpCommand } from './pm-plugins/commands';
|
|
7
8
|
import { keymapPlugin } from './pm-plugins/keymap';
|
|
8
9
|
import { createPlugin } from './pm-plugins/main';
|
|
@@ -72,5 +73,17 @@ export const helpDialogPlugin = ({
|
|
|
72
73
|
return null;
|
|
73
74
|
}
|
|
74
75
|
return pluginKey.getState(editorState) || null;
|
|
76
|
+
},
|
|
77
|
+
actions: {
|
|
78
|
+
openHelp: () => {
|
|
79
|
+
return api === null || api === void 0 ? void 0 : api.core.actions.execute(({
|
|
80
|
+
tr
|
|
81
|
+
}) => openHelpAction(tr));
|
|
82
|
+
},
|
|
83
|
+
closeHelp: () => {
|
|
84
|
+
return api === null || api === void 0 ? void 0 : api.core.actions.execute(({
|
|
85
|
+
tr
|
|
86
|
+
}) => closeHelpAction(tr));
|
|
87
|
+
}
|
|
75
88
|
}
|
|
76
89
|
});
|
|
@@ -3,6 +3,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
|
|
|
3
3
|
import { openHelp, tooltip } from '@atlaskit/editor-common/keymaps';
|
|
4
4
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import QuestionCircleIcon from '@atlaskit/icon/core/migration/question-circle';
|
|
6
|
+
import { closeHelpAction, openHelpAction } from './pm-plugins/actions';
|
|
6
7
|
import { openHelpCommand } from './pm-plugins/commands';
|
|
7
8
|
import { keymapPlugin } from './pm-plugins/keymap';
|
|
8
9
|
import { createPlugin } from './pm-plugins/main';
|
|
@@ -76,6 +77,20 @@ export var helpDialogPlugin = function helpDialogPlugin(_ref) {
|
|
|
76
77
|
return null;
|
|
77
78
|
}
|
|
78
79
|
return pluginKey.getState(editorState) || null;
|
|
80
|
+
},
|
|
81
|
+
actions: {
|
|
82
|
+
openHelp: function openHelp() {
|
|
83
|
+
return api === null || api === void 0 ? void 0 : api.core.actions.execute(function (_ref5) {
|
|
84
|
+
var tr = _ref5.tr;
|
|
85
|
+
return openHelpAction(tr);
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
closeHelp: function closeHelp() {
|
|
89
|
+
return api === null || api === void 0 ? void 0 : api.core.actions.execute(function (_ref6) {
|
|
90
|
+
var tr = _ref6.tr;
|
|
91
|
+
return closeHelpAction(tr);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
79
94
|
}
|
|
80
95
|
};
|
|
81
96
|
};
|
|
@@ -9,4 +9,8 @@ export type HelpDialogPlugin = NextEditorPlugin<'helpDialog', {
|
|
|
9
9
|
dependencies: [OptionalPlugin<AnalyticsPlugin>, OptionalPlugin<QuickInsertPlugin>];
|
|
10
10
|
pluginConfiguration: boolean;
|
|
11
11
|
sharedState: HelpDialogSharedState | null;
|
|
12
|
+
actions: {
|
|
13
|
+
openHelp(): void;
|
|
14
|
+
closeHelp(): void;
|
|
15
|
+
};
|
|
12
16
|
}>;
|