@seafile/sea-email-editor 0.0.1
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/README.md +1 -0
- package/dist/assets/icons/align-center.svg +1 -0
- package/dist/assets/icons/align-left.svg +1 -0
- package/dist/assets/icons/align-right.svg +1 -0
- package/dist/assets/icons/arrow-down.svg +1 -0
- package/dist/assets/icons/arrow-right.svg +1 -0
- package/dist/assets/icons/arrow-up.svg +1 -0
- package/dist/assets/icons/bold.svg +1 -0
- package/dist/assets/icons/callout-color.svg +1 -0
- package/dist/assets/icons/check-mark-option.svg +3 -0
- package/dist/assets/icons/check-square.svg +1 -0
- package/dist/assets/icons/clear-format.svg +1 -0
- package/dist/assets/icons/close.svg +3 -0
- package/dist/assets/icons/code-block.svg +1 -0
- package/dist/assets/icons/image.svg +1 -0
- package/dist/assets/icons/inline-code.svg +1 -0
- package/dist/assets/icons/insert.svg +1 -0
- package/dist/assets/icons/italic.svg +1 -0
- package/dist/assets/icons/link.svg +1 -0
- package/dist/assets/icons/more.svg +1 -0
- package/dist/assets/icons/ol.svg +1 -0
- package/dist/assets/icons/quote.svg +1 -0
- package/dist/assets/icons/rename.svg +4 -0
- package/dist/assets/icons/strikethrough.svg +1 -0
- package/dist/assets/icons/table.svg +1 -0
- package/dist/assets/icons/ul.svg +1 -0
- package/dist/assets/icons/underline.svg +1 -0
- package/dist/assets/icons/unlink.svg +1 -0
- package/dist/components/browser-tip/index.css +18 -0
- package/dist/components/browser-tip/index.js +28 -0
- package/dist/components/centered-loading.js +23 -0
- package/dist/components/icon/index.css +7 -0
- package/dist/components/icon/index.js +30 -0
- package/dist/components/icon-button/index.css +33 -0
- package/dist/components/icon-button/index.js +71 -0
- package/dist/components/index.js +92 -0
- package/dist/components/loading/index.css +54 -0
- package/dist/components/loading/index.js +15 -0
- package/dist/components/modal/index.css +0 -0
- package/dist/components/modal/index.js +27 -0
- package/dist/components/modal-header/index.css +22 -0
- package/dist/components/modal-header/index.js +36 -0
- package/dist/components/option/index.css +20 -0
- package/dist/components/option/index.js +39 -0
- package/dist/components/options-editor/container/index.css +49 -0
- package/dist/components/options-editor/container/index.js +122 -0
- package/dist/components/options-editor/index.css +26 -0
- package/dist/components/options-editor/index.js +70 -0
- package/dist/components/options-editor/options/index.css +5 -0
- package/dist/components/options-editor/options/index.js +138 -0
- package/dist/components/options-editor/options/option/index.css +54 -0
- package/dist/components/options-editor/options/option/index.js +138 -0
- package/dist/components/popover/index.js +85 -0
- package/dist/components/popover/utils.js +76 -0
- package/dist/components/search-input/index.css +52 -0
- package/dist/components/search-input/index.js +148 -0
- package/dist/components/selector-display/index.css +86 -0
- package/dist/components/selector-display/index.js +66 -0
- package/dist/components/toolbar/index.js +20 -0
- package/dist/components/toolbar/toolbar-group/index.css +13 -0
- package/dist/components/toolbar/toolbar-group/index.js +22 -0
- package/dist/components/toolbar/toolbar-item/index.css +3 -0
- package/dist/components/toolbar/toolbar-item/index.js +53 -0
- package/dist/components/tooltip/index.css +68 -0
- package/dist/components/tooltip/index.js +46 -0
- package/dist/components/tooltip/shortcut-key/index.css +7 -0
- package/dist/components/tooltip/shortcut-key/index.js +20 -0
- package/dist/constants/event-types.js +25 -0
- package/dist/constants/index.js +40 -0
- package/dist/constants/key-codes.js +104 -0
- package/dist/editor/index.css +44 -0
- package/dist/editor/index.js +50 -0
- package/dist/editor/main/index.css +19 -0
- package/dist/editor/main/index.js +166 -0
- package/dist/editor/with-props-editor.js +20 -0
- package/dist/extension/commons/dropdown-menu-item/index.css +52 -0
- package/dist/extension/commons/dropdown-menu-item/index.js +62 -0
- package/dist/extension/commons/index.js +5 -0
- package/dist/extension/commons/insert-element-dialog/index.js +91 -0
- package/dist/extension/commons/menu/index.js +3 -0
- package/dist/extension/commons/menu/menu-drop-down.js +98 -0
- package/dist/extension/commons/menu-shortcut-indicator/index.js +24 -0
- package/dist/extension/commons/menu-shortcut-indicator/style.css +18 -0
- package/dist/extension/constants/element-default-style.js +78 -0
- package/dist/extension/constants/element-types.js +33 -0
- package/dist/extension/constants/index.js +63 -0
- package/dist/extension/constants/keyboard.js +33 -0
- package/dist/extension/constants/menus-config.js +142 -0
- package/dist/extension/core/index.js +38 -0
- package/dist/extension/core/queries/index.js +507 -0
- package/dist/extension/core/transforms/focus-editor.js +18 -0
- package/dist/extension/core/transforms/index.js +49 -0
- package/dist/extension/core/transforms/move-children.js +35 -0
- package/dist/extension/core/transforms/remove-node-children.js +19 -0
- package/dist/extension/core/transforms/replace-node-children.js +24 -0
- package/dist/extension/core/utils/index.js +120 -0
- package/dist/extension/event-transfer/get-event-transfer.js +38 -0
- package/dist/extension/event-transfer/set-event-transfer.js +36 -0
- package/dist/extension/highlight/index.js +20 -0
- package/dist/extension/highlight/normalize-tokens.js +94 -0
- package/dist/extension/highlight/prismjs.js +27 -0
- package/dist/extension/highlight/set-node-decorations.js +81 -0
- package/dist/extension/highlight/use-highlight.js +20 -0
- package/dist/extension/index.js +67 -0
- package/dist/extension/plugins/blockquote/helpers.js +68 -0
- package/dist/extension/plugins/blockquote/index.js +18 -0
- package/dist/extension/plugins/blockquote/menu/index.js +35 -0
- package/dist/extension/plugins/blockquote/plugin.js +154 -0
- package/dist/extension/plugins/blockquote/render-elem.js +29 -0
- package/dist/extension/plugins/check-list/helper.js +34 -0
- package/dist/extension/plugins/check-list/index.js +19 -0
- package/dist/extension/plugins/check-list/menu/index.js +39 -0
- package/dist/extension/plugins/check-list/plugin.js +92 -0
- package/dist/extension/plugins/check-list/render-elem.js +61 -0
- package/dist/extension/plugins/clear-format/helpers.js +51 -0
- package/dist/extension/plugins/clear-format/menu/index.js +35 -0
- package/dist/extension/plugins/code-block/helpers.js +140 -0
- package/dist/extension/plugins/code-block/index.js +20 -0
- package/dist/extension/plugins/code-block/menu/index.js +59 -0
- package/dist/extension/plugins/code-block/plugin.js +288 -0
- package/dist/extension/plugins/code-block/render-elem/constant.js +22 -0
- package/dist/extension/plugins/code-block/render-elem/index.js +89 -0
- package/dist/extension/plugins/code-block/render-elem/language-selector/index.css +18 -0
- package/dist/extension/plugins/code-block/render-elem/language-selector/index.js +38 -0
- package/dist/extension/plugins/formula/formula.css +22 -0
- package/dist/extension/plugins/formula/helper.js +80 -0
- package/dist/extension/plugins/formula/index.js +19 -0
- package/dist/extension/plugins/formula/menu/formula-modal.js +98 -0
- package/dist/extension/plugins/formula/menu/index.js +35 -0
- package/dist/extension/plugins/formula/plugin.js +22 -0
- package/dist/extension/plugins/formula/render-elem.js +64 -0
- package/dist/extension/plugins/header/helper.js +55 -0
- package/dist/extension/plugins/header/index.js +19 -0
- package/dist/extension/plugins/header/menu/index.js +72 -0
- package/dist/extension/plugins/header/plugin.js +155 -0
- package/dist/extension/plugins/header/render-elem.js +39 -0
- package/dist/extension/plugins/html/index.js +13 -0
- package/dist/extension/plugins/html/plugin.js +69 -0
- package/dist/extension/plugins/image/helper.js +131 -0
- package/dist/extension/plugins/image/index.js +19 -0
- package/dist/extension/plugins/image/menu/image-menu-dialog.js +92 -0
- package/dist/extension/plugins/image/menu/index.css +3 -0
- package/dist/extension/plugins/image/menu/index.js +103 -0
- package/dist/extension/plugins/image/plugin.js +56 -0
- package/dist/extension/plugins/image/render-element/image-previewer.js +89 -0
- package/dist/extension/plugins/image/render-element/index.js +141 -0
- package/dist/extension/plugins/image/render-element/style.css +68 -0
- package/dist/extension/plugins/index.js +116 -0
- package/dist/extension/plugins/link/helper.js +258 -0
- package/dist/extension/plugins/link/index.js +19 -0
- package/dist/extension/plugins/link/menu/index.js +92 -0
- package/dist/extension/plugins/link/menu/link-modal.js +169 -0
- package/dist/extension/plugins/link/plugin.js +172 -0
- package/dist/extension/plugins/link/render-elem/index.css +12 -0
- package/dist/extension/plugins/link/render-elem/index.js +103 -0
- package/dist/extension/plugins/link/render-elem/link-op-menu/index.css +33 -0
- package/dist/extension/plugins/link/render-elem/link-op-menu/index.js +89 -0
- package/dist/extension/plugins/list/constant.js +8 -0
- package/dist/extension/plugins/list/helpers.js +102 -0
- package/dist/extension/plugins/list/index.js +19 -0
- package/dist/extension/plugins/list/menu/index.js +41 -0
- package/dist/extension/plugins/list/plugin/index.js +80 -0
- package/dist/extension/plugins/list/plugin/insert-break-list.js +29 -0
- package/dist/extension/plugins/list/plugin/insert-fragment-list.js +179 -0
- package/dist/extension/plugins/list/plugin/normalize-list.js +79 -0
- package/dist/extension/plugins/list/plugin/on-tab-handle.js +63 -0
- package/dist/extension/plugins/list/plugin/shortcut.js +69 -0
- package/dist/extension/plugins/list/queries/index.js +52 -0
- package/dist/extension/plugins/list/render-elem/index.js +68 -0
- package/dist/extension/plugins/list/transforms/index.js +75 -0
- package/dist/extension/plugins/list/transforms/insert-list-item.js +98 -0
- package/dist/extension/plugins/list/transforms/move-list-item-down.js +50 -0
- package/dist/extension/plugins/list/transforms/move-list-item-up.js +124 -0
- package/dist/extension/plugins/list/transforms/move-list-items-to-list.js +63 -0
- package/dist/extension/plugins/list/transforms/move-list-items.js +73 -0
- package/dist/extension/plugins/list/transforms/normalize-list-item.js +110 -0
- package/dist/extension/plugins/list/transforms/normalize-nested-list.js +38 -0
- package/dist/extension/plugins/list/transforms/remove-first-list-item.js +24 -0
- package/dist/extension/plugins/list/transforms/transforms-to-list.js +131 -0
- package/dist/extension/plugins/list/transforms/unwrap-list.js +48 -0
- package/dist/extension/plugins/markdown/index.js +12 -0
- package/dist/extension/plugins/markdown/plugin.js +257 -0
- package/dist/extension/plugins/node-id/constants.js +24 -0
- package/dist/extension/plugins/node-id/helpers.js +78 -0
- package/dist/extension/plugins/node-id/index.js +12 -0
- package/dist/extension/plugins/node-id/with-node-id.js +37 -0
- package/dist/extension/plugins/p/helper.js +17 -0
- package/dist/extension/plugins/p/index.js +17 -0
- package/dist/extension/plugins/p/plugin.js +141 -0
- package/dist/extension/plugins/p/render-elem.js +29 -0
- package/dist/extension/plugins/paragraph/helper.js +17 -0
- package/dist/extension/plugins/paragraph/index.js +17 -0
- package/dist/extension/plugins/paragraph/plugin.js +141 -0
- package/dist/extension/plugins/paragraph/render-elem.js +29 -0
- package/dist/extension/plugins/table/constant.js +24 -0
- package/dist/extension/plugins/table/context-menu/horizontal-align-popover/index.css +3 -0
- package/dist/extension/plugins/table/context-menu/horizontal-align-popover/index.js +64 -0
- package/dist/extension/plugins/table/context-menu/index.css +13 -0
- package/dist/extension/plugins/table/context-menu/index.js +152 -0
- package/dist/extension/plugins/table/context-menu/insert-table-element/index.css +27 -0
- package/dist/extension/plugins/table/context-menu/insert-table-element/index.js +113 -0
- package/dist/extension/plugins/table/helper.js +333 -0
- package/dist/extension/plugins/table/index.js +21 -0
- package/dist/extension/plugins/table/menu/index.js +61 -0
- package/dist/extension/plugins/table/menu/table-operator.js +97 -0
- package/dist/extension/plugins/table/menu/table-size-selector/index.css +27 -0
- package/dist/extension/plugins/table/menu/table-size-selector/index.js +98 -0
- package/dist/extension/plugins/table/model.js +102 -0
- package/dist/extension/plugins/table/plugin.js +351 -0
- package/dist/extension/plugins/table/render-elem/index.css +64 -0
- package/dist/extension/plugins/table/render-elem/index.js +252 -0
- package/dist/extension/plugins/table/table-operations.js +323 -0
- package/dist/extension/plugins/text-style/helpers.js +57 -0
- package/dist/extension/plugins/text-style/index.js +17 -0
- package/dist/extension/plugins/text-style/menu/index.js +37 -0
- package/dist/extension/plugins/text-style/plugin.js +38 -0
- package/dist/extension/plugins/text-style/render-elem.js +63 -0
- package/dist/extension/render/render-element.js +115 -0
- package/dist/extension/render/render-leaf.js +22 -0
- package/dist/extension/toolbar/index.css +16 -0
- package/dist/extension/toolbar/index.js +89 -0
- package/dist/extension/toolbar/insert-toolbar.js +78 -0
- package/dist/hooks/use-attachments.js +38 -0
- package/dist/hooks/use-container-style.js +50 -0
- package/dist/hooks/use-mathjax.js +46 -0
- package/dist/hooks/use-scroll-context.js +20 -0
- package/dist/hooks/use-selection-update.js +20 -0
- package/dist/hooks/user-link-click.js +52 -0
- package/dist/index.js +9 -0
- package/dist/intl/ReactIntlUniversal.js +310 -0
- package/dist/intl/constants.js +21 -0
- package/dist/intl/index.js +33 -0
- package/dist/locale/index.js +11 -0
- package/dist/locale/lang/en.json +83 -0
- package/dist/slate-convert/html-to-slate/constants.js +146 -0
- package/dist/slate-convert/html-to-slate/helper.js +106 -0
- package/dist/slate-convert/html-to-slate/index.js +138 -0
- package/dist/slate-convert/html-to-slate/rules/blockquote.js +26 -0
- package/dist/slate-convert/html-to-slate/rules/br.js +29 -0
- package/dist/slate-convert/html-to-slate/rules/check-list.js +29 -0
- package/dist/slate-convert/html-to-slate/rules/code-block.js +95 -0
- package/dist/slate-convert/html-to-slate/rules/header.js +26 -0
- package/dist/slate-convert/html-to-slate/rules/image.js +31 -0
- package/dist/slate-convert/html-to-slate/rules/index.js +20 -0
- package/dist/slate-convert/html-to-slate/rules/link.js +31 -0
- package/dist/slate-convert/html-to-slate/rules/list.js +74 -0
- package/dist/slate-convert/html-to-slate/rules/p.js +37 -0
- package/dist/slate-convert/html-to-slate/rules/paragraph.js +37 -0
- package/dist/slate-convert/html-to-slate/rules/table.js +64 -0
- package/dist/slate-convert/html-to-slate/rules/text.js +71 -0
- package/dist/slate-convert/index.js +20 -0
- package/dist/slate-convert/slate-to-html/index.js +143 -0
- package/dist/utils/common.js +46 -0
- package/dist/utils/deserialize-html.js +219 -0
- package/dist/utils/dom-utils.js +57 -0
- package/dist/utils/dom.js +133 -0
- package/dist/utils/event-bus.js +40 -0
- package/dist/utils/event-handler.js +44 -0
- package/dist/utils/get-browser-Info.js +35 -0
- package/dist/utils/hotkey.js +45 -0
- package/dist/utils/is-punctuation-mark.js +50 -0
- package/dist/utils/object-utils.js +56 -0
- package/dist/utils/search.js +20 -0
- package/dist/utils/translate.js +18 -0
- package/dist/utils/type-detection.js +42 -0
- package/package.json +177 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _slate = require("slate");
|
|
11
|
+
var _eventBus = _interopRequireDefault(require("../../../utils/event-bus"));
|
|
12
|
+
var _eventTypes = require("../../../constants/event-types");
|
|
13
|
+
var _constants = require("../../constants");
|
|
14
|
+
var _linkModal = _interopRequireDefault(require("../../plugins/link/menu/link-modal"));
|
|
15
|
+
var _formulaModal = _interopRequireDefault(require("../../plugins/formula/menu/formula-modal"));
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
const InsertElementDialog = _ref => {
|
|
18
|
+
let {
|
|
19
|
+
editor
|
|
20
|
+
} = _ref;
|
|
21
|
+
const [dialogType, setDialogType] = (0, _react.useState)('');
|
|
22
|
+
const [isOpenLinkModal, setIsOpenLinkModal] = (0, _react.useState)(false);
|
|
23
|
+
const [formula, setFormula] = (0, _react.useState)('');
|
|
24
|
+
const [linkInfo, setLinkInfo] = (0, _react.useState)({
|
|
25
|
+
linkTitle: '',
|
|
26
|
+
linkUrl: ''
|
|
27
|
+
});
|
|
28
|
+
const toggleDialog = (0, _react.useCallback)(_ref2 => {
|
|
29
|
+
let {
|
|
30
|
+
type
|
|
31
|
+
} = _ref2;
|
|
32
|
+
setDialogType(type);
|
|
33
|
+
setIsOpenLinkModal(true);
|
|
34
|
+
if (type === _constants.ElementTypes.LINK) {
|
|
35
|
+
if (editor.selection) {
|
|
36
|
+
const selectedText = _slate.Editor.string(editor, editor.selection);
|
|
37
|
+
setLinkInfo({
|
|
38
|
+
...linkInfo,
|
|
39
|
+
linkTitle: selectedText
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}, [editor, linkInfo]);
|
|
44
|
+
const handleOpenLinkModal = (0, _react.useCallback)(formulaElement => {
|
|
45
|
+
if (formulaElement) {
|
|
46
|
+
const {
|
|
47
|
+
formula
|
|
48
|
+
} = formulaElement.data || {};
|
|
49
|
+
setFormula(formula);
|
|
50
|
+
setIsOpenLinkModal(true);
|
|
51
|
+
}
|
|
52
|
+
}, []);
|
|
53
|
+
(0, _react.useEffect)(() => {
|
|
54
|
+
const eventBus = _eventBus.default.getInstance();
|
|
55
|
+
const toggleDialogSubscribe = eventBus.subscribe(_eventTypes.INTERNAL_EVENTS.INSERT_ELEMENT, toggleDialog);
|
|
56
|
+
const unsubscribe = eventBus.subscribe(_eventTypes.INTERNAL_EVENTS.ON_OPEN_FORMULA_DIALOG, handleOpenLinkModal);
|
|
57
|
+
return () => {
|
|
58
|
+
toggleDialogSubscribe();
|
|
59
|
+
unsubscribe();
|
|
60
|
+
};
|
|
61
|
+
}, [toggleDialog, handleOpenLinkModal]);
|
|
62
|
+
const onCloseModal = (0, _react.useCallback)(() => {
|
|
63
|
+
setIsOpenLinkModal(false);
|
|
64
|
+
if (dialogType === _constants.ElementTypes.LINK) {
|
|
65
|
+
setLinkInfo({
|
|
66
|
+
linkTitle: '',
|
|
67
|
+
linkUrl: ''
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
if (dialogType === _constants.ElementTypes.FORMULA) {
|
|
71
|
+
setFormula('');
|
|
72
|
+
}
|
|
73
|
+
}, [dialogType]);
|
|
74
|
+
if (_constants.ElementTypes.LINK === dialogType) {
|
|
75
|
+
return isOpenLinkModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_linkModal.default, {
|
|
76
|
+
onCloseModal: onCloseModal,
|
|
77
|
+
editor: editor,
|
|
78
|
+
linkTitle: linkInfo.linkTitle,
|
|
79
|
+
linkUrl: linkInfo.linkUrl
|
|
80
|
+
});
|
|
81
|
+
} else if (_constants.ElementTypes.FORMULA === dialogType) {
|
|
82
|
+
return isOpenLinkModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_formulaModal.default, {
|
|
83
|
+
onCloseModal: onCloseModal,
|
|
84
|
+
editor: editor,
|
|
85
|
+
formula: formula
|
|
86
|
+
});
|
|
87
|
+
} else {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
var _default = exports.default = InsertElementDialog;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _constants = require("@/constants");
|
|
11
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
|
+
var _components = require("@/components");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
const MenuDropDown = props => {
|
|
15
|
+
const {
|
|
16
|
+
readonly,
|
|
17
|
+
className = '',
|
|
18
|
+
isDisabled,
|
|
19
|
+
dropDownList = [],
|
|
20
|
+
id,
|
|
21
|
+
text,
|
|
22
|
+
iconClass,
|
|
23
|
+
isShowMenuItemTooltip = false,
|
|
24
|
+
isShowListItemIcon = false
|
|
25
|
+
} = props;
|
|
26
|
+
const [isShowDropDown, setIsShowDropDown] = (0, _react.useState)(false);
|
|
27
|
+
const menuItemRef = (0, _react.useRef)();
|
|
28
|
+
const menuDropdownRef = (0, _react.useRef)();
|
|
29
|
+
const containerId = (0, _react.useMemo)(() => `menu-dropdown-${id}`, [id]);
|
|
30
|
+
const handleHideDropDownList = (0, _react.useCallback)(e => {
|
|
31
|
+
var _menuItemRef$current, _menuDropdownRef$curr;
|
|
32
|
+
const isClickOnMenuItem = menuItemRef === null || menuItemRef === void 0 ? void 0 : (_menuItemRef$current = menuItemRef.current) === null || _menuItemRef$current === void 0 ? void 0 : _menuItemRef$current.contains(e.target);
|
|
33
|
+
const isClickOnMenuDropdown = menuDropdownRef === null || menuDropdownRef === void 0 ? void 0 : (_menuDropdownRef$curr = menuDropdownRef.current) === null || _menuDropdownRef$curr === void 0 ? void 0 : _menuDropdownRef$curr.contains(e.target);
|
|
34
|
+
// If click on menu item, menu dropdown will show, and click on menu dropdown, menu dropdown will hide
|
|
35
|
+
if (!isShowDropDown && isClickOnMenuItem && !isClickOnMenuDropdown) return;
|
|
36
|
+
document.removeEventListener('click', handleHideDropDownList);
|
|
37
|
+
setIsShowDropDown(false);
|
|
38
|
+
}, [isShowDropDown]);
|
|
39
|
+
const registerClickEvent = (0, _react.useCallback)(e => {
|
|
40
|
+
setIsShowDropDown(true);
|
|
41
|
+
document.addEventListener('click', handleHideDropDownList);
|
|
42
|
+
}, [handleHideDropDownList]);
|
|
43
|
+
const handleClickDropDownItem = (0, _react.useCallback)((event, item, callback) => {
|
|
44
|
+
event.stopPropagation();
|
|
45
|
+
handleHideDropDownList(event);
|
|
46
|
+
callback && callback(item);
|
|
47
|
+
}, [handleHideDropDownList]);
|
|
48
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
49
|
+
style: {
|
|
50
|
+
position: 'relative'
|
|
51
|
+
},
|
|
52
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
53
|
+
ref: menuItemRef,
|
|
54
|
+
id: containerId,
|
|
55
|
+
className: (0, _classnames.default)(className, 'sf-menu-group-item sf-menu-with-dropdown', {
|
|
56
|
+
'header-popover-showed': isShowDropDown,
|
|
57
|
+
'header-toggle-disabled': isDisabled
|
|
58
|
+
}),
|
|
59
|
+
onClick: !readonly && !isDisabled && registerClickEvent,
|
|
60
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
61
|
+
className: `sf-menu-with-dropdown-icon active ${iconClass}`
|
|
62
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
63
|
+
className: "sf-menu-with-dropdown-triangle",
|
|
64
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
65
|
+
className: `sf-menu-with-dropdown-triangle-icon iconfont icon-${isShowDropDown ? 'drop-down' : 'caret-up'}`
|
|
66
|
+
})
|
|
67
|
+
}), !!isShowDropDown && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
68
|
+
ref: menuDropdownRef,
|
|
69
|
+
className: "sf-dropdown-list ",
|
|
70
|
+
children: dropDownList.map((item, index) => {
|
|
71
|
+
const {
|
|
72
|
+
id,
|
|
73
|
+
iconClass,
|
|
74
|
+
handleClick,
|
|
75
|
+
text
|
|
76
|
+
} = item;
|
|
77
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Fragment, {
|
|
78
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
79
|
+
id: id,
|
|
80
|
+
className: (0, _classnames.default)('sf-dropdown-list-item'),
|
|
81
|
+
onClick: event => handleClickDropDownItem(event, item, handleClick),
|
|
82
|
+
children: [isShowListItemIcon && iconClass && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
83
|
+
className: `sea-email-dropdown-menu-item-icon ${iconClass}`
|
|
84
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
85
|
+
className: "sea-email-dropdown-menu-item-text",
|
|
86
|
+
children: (0, _constants.gettext)(text)
|
|
87
|
+
})]
|
|
88
|
+
})
|
|
89
|
+
}, index);
|
|
90
|
+
})
|
|
91
|
+
}), !!isShowMenuItemTooltip && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Tooltip, {
|
|
92
|
+
target: containerId,
|
|
93
|
+
children: (0, _constants.gettext)(text)
|
|
94
|
+
})]
|
|
95
|
+
})
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
var _default = exports.default = MenuDropDown;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
require("./style.css");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
const MenuShortcutPrompt = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
shortcuts,
|
|
15
|
+
containerClassName = ''
|
|
16
|
+
} = _ref;
|
|
17
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
18
|
+
className: (0, _classnames.default)('sf-shortcut-prompt-container', containerClassName),
|
|
19
|
+
children: shortcuts.map((shortcut, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)("kbd", {
|
|
20
|
+
children: shortcut
|
|
21
|
+
}, `sf-shortcut-${shortcut}-${index}`))
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
var _default = exports.default = MenuShortcutPrompt;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.sf-shortcut-prompt-container kbd {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
margin-bottom: 0px;
|
|
4
|
+
margin-left: 1px;
|
|
5
|
+
margin-right: 1px;
|
|
6
|
+
padding: 1px 3px;
|
|
7
|
+
min-width: 12px;
|
|
8
|
+
border: none;
|
|
9
|
+
font: inherit;
|
|
10
|
+
text-align: center;
|
|
11
|
+
color: #999;
|
|
12
|
+
background-color: transparent;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.sf-shortcut-prompt-container kbd:last-child {
|
|
16
|
+
margin-right: 0px;
|
|
17
|
+
padding-right: 0px;
|
|
18
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ELEMENT_DEFAULT_STYLE = void 0;
|
|
8
|
+
var ElementTypes = _interopRequireWildcard(require("./element-types"));
|
|
9
|
+
const ELEMENT_DEFAULT_STYLE = exports.ELEMENT_DEFAULT_STYLE = {
|
|
10
|
+
[ElementTypes.BLOCKQUOTE]: {
|
|
11
|
+
borderLeft: '4px solid #ddd',
|
|
12
|
+
color: '#666',
|
|
13
|
+
margin: '1.2em 0',
|
|
14
|
+
padding: '0 15px'
|
|
15
|
+
},
|
|
16
|
+
[ElementTypes.CHECK_LIST_ITEM]: {
|
|
17
|
+
margin: '0.5rem 0'
|
|
18
|
+
},
|
|
19
|
+
[ElementTypes.CODE]: {
|
|
20
|
+
backgroundColor: 'rgba(27, 31, 35, .05)',
|
|
21
|
+
border: 'none',
|
|
22
|
+
borderRadius: '3px',
|
|
23
|
+
fontSize: '85%',
|
|
24
|
+
margin: 0,
|
|
25
|
+
padding: '2px 4px'
|
|
26
|
+
},
|
|
27
|
+
[ElementTypes.CODE_BLOCK]: {
|
|
28
|
+
position: 'relative',
|
|
29
|
+
margin: '10px 0 10px',
|
|
30
|
+
padding: '8px',
|
|
31
|
+
borderRadius: '4px',
|
|
32
|
+
overflow: 'hidden',
|
|
33
|
+
background: '#f5f7fa'
|
|
34
|
+
},
|
|
35
|
+
[ElementTypes.FORMULA]: {},
|
|
36
|
+
[ElementTypes.LINK]: {
|
|
37
|
+
color: '#eb8205'
|
|
38
|
+
},
|
|
39
|
+
[ElementTypes.UNORDERED_LIST]: {
|
|
40
|
+
display: 'flex',
|
|
41
|
+
flexDirection: 'column',
|
|
42
|
+
margin: 0,
|
|
43
|
+
paddingInlineStart: '24px'
|
|
44
|
+
},
|
|
45
|
+
[ElementTypes.ORDERED_LIST]: {
|
|
46
|
+
display: 'flex',
|
|
47
|
+
flexDirection: 'column',
|
|
48
|
+
margin: 0,
|
|
49
|
+
paddingInlineStart: '24px'
|
|
50
|
+
},
|
|
51
|
+
[ElementTypes.P]: {
|
|
52
|
+
margin: '8px 0'
|
|
53
|
+
},
|
|
54
|
+
[ElementTypes.TABLE_CELL]: {
|
|
55
|
+
borderColor: '#ccc',
|
|
56
|
+
borderStyle: 'solid',
|
|
57
|
+
borderWidth: '0 1px 1px 0',
|
|
58
|
+
flex: 1,
|
|
59
|
+
lineHeight: 1.5,
|
|
60
|
+
padding: '10px',
|
|
61
|
+
wordBreak: 'break-all'
|
|
62
|
+
},
|
|
63
|
+
[ElementTypes.TABLE_ROW]: {
|
|
64
|
+
border: '0 solid',
|
|
65
|
+
borderColor: 'inherit',
|
|
66
|
+
display: 'flex'
|
|
67
|
+
},
|
|
68
|
+
[ElementTypes.TABLE]: {
|
|
69
|
+
borderCollapse: 'collapse',
|
|
70
|
+
borderLeft: '1px solid #ddd',
|
|
71
|
+
borderTop: '1px solid #ddd',
|
|
72
|
+
margin: '10px 0',
|
|
73
|
+
width: '100%'
|
|
74
|
+
},
|
|
75
|
+
[ElementTypes.PARAGRAPH]: {
|
|
76
|
+
lineHeight: 1.5
|
|
77
|
+
}
|
|
78
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.UNORDERED_LIST = exports.TABLE_ROW = exports.TABLE_CELL = exports.TABLE = exports.PARAGRAPH = exports.P = exports.ORDERED_LIST = exports.LIST_ITEM = exports.LINK = exports.IMAGE = exports.HEADER6 = exports.HEADER5 = exports.HEADER4 = exports.HEADER3 = exports.HEADER2 = exports.HEADER1 = exports.HEADER = exports.FORMULA = exports.CODE_LINE = exports.CODE_BLOCK = exports.CODE = exports.CHECK_LIST_ITEM = exports.BR = exports.BLOCKQUOTE = void 0;
|
|
7
|
+
const BLOCKQUOTE = exports.BLOCKQUOTE = 'blockquote';
|
|
8
|
+
const HEADER = exports.HEADER = 'header';
|
|
9
|
+
// each header type should be start with HEADER, all of justices should based on HEADER
|
|
10
|
+
const HEADER1 = exports.HEADER1 = `${HEADER}1`;
|
|
11
|
+
const HEADER2 = exports.HEADER2 = `${HEADER}2`;
|
|
12
|
+
const HEADER3 = exports.HEADER3 = `${HEADER}3`;
|
|
13
|
+
const HEADER4 = exports.HEADER4 = `${HEADER}4`;
|
|
14
|
+
const HEADER5 = exports.HEADER5 = `${HEADER}5`;
|
|
15
|
+
const HEADER6 = exports.HEADER6 = `${HEADER}6`;
|
|
16
|
+
const ORDERED_LIST = exports.ORDERED_LIST = 'ordered_list'; // <ol>
|
|
17
|
+
const UNORDERED_LIST = exports.UNORDERED_LIST = 'unordered_list'; // <ul> // unordered_list can not work
|
|
18
|
+
const LIST_ITEM = exports.LIST_ITEM = 'list_item'; // <li>
|
|
19
|
+
const CHECK_LIST_ITEM = exports.CHECK_LIST_ITEM = 'check_list_item';
|
|
20
|
+
const PARAGRAPH = exports.PARAGRAPH = 'paragraph';
|
|
21
|
+
const CODE_BLOCK = exports.CODE_BLOCK = 'code_block';
|
|
22
|
+
const CODE_LINE = exports.CODE_LINE = 'code_line';
|
|
23
|
+
const TABLE = exports.TABLE = 'table';
|
|
24
|
+
const TABLE_ROW = exports.TABLE_ROW = 'table_row';
|
|
25
|
+
const TABLE_CELL = exports.TABLE_CELL = 'table_cell';
|
|
26
|
+
const IMAGE = exports.IMAGE = 'image';
|
|
27
|
+
const LINK = exports.LINK = 'link';
|
|
28
|
+
const FORMULA = exports.FORMULA = 'formula';
|
|
29
|
+
const P = exports.P = 'p';
|
|
30
|
+
const BR = exports.BR = 'br';
|
|
31
|
+
|
|
32
|
+
// other
|
|
33
|
+
const CODE = exports.CODE = 'code';
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
var _exportNames = {
|
|
8
|
+
HEADERS: true,
|
|
9
|
+
HEADER_TITLE_MAP: true,
|
|
10
|
+
LIST_TYPE_ARRAY: true,
|
|
11
|
+
INSERT_POSITION: true,
|
|
12
|
+
TEXT_ALIGN: true,
|
|
13
|
+
ElementTypes: true
|
|
14
|
+
};
|
|
15
|
+
exports.TEXT_ALIGN = exports.LIST_TYPE_ARRAY = exports.INSERT_POSITION = exports.HEADER_TITLE_MAP = exports.HEADERS = exports.ElementTypes = void 0;
|
|
16
|
+
var _elementTypes = _interopRequireWildcard(require("./element-types"));
|
|
17
|
+
var _ElementTypes = _elementTypes;
|
|
18
|
+
exports.ElementTypes = _elementTypes;
|
|
19
|
+
var _menusConfig = require("./menus-config");
|
|
20
|
+
Object.keys(_menusConfig).forEach(function (key) {
|
|
21
|
+
if (key === "default" || key === "__esModule") return;
|
|
22
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
23
|
+
if (key in exports && exports[key] === _menusConfig[key]) return;
|
|
24
|
+
Object.defineProperty(exports, key, {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _menusConfig[key];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
var _elementDefaultStyle = require("./element-default-style");
|
|
32
|
+
Object.keys(_elementDefaultStyle).forEach(function (key) {
|
|
33
|
+
if (key === "default" || key === "__esModule") return;
|
|
34
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
35
|
+
if (key in exports && exports[key] === _elementDefaultStyle[key]) return;
|
|
36
|
+
Object.defineProperty(exports, key, {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _elementDefaultStyle[key];
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
const HEADERS = exports.HEADERS = [_elementTypes.HEADER1, _elementTypes.HEADER2, _elementTypes.HEADER3, _elementTypes.HEADER4, _elementTypes.HEADER5, _elementTypes.HEADER6];
|
|
44
|
+
const HEADER_TITLE_MAP = exports.HEADER_TITLE_MAP = {
|
|
45
|
+
[_elementTypes.HEADER1]: 'Header one',
|
|
46
|
+
[_elementTypes.HEADER2]: 'Header two',
|
|
47
|
+
[_elementTypes.HEADER3]: 'Header three',
|
|
48
|
+
[_elementTypes.HEADER4]: 'Header four',
|
|
49
|
+
[_elementTypes.HEADER5]: 'Header five',
|
|
50
|
+
[_elementTypes.HEADER6]: 'Header six',
|
|
51
|
+
[_elementTypes.PARAGRAPH]: 'Paragraph'
|
|
52
|
+
};
|
|
53
|
+
const LIST_TYPE_ARRAY = exports.LIST_TYPE_ARRAY = ['unordered_list', 'ordered_list'];
|
|
54
|
+
const INSERT_POSITION = exports.INSERT_POSITION = {
|
|
55
|
+
BEFORE: 'before',
|
|
56
|
+
CURRENT: 'current',
|
|
57
|
+
AFTER: 'after'
|
|
58
|
+
};
|
|
59
|
+
const TEXT_ALIGN = exports.TEXT_ALIGN = {
|
|
60
|
+
LEFT: 'left',
|
|
61
|
+
CENTER: 'center',
|
|
62
|
+
RIGHT: 'right'
|
|
63
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.WIN_HOTKEYS_EVENT_HEADER = exports.MAC_HOTKEYS_TIP_HEADER = exports.MAC_HOTKEYS_EVENT_HEADER = void 0;
|
|
7
|
+
const MAC_HOTKEYS_TIP_HEADER = exports.MAC_HOTKEYS_TIP_HEADER = {
|
|
8
|
+
paragraph: '⌘+⌥+0',
|
|
9
|
+
header1: '⌘+⌥+1',
|
|
10
|
+
header2: '⌘+⌥+2',
|
|
11
|
+
header3: '⌘+⌥+3',
|
|
12
|
+
header4: '⌘+⌥+4',
|
|
13
|
+
header5: '⌘+⌥+5',
|
|
14
|
+
header6: '⌘+⌥+6'
|
|
15
|
+
};
|
|
16
|
+
const WIN_HOTKEYS_EVENT_HEADER = exports.WIN_HOTKEYS_EVENT_HEADER = {
|
|
17
|
+
paragraph: 'ctrl+alt+0',
|
|
18
|
+
header1: 'ctrl+alt+1',
|
|
19
|
+
header2: 'ctrl+alt+2',
|
|
20
|
+
header3: 'ctrl+alt+3',
|
|
21
|
+
header4: 'ctrl+alt+4',
|
|
22
|
+
header5: 'ctrl+alt+5',
|
|
23
|
+
header6: 'ctrl+alt+6'
|
|
24
|
+
};
|
|
25
|
+
const MAC_HOTKEYS_EVENT_HEADER = exports.MAC_HOTKEYS_EVENT_HEADER = {
|
|
26
|
+
paragraph: 'cmd+opt+0',
|
|
27
|
+
header1: 'cmd+opt+1',
|
|
28
|
+
header2: 'cmd+opt+2',
|
|
29
|
+
header3: 'cmd+opt+3',
|
|
30
|
+
header4: 'cmd+opt+4',
|
|
31
|
+
header5: 'cmd+opt+5',
|
|
32
|
+
header6: 'cmd+opt+6'
|
|
33
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TEXT_STYLE_MAP = exports.TABLE_SUBMENU_MAP = exports.MENUS_CONFIG_MAP = exports.CLEAR_FORMAT = void 0;
|
|
7
|
+
var _elementTypes = require("./element-types");
|
|
8
|
+
const BOLD = 'bold';
|
|
9
|
+
const ITALIC = 'italic';
|
|
10
|
+
const UNDERLINE = 'underline';
|
|
11
|
+
const CODE = 'code';
|
|
12
|
+
const DELETE = 'delete';
|
|
13
|
+
const ADD = 'add';
|
|
14
|
+
const CLEAR_FORMAT = exports.CLEAR_FORMAT = 'clear_format';
|
|
15
|
+
const TEXT_STYLE_MAP = exports.TEXT_STYLE_MAP = {
|
|
16
|
+
BOLD: BOLD,
|
|
17
|
+
ITALIC: ITALIC,
|
|
18
|
+
UNDERLINE: UNDERLINE,
|
|
19
|
+
CODE: CODE,
|
|
20
|
+
DELETE: DELETE,
|
|
21
|
+
ADD: ADD,
|
|
22
|
+
BOLD_ITALIC: `${BOLD}_${ITALIC}`
|
|
23
|
+
};
|
|
24
|
+
const TABLE_SUBMENU_MAP = exports.TABLE_SUBMENU_MAP = {
|
|
25
|
+
TABLE_ALIGN_LEFT: 'table_align_left',
|
|
26
|
+
TABLE_ALIGN_CENTER: 'table_align_center',
|
|
27
|
+
TABLE_ALIGN_RIGHT: 'table_align_right',
|
|
28
|
+
TABLE_INSERT_COLUMN: 'table_insert_column',
|
|
29
|
+
TABLE_DELETE_COLUMN: 'table_delete_column',
|
|
30
|
+
TABLE_INSERT_ROW: 'table_insert_row',
|
|
31
|
+
TABLE_DELETE_ROW: 'table_delete_row',
|
|
32
|
+
TABLE_DELETE_TABLE: 'table_delete_table'
|
|
33
|
+
};
|
|
34
|
+
const MENUS_CONFIG_MAP = exports.MENUS_CONFIG_MAP = {
|
|
35
|
+
[_elementTypes.BLOCKQUOTE]: {
|
|
36
|
+
id: `sea_email_${_elementTypes.BLOCKQUOTE}`,
|
|
37
|
+
icon: 'quote',
|
|
38
|
+
text: 'Quote'
|
|
39
|
+
},
|
|
40
|
+
[_elementTypes.ORDERED_LIST]: {
|
|
41
|
+
id: `sea_email_${_elementTypes.ORDERED_LIST}`,
|
|
42
|
+
icon: 'ol',
|
|
43
|
+
text: 'Ordered list'
|
|
44
|
+
},
|
|
45
|
+
[_elementTypes.UNORDERED_LIST]: {
|
|
46
|
+
id: `sea_email_${_elementTypes.UNORDERED_LIST}`,
|
|
47
|
+
icon: 'ul',
|
|
48
|
+
text: 'Unordered list'
|
|
49
|
+
},
|
|
50
|
+
[_elementTypes.CHECK_LIST_ITEM]: {
|
|
51
|
+
id: `sea_email_${_elementTypes.CHECK_LIST_ITEM}`,
|
|
52
|
+
icon: 'check-square',
|
|
53
|
+
text: 'Check list item'
|
|
54
|
+
},
|
|
55
|
+
[_elementTypes.CODE_BLOCK]: {
|
|
56
|
+
id: `sea_email_${_elementTypes.CODE_BLOCK}`,
|
|
57
|
+
icon: 'code-block',
|
|
58
|
+
text: 'Code block'
|
|
59
|
+
},
|
|
60
|
+
[_elementTypes.LINK]: {
|
|
61
|
+
id: `sea_email_${_elementTypes.LINK}`,
|
|
62
|
+
icon: 'link',
|
|
63
|
+
text: 'Insert link'
|
|
64
|
+
},
|
|
65
|
+
[_elementTypes.IMAGE]: {
|
|
66
|
+
id: `sea_email_${_elementTypes.IMAGE}`,
|
|
67
|
+
icon: 'image',
|
|
68
|
+
text: 'Insert image'
|
|
69
|
+
},
|
|
70
|
+
[_elementTypes.TABLE]: {
|
|
71
|
+
id: `sea_email_${_elementTypes.TABLE}`,
|
|
72
|
+
icon: 'table',
|
|
73
|
+
text: 'Insert table'
|
|
74
|
+
},
|
|
75
|
+
[ITALIC]: {
|
|
76
|
+
id: `sea_email_${ITALIC}`,
|
|
77
|
+
icon: 'italic',
|
|
78
|
+
text: 'Italic',
|
|
79
|
+
type: ITALIC
|
|
80
|
+
},
|
|
81
|
+
[BOLD]: {
|
|
82
|
+
id: `sea_email_${BOLD}`,
|
|
83
|
+
icon: 'bold',
|
|
84
|
+
text: 'Bold',
|
|
85
|
+
type: BOLD
|
|
86
|
+
},
|
|
87
|
+
[UNDERLINE]: {
|
|
88
|
+
id: `sea_email_${UNDERLINE}`,
|
|
89
|
+
icon: 'underline',
|
|
90
|
+
text: 'Underline',
|
|
91
|
+
type: UNDERLINE
|
|
92
|
+
},
|
|
93
|
+
[CODE]: {
|
|
94
|
+
id: `sea_email_${CODE}`,
|
|
95
|
+
icon: 'inline-code',
|
|
96
|
+
text: 'Inline code',
|
|
97
|
+
type: CODE
|
|
98
|
+
},
|
|
99
|
+
[TABLE_SUBMENU_MAP.TABLE_ALIGN_LEFT]: {
|
|
100
|
+
id: `sea_email_${TABLE_SUBMENU_MAP.TABLE_ALIGN_LEFT}`,
|
|
101
|
+
icon: 'left-alignment',
|
|
102
|
+
text: 'Left'
|
|
103
|
+
},
|
|
104
|
+
[TABLE_SUBMENU_MAP.TABLE_ALIGN_CENTER]: {
|
|
105
|
+
id: `sea_email_${TABLE_SUBMENU_MAP.TABLE_ALIGN_CENTER}`,
|
|
106
|
+
icon: 'center-horizontally',
|
|
107
|
+
text: 'Center'
|
|
108
|
+
},
|
|
109
|
+
[TABLE_SUBMENU_MAP.TABLE_ALIGN_RIGHT]: {
|
|
110
|
+
id: `sea_email_${TABLE_SUBMENU_MAP.TABLE_ALIGN_RIGHT}`,
|
|
111
|
+
icon: 'align-right',
|
|
112
|
+
text: 'Right'
|
|
113
|
+
},
|
|
114
|
+
[TABLE_SUBMENU_MAP.TABLE_INSERT_COLUMN]: {
|
|
115
|
+
id: `sea_email_${TABLE_SUBMENU_MAP.TABLE_INSERT_COLUMN}`,
|
|
116
|
+
icon: 'column',
|
|
117
|
+
text: 'Insert column'
|
|
118
|
+
},
|
|
119
|
+
[TABLE_SUBMENU_MAP.TABLE_DELETE_COLUMN]: {
|
|
120
|
+
id: `sea_email_${TABLE_SUBMENU_MAP.TABLE_DELETE_COLUMN}`,
|
|
121
|
+
text: 'Delete column'
|
|
122
|
+
},
|
|
123
|
+
[TABLE_SUBMENU_MAP.TABLE_INSERT_ROW]: {
|
|
124
|
+
id: `sea_email_${TABLE_SUBMENU_MAP.TABLE_INSERT_ROW}`,
|
|
125
|
+
icon: 'row',
|
|
126
|
+
text: 'Insert row'
|
|
127
|
+
},
|
|
128
|
+
[TABLE_SUBMENU_MAP.TABLE_DELETE_ROW]: {
|
|
129
|
+
id: `sea_email_${TABLE_SUBMENU_MAP.TABLE_DELETE_ROW}`,
|
|
130
|
+
text: 'Delete row'
|
|
131
|
+
},
|
|
132
|
+
[TABLE_SUBMENU_MAP.TABLE_DELETE_TABLE]: {
|
|
133
|
+
id: `sea_email_${TABLE_SUBMENU_MAP.TABLE_DELETE_TABLE}`,
|
|
134
|
+
icon: 'delete-table',
|
|
135
|
+
text: 'Delete table'
|
|
136
|
+
},
|
|
137
|
+
[CLEAR_FORMAT]: {
|
|
138
|
+
id: `sea_email_${CLEAR_FORMAT}`,
|
|
139
|
+
icon: 'clear-format',
|
|
140
|
+
text: 'Clear format'
|
|
141
|
+
}
|
|
142
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _index = require("./queries/index");
|
|
7
|
+
Object.keys(_index).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _index[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _index[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _index2 = require("./transforms/index");
|
|
18
|
+
Object.keys(_index2).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _index2[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _index2[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _index3 = require("./utils/index");
|
|
29
|
+
Object.keys(_index3).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _index3[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _index3[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|