@flatbiz/antd 5.2.4 → 5.2.6
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/dist/ace-editor-mysql/index.js +2 -3
- package/dist/ace-editor-mysql/index.js.map +1 -1
- package/dist/content-DQTZHavT.js +404 -0
- package/dist/content-DQTZHavT.js.map +1 -0
- package/dist/{drawer-BGqWxVP9.js → drawer-1AS_mYsB.js} +8 -4
- package/dist/drawer-1AS_mYsB.js.map +1 -0
- package/dist/easy-table/index.d.ts +3 -0
- package/dist/easy-table/index.js +3 -3
- package/dist/easy-table/index.js.map +1 -1
- package/dist/{editor-DSdmtJGj.js → editor-KE1W0BsN.js} +10 -4
- package/dist/editor-KE1W0BsN.js.map +1 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/markdown-editor/index.css +0 -0
- package/dist/markdown-editor/index.d.ts +40 -0
- package/dist/markdown-editor/index.js +15 -0
- package/dist/markdown-editor/index.js.map +1 -0
- package/dist/pre-defined-class-name/index.css +1 -1
- package/dist/resizable-drawer/index.d.ts +10 -0
- package/dist/resizable-drawer/index.js +1 -1
- package/dist/tree-wrapper/index.js +2 -2
- package/dist/tree-wrapper/index.js.map +1 -1
- package/package.json +11 -6
- package/dist/drawer-BGqWxVP9.js.map +0 -1
- package/dist/editor-DSdmtJGj.js.map +0 -1
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import { a as _slicedToArray, _ as _objectWithoutProperties, b as _objectSpread2 } from './_rollupPluginBabelHelpers-BspM60Sw.js';
|
|
4
4
|
import { classNames } from '@dimjs/utils/class-names/class-names';
|
|
5
|
-
import { useState, useRef } from 'react';
|
|
5
|
+
import { useState, useRef, useEffect } from 'react';
|
|
6
6
|
import Ace from 'react-ace';
|
|
7
7
|
import { useMemoizedFn } from 'ahooks';
|
|
8
|
-
import {
|
|
8
|
+
import { loadScripts } from '@flatbiz/utils';
|
|
9
9
|
import { B as ButtonWrapper } from './button-wrapper-BGjkUPpk.js';
|
|
10
10
|
import { E as ErrorBoundaryWrapper } from './error-boundary-D6RX4EQZ.js';
|
|
11
11
|
import 'ace-builds/src-noconflict/ext-language_tools.js';
|
|
@@ -15,7 +15,8 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
15
15
|
|
|
16
16
|
var _excluded = ["value", "hiddenFormatterBtn", "autoCompleterList", "onChange", "onLoad"];
|
|
17
17
|
var formatSql = function formatSql(sqlContent) {
|
|
18
|
-
|
|
18
|
+
var sqlFormatter = window['sqlFormatter'];
|
|
19
|
+
return sqlFormatter === null || sqlFormatter === void 0 ? void 0 : sqlFormatter.format(sqlContent, {
|
|
19
20
|
language: 'sql'
|
|
20
21
|
}).replace(/\$ /g, '$').replace(/\{ /g, '{').replace(/ \}/g, '}');
|
|
21
22
|
};
|
|
@@ -31,6 +32,11 @@ var AceEditorMysql = function AceEditorMysql(props) {
|
|
|
31
32
|
onLoad = props.onLoad,
|
|
32
33
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
33
34
|
var editorRef = useRef();
|
|
35
|
+
useEffect(function () {
|
|
36
|
+
loadScripts({
|
|
37
|
+
scriptUrls: ['//oss.ly.com/newpay/cdn/sql-formatter/15.6.6/index.min.js']
|
|
38
|
+
});
|
|
39
|
+
}, []);
|
|
34
40
|
var handleChange = useMemoizedFn(function (content) {
|
|
35
41
|
onChange === null || onChange === void 0 || onChange(content);
|
|
36
42
|
});
|
|
@@ -116,4 +122,4 @@ var AceEditorMysql = function AceEditorMysql(props) {
|
|
|
116
122
|
};
|
|
117
123
|
|
|
118
124
|
export { AceEditorMysql as A };
|
|
119
|
-
//# sourceMappingURL=editor-
|
|
125
|
+
//# sourceMappingURL=editor-KE1W0BsN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-KE1W0BsN.js","sources":["@flatbiz/antd/src/ace-editor-mysql/editor.tsx"],"sourcesContent":["import type { CSSProperties, ReactElement } from 'react';\nimport { useEffect, useRef, useState } from 'react';\nimport type { IAceEditorProps } from 'react-ace';\nimport Ace from 'react-ace';\nimport { useMemoizedFn } from 'ahooks';\nimport { classNames } from '@dimjs/utils';\nimport { loadScripts, type TAny } from '@flatbiz/utils';\nimport { ButtonWrapper } from '../button-wrapper/button-wrapper.jsx';\nimport { ErrorBoundaryWrapper } from '../error-boundary-wrapper/error-boundary.jsx';\nimport 'ace-builds/src-noconflict/ext-language_tools.js';\nimport 'ace-builds/src-noconflict/mode-mysql.js';\nimport 'ace-builds/src-noconflict/snippets/mysql.js';\n\nconst formatSql = (sqlContent: string) => {\n const sqlFormatter = window['sqlFormatter'];\n return sqlFormatter\n ?.format(sqlContent, { language: 'sql' })\n .replace(/\\$ /g, '$')\n .replace(/\\{ /g, '{')\n .replace(/ \\}/g, '}');\n};\n\nexport type AceEditorMysqlProps = Omit<\n IAceEditorProps,\n 'theme' | 'mode' | 'value' | 'onChange'\n> & {\n /** 编辑器高度,默认值:100%,可输入值例如 300px、100% */\n height?: string;\n value?: string;\n onChange?: (value?: string) => void;\n /** 配置输入自动提示关键字 */\n autoCompleterList?: { name: string; desc?: string }[];\n /** 隐藏【美化】按钮 */\n hiddenFormatterBtn?: boolean;\n /**\n * 编辑器主题配置,例如:github、terminal、xcode\n * ```\n * 1. 顶部引入 import 'ace-builds/src-noconflict/theme-xxxx';\n * 2. 配置 theme = xxxx\n * ```\n */\n theme?: string;\n /** 底部额外布局 */\n footerExtraRender?: (children: ReactElement) => ReactElement;\n footerStyle?: CSSProperties;\n};\n\nexport const AceEditorMysql = (props: AceEditorMysqlProps) => {\n const [rootNodekey, setRootNodekey] = useState(Date.now());\n const {\n value,\n hiddenFormatterBtn,\n autoCompleterList,\n onChange,\n onLoad,\n ...otherProps\n } = props;\n\n const editorRef = useRef<TAny>();\n\n useEffect(() => {\n loadScripts({\n scriptUrls: ['//oss.ly.com/newpay/cdn/sql-formatter/15.6.6/index.min.js'],\n });\n }, []);\n\n const handleChange = useMemoizedFn((content: string) => {\n onChange?.(content);\n });\n\n const getCompletions = useMemoizedFn((_a, _b, _c, _d, callback) => {\n callback(\n null,\n autoCompleterList?.map((item) => ({\n name: item.name,\n value: item.name,\n // score: 100,\n meta: item.desc,\n }))\n );\n });\n\n const onLoadHandle = (editor) => {\n editorRef.current = editor;\n /** 向编辑器中添加自动补全列表 */\n const findIndex = editor.completers.findIndex(\n (item) => item.id === 'custom'\n );\n if (findIndex >= 0) {\n editor.completers[findIndex] = { getCompletions, id: 'custom' };\n } else {\n editor.completers.push({ getCompletions, id: 'custom' });\n }\n onLoad?.(editor);\n };\n\n const footer = (\n <ButtonWrapper\n hidden={hiddenFormatterBtn === true}\n type=\"primary\"\n ghost\n onClick={() => {\n const currentValue = editorRef.current?.getValue();\n onChange?.(formatSql(currentValue || ''));\n }}\n >\n 美化\n </ButtonWrapper>\n );\n\n const Element = ((Ace as any)?.['default'] || (Ace as any)) as any;\n\n return (\n <div\n key={rootNodekey}\n className={classNames('ace-editor-mysql', props.className)}\n style={props.style}\n >\n <ErrorBoundaryWrapper\n onRenderReset={() => {\n onChange?.(undefined);\n setRootNodekey(Date.now());\n }}\n >\n <Element\n fontSize={14}\n showPrintMargin={true}\n showGutter={true}\n highlightActiveLine={true}\n placeholder=\"输入SQL\"\n height=\"250px\"\n width=\"auto\"\n {...otherProps}\n setOptions={{\n useWorker: false,\n enableBasicAutocompletion: false,\n enableLiveAutocompletion: true,\n enableSnippets: false,\n showLineNumbers: true,\n tabSize: 2,\n ...otherProps.setOptions,\n }}\n mode=\"mysql\"\n onLoad={onLoadHandle}\n onChange={handleChange}\n value={value}\n />\n </ErrorBoundaryWrapper>\n <div\n className=\"ace-editor-mysql-footer\"\n style={{ marginTop: 10, ...props.footerStyle }}\n >\n {props.footerExtraRender ? props.footerExtraRender(footer) : footer}\n </div>\n </div>\n );\n};\n"],"names":["formatSql","sqlContent","sqlFormatter","window","format","language","replace","AceEditorMysql","props","_useState","useState","Date","now","_useState2","_slicedToArray","rootNodekey","setRootNodekey","value","hiddenFormatterBtn","autoCompleterList","onChange","onLoad","otherProps","_objectWithoutProperties","_excluded","editorRef","useRef","useEffect","loadScripts","scriptUrls","handleChange","useMemoizedFn","content","getCompletions","_a","_b","_c","_d","callback","map","item","name","meta","desc","onLoadHandle","editor","current","findIndex","completers","id","push","footer","_jsx","ButtonWrapper","hidden","type","ghost","onClick","_editorRef$current","currentValue","getValue","children","Element","Ace","_jsxs","className","_classNames","style","ErrorBoundaryWrapper","onRenderReset","undefined","_objectSpread","fontSize","showPrintMargin","showGutter","highlightActiveLine","placeholder","height","width","setOptions","useWorker","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets","showLineNumbers","tabSize","mode","marginTop","footerStyle","footerExtraRender"],"mappings":";;;;;;;;;;;;;;;;AAaA,IAAMA,SAAS,GAAG,SAAZA,SAASA,CAAIC,UAAkB,EAAK;AACxC,EAAA,IAAMC,YAAY,GAAGC,MAAM,CAAC,cAAc,CAAC;EAC3C,OAAOD,YAAY,aAAZA,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZA,YAAY,CACfE,MAAM,CAACH,UAAU,EAAE;AAAEI,IAAAA,QAAQ,EAAE;GAAO,CAAC,CACxCC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CACpBA,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CACpBA,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;AACzB,CAAC;IA2BYC,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,KAA0B,EAAK;EAC5D,IAAAC,SAAA,GAAsCC,QAAQ,CAACC,IAAI,CAACC,GAAG,EAAE,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAL,SAAA,EAAA,CAAA,CAAA;AAAnDM,IAAAA,WAAW,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,cAAc,GAAAH,UAAA,CAAA,CAAA,CAAA;AAClC,EAAA,IACEI,KAAK,GAMHT,KAAK,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BAAyB;AACnCE,MAAAA,KAAK,EAAAI,cAAA,CAAA;AAAIgB,QAAAA,SAAS,EAAE;OAAE,EAAK/E,KAAK,CAACgF,WAAW,CAAG;MAAA3B,QAAA,EAE9CrD,KAAK,CAACiF,iBAAiB,GAAGjF,KAAK,CAACiF,iBAAiB,CAACtC,MAAM,CAAC,GAAGA;AAAM,KAChE,CAAC;AAAA,GAAA,EAvCDpC,WAwCF,CAAC;AAEV;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2999,6 +2999,9 @@ export type EasyTableProps = {
|
|
|
2999
2999
|
/**
|
|
3000
3000
|
* 1. 查询条件Form initialValues
|
|
3001
3001
|
* 2. 接口其他参数,例如常量类型
|
|
3002
|
+
* ```
|
|
3003
|
+
* 如果设置 cacheKey,则查询参数会被缓存,缓存数据优先级高于 initialValues
|
|
3004
|
+
* ```
|
|
3002
3005
|
*/
|
|
3003
3006
|
initialValues?: TPlainObject;
|
|
3004
3007
|
/** 分页单页条数,默认值:10 */
|
|
@@ -4427,6 +4430,42 @@ export declare const LocalLoading: import("react").ForwardRefExoticComponent<Loc
|
|
|
4427
4430
|
onRequest: (params?: TPlainObject) => void;
|
|
4428
4431
|
};
|
|
4429
4432
|
};
|
|
4433
|
+
export type MarkdownEditorProps = {
|
|
4434
|
+
style?: CSSProperties;
|
|
4435
|
+
className?: string;
|
|
4436
|
+
value?: string;
|
|
4437
|
+
onChange?: (value?: string) => void;
|
|
4438
|
+
/** 图片上传回调,配置后,在工具栏中显示上传图片按钮 */
|
|
4439
|
+
onUploadImage?: (file: File) => Promise<string>;
|
|
4440
|
+
/**
|
|
4441
|
+
* 当高度参数为百分比时,拖动条无效
|
|
4442
|
+
* ```
|
|
4443
|
+
* 1. 当readonly=true、readonlyHeightAuto=true时,当前配置失效
|
|
4444
|
+
* ```
|
|
4445
|
+
*/
|
|
4446
|
+
height?: number | string;
|
|
4447
|
+
/** 是否隐藏工具栏 */
|
|
4448
|
+
hideToolbar?: boolean;
|
|
4449
|
+
/** 是否可拖拽高度操作,默认值:true */
|
|
4450
|
+
visibleDragbar?: boolean;
|
|
4451
|
+
/** 是否只读,设置后会隐藏工具栏部分功能 */
|
|
4452
|
+
readonly?: boolean;
|
|
4453
|
+
/** 只读高度自适应,设置为 true 时,会根据内容自动调整高度,默认值:true */
|
|
4454
|
+
readonlyHeightAuto?: boolean;
|
|
4455
|
+
/** 是否暗色模式,默认值:false */
|
|
4456
|
+
darkMode?: boolean;
|
|
4457
|
+
};
|
|
4458
|
+
/**
|
|
4459
|
+
* markdown编辑器
|
|
4460
|
+
* ```
|
|
4461
|
+
* 1. 使用@uiw/react-md-editor组件
|
|
4462
|
+
* 2. 动态加载 mermaid.js 和 mdeditor.js 和 mdeditor.css
|
|
4463
|
+
* //oss.ly.com/newpay/cdn/react-md-editor/mermaid.11.12.0.min.js
|
|
4464
|
+
* //oss.ly.com/newpay/cdn/react-md-editor/4.0.11/mdeditor.min.js
|
|
4465
|
+
* //oss.ly.com/newpay/cdn/react-md-editor/4.0.11/mdeditor.min.css
|
|
4466
|
+
* ```
|
|
4467
|
+
*/
|
|
4468
|
+
export declare const MarkdownEditor: (props: MarkdownEditorProps) => import("react").JSX.Element;
|
|
4430
4469
|
export type MentionsWrapperRef = {
|
|
4431
4470
|
getInputInstance: () => any;
|
|
4432
4471
|
};
|
|
@@ -4847,6 +4886,16 @@ export type ResizableDrawerProps = {
|
|
|
4847
4886
|
onOk?: (e: React.MouseEvent<HTMLElement>) => void | Promise<void>;
|
|
4848
4887
|
cancelText?: string;
|
|
4849
4888
|
okText?: string;
|
|
4889
|
+
/** 最小宽度,默认值:400 */
|
|
4890
|
+
minConstraints?: [
|
|
4891
|
+
number,
|
|
4892
|
+
number
|
|
4893
|
+
];
|
|
4894
|
+
/** 最大宽度,默认值:1200 */
|
|
4895
|
+
maxConstraints?: [
|
|
4896
|
+
number,
|
|
4897
|
+
number
|
|
4898
|
+
];
|
|
4850
4899
|
};
|
|
4851
4900
|
export declare const ResizableDrawer: FC<ResizableDrawerProps>;
|
|
4852
4901
|
export interface RichTextEditorProps extends Omit<IAllProps, "onChange" | "init"> {
|
package/dist/index.js
CHANGED
|
@@ -77,6 +77,7 @@ import './input-text-area-wrapper/index.css';
|
|
|
77
77
|
import './input-wrapper/index.css';
|
|
78
78
|
import './label-value-render/index.css';
|
|
79
79
|
import './local-loading/index.css';
|
|
80
|
+
import './markdown-editor/index.css';
|
|
80
81
|
import './mention-editor/index.css';
|
|
81
82
|
import './mentions-wrapper/index.css';
|
|
82
83
|
import './modal-action/index.css';
|
|
@@ -135,7 +136,7 @@ import './index.css';
|
|
|
135
136
|
export { A as AceEditorGroovy } from './editor-DAPkU6O3.js';
|
|
136
137
|
export { A as AceEditorJava } from './editor-CGhK1Jlw.js';
|
|
137
138
|
export { A as AceEditorJson } from './editor-CbMpnwGo.js';
|
|
138
|
-
export { A as AceEditorMysql } from './editor-
|
|
139
|
+
export { A as AceEditorMysql } from './editor-KE1W0BsN.js';
|
|
139
140
|
export { A as AceEditorXml } from './editor-DZQ3NHrz.js';
|
|
140
141
|
export { A as AlertWrapper } from './alert-DGRFbqqK.js';
|
|
141
142
|
export { A as AmountFenInput } from './amount-fen-input-DI4mxLeO.js';
|
|
@@ -210,6 +211,7 @@ export { I as InputTextAreaWrapper } from './input-text-area-wrapper-xOYbr_W-.js
|
|
|
210
211
|
export { I as InputWrapper } from './input-wrapper-BlzWXhi9.js';
|
|
211
212
|
export { L as LabelValueRender } from './label-value-PpVVP7P9.js';
|
|
212
213
|
export { LocalLoading } from './local-loading/index.js';
|
|
214
|
+
export { M as MarkdownEditor } from './content-DQTZHavT.js';
|
|
213
215
|
export { M as MentionEditor } from './mention-editor-DKDH7LIL.js';
|
|
214
216
|
export { M as MentionsWrapper } from './mentions-B9WSplSU.js';
|
|
215
217
|
export { M as ModalAction } from './modal-action-kQ60nGCG.js';
|
|
@@ -225,7 +227,7 @@ export { preDefinedClassName } from './pre-defined-class-name/index.js';
|
|
|
225
227
|
export { R as RadioGroupWrapper } from './radio-group-wrapper-Dip9OsdR.js';
|
|
226
228
|
export { R as RelationTree } from './relation-tree-DuFa9fTc.js';
|
|
227
229
|
export { R as RequestStatus } from './request-status-Cjtei7Bl.js';
|
|
228
|
-
export { R as ResizableDrawer } from './drawer-
|
|
230
|
+
export { R as ResizableDrawer } from './drawer-1AS_mYsB.js';
|
|
229
231
|
export { R as RichTextEditor } from './rich-text-editor-k8SgoKVU.js';
|
|
230
232
|
export { R as RichTextViewer } from './rich-text-viewer-BuOKtoaJ.js';
|
|
231
233
|
export { R as RollLocationCenter } from './center-DgQUmnwe.js';
|
|
@@ -277,7 +279,6 @@ import 'ace-builds/src-noconflict/mode-java.js';
|
|
|
277
279
|
import 'ace-builds/src-noconflict/snippets/java.js';
|
|
278
280
|
import 'ace-builds/src-noconflict/mode-json.js';
|
|
279
281
|
import 'ace-builds/src-noconflict/snippets/json.js';
|
|
280
|
-
import 'sql-formatter';
|
|
281
282
|
import 'ace-builds/src-noconflict/mode-mysql.js';
|
|
282
283
|
import 'ace-builds/src-noconflict/snippets/mysql.js';
|
|
283
284
|
import 'antd';
|
|
@@ -340,6 +341,7 @@ import '@dimjs/model';
|
|
|
340
341
|
import './use-responsive-point-Bp3D3lZT.js';
|
|
341
342
|
import '@ant-design/icons/es/icons/QuestionCircleFilled.js';
|
|
342
343
|
import '@dimjs/lang/is-deep-equal';
|
|
344
|
+
import 'rehype-rewrite';
|
|
343
345
|
import 'react-resizable';
|
|
344
346
|
import '@tinymce/tinymce-react';
|
|
345
347
|
import '@ant-design/icons/es/icons/PlusCircleOutlined.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
File without changes
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
|
|
3
|
+
export type MarkdownEditorProps = {
|
|
4
|
+
style?: CSSProperties;
|
|
5
|
+
className?: string;
|
|
6
|
+
value?: string;
|
|
7
|
+
onChange?: (value?: string) => void;
|
|
8
|
+
/** 图片上传回调,配置后,在工具栏中显示上传图片按钮 */
|
|
9
|
+
onUploadImage?: (file: File) => Promise<string>;
|
|
10
|
+
/**
|
|
11
|
+
* 当高度参数为百分比时,拖动条无效
|
|
12
|
+
* ```
|
|
13
|
+
* 1. 当readonly=true、readonlyHeightAuto=true时,当前配置失效
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
height?: number | string;
|
|
17
|
+
/** 是否隐藏工具栏 */
|
|
18
|
+
hideToolbar?: boolean;
|
|
19
|
+
/** 是否可拖拽高度操作,默认值:true */
|
|
20
|
+
visibleDragbar?: boolean;
|
|
21
|
+
/** 是否只读,设置后会隐藏工具栏部分功能 */
|
|
22
|
+
readonly?: boolean;
|
|
23
|
+
/** 只读高度自适应,设置为 true 时,会根据内容自动调整高度,默认值:true */
|
|
24
|
+
readonlyHeightAuto?: boolean;
|
|
25
|
+
/** 是否暗色模式,默认值:false */
|
|
26
|
+
darkMode?: boolean;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* markdown编辑器
|
|
30
|
+
* ```
|
|
31
|
+
* 1. 使用@uiw/react-md-editor组件
|
|
32
|
+
* 2. 动态加载 mermaid.js 和 mdeditor.js 和 mdeditor.css
|
|
33
|
+
* //oss.ly.com/newpay/cdn/react-md-editor/mermaid.11.12.0.min.js
|
|
34
|
+
* //oss.ly.com/newpay/cdn/react-md-editor/4.0.11/mdeditor.min.js
|
|
35
|
+
* //oss.ly.com/newpay/cdn/react-md-editor/4.0.11/mdeditor.min.css
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export declare const MarkdownEditor: (props: MarkdownEditorProps) => import("react").JSX.Element;
|
|
39
|
+
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import './index.css';
|
|
3
|
+
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
4
|
+
|
|
5
|
+
export { M as MarkdownEditor } from '../content-DQTZHavT.js';
|
|
6
|
+
import '../_rollupPluginBabelHelpers-BspM60Sw.js';
|
|
7
|
+
import '@ant-design/icons/es/icons/CloseCircleFilled.js';
|
|
8
|
+
import 'react';
|
|
9
|
+
import 'antd';
|
|
10
|
+
import '@flatbiz/utils';
|
|
11
|
+
import '@dimjs/utils/class-names/class-names';
|
|
12
|
+
import 'ahooks';
|
|
13
|
+
import 'rehype-rewrite';
|
|
14
|
+
import 'react/jsx-runtime';
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.form-item-label-70.ant-form-item .ant-form-item-label{width:70px}.form-item-label-80.ant-form-item .ant-form-item-label{width:80px}.form-item-label-90.ant-form-item .ant-form-item-label{width:90px}.form-item-label-100.ant-form-item .ant-form-item-label{width:100px}.form-item-label-110.ant-form-item .ant-form-item-label{width:110px}.form-item-label-120.ant-form-item .ant-form-item-label{width:120px}.form-item-label-130.ant-form-item .ant-form-item-label{width:130px}.form-item-label-140.ant-form-item .ant-form-item-label{width:140px}.form-item-label-150.ant-form-item .ant-form-item-label{width:150px}.form-item-label-160.ant-form-item .ant-form-item-label{width:160px}.form-item-label-170.ant-form-item .ant-form-item-label{width:170px}.form-item-label-180.ant-form-item .ant-form-item-label{width:180px}.form-item-label-190.ant-form-item .ant-form-item-label{width:190px}.form-item-label-200.ant-form-item .ant-form-item-label{width:200px}.form-item-label-auto.ant-form-item .ant-form-item-row{flex-direction:row!important}.form-item-label-auto.ant-form-item .ant-form-item-label{width:auto!important}.form-item-label-auto.ant-form-item .ant-form-item-control{flex:1}.form-item-label-align-left.ant-form-item .ant-form-item-label{text-align:left}.form-item-label-align-right.ant-form-item .ant-form-item-label{text-align:right}.ant-form-item.form-item-label-value-vertical>.ant-form-item-row{flex-direction:column}.ant-form-item.form-item-label-value-vertical>.ant-form-item-row>.ant-form-item-label{text-align:left;width:100%}.ant-form-item.form-item-label-value-vertical>.ant-form-item-row>.ant-form-item-control{flex:initial}.form-label-70 .ant-form-item-label{width:70px}.form-label-80 .ant-form-item-label{width:80px}.form-label-90 .ant-form-item-label{width:90px}.form-label-100 .ant-form-item-label{width:100px}.form-label-110 .ant-form-item-label{width:110px}.form-label-120 .ant-form-item-label{width:120px}.form-label-130 .ant-form-item-label{width:130px}.form-label-140 .ant-form-item-label{width:140px}.form-label-150 .ant-form-item-label{width:150px}.form-label-160 .ant-form-item-label{width:160px}.form-label-170 .ant-form-item-label{width:170px}.form-label-180 .ant-form-item-label{width:180px}.form-label-190 .ant-form-item-label{width:190px}.form-label-200 .ant-form-item-label{width:200px}.form-label-auto .ant-form-item-label{width:auto}.form-label-align-left .ant-form-item-label{text-align:left}.form-label-align-right .ant-form-item-label{text-align:right}.form-label-value-vertical .ant-form-item:not(.form-item-label-auto) .ant-form-item-row{flex-direction:column}.form-label-value-vertical .ant-form-item:not(.form-item-label-auto) .ant-form-item-label{text-align:left;width:100%}.form-label-value-vertical .ant-form-item:not(.form-item-label-auto) .ant-form-item-control{flex:initial}.form-formitem-gap-24 .ant-form-item{margin-bottom:24px}.form-formitem-gap-15 .ant-form-item{margin-bottom:15px}.form-formitem-gap-8 .ant-form-item{margin-bottom:8px}.form-formitem-gap-5 .ant-form-item{margin-bottom:5px}.form-formitem-gap-0 .ant-form-item{margin-bottom:0}
|
|
1
|
+
.form-item-label-70.ant-form-item .ant-form-item-label{min-width:70px}.form-item-label-80.ant-form-item .ant-form-item-label{min-width:80px}.form-item-label-90.ant-form-item .ant-form-item-label{min-width:90px}.form-item-label-100.ant-form-item .ant-form-item-label{min-width:100px}.form-item-label-110.ant-form-item .ant-form-item-label{min-width:110px}.form-item-label-120.ant-form-item .ant-form-item-label{min-width:120px}.form-item-label-130.ant-form-item .ant-form-item-label{min-width:130px}.form-item-label-140.ant-form-item .ant-form-item-label{min-width:140px}.form-item-label-150.ant-form-item .ant-form-item-label{min-width:150px}.form-item-label-160.ant-form-item .ant-form-item-label{min-width:160px}.form-item-label-170.ant-form-item .ant-form-item-label{min-width:170px}.form-item-label-180.ant-form-item .ant-form-item-label{min-width:180px}.form-item-label-190.ant-form-item .ant-form-item-label{min-width:190px}.form-item-label-200.ant-form-item .ant-form-item-label{min-width:200px}.form-item-label-auto.ant-form-item .ant-form-item-row{flex-direction:row!important}.form-item-label-auto.ant-form-item .ant-form-item-label{width:auto!important}.form-item-label-auto.ant-form-item .ant-form-item-control{flex:1}.form-item-label-align-left.ant-form-item .ant-form-item-label{text-align:left}.form-item-label-align-right.ant-form-item .ant-form-item-label{text-align:right}.ant-form-item.form-item-label-value-vertical>.ant-form-item-row{flex-direction:column}.ant-form-item.form-item-label-value-vertical>.ant-form-item-row>.ant-form-item-label{text-align:left;width:100%}.ant-form-item.form-item-label-value-vertical>.ant-form-item-row>.ant-form-item-control{flex:initial}.form-label-70 .ant-form-item-label{min-width:70px}.form-label-80 .ant-form-item-label{min-width:80px}.form-label-90 .ant-form-item-label{min-width:90px}.form-label-100 .ant-form-item-label{min-width:100px}.form-label-110 .ant-form-item-label{min-width:110px}.form-label-120 .ant-form-item-label{min-width:120px}.form-label-130 .ant-form-item-label{min-width:130px}.form-label-140 .ant-form-item-label{min-width:140px}.form-label-150 .ant-form-item-label{min-width:150px}.form-label-160 .ant-form-item-label{min-width:160px}.form-label-170 .ant-form-item-label{min-width:170px}.form-label-180 .ant-form-item-label{min-width:180px}.form-label-190 .ant-form-item-label{min-width:190px}.form-label-200 .ant-form-item-label{min-width:200px}.form-label-auto .ant-form-item-label{min-width:auto}.form-label-align-left .ant-form-item-label{text-align:left}.form-label-align-right .ant-form-item-label{text-align:right}.form-label-value-vertical .ant-form-item:not(.form-item-label-auto) .ant-form-item-row{flex-direction:column}.form-label-value-vertical .ant-form-item:not(.form-item-label-auto) .ant-form-item-label{text-align:left;width:100%}.form-label-value-vertical .ant-form-item:not(.form-item-label-auto) .ant-form-item-control{flex:initial}.form-formitem-gap-24 .ant-form-item{margin-bottom:24px}.form-formitem-gap-15 .ant-form-item{margin-bottom:15px}.form-formitem-gap-8 .ant-form-item{margin-bottom:8px}.form-formitem-gap-5 .ant-form-item{margin-bottom:5px}.form-formitem-gap-0 .ant-form-item{margin-bottom:0}
|
|
@@ -22,6 +22,16 @@ export type ResizableDrawerProps = {
|
|
|
22
22
|
onOk?: (e: React.MouseEvent<HTMLElement>) => void | Promise<void>;
|
|
23
23
|
cancelText?: string;
|
|
24
24
|
okText?: string;
|
|
25
|
+
/** 最小宽度,默认值:400 */
|
|
26
|
+
minConstraints?: [
|
|
27
|
+
number,
|
|
28
|
+
number
|
|
29
|
+
];
|
|
30
|
+
/** 最大宽度,默认值:1200 */
|
|
31
|
+
maxConstraints?: [
|
|
32
|
+
number,
|
|
33
|
+
number
|
|
34
|
+
];
|
|
25
35
|
};
|
|
26
36
|
export declare const ResizableDrawer: FC<ResizableDrawerProps>;
|
|
27
37
|
|
|
@@ -3,7 +3,7 @@ import './../fba-hooks/index.css';
|
|
|
3
3
|
import './index.css';
|
|
4
4
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
5
5
|
|
|
6
|
-
export { R as ResizableDrawer } from '../drawer-
|
|
6
|
+
export { R as ResizableDrawer } from '../drawer-1AS_mYsB.js';
|
|
7
7
|
import '@ant-design/icons/es/icons/CloseOutlined.js';
|
|
8
8
|
import '../_rollupPluginBabelHelpers-BspM60Sw.js';
|
|
9
9
|
import '@dimjs/lang/is-promise';
|
|
@@ -8,7 +8,7 @@ import './../request-status/index.css';
|
|
|
8
8
|
import './index.css';
|
|
9
9
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
10
10
|
|
|
11
|
-
import { treeToArray, arrayToMap, isUndefinedOrNull, treeToTiledArray, treeLeafParentsArray, isNotEmptyArray, treeToTiledMap, getUuid, toArray, treeFilter,
|
|
11
|
+
import { treeToArray, arrayToMap, isUndefinedOrNull, treeToTiledArray, treeLeafParentsArray, isNotEmptyArray, treeToTiledMap, getUuid, toArray, treeFilter, findParentsElement, attachPropertiesToComponent } from '@flatbiz/utils';
|
|
12
12
|
import { isArray } from '@dimjs/lang/is-array';
|
|
13
13
|
import { Model } from '@dimjs/model-react';
|
|
14
14
|
import { arrayRemove } from '@dimjs/utils/array/array-remove';
|
|
@@ -1012,7 +1012,7 @@ var TreeWrapper$1 = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1012
1012
|
var targetEle = e.target;
|
|
1013
1013
|
var _value = targetEle.dataset.value;
|
|
1014
1014
|
if (isUndefinedOrNull(_value)) {
|
|
1015
|
-
targetEle =
|
|
1015
|
+
targetEle = findParentsElement(e.target, function (node) {
|
|
1016
1016
|
var _node$classList, _node$classList2;
|
|
1017
1017
|
return ((_node$classList = node.classList) === null || _node$classList === void 0 ? void 0 : _node$classList.contains('tree-item-title')) || ((_node$classList2 = node.classList) === null || _node$classList2 === void 0 ? void 0 : _node$classList2.contains('ant-tree-treenode'));
|
|
1018
1018
|
});
|