@elliemae/ds-wysiwygeditor 3.16.0-next.2 → 3.16.0-next.4
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/cjs/DSWYSIWYGEditor.js +13 -13
- package/dist/cjs/DSWYSIWYGEditor.js.map +2 -2
- package/dist/cjs/components/DSWYSIWYGEditorImpl.js.map +2 -2
- package/dist/cjs/package.json +7 -0
- package/dist/esm/DSWYSIWYGEditor.js +1 -1
- package/dist/esm/DSWYSIWYGEditor.js.map +1 -1
- package/dist/esm/components/DSWYSIWYGEditorImpl.js.map +2 -2
- package/dist/esm/package.json +7 -0
- package/dist/types/DSWYSIWYGEditor.d.ts +12 -12
- package/package.json +12 -11
|
@@ -32,7 +32,7 @@ module.exports = __toCommonJS(DSWYSIWYGEditor_exports);
|
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
34
|
var import_react = require("react");
|
|
35
|
-
var
|
|
35
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
36
|
var import_DSWYSIWYGEditorImpl = __toESM(require("./components/DSWYSIWYGEditorImpl"));
|
|
37
37
|
const DSWYSIWYGEditor = ({
|
|
38
38
|
value = "",
|
|
@@ -72,31 +72,31 @@ const DSWYSIWYGEditor = ({
|
|
|
72
72
|
);
|
|
73
73
|
};
|
|
74
74
|
const wysiwygEditorProps = {
|
|
75
|
-
value:
|
|
76
|
-
onChange:
|
|
75
|
+
value: import_ds_props_helpers.PropTypes.string.description("editors value").isRequired,
|
|
76
|
+
onChange: import_ds_props_helpers.PropTypes.func.description(
|
|
77
77
|
`(content, delta, source, editor) : Called back with the new contents of the editor after change.
|
|
78
78
|
It will be passed the HTML contents of the editor, a delta object expressing the change, the source of the change, and finally a read-only proxy to editor accessors such as getHTML().
|
|
79
79
|
\u26A0\uFE0F Do not use this delta object as value, as it will cause a loop.
|
|
80
80
|
Use editor.getContents() instead. See Using Deltas for details.
|
|
81
81
|
Read more: https://github.com/zenoamaro/react-quill#props`
|
|
82
82
|
).isRequired,
|
|
83
|
-
getQuillRef:
|
|
84
|
-
quillModules:
|
|
85
|
-
customToolbar:
|
|
86
|
-
toolbarHandlers:
|
|
87
|
-
showRawHTML:
|
|
88
|
-
height:
|
|
89
|
-
readOnly:
|
|
83
|
+
getQuillRef: import_ds_props_helpers.PropTypes.func.description("function to use quill.js ref"),
|
|
84
|
+
quillModules: import_ds_props_helpers.PropTypes.object.description("object to override quill modules"),
|
|
85
|
+
customToolbar: import_ds_props_helpers.PropTypes.element.description("custom toolbar"),
|
|
86
|
+
toolbarHandlers: import_ds_props_helpers.PropTypes.object.description("object with toolbar handlers"),
|
|
87
|
+
showRawHTML: import_ds_props_helpers.PropTypes.bool.description("whether to display html view or not").defaultValue(false),
|
|
88
|
+
height: import_ds_props_helpers.PropTypes.string.description("heigth of the editors text area"),
|
|
89
|
+
readOnly: import_ds_props_helpers.PropTypes.string.description(
|
|
90
90
|
"If true, the editor won't allow changing its contents. Wraps the Quill disable API."
|
|
91
91
|
),
|
|
92
|
-
hideItems:
|
|
93
|
-
zIndex:
|
|
92
|
+
hideItems: import_ds_props_helpers.PropTypes.object.description("object of defaultItems to be removed from toolbar").defaultValue({}),
|
|
93
|
+
zIndex: import_ds_props_helpers.PropTypes.number.description(
|
|
94
94
|
"zIndex to be used (required when used in a modal for correct tooltips displaying)"
|
|
95
95
|
)
|
|
96
96
|
};
|
|
97
97
|
DSWYSIWYGEditor.propTypes = wysiwygEditorProps;
|
|
98
98
|
DSWYSIWYGEditor.displayName = "DSWYSIWYGEditor";
|
|
99
|
-
const WYSIWYWithSchema = (0,
|
|
99
|
+
const WYSIWYWithSchema = (0, import_ds_props_helpers.describe)(DSWYSIWYGEditor);
|
|
100
100
|
WYSIWYWithSchema.propTypes = wysiwygEditorProps;
|
|
101
101
|
var DSWYSIWYGEditor_default = DSWYSIWYGEditor;
|
|
102
102
|
//# sourceMappingURL=DSWYSIWYGEditor.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSWYSIWYGEditor.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useState, useEffect } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsBnB;AAtBJ,mBAA2C;AAC3C,
|
|
4
|
+
"sourcesContent": ["import React, { useState, useEffect } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport DSWYSIWYGEditorImpl from './components/DSWYSIWYGEditorImpl';\n\nconst DSWYSIWYGEditor = ({\n value = '',\n onChange = () => null,\n getQuillRef = () => null,\n quillModules = {},\n customToolbar,\n toolbarHandlers,\n showRawHTML = false,\n height,\n hideItems,\n ...rest\n}) => {\n const emptyAction = () => {};\n const [showHTML, setShowHTML] = useState(showRawHTML);\n\n useEffect(() => setShowHTML(showRawHTML), [showRawHTML]);\n\n return (\n <DSWYSIWYGEditorImpl\n forceHttpLink\n handleCustomFieldClick={emptyAction}\n handleImageClick={emptyAction}\n quillOverrides={[]}\n value={value}\n onChange={onChange}\n getQuillRef={getQuillRef}\n quillModules={quillModules}\n customToolbar={customToolbar}\n toolbarHandlers={toolbarHandlers}\n showRawHTML={showHTML}\n onShowHTML={() => setShowHTML(!showHTML)}\n height={height}\n hideItems={hideItems}\n {...rest}\n />\n );\n};\n\nconst wysiwygEditorProps = {\n value: PropTypes.string.description('editors value').isRequired,\n onChange: PropTypes.func.description(\n `(content, delta, source, editor) : Called back with the new contents of the editor after change. \n It will be passed the HTML contents of the editor, a delta object expressing the change, the source of the change, and finally a read-only proxy to editor accessors such as getHTML(). \n \u26A0\uFE0F Do not use this delta object as value, as it will cause a loop. \n Use editor.getContents() instead. See Using Deltas for details. \n Read more: https://github.com/zenoamaro/react-quill#props`,\n ).isRequired,\n getQuillRef: PropTypes.func.description('function to use quill.js ref'),\n quillModules: PropTypes.object.description('object to override quill modules'),\n customToolbar: PropTypes.element.description('custom toolbar'),\n toolbarHandlers: PropTypes.object.description('object with toolbar handlers'),\n showRawHTML: PropTypes.bool.description('whether to display html view or not').defaultValue(false),\n height: PropTypes.string.description('heigth of the editors text area'),\n readOnly: PropTypes.string.description(\n \"If true, the editor won't allow changing its contents. Wraps the Quill disable API.\",\n ),\n hideItems: PropTypes.object.description('object of defaultItems to be removed from toolbar').defaultValue({}),\n zIndex: PropTypes.number.description(\n 'zIndex to be used (required when used in a modal for correct tooltips displaying)',\n ),\n};\n\nDSWYSIWYGEditor.propTypes = wysiwygEditorProps;\nDSWYSIWYGEditor.displayName = 'DSWYSIWYGEditor';\nconst WYSIWYWithSchema = describe(DSWYSIWYGEditor);\nWYSIWYWithSchema.propTypes = wysiwygEditorProps;\n\nexport { WYSIWYWithSchema, DSWYSIWYGEditor };\nexport default DSWYSIWYGEditor;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsBnB;AAtBJ,mBAA2C;AAC3C,8BAAoC;AACpC,iCAAgC;AAEhC,MAAM,kBAAkB,CAAC;AAAA,EACvB,QAAQ;AAAA,EACR,WAAW,MAAM;AAAA,EACjB,cAAc,MAAM;AAAA,EACpB,eAAe,CAAC;AAAA,EAChB;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA;AAAA,KACG;AACL,MAAM;AACJ,QAAM,cAAc,MAAM;AAAA,EAAC;AAC3B,QAAM,CAAC,UAAU,WAAW,QAAI,uBAAS,WAAW;AAEpD,8BAAU,MAAM,YAAY,WAAW,GAAG,CAAC,WAAW,CAAC;AAEvD,SACE;AAAA,IAAC,2BAAAA;AA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im.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\nimport React from 'react';\nimport ReactQuill, { Quill } from 'react-quill';\nimport BlotFormatter from 'quill-blot-formatter';\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\nimport React from 'react';\nimport ReactQuill, { Quill } from 'react-quill';\nimport BlotFormatter from 'quill-blot-formatter';\nimport ImageLibraryModal from './ImageLibraryModal';\nimport InsertFieldModal from './InsertFieldModal';\nimport { CustomToolbar } from './CustomToolbar';\nimport IndentStyle from '../quillOverrides/IndentStyle';\nimport LinkFormat from '../quillOverrides/LinkFormat';\nimport Image from '../quillOverrides/Image';\nimport { formatHTML } from '../utils';\nimport { clipboardLinkWithTagMatcher } from '../quillMatchers/clipboardLinkWithTagMatcher';\n\nQuill.register('modules/blotFormatter', BlotFormatter);\n\n// Fix block styled formats ----------------\nconst AlignStyle = Quill.import('attributors/style/align');\nconst FontStyle = Quill.import('attributors/style/font');\nFontStyle.whitelist = [\n // allow ONLY these fonts and the default\n 'serif',\n 'monospace',\n 'arial',\n 'comic-sans',\n 'courier-new',\n 'georgia',\n 'helvetica',\n 'lucida',\n];\nconst SizeStyle = Quill.import('attributors/style/size');\nSizeStyle.whitelist = [\n // allow ONLY these sizes and the default\n 'x-small',\n 'large',\n 'x-large',\n];\n\n// Fix Doc Viewer p tags extra margin issue ---------\nconst Block = Quill.import('blots/block');\nBlock.tagName = 'p';\nQuill.register(Block);\n\nQuill.register(AlignStyle, true);\nQuill.register(IndentStyle, true);\nQuill.register(FontStyle, true);\nQuill.register(SizeStyle, true);\n// -----------------------------------------\nQuill.register(Image, true);\n\nexport default class DSWYSIWYGEditorImpl extends React.PureComponent {\n quillModules = {\n toolbar: {\n container: this.props.toolbarContainer ? `#${this.props.toolbarContainer}` : '#toolbar',\n handlers: {\n ...this.props.toolbarHandlers,\n },\n },\n clipboard: {\n // toggle to add extra line breaks when pasting HTML:\n matchVisual: false,\n },\n blotFormatter: {\n // options... https://github.com/Fandom-OSS/quill-blot-formatter\n },\n ...this.props.quillModules,\n };\n\n constructor(props) {\n super(props);\n Quill.register(LinkFormat, true);\n if (props.quillOverrides.length) {\n props.quillOverrides.map((override) => Quill.register(override, true));\n }\n this.state = {\n isImageModalOpen: false,\n isFieldModalOpen: false,\n };\n const { toolbar } = this.quillModules;\n if (props.imagesData) {\n toolbar.handlers.image = (value) => {\n const { imagesData, handleImageClick } = this.props;\n if (!imagesData.length) {\n return;\n }\n this.setState({ isImageModalOpen: !!value });\n handleImageClick(value);\n };\n }\n if (props.customFields) {\n toolbar.handlers.customFields = (value) => {\n const { customFields, handleCustomFieldClick } = this.props;\n if (!customFields.length) {\n return;\n }\n this.setState({ isFieldModalOpen: !!value });\n handleCustomFieldClick(value);\n };\n }\n }\n\n componentDidMount() {\n // this.quill doesn't exist untill the full call-stack execute\n // we need to \"setTimeout\" so this componentDidMount work as expected\n setTimeout(() => {\n const quillDomRef = this.quill;\n this.props.getQuillRef(quillDomRef);\n\n const editor = quillDomRef?.getEditor();\n // https://github.com/quilljs/quill/issues/2677\n editor?.clipboard.addMatcher('a', clipboardLinkWithTagMatcher);\n });\n }\n\n getEditor = () => this.quill?.getEditor();\n\n // eslint-disable-next-line max-params\n onChangeQuill = (html, delta, source, editor) => {\n console.log('quill detected a change');\n const { showRawHTML, onChange } = this.props;\n if (!showRawHTML) onChange(html, delta, source, editor);\n };\n\n onChangeTextArea = (e) => {\n const { showRawHTML, onChange } = this.props;\n if (showRawHTML) onChange(e.target.value);\n };\n\n onInserFieldConfirm = (fieldCode) => {\n const editor = this.getEditor();\n const range = editor.getSelection(true);\n editor.insertText(range.index, fieldCode);\n };\n\n onImageConfirm = (image) => {\n if (!image) {\n return;\n }\n const editor = this.getEditor();\n const range = editor.getSelection(true);\n editor.insertEmbed(range.index, 'image', image.url);\n };\n\n onFieldModalClose = () => {\n this.setState({ isFieldModalOpen: false });\n };\n\n onImageModalClose = () => {\n this.setState({ isImageModalOpen: false });\n };\n\n quillRef = (ref) => {\n this.quill = ref;\n };\n\n render() {\n const { isFieldModalOpen, isImageModalOpen } = this.state;\n const {\n containerProps = {},\n customFields,\n imagesData,\n customToolbar,\n handleImageClick,\n handleCustomFieldClick,\n height,\n value,\n showRawHTML,\n onShowHTML,\n onChange,\n hideItems,\n ...editorProps\n } = this.props;\n\n return (\n <div\n // data-testid=\"wysiwyg-text-container\"\n {...containerProps}\n className={`quill-wysiwyg-editor ${showRawHTML ? 'show-raw' : ''}`}\n >\n {customToolbar || (\n <CustomToolbar\n customFields={customFields}\n onShowHTML={onShowHTML}\n hideItems={hideItems}\n userProps={this.props}\n />\n )}\n <ReactQuill\n ref={this.quillRef}\n modules={this.quillModules}\n onChange={this.onChangeQuill}\n value={value}\n style={{\n height,\n borderBottom: '1px solid #ccc',\n }}\n {...editorProps}\n id=\"wysiwyg-text-container\"\n />\n <textarea\n className=\"raw-editor ql-container ql-snow ql-editor\"\n style={{\n width: '100%',\n resize: 'none',\n height,\n minHeight: '200px',\n }}\n onChange={this.onChangeTextArea}\n value={formatHTML(value)}\n />\n {imagesData && imagesData.length && (\n <ImageLibraryModal\n imagesData={imagesData}\n isOpen={isImageModalOpen}\n onClose={this.onImageModalClose}\n onConfirm={this.onImageConfirm}\n />\n )}\n {customFields && customFields.length && (\n <InsertFieldModal\n customFields={customFields}\n isOpen={isFieldModalOpen}\n onClose={this.onFieldModalClose}\n onConfirm={this.onInserFieldConfirm}\n />\n )}\n </div>\n );\n }\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8KjB;AA5KN,mBAAkB;AAClB,yBAAkC;AAClC,kCAA0B;AAC1B,+BAA8B;AAC9B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AAO;AAAA,gBACP,QAAQ;AAAA,gBACR;AAAA,gBACA,WAAW;AAAA,cACb;AAAA,cACA,UAAU,KAAK;AAAA,cACf,WAAO,yBAAW,KAAK;AAAA;AAAA,UACzB;AAAA,UACC,cAAc,WAAW,UACxB;AAAA,YAAC,yBAAAC;AAAA,YAAA;AAAA,cACC;AAAA,cACA,QAAQ;AAAA,cACR,SAAS,KAAK;AAAA,cACd,WAAW,KAAK;AAAA;AAAA,UAClB;AAAA,UAED,gBAAgB,aAAa,UAC5B;AAAA,YAAC,wBAAAC;AAAA,YAAA;AAAA,cACC;AAAA,cACA,QAAQ;AAAA,cACR,SAAS,KAAK;AAAA,cACd,WAAW,KAAK;AAAA;AAAA,UAClB;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;",
|
|
6
6
|
"names": ["BlotFormatter", "IndentStyle", "Image", "React", "LinkFormat", "ReactQuill", "ImageLibraryModal", "InsertFieldModal"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useEffect } from "react";
|
|
4
|
-
import { describe, PropTypes } from "@elliemae/ds-
|
|
4
|
+
import { describe, PropTypes } from "@elliemae/ds-props-helpers";
|
|
5
5
|
import DSWYSIWYGEditorImpl from "./components/DSWYSIWYGEditorImpl";
|
|
6
6
|
const DSWYSIWYGEditor = ({
|
|
7
7
|
value = "",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSWYSIWYGEditor.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useState, useEffect } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useState, useEffect } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport DSWYSIWYGEditorImpl from './components/DSWYSIWYGEditorImpl';\n\nconst DSWYSIWYGEditor = ({\n value = '',\n onChange = () => null,\n getQuillRef = () => null,\n quillModules = {},\n customToolbar,\n toolbarHandlers,\n showRawHTML = false,\n height,\n hideItems,\n ...rest\n}) => {\n const emptyAction = () => {};\n const [showHTML, setShowHTML] = useState(showRawHTML);\n\n useEffect(() => setShowHTML(showRawHTML), [showRawHTML]);\n\n return (\n <DSWYSIWYGEditorImpl\n forceHttpLink\n handleCustomFieldClick={emptyAction}\n handleImageClick={emptyAction}\n quillOverrides={[]}\n value={value}\n onChange={onChange}\n getQuillRef={getQuillRef}\n quillModules={quillModules}\n customToolbar={customToolbar}\n toolbarHandlers={toolbarHandlers}\n showRawHTML={showHTML}\n onShowHTML={() => setShowHTML(!showHTML)}\n height={height}\n hideItems={hideItems}\n {...rest}\n />\n );\n};\n\nconst wysiwygEditorProps = {\n value: PropTypes.string.description('editors value').isRequired,\n onChange: PropTypes.func.description(\n `(content, delta, source, editor) : Called back with the new contents of the editor after change. \n It will be passed the HTML contents of the editor, a delta object expressing the change, the source of the change, and finally a read-only proxy to editor accessors such as getHTML(). \n \u26A0\uFE0F Do not use this delta object as value, as it will cause a loop. \n Use editor.getContents() instead. See Using Deltas for details. \n Read more: https://github.com/zenoamaro/react-quill#props`,\n ).isRequired,\n getQuillRef: PropTypes.func.description('function to use quill.js ref'),\n quillModules: PropTypes.object.description('object to override quill modules'),\n customToolbar: PropTypes.element.description('custom toolbar'),\n toolbarHandlers: PropTypes.object.description('object with toolbar handlers'),\n showRawHTML: PropTypes.bool.description('whether to display html view or not').defaultValue(false),\n height: PropTypes.string.description('heigth of the editors text area'),\n readOnly: PropTypes.string.description(\n \"If true, the editor won't allow changing its contents. Wraps the Quill disable API.\",\n ),\n hideItems: PropTypes.object.description('object of defaultItems to be removed from toolbar').defaultValue({}),\n zIndex: PropTypes.number.description(\n 'zIndex to be used (required when used in a modal for correct tooltips displaying)',\n ),\n};\n\nDSWYSIWYGEditor.propTypes = wysiwygEditorProps;\nDSWYSIWYGEditor.displayName = 'DSWYSIWYGEditor';\nconst WYSIWYWithSchema = describe(DSWYSIWYGEditor);\nWYSIWYWithSchema.propTypes = wysiwygEditorProps;\n\nexport { WYSIWYWithSchema, DSWYSIWYGEditor };\nexport default DSWYSIWYGEditor;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACsBnB;AAtBJ,SAAgB,UAAU,iBAAiB;AAC3C,SAAS,UAAU,iBAAiB;AACpC,OAAO,yBAAyB;AAEhC,MAAM,kBAAkB,CAAC;AAAA,EACvB,QAAQ;AAAA,EACR,WAAW,MAAM;AAAA,EACjB,cAAc,MAAM;AAAA,EACpB,eAAe,CAAC;AAAA,EAChB;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA;AAAA,KACG;AACL,MAAM;AACJ,QAAM,cAAc,MAAM;AAAA,EAAC;AAC3B,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,WAAW;AAEpD,YAAU,MAAM,YAAY,WAAW,GAAG,CAAC,WAAW,CAAC;AAEvD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa;AAAA,MACb,wBAAwB;AAAA,MACxB,kBAAkB;AAAA,MAClB,gBAAgB,CAAC;AAAA,MACjB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,aAAa;AAAA,MACb,YAAY,MAAM,YAAY,CAAC,QAAQ;AAAA,MACvC;AAAA,MACA;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,MAAM,qBAAqB;AAAA,EACzB,OAAO,UAAU,OAAO,YAAY,eAAe,EAAE;AAAA,EACrD,UAAU,UAAU,KAAK;AAAA,IACvB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF,EAAE;AAAA,EACF,aAAa,UAAU,KAAK,YAAY,8BAA8B;AAAA,EACtE,cAAc,UAAU,OAAO,YAAY,kCAAkC;AAAA,EAC7E,eAAe,UAAU,QAAQ,YAAY,gBAAgB;AAAA,EAC7D,iBAAiB,UAAU,OAAO,YAAY,8BAA8B;AAAA,EAC5E,aAAa,UAAU,KAAK,YAAY,qCAAqC,EAAE,aAAa,KAAK;AAAA,EACjG,QAAQ,UAAU,OAAO,YAAY,iCAAiC;AAAA,EACtE,UAAU,UAAU,OAAO;AAAA,IACzB;AAAA,EACF;AAAA,EACA,WAAW,UAAU,OAAO,YAAY,mDAAmD,EAAE,aAAa,CAAC,CAAC;AAAA,EAC5G,QAAQ,UAAU,OAAO;AAAA,IACvB;AAAA,EACF;AACF;AAEA,gBAAgB,YAAY;AAC5B,gBAAgB,cAAc;AAC9B,MAAM,mBAAmB,SAAS,eAAe;AACjD,iBAAiB,YAAY;AAG7B,IAAO,0BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/DSWYSIWYGEditorImpl.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\nimport React from 'react';\nimport ReactQuill, { Quill } from 'react-quill';\nimport BlotFormatter from 'quill-blot-formatter';\
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\nimport React from 'react';\nimport ReactQuill, { Quill } from 'react-quill';\nimport BlotFormatter from 'quill-blot-formatter';\nimport ImageLibraryModal from './ImageLibraryModal';\nimport InsertFieldModal from './InsertFieldModal';\nimport { CustomToolbar } from './CustomToolbar';\nimport IndentStyle from '../quillOverrides/IndentStyle';\nimport LinkFormat from '../quillOverrides/LinkFormat';\nimport Image from '../quillOverrides/Image';\nimport { formatHTML } from '../utils';\nimport { clipboardLinkWithTagMatcher } from '../quillMatchers/clipboardLinkWithTagMatcher';\n\nQuill.register('modules/blotFormatter', BlotFormatter);\n\n// Fix block styled formats ----------------\nconst AlignStyle = Quill.import('attributors/style/align');\nconst FontStyle = Quill.import('attributors/style/font');\nFontStyle.whitelist = [\n // allow ONLY these fonts and the default\n 'serif',\n 'monospace',\n 'arial',\n 'comic-sans',\n 'courier-new',\n 'georgia',\n 'helvetica',\n 'lucida',\n];\nconst SizeStyle = Quill.import('attributors/style/size');\nSizeStyle.whitelist = [\n // allow ONLY these sizes and the default\n 'x-small',\n 'large',\n 'x-large',\n];\n\n// Fix Doc Viewer p tags extra margin issue ---------\nconst Block = Quill.import('blots/block');\nBlock.tagName = 'p';\nQuill.register(Block);\n\nQuill.register(AlignStyle, true);\nQuill.register(IndentStyle, true);\nQuill.register(FontStyle, true);\nQuill.register(SizeStyle, true);\n// -----------------------------------------\nQuill.register(Image, true);\n\nexport default class DSWYSIWYGEditorImpl extends React.PureComponent {\n quillModules = {\n toolbar: {\n container: this.props.toolbarContainer ? `#${this.props.toolbarContainer}` : '#toolbar',\n handlers: {\n ...this.props.toolbarHandlers,\n },\n },\n clipboard: {\n // toggle to add extra line breaks when pasting HTML:\n matchVisual: false,\n },\n blotFormatter: {\n // options... https://github.com/Fandom-OSS/quill-blot-formatter\n },\n ...this.props.quillModules,\n };\n\n constructor(props) {\n super(props);\n Quill.register(LinkFormat, true);\n if (props.quillOverrides.length) {\n props.quillOverrides.map((override) => Quill.register(override, true));\n }\n this.state = {\n isImageModalOpen: false,\n isFieldModalOpen: false,\n };\n const { toolbar } = this.quillModules;\n if (props.imagesData) {\n toolbar.handlers.image = (value) => {\n const { imagesData, handleImageClick } = this.props;\n if (!imagesData.length) {\n return;\n }\n this.setState({ isImageModalOpen: !!value });\n handleImageClick(value);\n };\n }\n if (props.customFields) {\n toolbar.handlers.customFields = (value) => {\n const { customFields, handleCustomFieldClick } = this.props;\n if (!customFields.length) {\n return;\n }\n this.setState({ isFieldModalOpen: !!value });\n handleCustomFieldClick(value);\n };\n }\n }\n\n componentDidMount() {\n // this.quill doesn't exist untill the full call-stack execute\n // we need to \"setTimeout\" so this componentDidMount work as expected\n setTimeout(() => {\n const quillDomRef = this.quill;\n this.props.getQuillRef(quillDomRef);\n\n const editor = quillDomRef?.getEditor();\n // https://github.com/quilljs/quill/issues/2677\n editor?.clipboard.addMatcher('a', clipboardLinkWithTagMatcher);\n });\n }\n\n getEditor = () => this.quill?.getEditor();\n\n // eslint-disable-next-line max-params\n onChangeQuill = (html, delta, source, editor) => {\n console.log('quill detected a change');\n const { showRawHTML, onChange } = this.props;\n if (!showRawHTML) onChange(html, delta, source, editor);\n };\n\n onChangeTextArea = (e) => {\n const { showRawHTML, onChange } = this.props;\n if (showRawHTML) onChange(e.target.value);\n };\n\n onInserFieldConfirm = (fieldCode) => {\n const editor = this.getEditor();\n const range = editor.getSelection(true);\n editor.insertText(range.index, fieldCode);\n };\n\n onImageConfirm = (image) => {\n if (!image) {\n return;\n }\n const editor = this.getEditor();\n const range = editor.getSelection(true);\n editor.insertEmbed(range.index, 'image', image.url);\n };\n\n onFieldModalClose = () => {\n this.setState({ isFieldModalOpen: false });\n };\n\n onImageModalClose = () => {\n this.setState({ isImageModalOpen: false });\n };\n\n quillRef = (ref) => {\n this.quill = ref;\n };\n\n render() {\n const { isFieldModalOpen, isImageModalOpen } = this.state;\n const {\n containerProps = {},\n customFields,\n imagesData,\n customToolbar,\n handleImageClick,\n handleCustomFieldClick,\n height,\n value,\n showRawHTML,\n onShowHTML,\n onChange,\n hideItems,\n ...editorProps\n } = this.props;\n\n return (\n <div\n // data-testid=\"wysiwyg-text-container\"\n {...containerProps}\n className={`quill-wysiwyg-editor ${showRawHTML ? 'show-raw' : ''}`}\n >\n {customToolbar || (\n <CustomToolbar\n customFields={customFields}\n onShowHTML={onShowHTML}\n hideItems={hideItems}\n userProps={this.props}\n />\n )}\n <ReactQuill\n ref={this.quillRef}\n modules={this.quillModules}\n onChange={this.onChangeQuill}\n value={value}\n style={{\n height,\n borderBottom: '1px solid #ccc',\n }}\n {...editorProps}\n id=\"wysiwyg-text-container\"\n />\n <textarea\n className=\"raw-editor ql-container ql-snow ql-editor\"\n style={{\n width: '100%',\n resize: 'none',\n height,\n minHeight: '200px',\n }}\n onChange={this.onChangeTextArea}\n value={formatHTML(value)}\n />\n {imagesData && imagesData.length && (\n <ImageLibraryModal\n imagesData={imagesData}\n isOpen={isImageModalOpen}\n onClose={this.onImageModalClose}\n onConfirm={this.onImageConfirm}\n />\n )}\n {customFields && customFields.length && (\n <InsertFieldModal\n customFields={customFields}\n isOpen={isFieldModalOpen}\n onClose={this.onFieldModalClose}\n onConfirm={this.onInserFieldConfirm}\n />\n )}\n </div>\n );\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC8KjB,SAMI,KANJ;AA5KN,OAAOA,YAAW;AAClB,OAAO,cAAc,aAAa;AAClC,OAAO,mBAAmB;AAC1B,OAAO,uBAAuB;AAC9B,OAAO,sBAAsB;AAC7B,SAAS,qBAAqB;AAC9B,OAAO,iBAAiB;AACxB,OAAO,gBAAgB;AACvB,OAAO,WAAW;AAClB,SAAS,kBAAkB;AAC3B,SAAS,mCAAmC;AAE5C,MAAM,SAAS,yBAAyB,aAAa;AAGrD,MAAM,aAAa,MAAM,OAAO,yBAAyB;AACzD,MAAM,YAAY,MAAM,OAAO,wBAAwB;AACvD,UAAU,YAAY;AAAA,EAEpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACA,MAAM,YAAY,MAAM,OAAO,wBAAwB;AACvD,UAAU,YAAY;AAAA,EAEpB;AAAA,EACA;AAAA,EACA;AACF;AAGA,MAAM,QAAQ,MAAM,OAAO,aAAa;AACxC,MAAM,UAAU;AAChB,MAAM,SAAS,KAAK;AAEpB,MAAM,SAAS,YAAY,IAAI;AAC/B,MAAM,SAAS,aAA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MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,SACG;AAAA,IACL,IAAI,KAAK;AAET,WACE;AAAA,MAAC;AAAA;AAAA,QAEE,GAAG;AAAA,QACJ,WAAW,wBAAwB,cAAc,aAAa;AAAA,QAE7D;AAAA,2BACC;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA;AAAA,cACA;AAAA,cACA,WAAW,KAAK;AAAA;AAAA,UAClB;AAAA,UAEF;AAAA,YAAC;AAAA;AAAA,cACC,KAAK,KAAK;AAAA,cACV,SAAS,KAAK;AAAA,cACd,UAAU,KAAK;AAAA,cACf;AAAA,cACA,OAAO;AAAA,gBACL;AAAA,gBACA,cAAc;AAAA,cAChB;AAAA,cACC,GAAG;AAAA,cACJ,IAAG;AAAA;AAAA,UACL;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO;AAAA,gBACL,OAAO;AAAA,gBACP,QAAQ;AAAA,gBACR;AAAA,gBACA,WAAW;AAAA,cACb;AAAA,cACA,UAAU,KAAK;AAAA,cACf,OAAO,WAAW,KAAK;AAAA;AAAA,UACzB;AAAA,UACC,cAAc,WAAW,UACxB;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA,QAAQ;AAAA,cACR,SAAS,KAAK;AAAA,cACd,WAAW,KAAK;AAAA;AAAA,UAClB;AAAA,UAED,gBAAgB,aAAa,UAC5B;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA,QAAQ;AAAA,cACR,SAAS,KAAK;AAAA,cACd,WAAW,KAAK;AAAA;AAAA,UAClB;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -12,21 +12,21 @@ declare const DSWYSIWYGEditor: {
|
|
|
12
12
|
hideItems: any;
|
|
13
13
|
}): JSX.Element;
|
|
14
14
|
propTypes: {
|
|
15
|
-
value: import("@elliemae/ds-
|
|
16
|
-
onChange: import("@elliemae/ds-
|
|
17
|
-
getQuillRef: import("@elliemae/ds-
|
|
18
|
-
quillModules: import("@elliemae/ds-
|
|
19
|
-
customToolbar: import("@elliemae/ds-
|
|
20
|
-
toolbarHandlers: import("@elliemae/ds-
|
|
21
|
-
showRawHTML: import("@elliemae/ds-
|
|
22
|
-
height: import("@elliemae/ds-
|
|
23
|
-
readOnly: import("@elliemae/ds-
|
|
24
|
-
hideItems: import("@elliemae/ds-
|
|
25
|
-
zIndex: import("@elliemae/ds-
|
|
15
|
+
value: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
16
|
+
onChange: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
17
|
+
getQuillRef: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
18
|
+
quillModules: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
19
|
+
customToolbar: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
20
|
+
toolbarHandlers: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
21
|
+
showRawHTML: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
22
|
+
height: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
23
|
+
readOnly: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
24
|
+
hideItems: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
25
|
+
zIndex: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
26
26
|
};
|
|
27
27
|
displayName: string;
|
|
28
28
|
};
|
|
29
|
-
declare const WYSIWYWithSchema: import("@elliemae/ds-
|
|
29
|
+
declare const WYSIWYWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<{
|
|
30
30
|
[x: string]: any;
|
|
31
31
|
value?: string | undefined;
|
|
32
32
|
onChange?: (() => null) | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-wysiwygeditor",
|
|
3
|
-
"version": "3.16.0-next.
|
|
3
|
+
"version": "3.16.0-next.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - WYSIWYG Editor",
|
|
6
6
|
"files": [
|
|
@@ -102,15 +102,16 @@
|
|
|
102
102
|
"prop-types": "~15.8.1",
|
|
103
103
|
"quill-blot-formatter": "~1.0.5",
|
|
104
104
|
"react-quill": "2.0.0-beta.2",
|
|
105
|
-
"@elliemae/ds-button": "3.16.0-next.
|
|
106
|
-
"@elliemae/ds-dropdownmenu": "3.16.0-next.
|
|
107
|
-
"@elliemae/ds-
|
|
108
|
-
"@elliemae/ds-
|
|
109
|
-
"@elliemae/ds-
|
|
110
|
-
"@elliemae/ds-
|
|
111
|
-
"@elliemae/ds-
|
|
112
|
-
"@elliemae/ds-
|
|
113
|
-
"@elliemae/ds-
|
|
105
|
+
"@elliemae/ds-button": "3.16.0-next.4",
|
|
106
|
+
"@elliemae/ds-dropdownmenu": "3.16.0-next.4",
|
|
107
|
+
"@elliemae/ds-modal": "3.16.0-next.4",
|
|
108
|
+
"@elliemae/ds-props-helpers": "3.16.0-next.4",
|
|
109
|
+
"@elliemae/ds-shared": "3.16.0-next.4",
|
|
110
|
+
"@elliemae/ds-tooltip": "3.16.0-next.4",
|
|
111
|
+
"@elliemae/ds-uploader": "3.16.0-next.4",
|
|
112
|
+
"@elliemae/ds-utilities": "3.16.0-next.4",
|
|
113
|
+
"@elliemae/ds-icons": "3.16.0-next.4",
|
|
114
|
+
"@elliemae/ds-imagelibrarymodal": "3.16.0-next.4"
|
|
114
115
|
},
|
|
115
116
|
"devDependencies": {
|
|
116
117
|
"quill-delta": "5.0.0"
|
|
@@ -131,7 +132,7 @@
|
|
|
131
132
|
"eslint:fix": "exit 0 | echo",
|
|
132
133
|
"dts": "node ../../scripts/dts.mjs",
|
|
133
134
|
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
|
|
134
|
-
"dev:build": "pnpm --filter {.}... build
|
|
135
|
+
"dev:build": "pnpm --filter {.}... build",
|
|
135
136
|
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
136
137
|
"checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
137
138
|
}
|