@elliemae/ds-wysiwygeditor 3.1.0-next.2 → 3.1.0-next.5
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.
|
@@ -53,7 +53,7 @@ __export(DSWYSIWYGEditor_exports, {
|
|
|
53
53
|
module.exports = __toCommonJS(DSWYSIWYGEditor_exports);
|
|
54
54
|
var React = __toESM(require("react"));
|
|
55
55
|
var import_react = __toESM(require("react"));
|
|
56
|
-
var
|
|
56
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
57
57
|
var import_DSWYSIWYGEditorImpl = __toESM(require("./components/DSWYSIWYGEditorImpl"));
|
|
58
58
|
const DSWYSIWYGEditor = (_a) => {
|
|
59
59
|
var _b = _a, {
|
|
@@ -99,25 +99,25 @@ const DSWYSIWYGEditor = (_a) => {
|
|
|
99
99
|
}, rest));
|
|
100
100
|
};
|
|
101
101
|
const wysiwygEditorProps = {
|
|
102
|
-
value:
|
|
103
|
-
onChange:
|
|
102
|
+
value: import_ds_utilities.PropTypes.string.description("editors value").isRequired,
|
|
103
|
+
onChange: import_ds_utilities.PropTypes.func.description(`(content, delta, source, editor) : Called back with the new contents of the editor after change.
|
|
104
104
|
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().
|
|
105
105
|
\u26A0\uFE0F Do not use this delta object as value, as it will cause a loop.
|
|
106
106
|
Use editor.getContents() instead. See Using Deltas for details.
|
|
107
107
|
Read more: https://github.com/zenoamaro/react-quill#props`).isRequired,
|
|
108
|
-
getQuillRef:
|
|
109
|
-
quillModules:
|
|
110
|
-
customToolbar:
|
|
111
|
-
toolbarHandlers:
|
|
112
|
-
showRawHTML:
|
|
113
|
-
height:
|
|
114
|
-
readOnly:
|
|
115
|
-
hideItems:
|
|
116
|
-
zIndex:
|
|
108
|
+
getQuillRef: import_ds_utilities.PropTypes.func.description("function to use quill.js ref"),
|
|
109
|
+
quillModules: import_ds_utilities.PropTypes.object.description("object to override quill modules"),
|
|
110
|
+
customToolbar: import_ds_utilities.PropTypes.element.description("custom toolbar"),
|
|
111
|
+
toolbarHandlers: import_ds_utilities.PropTypes.object.description("object with toolbar handlers"),
|
|
112
|
+
showRawHTML: import_ds_utilities.PropTypes.bool.description("whether to display html view or not").defaultValue(false),
|
|
113
|
+
height: import_ds_utilities.PropTypes.string.description("heigth of the editors text area"),
|
|
114
|
+
readOnly: import_ds_utilities.PropTypes.string.description("If true, the editor won't allow changing its contents. Wraps the Quill disable API."),
|
|
115
|
+
hideItems: import_ds_utilities.PropTypes.object.description("object of defaultItems to be removed from toolbar").defaultValue({}),
|
|
116
|
+
zIndex: import_ds_utilities.PropTypes.number.description("zIndex to be used (required when used in a modal for correct tooltips displaying)")
|
|
117
117
|
};
|
|
118
118
|
DSWYSIWYGEditor.propTypes = wysiwygEditorProps;
|
|
119
119
|
DSWYSIWYGEditor.displayName = "DSWYSIWYGEditor";
|
|
120
|
-
const WYSIWYWithSchema = (0,
|
|
120
|
+
const WYSIWYWithSchema = (0, import_ds_utilities.describe)(DSWYSIWYGEditor);
|
|
121
121
|
WYSIWYWithSchema.propTypes = wysiwygEditorProps;
|
|
122
122
|
var DSWYSIWYGEditor_default = DSWYSIWYGEditor;
|
|
123
123
|
//# 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 '
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA2C;AAC3C,
|
|
4
|
+
"sourcesContent": ["import React, { useState, useEffect } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-utilities';\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;ADAvB,mBAA2C;AAC3C,0BAAoC;AACpC,iCAAgC;AAEhC,MAAM,kBAAkB,CAAC,OAWnB;AAXmB,eACvB;AAAA,YAAQ;AAAA,IACR,WAAW,MAAM;AAAA,IACjB,cAAc,MAAM;AAAA,IACpB,eAAe,CAAC;AAAA,IAChB;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd;AAAA,IACA;AAAA,MATuB,IAUpB,iBAVoB,IAUpB;AAAA,IATH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM,cAAc,MAAM;AAAA,EAAC;AAC3B,QAAM,CAAC,UAAU,eAAe,2BAAS,WAAW;AAEpD,8BAAU,MAAM,YAAY,WAAW,GAAG,CAAC,WAAW,CAAC;AAEvD,SACE,mDAAC;AAAA,IACC,eAAa;AAAA,IACb,wBAAwB;AAAA,IACxB,kBAAkB;AAAA,IAClB,gBAAgB,CAAC;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa;AAAA,IACb,YAAY,MAAM,YAAY,CAAC,QAAQ;AAAA,IACvC;AAAA,IACA;AAAA,KACI,KACN;AAEJ;AAEA,MAAM,qBAAqB;AAAA,EACzB,OAAO,8BAAU,OAAO,YAAY,eAAe,EAAE;AAAA,EACrD,UAAU,8BAAU,KAAK,YACvB;AAAA;AAAA;AAAA;AAAA,8DAKF,EAAE;AAAA,EACF,aAAa,8BAAU,KAAK,YAAY,8BAA8B;AAAA,EACtE,cAAc,8BAAU,OAAO,YAAY,kCAAkC;AAAA,EAC7E,eAAe,8BAAU,QAAQ,YAAY,gBAAgB;AAAA,EAC7D,iBAAiB,8BAAU,OAAO,YAAY,8BAA8B;AAAA,EAC5E,aAAa,8BAAU,KAAK,YAAY,qCAAqC,EAAE,aAAa,KAAK;AAAA,EACjG,QAAQ,8BAAU,OAAO,YAAY,iCAAiC;AAAA,EACtE,UAAU,8BAAU,OAAO,YACzB,qFACF;AAAA,EACA,WAAW,8BAAU,OAAO,YAAY,mDAAmD,EAAE,aAAa,CAAC,CAAC;AAAA,EAC5G,QAAQ,8BAAU,OAAO,YACvB,mFACF;AACF;AAEA,gBAAgB,YAAY;AAC5B,gBAAgB,cAAc;AAC9B,MAAM,mBAAmB,kCAAS,eAAe;AACjD,iBAAiB,YAAY;AAG7B,IAAO,0BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -28,7 +28,7 @@ var __objRest = (source, exclude) => {
|
|
|
28
28
|
};
|
|
29
29
|
import * as React from "react";
|
|
30
30
|
import React2, { useState, useEffect } from "react";
|
|
31
|
-
import { describe, PropTypes } from "
|
|
31
|
+
import { describe, PropTypes } from "@elliemae/ds-utilities";
|
|
32
32
|
import DSWYSIWYGEditorImpl from "./components/DSWYSIWYGEditorImpl";
|
|
33
33
|
const DSWYSIWYGEditor = (_a) => {
|
|
34
34
|
var _b = _a, {
|
|
@@ -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 '
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useState, useEffect } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-utilities';\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;ACAA;AACA;AACA;AAEA,MAAM,kBAAkB,CAAC,OAWnB;AAXmB,eACvB;AAAA,YAAQ;AAAA,IACR,WAAW,MAAM;AAAA,IACjB,cAAc,MAAM;AAAA,IACpB,eAAe,CAAC;AAAA,IAChB;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd;AAAA,IACA;AAAA,MATuB,IAUpB,iBAVoB,IAUpB;AAAA,IATH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM,cAAc,MAAM;AAAA,EAAC;AAC3B,QAAM,CAAC,UAAU,eAAe,SAAS,WAAW;AAEpD,YAAU,MAAM,YAAY,WAAW,GAAG,CAAC,WAAW,CAAC;AAEvD,SACE,qCAAC;AAAA,IACC,eAAa;AAAA,IACb,wBAAwB;AAAA,IACxB,kBAAkB;AAAA,IAClB,gBAAgB,CAAC;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa;AAAA,IACb,YAAY,MAAM,YAAY,CAAC,QAAQ;AAAA,IACvC;AAAA,IACA;AAAA,KACI,KACN;AAEJ;AAEA,MAAM,qBAAqB;AAAA,EACzB,OAAO,UAAU,OAAO,YAAY,eAAe,EAAE;AAAA,EACrD,UAAU,UAAU,KAAK,YACvB;AAAA;AAAA;AAAA;AAAA,8DAKF,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,YACzB,qFACF;AAAA,EACA,WAAW,UAAU,OAAO,YAAY,mDAAmD,EAAE,aAAa,CAAC,CAAC;AAAA,EAC5G,QAAQ,UAAU,OAAO,YACvB,mFACF;AACF;AAEA,gBAAgB,YAAY;AAC5B,gBAAgB,cAAc;AAC9B,MAAM,mBAAmB,SAAS,eAAe;AACjD,iBAAiB,YAAY;AAG7B,IAAO,0BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-wysiwygeditor",
|
|
3
|
-
"version": "3.1.0-next.
|
|
3
|
+
"version": "3.1.0-next.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - WYSIWYG Editor",
|
|
6
6
|
"files": [
|
|
@@ -98,26 +98,19 @@
|
|
|
98
98
|
"reportFile": "tests.xml",
|
|
99
99
|
"indent": 4
|
|
100
100
|
},
|
|
101
|
-
"scripts": {
|
|
102
|
-
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
103
|
-
"test": "node ../../scripts/testing/test.mjs",
|
|
104
|
-
"lint": "node ../../scripts/lint.mjs",
|
|
105
|
-
"dts": "node ../../scripts/dts.mjs",
|
|
106
|
-
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
|
|
107
|
-
},
|
|
108
101
|
"dependencies": {
|
|
109
|
-
"@elliemae/ds-button": "3.1.0-next.
|
|
110
|
-
"@elliemae/ds-dropdownmenu": "3.1.0-next.
|
|
111
|
-
"@elliemae/ds-icons": "3.1.0-next.
|
|
112
|
-
"@elliemae/ds-imagelibrarymodal": "3.1.0-next.
|
|
113
|
-
"@elliemae/ds-modal": "3.1.0-next.
|
|
114
|
-
"@elliemae/ds-shared": "3.1.0-next.
|
|
115
|
-
"@elliemae/ds-tooltip": "3.1.0-next.
|
|
116
|
-
"@elliemae/ds-uploader": "3.1.0-next.
|
|
102
|
+
"@elliemae/ds-button": "3.1.0-next.5",
|
|
103
|
+
"@elliemae/ds-dropdownmenu": "3.1.0-next.5",
|
|
104
|
+
"@elliemae/ds-icons": "3.1.0-next.5",
|
|
105
|
+
"@elliemae/ds-imagelibrarymodal": "3.1.0-next.5",
|
|
106
|
+
"@elliemae/ds-modal": "3.1.0-next.5",
|
|
107
|
+
"@elliemae/ds-shared": "3.1.0-next.5",
|
|
108
|
+
"@elliemae/ds-tooltip": "3.1.0-next.5",
|
|
109
|
+
"@elliemae/ds-uploader": "3.1.0-next.5",
|
|
110
|
+
"@elliemae/ds-utilities": "3.1.0-next.5",
|
|
117
111
|
"prop-types": "~15.8.1",
|
|
118
112
|
"quill-blot-formatter": "~1.0.5",
|
|
119
113
|
"quill-delta": "4.2.2",
|
|
120
|
-
"react-desc": "~4.1.3",
|
|
121
114
|
"react-quill": "2.0.0-beta.2"
|
|
122
115
|
},
|
|
123
116
|
"publishConfig": {
|
|
@@ -128,5 +121,13 @@
|
|
|
128
121
|
"lodash": "^4.17.21",
|
|
129
122
|
"react": "~17.0.2",
|
|
130
123
|
"react-dom": "^17.0.2"
|
|
124
|
+
},
|
|
125
|
+
"scripts": {
|
|
126
|
+
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
127
|
+
"test": "node ../../scripts/testing/test.mjs",
|
|
128
|
+
"lint": "node ../../scripts/lint.mjs",
|
|
129
|
+
"dts": "node ../../scripts/dts.mjs",
|
|
130
|
+
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
|
|
131
|
+
"checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
131
132
|
}
|
|
132
|
-
}
|
|
133
|
+
}
|