@flatbiz/antd 4.2.7 → 4.2.8
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import './index.css';
|
|
3
3
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
4
|
-
import{Editor as e}from"@wove/react/cjs/editor";import{a as t}from"../_rollupPluginBabelHelpers-1f4d8910.js";import{hooks as i}from"@wove/react/cjs/hooks";import{jsx as
|
|
4
|
+
import{Editor as e}from"@wove/react/cjs/editor";import{a as t}from"../_rollupPluginBabelHelpers-1f4d8910.js";import{hooks as i}from"@wove/react/cjs/hooks";import{jsx as r}from"react/jsx-runtime";var a=function a(l){var n=i.useCallbackRef((function(e,t){var i=t.getContent();var r=i?i:undefined;l.onChange==null?void 0:l.onChange(r)}));return r("div",{className:"v-editor-wrapper",children:r(e,t({value:l.value,cdnTinyMce:"https://file.40017.cn/tcsk/tinymce/tinymce.min.js",init:t({height:l.height||300,menubar:true,language:"zh_CN",paste_retain_style_properties:"all",table_default_styles:{width:"100%"},plugins:"advlist lists image charmap preview visualblocks code hr print media table paste help template fullscreen",toolbar:["undo redo fullscreen preview","formatselect bold italic backcolor bullist numlist","outdent indent alignleft aligncenter alignright alignjustify","textmark untextmark code preview","template link image help"].join("|"),fontsize_formats:"8px 10px 12px 14px 16px 18px 24px 36px 48px",autoresize_bottom_margin:50},l.editorInitParams)},l.editorProps,{onEditorChange:n}))})};export{a as EditorWrapper};
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["@flatbiz/antd/src/editor-wrapper/editor-wrapper.tsx"],"sourcesContent":["import { TPlainObject } from '@flatbiz/utils';\nimport { Editor, hooks } from '@wove/react';\nimport { CSSProperties } from 'react';\nimport './style.less';\nimport { varStyles } from './types';\n\nexport type EditorWrapperProps = {\n onChange?: (data?: string) => void;\n value?: string;\n editorInitParams?: TPlainObject;\n editorProps?: TPlainObject;\n varStyle?: Record<varStyles, CSSProperties['color']>;\n height?: number | string;\n};\n\n/**\n * 富文本编辑器,配置参考tinymce\n * @param props\n * @returns\n */\nexport const EditorWrapper = (props: EditorWrapperProps) => {\n const onChange = hooks.useCallbackRef((_, editor) => {\n const content = editor.getContent();\n const respValue = content ? content : undefined;\n props.onChange?.(respValue);\n });\n\n // const varStyleString = useMemo(() => {\n // const merge = { ...defaultVarStyle, ...props.varStyle };\n // let varStyleString = '';\n // Object.keys(merge).map((key) => {\n // varStyleString += `${key}:${merge[key]};`;\n // });\n // return varStyleString;\n // }, [props.varStyle]);\n\n return (\n <div className=\"v-editor-wrapper\">\n <Editor\n value={props.value}\n cdnTinyMce=\"https://file.40017.cn/tcsk/tinymce/tinymce.min.js\"\n init={{\n height: props.height || 300,\n menubar: true,\n language: 'zh_CN',\n paste_retain_style_properties: 'all',\n table_default_styles: {\n width: '100%',\n },\n plugins:\n 'advlist lists image charmap preview visualblocks code hr print media table paste help template',\n toolbar: [\n 'undo redo fullscreen preview',\n 'formatselect bold italic backcolor bullist numlist',\n 'outdent indent alignleft aligncenter alignright alignjustify',\n 'textmark untextmark code preview',\n 'template link image help',\n ].join('|'),\n fontsize_formats: '8px 10px 12px 14px 16px 18px 24px 36px 48px',\n autoresize_bottom_margin: 50,\n // templates: [\n // editorTemplates.block,\n // editorTemplates.primary_p,\n // editorTemplates.secondary_p,\n // editorTemplates.warning_p,\n // editorTemplates.danger_p,\n // editorTemplates.success_p,\n // editorTemplates.p,\n // ],\n // template_replace_values: {\n // varStyle: varStyleString,\n // },\n // template_preview_replace_values: {\n // varStyle: varStyleString,\n // },\n ...props.editorInitParams,\n }}\n {...props.editorProps}\n onEditorChange={onChange}\n />\n </div>\n );\n};\n\n/**\n * undo redo\n * codesample\n * fontselect fontsizeselect formatselect\n * image media link anchor\n * preview save print\n * emoticons(表情)\n */\n"],"names":["EditorWrapper","props","onChange","_hooks","useCallbackRef","_","editor","content","getContent","respValue","undefined","_jsx","className","children","_Editor","_extends","value","cdnTinyMce","init","height","menubar","language","paste_retain_style_properties","table_default_styles","width","plugins","toolbar","join","fontsize_formats","autoresize_bottom_margin","editorInitParams","editorProps","onEditorChange"],"mappings":";uMAoBaA,EAAgB,SAAhBA,EAAiBC,GAC5B,IAAMC,EAAWC,EAAMC,gBAAe,SAACC,EAAGC,GACxC,IAAMC,EAAUD,EAAOE,aACvB,IAAMC,EAAYF,EAAUA,EAAUG,UACtCT,EAAMC,UAAND,UAAAA,EAAAA,EAAMC,SAAWO,EACnB,IAWA,OACEE,EAAA,MAAA,CAAKC,UAAU,mBAAkBC,SAC/BF,EAAAG,EAAAC,EAAA,CACEC,MAAOf,EAAMe,MACbC,WAAW,oDACXC,KAAIH,EAAA,CACFI,OAAQlB,EAAMkB,QAAU,IACxBC,QAAS,KACTC,SAAU,QACVC,8BAA+B,MAC/BC,qBAAsB,CACpBC,MAAO,QAETC,QACE,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["@flatbiz/antd/src/editor-wrapper/editor-wrapper.tsx"],"sourcesContent":["import { TPlainObject } from '@flatbiz/utils';\nimport { Editor, hooks } from '@wove/react';\nimport { CSSProperties } from 'react';\nimport './style.less';\nimport { varStyles } from './types';\n\nexport type EditorWrapperProps = {\n onChange?: (data?: string) => void;\n value?: string;\n editorInitParams?: TPlainObject;\n editorProps?: TPlainObject;\n varStyle?: Record<varStyles, CSSProperties['color']>;\n height?: number | string;\n};\n\n/**\n * 富文本编辑器,配置参考tinymce\n * @param props\n * @returns\n */\nexport const EditorWrapper = (props: EditorWrapperProps) => {\n const onChange = hooks.useCallbackRef((_, editor) => {\n const content = editor.getContent();\n const respValue = content ? content : undefined;\n props.onChange?.(respValue);\n });\n\n // const varStyleString = useMemo(() => {\n // const merge = { ...defaultVarStyle, ...props.varStyle };\n // let varStyleString = '';\n // Object.keys(merge).map((key) => {\n // varStyleString += `${key}:${merge[key]};`;\n // });\n // return varStyleString;\n // }, [props.varStyle]);\n\n return (\n <div className=\"v-editor-wrapper\">\n <Editor\n value={props.value}\n cdnTinyMce=\"https://file.40017.cn/tcsk/tinymce/tinymce.min.js\"\n init={{\n height: props.height || 300,\n menubar: true,\n language: 'zh_CN',\n paste_retain_style_properties: 'all',\n table_default_styles: {\n width: '100%',\n },\n plugins:\n 'advlist lists image charmap preview visualblocks code hr print media table paste help template fullscreen',\n toolbar: [\n 'undo redo fullscreen preview',\n 'formatselect bold italic backcolor bullist numlist',\n 'outdent indent alignleft aligncenter alignright alignjustify',\n 'textmark untextmark code preview',\n 'template link image help',\n ].join('|'),\n fontsize_formats: '8px 10px 12px 14px 16px 18px 24px 36px 48px',\n autoresize_bottom_margin: 50,\n // templates: [\n // editorTemplates.block,\n // editorTemplates.primary_p,\n // editorTemplates.secondary_p,\n // editorTemplates.warning_p,\n // editorTemplates.danger_p,\n // editorTemplates.success_p,\n // editorTemplates.p,\n // ],\n // template_replace_values: {\n // varStyle: varStyleString,\n // },\n // template_preview_replace_values: {\n // varStyle: varStyleString,\n // },\n ...props.editorInitParams,\n }}\n {...props.editorProps}\n onEditorChange={onChange}\n />\n </div>\n );\n};\n\n/**\n * undo redo\n * codesample\n * fontselect fontsizeselect formatselect\n * image media link anchor\n * preview save print\n * emoticons(表情)\n */\n"],"names":["EditorWrapper","props","onChange","_hooks","useCallbackRef","_","editor","content","getContent","respValue","undefined","_jsx","className","children","_Editor","_extends","value","cdnTinyMce","init","height","menubar","language","paste_retain_style_properties","table_default_styles","width","plugins","toolbar","join","fontsize_formats","autoresize_bottom_margin","editorInitParams","editorProps","onEditorChange"],"mappings":";uMAoBaA,EAAgB,SAAhBA,EAAiBC,GAC5B,IAAMC,EAAWC,EAAMC,gBAAe,SAACC,EAAGC,GACxC,IAAMC,EAAUD,EAAOE,aACvB,IAAMC,EAAYF,EAAUA,EAAUG,UACtCT,EAAMC,UAAND,UAAAA,EAAAA,EAAMC,SAAWO,EACnB,IAWA,OACEE,EAAA,MAAA,CAAKC,UAAU,mBAAkBC,SAC/BF,EAAAG,EAAAC,EAAA,CACEC,MAAOf,EAAMe,MACbC,WAAW,oDACXC,KAAIH,EAAA,CACFI,OAAQlB,EAAMkB,QAAU,IACxBC,QAAS,KACTC,SAAU,QACVC,8BAA+B,MAC/BC,qBAAsB,CACpBC,MAAO,QAETC,QACE,4GACFC,QAAS,CACP,+BACA,qDACA,+DACA,mCACA,4BACAC,KAAK,KACPC,iBAAkB,8CAClBC,yBAA0B,IAgBvB5B,EAAM6B,mBAEP7B,EAAM8B,YAAW,CACrBC,eAAgB9B,MAIxB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flatbiz/antd",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.8",
|
|
4
4
|
"description": "flat-biz oss ui components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@dimjs/model-react": ">=1.1.8",
|
|
33
33
|
"@dimjs/utils": ">=1.2.33",
|
|
34
34
|
"@flatbiz/utils": ">=4.0.4",
|
|
35
|
-
"@wove/react": ">=1.2.
|
|
35
|
+
"@wove/react": ">=1.2.23",
|
|
36
36
|
"antd": ">=5.2.1",
|
|
37
37
|
"dayjs": ">=1.11.7",
|
|
38
38
|
"react": ">=18.2.0",
|