|
|
|
|
@ -1335,11 +1335,15 @@ Object.defineProperty(DrawCommandHandler.prototype, "pasteOffset", {
|
|
|
|
|
var Figures = __webpack_require__(56600);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_gojs-react@1.1.2@gojs-react/lib/esm/gojsreact.js + 1 modules
|
|
|
|
|
var gojsreact = __webpack_require__(85160);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
|
|
var es_modal = __webpack_require__(43418);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
|
|
|
|
|
var col = __webpack_require__(43604);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
|
|
var fetch = __webpack_require__(87101);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/flow-chart/index.less?modules
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
/* harmony default export */ var flow_chartmodules = ({"myPaletteDiv":"myPaletteDiv___Xjz2I"});
|
|
|
|
|
/* harmony default export */ var flow_chartmodules = ({"myPaletteDiv":"myPaletteDiv___Xjz2I","maxH60":"maxH60___Pd4Re"});
|
|
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/flow-chart/index.tsx
|
|
|
|
|
var __async = (__this, __arguments, generator) => {
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
@ -1370,11 +1374,12 @@ window.go = go_module;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function FlowChart({ callback }) {
|
|
|
|
|
console.log("callback:", callback);
|
|
|
|
|
function FlowChart({ onCancel, callback }) {
|
|
|
|
|
let myDiagram = (0,_react_17_0_2_react.useRef)().current;
|
|
|
|
|
let myDiagramDivRef = (0,_react_17_0_2_react.useRef)();
|
|
|
|
|
let myPaletteDivRef = (0,_react_17_0_2_react.useRef)();
|
|
|
|
|
let hidedenContentRef = (0,_react_17_0_2_react.useRef)(false);
|
|
|
|
|
const [modal, contextHolder] = es_modal["default"].useModal();
|
|
|
|
|
function initDiagram() {
|
|
|
|
|
var _a;
|
|
|
|
|
const $ = go_module.GraphObject.make;
|
|
|
|
|
@ -2281,14 +2286,34 @@ function FlowChart({ callback }) {
|
|
|
|
|
});
|
|
|
|
|
callback({ src: res.url });
|
|
|
|
|
});
|
|
|
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { width: "100%", height: "80vh", overflow: "hidden", position: "relative" } }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { display: "flex", height: "100%" } }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { width: "300px", height: "100%" } }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { background: "#fff", position: "relative", zIndex: 12, fontSize: 16, color: "#3061d0" } }, "\u56FE\u5F62\u5E93"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { height: "calc(100% - 50px)" }, className: flow_chartmodules.myPaletteDiv, ref: myPaletteDivRef })), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { flex: 1, position: "relative" } }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
|
|
|
gojsreact/* ReactDiagram */.FI,
|
|
|
|
|
{
|
|
|
|
|
initDiagram,
|
|
|
|
|
divClassName: "diagram-component",
|
|
|
|
|
style: { height: "80vh" }
|
|
|
|
|
}
|
|
|
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { ref: myDiagramDivRef }))), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "tr" }, /* @__PURE__ */ _react_17_0_2_react.createElement(es_button/* default */.ZP, { size: "large", onClick: save, style: { position: "absolute", right: 0, bottom: 0, zIndex: 8 }, type: "primary" }, "\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")));
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
|
|
|
const instance = modal.confirm({
|
|
|
|
|
width: 1200,
|
|
|
|
|
icon: null,
|
|
|
|
|
footer: null,
|
|
|
|
|
closable: true,
|
|
|
|
|
onCancel,
|
|
|
|
|
className: "body-overflow-initial",
|
|
|
|
|
title: /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, null, /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { flex: 1 }, "\u63D2\u5165\u6D41\u7A0B\u56FE"), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { onClick: () => {
|
|
|
|
|
hidedenContentRef.current = !hidedenContentRef.current;
|
|
|
|
|
instance.update(
|
|
|
|
|
{ icon: null, className: hidedenContentRef.current ? `${flow_chartmodules.maxH60} body-overflow-initial` : "body-overflow-initial", width: 1200 }
|
|
|
|
|
);
|
|
|
|
|
} }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "current c-blue mr30", style: { fontWeight: 400 } }, "\u5C55\u5F00/\u6536\u8D77"))),
|
|
|
|
|
content: /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { width: "100%", height: "80vh", overflow: "hidden", position: "relative" } }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { display: "flex", height: "100%" } }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { width: "300px", height: "100%" } }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { background: "#fff", position: "relative", zIndex: 12, fontSize: 16, color: "#3061d0" } }, "\u56FE\u5F62\u5E93"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { height: "calc(100% - 50px)" }, className: flow_chartmodules.myPaletteDiv, ref: myPaletteDivRef })), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { flex: 1, position: "relative" } }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
|
|
|
gojsreact/* ReactDiagram */.FI,
|
|
|
|
|
{
|
|
|
|
|
initDiagram,
|
|
|
|
|
divClassName: "diagram-component",
|
|
|
|
|
style: { height: "80vh" }
|
|
|
|
|
}
|
|
|
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { ref: myDiagramDivRef }))), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "tr" }, /* @__PURE__ */ _react_17_0_2_react.createElement(es_button/* default */.ZP, { size: "large", onClick: save, style: { position: "absolute", right: 0, bottom: 0, zIndex: 8 }, type: "primary" }, "\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))
|
|
|
|
|
});
|
|
|
|
|
return () => {
|
|
|
|
|
instance.destroy();
|
|
|
|
|
};
|
|
|
|
|
}, []);
|
|
|
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, contextHolder);
|
|
|
|
|
}
|
|
|
|
|
/* harmony default export */ var flow_chart = (FlowChart);
|
|
|
|
|
|
|
|
|
|
@ -2336,8 +2361,6 @@ const add_table_panel_style = {
|
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
|
|
var env = __webpack_require__(64741);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
|
|
var es_modal = __webpack_require__(43418);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/constant.ts
|
|
|
|
|
const LINK = "link";
|
|
|
|
|
const UPLOAD_IMAGE = "upload-image";
|
|
|
|
|
@ -3022,7 +3045,7 @@ const TitleDesc = {
|
|
|
|
|
}
|
|
|
|
|
),
|
|
|
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "markdown-editor-body" }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "codemirror-container" }, /* @__PURE__ */ _react_17_0_2_react.createElement("textarea", { ref: cmEl, placeholder })), preview ? /* @__PURE__ */ _react_17_0_2_react.createElement("div", { ref: previewEl, className: "preview-container" }, mode === "stex" && /* @__PURE__ */ _react_17_0_2_react.createElement(RenderHtml_stex, { value }), mode !== "stex" && /* @__PURE__ */ _react_17_0_2_react.createElement(RenderHtml/* default */.Z, { disabledFill, showProgramFill: showNullProgramButton, value })) : null)
|
|
|
|
|
)), showResizeBar ? /* @__PURE__ */ _react_17_0_2_react.createElement("a", { ref: resizeBarEl, className: "editor-resize" }) : null, action === DRAW_IMAGE && /* @__PURE__ */ _react_17_0_2_react.createElement(draw_image, { callback: ExecutePluginAction, onCancel }), /* @__PURE__ */ _react_17_0_2_react.createElement(modal/* default */.Z, null, TitleDesc[action] && action !== DRAW_IMAGE ? /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
|
|
|
)), showResizeBar ? /* @__PURE__ */ _react_17_0_2_react.createElement("a", { ref: resizeBarEl, className: "editor-resize" }) : null, action === DRAW_IMAGE && /* @__PURE__ */ _react_17_0_2_react.createElement(draw_image, { callback: ExecutePluginAction, onCancel }), action === ADD_FLOWCHART && /* @__PURE__ */ _react_17_0_2_react.createElement(flow_chart, { callback: ExecutePluginAction, onCancel }), /* @__PURE__ */ _react_17_0_2_react.createElement(modal/* default */.Z, null, TitleDesc[action] && action !== DRAW_IMAGE && action !== ADD_FLOWCHART ? /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
|
|
|
es_modal["default"],
|
|
|
|
|
{
|
|
|
|
|
centered: true,
|
|
|
|
|
|