@elliemae/ds-wysiwygeditor 3.32.2-next.1 → 3.33.0-next.0
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 +106 -0
- package/dist/cjs/DSWYSIWYGEditor.js.map +7 -0
- package/dist/cjs/components/CustomImageUploader.js +138 -0
- package/dist/cjs/components/CustomImageUploader.js.map +7 -0
- package/dist/cjs/components/CustomToolbar.js +327 -0
- package/dist/cjs/components/CustomToolbar.js.map +7 -0
- package/dist/cjs/components/DSWYSIWYGEditorImpl.js +237 -0
- package/dist/cjs/components/DSWYSIWYGEditorImpl.js.map +7 -0
- package/dist/cjs/components/ImageLibraryModal.js +92 -0
- package/dist/cjs/components/ImageLibraryModal.js.map +7 -0
- package/dist/cjs/components/InsertFieldModal.js +183 -0
- package/dist/cjs/components/InsertFieldModal.js.map +7 -0
- package/dist/cjs/components/TippedButton.js +57 -0
- package/dist/cjs/components/TippedButton.js.map +7 -0
- package/dist/cjs/components/TippedSelect.js +53 -0
- package/dist/cjs/components/TippedSelect.js.map +7 -0
- package/dist/cjs/components/colors.js +51 -0
- package/dist/cjs/components/colors.js.map +7 -0
- package/dist/cjs/components/customFields.js +78 -0
- package/dist/cjs/components/customFields.js.map +7 -0
- package/dist/cjs/config/quillSingletonConfigurations.js +86 -0
- package/dist/cjs/config/quillSingletonConfigurations.js.map +7 -0
- package/dist/cjs/constants.js +116 -0
- package/dist/cjs/constants.js.map +7 -0
- package/dist/cjs/index.js +7 -3
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/quillMatchers/clipboardLinkWithTagMatcher.js +49 -0
- package/dist/cjs/quillMatchers/clipboardLinkWithTagMatcher.js.map +7 -0
- package/dist/cjs/quillOverrides/Image.js +74 -0
- package/dist/cjs/quillOverrides/Image.js.map +7 -0
- package/dist/cjs/quillOverrides/IndentStyle.js +52 -0
- package/dist/cjs/quillOverrides/IndentStyle.js.map +7 -0
- package/dist/cjs/quillOverrides/LinkFormat.js +87 -0
- package/dist/cjs/quillOverrides/LinkFormat.js.map +7 -0
- package/dist/cjs/quillOverrides/PlainClipboard.js +48 -0
- package/dist/cjs/quillOverrides/PlainClipboard.js.map +7 -0
- package/dist/cjs/utils.js +51 -0
- package/dist/cjs/utils.js.map +7 -0
- package/dist/esm/DSWYSIWYGEditor.js +76 -0
- package/dist/esm/DSWYSIWYGEditor.js.map +7 -0
- package/dist/esm/components/CustomImageUploader.js +108 -0
- package/dist/esm/components/CustomImageUploader.js.map +7 -0
- package/dist/esm/components/CustomToolbar.js +297 -0
- package/dist/esm/components/CustomToolbar.js.map +7 -0
- package/dist/esm/components/DSWYSIWYGEditorImpl.js +207 -0
- package/dist/esm/components/DSWYSIWYGEditorImpl.js.map +7 -0
- package/dist/esm/components/ImageLibraryModal.js +62 -0
- package/dist/esm/components/ImageLibraryModal.js.map +7 -0
- package/dist/esm/components/InsertFieldModal.js +153 -0
- package/dist/esm/components/InsertFieldModal.js.map +7 -0
- package/dist/esm/components/TippedButton.js +27 -0
- package/dist/esm/components/TippedButton.js.map +7 -0
- package/dist/esm/components/TippedSelect.js +23 -0
- package/dist/esm/components/TippedSelect.js.map +7 -0
- package/dist/esm/components/colors.js +21 -0
- package/dist/esm/components/colors.js.map +7 -0
- package/dist/esm/components/customFields.js +48 -0
- package/dist/esm/components/customFields.js.map +7 -0
- package/dist/esm/config/quillSingletonConfigurations.js +56 -0
- package/dist/esm/config/quillSingletonConfigurations.js.map +7 -0
- package/dist/esm/constants.js +86 -0
- package/dist/esm/constants.js.map +7 -0
- package/dist/esm/index.js +6 -2
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/quillMatchers/clipboardLinkWithTagMatcher.js +19 -0
- package/dist/esm/quillMatchers/clipboardLinkWithTagMatcher.js.map +7 -0
- package/dist/esm/quillOverrides/Image.js +44 -0
- package/dist/esm/quillOverrides/Image.js.map +7 -0
- package/dist/esm/quillOverrides/IndentStyle.js +22 -0
- package/dist/esm/quillOverrides/IndentStyle.js.map +7 -0
- package/dist/esm/quillOverrides/LinkFormat.js +57 -0
- package/dist/esm/quillOverrides/LinkFormat.js.map +7 -0
- package/dist/esm/quillOverrides/PlainClipboard.js +18 -0
- package/dist/esm/quillOverrides/PlainClipboard.js.map +7 -0
- package/dist/esm/utils.js +21 -0
- package/dist/esm/utils.js.map +7 -0
- package/dist/types/DSWYSIWYGEditor.d.ts +43 -0
- package/dist/types/components/CustomImageUploader.d.ts +7 -0
- package/dist/types/components/CustomToolbar.d.ts +20 -0
- package/dist/types/components/DSWYSIWYGEditorImpl.d.ts +22 -0
- package/dist/types/components/ImageLibraryModal.d.ts +23 -0
- package/dist/types/components/InsertFieldModal.d.ts +40 -0
- package/dist/types/components/TippedButton.d.ts +12 -0
- package/dist/types/components/TippedSelect.d.ts +13 -0
- package/dist/types/components/colors.d.ts +1 -0
- package/dist/types/components/customFields.d.ts +33 -0
- package/dist/types/config/quillSingletonConfigurations.d.ts +2 -0
- package/dist/types/constants.d.ts +26 -0
- package/dist/types/index.d.ts +4 -2
- package/dist/types/quillMatchers/clipboardLinkWithTagMatcher.d.ts +2 -0
- package/dist/types/quillOverrides/Image.d.ts +7 -0
- package/dist/types/quillOverrides/IndentStyle.d.ts +10 -0
- package/dist/types/quillOverrides/LinkFormat.d.ts +12 -0
- package/dist/types/quillOverrides/PlainClipboard.d.ts +8 -0
- package/dist/types/utils.d.ts +1 -0
- package/package.json +19 -3
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var DSWYSIWYGEditor_exports = {};
|
|
30
|
+
__export(DSWYSIWYGEditor_exports, {
|
|
31
|
+
DSWYSIWYGEditor: () => DSWYSIWYGEditor,
|
|
32
|
+
WYSIWYWithSchema: () => WYSIWYWithSchema,
|
|
33
|
+
default: () => DSWYSIWYGEditor_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(DSWYSIWYGEditor_exports);
|
|
36
|
+
var React = __toESM(require("react"));
|
|
37
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
|
+
var import_react = require("react");
|
|
39
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
40
|
+
var import_DSWYSIWYGEditorImpl = __toESM(require("./components/DSWYSIWYGEditorImpl.js"));
|
|
41
|
+
const DSWYSIWYGEditor = ({
|
|
42
|
+
value = "",
|
|
43
|
+
onChange = () => null,
|
|
44
|
+
getQuillRef = () => null,
|
|
45
|
+
quillModules = {},
|
|
46
|
+
customToolbar,
|
|
47
|
+
toolbarHandlers,
|
|
48
|
+
showRawHTML = false,
|
|
49
|
+
height,
|
|
50
|
+
hideItems,
|
|
51
|
+
...rest
|
|
52
|
+
}) => {
|
|
53
|
+
const emptyAction = () => {
|
|
54
|
+
};
|
|
55
|
+
const [showHTML, setShowHTML] = (0, import_react.useState)(showRawHTML);
|
|
56
|
+
(0, import_react.useEffect)(() => setShowHTML(showRawHTML), [showRawHTML]);
|
|
57
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
58
|
+
import_DSWYSIWYGEditorImpl.default,
|
|
59
|
+
{
|
|
60
|
+
handleCustomFieldClick: emptyAction,
|
|
61
|
+
handleImageClick: emptyAction,
|
|
62
|
+
quillOverrides: [],
|
|
63
|
+
value,
|
|
64
|
+
onChange,
|
|
65
|
+
getQuillRef,
|
|
66
|
+
quillModules,
|
|
67
|
+
customToolbar,
|
|
68
|
+
toolbarHandlers,
|
|
69
|
+
showRawHTML: showHTML,
|
|
70
|
+
onShowHTML: () => setShowHTML(!showHTML),
|
|
71
|
+
height,
|
|
72
|
+
hideItems,
|
|
73
|
+
...rest
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
const wysiwygEditorProps = {
|
|
78
|
+
value: import_ds_props_helpers.PropTypes.string.description("editors value").isRequired,
|
|
79
|
+
onChange: import_ds_props_helpers.PropTypes.func.description(
|
|
80
|
+
`(content, delta, source, editor) : Called back with the new contents of the editor after change.
|
|
81
|
+
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().
|
|
82
|
+
\u26A0\uFE0F Do not use this delta object as value, as it will cause a loop.
|
|
83
|
+
Use editor.getContents() instead. See Using Deltas for details.
|
|
84
|
+
Read more: https://github.com/zenoamaro/react-quill#props`
|
|
85
|
+
).isRequired,
|
|
86
|
+
getQuillRef: import_ds_props_helpers.PropTypes.func.description("function to use quill.js ref"),
|
|
87
|
+
quillModules: import_ds_props_helpers.PropTypes.object.description("object to override quill modules"),
|
|
88
|
+
customToolbar: import_ds_props_helpers.PropTypes.element.description("custom toolbar"),
|
|
89
|
+
toolbarHandlers: import_ds_props_helpers.PropTypes.object.description("object with toolbar handlers"),
|
|
90
|
+
showRawHTML: import_ds_props_helpers.PropTypes.bool.description("whether to display html view or not").defaultValue(false),
|
|
91
|
+
height: import_ds_props_helpers.PropTypes.string.description("heigth of the editors text area"),
|
|
92
|
+
readOnly: import_ds_props_helpers.PropTypes.string.description(
|
|
93
|
+
"If true, the editor won't allow changing its contents. Wraps the Quill disable API."
|
|
94
|
+
),
|
|
95
|
+
hideToolbar: import_ds_props_helpers.PropTypes.bool.description("If true, the editor will hide the toolbar.").defaultValue(false),
|
|
96
|
+
hideItems: import_ds_props_helpers.PropTypes.object.description("object of defaultItems to be removed from toolbar").defaultValue({}),
|
|
97
|
+
zIndex: import_ds_props_helpers.PropTypes.number.description(
|
|
98
|
+
"zIndex to be used (required when used in a modal for correct tooltips displaying)"
|
|
99
|
+
)
|
|
100
|
+
};
|
|
101
|
+
DSWYSIWYGEditor.propTypes = wysiwygEditorProps;
|
|
102
|
+
DSWYSIWYGEditor.displayName = "DSWYSIWYGEditor";
|
|
103
|
+
const WYSIWYWithSchema = (0, import_ds_props_helpers.describe)(DSWYSIWYGEditor);
|
|
104
|
+
WYSIWYWithSchema.propTypes = wysiwygEditorProps;
|
|
105
|
+
var DSWYSIWYGEditor_default = DSWYSIWYGEditor;
|
|
106
|
+
//# sourceMappingURL=DSWYSIWYGEditor.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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-props-helpers';\nimport DSWYSIWYGEditorImpl from './components/DSWYSIWYGEditorImpl.js';\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 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 hideToolbar: PropTypes.bool.description('If true, the editor will hide the toolbar.').defaultValue(false),\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,EACA,GAAG;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;AAAA,IAAA;AAAA,MACC,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,kCAAU,OAAO,YAAY,eAAe,EAAE;AAAA,EACrD,UAAU,kCAAU,KAAK;AAAA,IACvB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF,EAAE;AAAA,EACF,aAAa,kCAAU,KAAK,YAAY,8BAA8B;AAAA,EACtE,cAAc,kCAAU,OAAO,YAAY,kCAAkC;AAAA,EAC7E,eAAe,kCAAU,QAAQ,YAAY,gBAAgB;AAAA,EAC7D,iBAAiB,kCAAU,OAAO,YAAY,8BAA8B;AAAA,EAC5E,aAAa,kCAAU,KAAK,YAAY,qCAAqC,EAAE,aAAa,KAAK;AAAA,EACjG,QAAQ,kCAAU,OAAO,YAAY,iCAAiC;AAAA,EACtE,UAAU,kCAAU,OAAO;AAAA,IACzB;AAAA,EACF;AAAA,EACA,aAAa,kCAAU,KAAK,YAAY,4CAA4C,EAAE,aAAa,KAAK;AAAA,EACxG,WAAW,kCAAU,OAAO,YAAY,mDAAmD,EAAE,aAAa,CAAC,CAAC;AAAA,EAC5G,QAAQ,kCAAU,OAAO;AAAA,IACvB;AAAA,EACF;AACF;AAEA,gBAAgB,YAAY;AAC5B,gBAAgB,cAAc;AAC9B,MAAM,uBAAmB,kCAAS,eAAe;AACjD,iBAAiB,YAAY;AAG7B,IAAO,0BAAQ;",
|
|
6
|
+
"names": ["DSWYSIWYGEditorImpl"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var CustomImageUploader_exports = {};
|
|
30
|
+
__export(CustomImageUploader_exports, {
|
|
31
|
+
CustomImageUploader: () => CustomImageUploader
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(CustomImageUploader_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_react = require("react");
|
|
37
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
38
|
+
var import_ds_uploader = require("@elliemae/ds-uploader");
|
|
39
|
+
var import_ds_modal = require("@elliemae/ds-modal");
|
|
40
|
+
var import_TippedButton = require("./TippedButton.js");
|
|
41
|
+
const ALLOWED_TYPES_TEXT = "JPG, JPEG, PNG, GIF, BMP, TIFF";
|
|
42
|
+
const ALLOWED_TYPES = /image\/(jpeg|jpg|png|gif|bmp|tiff)/;
|
|
43
|
+
const DEFAULT_MAX_SIZE = 1024 * 1024;
|
|
44
|
+
const CustomImageUploader = ({
|
|
45
|
+
quillRef,
|
|
46
|
+
editorFieldName,
|
|
47
|
+
allowedImageTypes = ALLOWED_TYPES_TEXT,
|
|
48
|
+
uploadAsset = () => null,
|
|
49
|
+
zIndex = 1
|
|
50
|
+
}) => {
|
|
51
|
+
const [isOpen, setIsOpen] = (0, import_react.useState)(false);
|
|
52
|
+
const [error, setError] = (0, import_react.useState)(null);
|
|
53
|
+
const [inProgress, setInProgress] = (0, import_react.useState)(false);
|
|
54
|
+
const [lastSelection, setLastSelection] = (0, import_react.useState)({ index: 0, length: 0 });
|
|
55
|
+
const elementId = `uploadImage${editorFieldName}`;
|
|
56
|
+
const handleFileChange = async (files) => {
|
|
57
|
+
if (!inProgress) {
|
|
58
|
+
setError(null);
|
|
59
|
+
const selectedFile = files[0];
|
|
60
|
+
if (!selectedFile) {
|
|
61
|
+
setError("Please select a file.");
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
if (!selectedFile.type.match(ALLOWED_TYPES)) {
|
|
65
|
+
setError("File must be an image.");
|
|
66
|
+
} else if (selectedFile.size > DEFAULT_MAX_SIZE) {
|
|
67
|
+
setError("File is too large.");
|
|
68
|
+
} else {
|
|
69
|
+
const fr = new FileReader();
|
|
70
|
+
fr.onload = async () => {
|
|
71
|
+
setInProgress(true);
|
|
72
|
+
try {
|
|
73
|
+
const url = await uploadAsset({
|
|
74
|
+
name: selectedFile.name,
|
|
75
|
+
type: selectedFile.type,
|
|
76
|
+
description: selectedFile.name,
|
|
77
|
+
isSystemAsset: false,
|
|
78
|
+
file: fr.result
|
|
79
|
+
});
|
|
80
|
+
setIsOpen(false);
|
|
81
|
+
quillRef?.getEditor().insertEmbed(lastSelection?.index || 0, "image", url);
|
|
82
|
+
} catch (e) {
|
|
83
|
+
setError("An error has occurred, try again");
|
|
84
|
+
}
|
|
85
|
+
setInProgress(false);
|
|
86
|
+
};
|
|
87
|
+
fr.readAsArrayBuffer(selectedFile);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
92
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
93
|
+
import_TippedButton.TippedButton,
|
|
94
|
+
{
|
|
95
|
+
zIndex,
|
|
96
|
+
tip: "Insert Image",
|
|
97
|
+
onClick: () => {
|
|
98
|
+
setLastSelection(quillRef?.getEditor().getSelection());
|
|
99
|
+
setIsOpen(true);
|
|
100
|
+
},
|
|
101
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.Image, { color: ["neutral", 500], size: "s" })
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
105
|
+
import_ds_modal.DSModal,
|
|
106
|
+
{
|
|
107
|
+
isOpen,
|
|
108
|
+
title: "",
|
|
109
|
+
onConfirm: () => {
|
|
110
|
+
setIsOpen(false);
|
|
111
|
+
},
|
|
112
|
+
onClose: () => {
|
|
113
|
+
setIsOpen(false);
|
|
114
|
+
},
|
|
115
|
+
showClose: true,
|
|
116
|
+
version: 2,
|
|
117
|
+
size: "xsmall",
|
|
118
|
+
modalType: import_ds_modal.MODAL_TYPE_V2.DECISION,
|
|
119
|
+
confirmLabel: "Cancel",
|
|
120
|
+
message: "",
|
|
121
|
+
children: [
|
|
122
|
+
!inProgress && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
123
|
+
import_ds_uploader.DSUploader,
|
|
124
|
+
{
|
|
125
|
+
containerProps: { id: elementId },
|
|
126
|
+
showAltAction: false,
|
|
127
|
+
acceptedTypesText: allowedImageTypes,
|
|
128
|
+
onDrop: handleFileChange
|
|
129
|
+
}
|
|
130
|
+
),
|
|
131
|
+
inProgress && "Upload in progress...",
|
|
132
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { color: "red", marginTop: "10px" }, children: error })
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
)
|
|
136
|
+
] });
|
|
137
|
+
};
|
|
138
|
+
//# sourceMappingURL=CustomImageUploader.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/CustomImageUploader.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable jsx-a11y/no-static-element-interactions */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\n/* eslint-disable react/prop-types */\nimport React, { useState } from 'react';\nimport { Image } from '@elliemae/ds-icons';\nimport { DSUploader } from '@elliemae/ds-uploader';\nimport { DSModal, MODAL_TYPE_V2 } from '@elliemae/ds-modal';\nimport { TippedButton } from './TippedButton.js';\n\nconst ALLOWED_TYPES_TEXT = 'JPG, JPEG, PNG, GIF, BMP, TIFF';\nconst ALLOWED_TYPES = /image\\/(jpeg|jpg|png|gif|bmp|tiff)/;\nconst DEFAULT_MAX_SIZE = 1024 * 1024; // 1 MB\n\nexport const CustomImageUploader = ({\n quillRef,\n editorFieldName,\n allowedImageTypes = ALLOWED_TYPES_TEXT,\n uploadAsset = () => null,\n zIndex = 1,\n}) => {\n const [isOpen, setIsOpen] = useState(false);\n const [error, setError] = useState(null);\n const [inProgress, setInProgress] = useState(false);\n const [lastSelection, setLastSelection] = useState({ index: 0, length: 0 });\n\n const elementId = `uploadImage${editorFieldName}`;\n\n // eslint-disable-next-line consistent-return\n const handleFileChange = async (files) => {\n if (!inProgress) {\n setError(null);\n const selectedFile = files[0];\n if (!selectedFile) {\n setError('Please select a file.');\n return false;\n }\n if (!selectedFile.type.match(ALLOWED_TYPES)) {\n setError('File must be an image.');\n } else if (selectedFile.size > DEFAULT_MAX_SIZE) {\n setError('File is too large.');\n } else {\n const fr = new FileReader();\n fr.onload = async () => {\n setInProgress(true);\n try {\n const url = await uploadAsset({\n name: selectedFile.name,\n type: selectedFile.type,\n description: selectedFile.name,\n isSystemAsset: false,\n file: fr.result,\n });\n setIsOpen(false);\n quillRef?.getEditor().insertEmbed(lastSelection?.index || 0, 'image', url);\n } catch (e) {\n setError('An error has occurred, try again');\n }\n setInProgress(false);\n };\n fr.readAsArrayBuffer(selectedFile);\n }\n }\n };\n return (\n <>\n <TippedButton\n zIndex={zIndex}\n tip=\"Insert Image\"\n onClick={() => {\n setLastSelection(quillRef?.getEditor().getSelection());\n setIsOpen(true);\n }}\n >\n <Image color={['neutral', 500]} size=\"s\" />\n </TippedButton>\n <DSModal\n isOpen={isOpen}\n title=\"\"\n onConfirm={() => {\n setIsOpen(false);\n }}\n onClose={() => {\n setIsOpen(false);\n }}\n showClose\n version={2}\n size=\"xsmall\"\n modalType={MODAL_TYPE_V2.DECISION}\n confirmLabel=\"Cancel\"\n message=\"\"\n >\n {!inProgress && (\n <DSUploader\n containerProps={{ id: elementId }}\n showAltAction={false}\n acceptedTypesText={allowedImageTypes}\n onDrop={handleFileChange}\n />\n )}\n {inProgress && 'Upload in progress...'}\n {error && <div style={{ color: 'red', marginTop: '10px' }}>{error}</div>}\n </DSModal>\n </>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiEnB;AA7DJ,mBAAgC;AAChC,sBAAsB;AACtB,yBAA2B;AAC3B,sBAAuC;AACvC,0BAA6B;AAE7B,MAAM,qBAAqB;AAC3B,MAAM,gBAAgB;AACtB,MAAM,mBAAmB,OAAO;AAEzB,MAAM,sBAAsB,CAAC;AAAA,EAClC;AAAA,EACA;AAAA,EACA,oBAAoB;AAAA,EACpB,cAAc,MAAM;AAAA,EACpB,SAAS;AACX,MAAM;AACJ,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAAS,KAAK;AAC1C,QAAM,CAAC,OAAO,QAAQ,QAAI,uBAA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A,MAAC;AAAA;AAAA,QACC;AAAA,QACA,OAAM;AAAA,QACN,WAAW,MAAM;AACf,oBAAU,KAAK;AAAA,QACjB;AAAA,QACA,SAAS,MAAM;AACb,oBAAU,KAAK;AAAA,QACjB;AAAA,QACA,WAAS;AAAA,QACT,SAAS;AAAA,QACT,MAAK;AAAA,QACL,WAAW,8BAAc;AAAA,QACzB,cAAa;AAAA,QACb,SAAQ;AAAA,QAEP;AAAA,WAAC,cACA;AAAA,YAAC;AAAA;AAAA,cACC,gBAAgB,EAAE,IAAI,UAAU;AAAA,cAChC,eAAe;AAAA,cACf,mBAAmB;AAAA,cACnB,QAAQ;AAAA;AAAA,UACV;AAAA,UAED,cAAc;AAAA,UACd,SAAS,4CAAC,SAAI,OAAO,EAAE,OAAO,OAAO,WAAW,OAAO,GAAI,iBAAM;AAAA;AAAA;AAAA,IACpE;AAAA,KACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var CustomToolbar_exports = {};
|
|
30
|
+
__export(CustomToolbar_exports, {
|
|
31
|
+
CustomDropdown: () => CustomDropdown,
|
|
32
|
+
CustomToolbar: () => CustomToolbar
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(CustomToolbar_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var import_react = require("react");
|
|
38
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
39
|
+
var import_ds_button_v2 = require("@elliemae/ds-button-v2");
|
|
40
|
+
var import_ds_grid = require("@elliemae/ds-grid");
|
|
41
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
42
|
+
var import_ds_dropdownmenu = require("@elliemae/ds-dropdownmenu");
|
|
43
|
+
var import_constants = require("../constants.js");
|
|
44
|
+
var import_TippedButton = require("./TippedButton.js");
|
|
45
|
+
var import_TippedSelect = require("./TippedSelect.js");
|
|
46
|
+
const optionsToValues = (options) => options.map((opt) => opt.toLowerCase().replace(" ", "-"));
|
|
47
|
+
const CustomFields = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\u1438\u1433" });
|
|
48
|
+
const Color = ({ color }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: color });
|
|
49
|
+
const Colors = ({ className, tip, zIndex }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedSelect.TippedSelect, { className, tip, zIndex, children: import_constants.colors.map((color) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Color, { color }, color)) });
|
|
50
|
+
const CustomDropdown = ({
|
|
51
|
+
options,
|
|
52
|
+
label,
|
|
53
|
+
onSelectMenuItem = () => null,
|
|
54
|
+
onClickOutsideMenu = () => null,
|
|
55
|
+
onClose = () => null,
|
|
56
|
+
closeMenuOnItemSelection,
|
|
57
|
+
isOpen,
|
|
58
|
+
minWidth,
|
|
59
|
+
maxWidth,
|
|
60
|
+
zIndex = 10
|
|
61
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
62
|
+
import_ds_dropdownmenu.DSDropdownMenu,
|
|
63
|
+
{
|
|
64
|
+
onClickOutsideMenu,
|
|
65
|
+
options,
|
|
66
|
+
onSelectMenuItem,
|
|
67
|
+
onClose,
|
|
68
|
+
closeMenuOnItemSelection,
|
|
69
|
+
isOpen,
|
|
70
|
+
minWidth,
|
|
71
|
+
maxWidth,
|
|
72
|
+
zIndex,
|
|
73
|
+
preventOverflow: "scrollParent",
|
|
74
|
+
triggerComponent: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button_v2.DSButtonV2, { buttonType: "text", "aria-label": label, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { gap: "xxs", cols: ["auto", "max-content"], children: [
|
|
75
|
+
label,
|
|
76
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ArrowheadDown, {})
|
|
77
|
+
] }) })
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
const Divider = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
style: {
|
|
84
|
+
height: "21px",
|
|
85
|
+
width: "1px",
|
|
86
|
+
margin: "0 10px",
|
|
87
|
+
padding: "0",
|
|
88
|
+
borderLeft: "1px solid #bbb",
|
|
89
|
+
display: "inline-block"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
const CustomToolbar = ({
|
|
94
|
+
customFields,
|
|
95
|
+
customItems = [],
|
|
96
|
+
hideItems = {},
|
|
97
|
+
onShowHTML = () => {
|
|
98
|
+
},
|
|
99
|
+
id = "toolbar",
|
|
100
|
+
userProps
|
|
101
|
+
}) => {
|
|
102
|
+
const {
|
|
103
|
+
HEADER,
|
|
104
|
+
FONT,
|
|
105
|
+
FONT_SIZE,
|
|
106
|
+
BOLD,
|
|
107
|
+
ITALIC,
|
|
108
|
+
UNDERLINE,
|
|
109
|
+
STRIKE,
|
|
110
|
+
SUB,
|
|
111
|
+
SUPER,
|
|
112
|
+
ORDERED_LIST,
|
|
113
|
+
BULLET_LIST,
|
|
114
|
+
INDENT_MINUS_ONE,
|
|
115
|
+
INDENT_PLUS_ONE,
|
|
116
|
+
ALIGN,
|
|
117
|
+
FONT_COLOR,
|
|
118
|
+
FONT_BACKGROUND_COLOR,
|
|
119
|
+
HYPERLINK,
|
|
120
|
+
IMAGE,
|
|
121
|
+
CLEAR_FORMAT,
|
|
122
|
+
SHOW_HTML
|
|
123
|
+
} = hideItems;
|
|
124
|
+
const [showHTML, setShowHTML] = (0, import_react.useState)(false);
|
|
125
|
+
const handleShowHTML = (e) => {
|
|
126
|
+
e.preventDefault();
|
|
127
|
+
setShowHTML(!showHTML);
|
|
128
|
+
onShowHTML();
|
|
129
|
+
};
|
|
130
|
+
const theme = (0, import_react.useContext)(import_ds_system.ThemeContext);
|
|
131
|
+
const defaultZIndex = theme?.zIndex?.tooltip;
|
|
132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { id, className: "ds-ql-custom-toolbar", children: [
|
|
133
|
+
(!HEADER || !FONT || !FONT_SIZE) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "ql-formats", children: [
|
|
134
|
+
!HEADER && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
135
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
136
|
+
import_TippedSelect.TippedSelect,
|
|
137
|
+
{
|
|
138
|
+
className: "ql-header",
|
|
139
|
+
tip: "Header",
|
|
140
|
+
values: ["", "1", "2", "3", "4", "5", "6"],
|
|
141
|
+
zIndex: userProps?.zIndex || defaultZIndex
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {})
|
|
145
|
+
] }),
|
|
146
|
+
!FONT && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
147
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
148
|
+
import_TippedSelect.TippedSelect,
|
|
149
|
+
{
|
|
150
|
+
className: "ql-font",
|
|
151
|
+
defaultValue: "sans-serif",
|
|
152
|
+
options: import_constants.fonts,
|
|
153
|
+
tip: "Font",
|
|
154
|
+
values: optionsToValues(import_constants.fonts),
|
|
155
|
+
zIndex: userProps?.zIndex || defaultZIndex
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {})
|
|
159
|
+
] }),
|
|
160
|
+
!FONT_SIZE && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
161
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
162
|
+
import_TippedSelect.TippedSelect,
|
|
163
|
+
{
|
|
164
|
+
className: "ql-size",
|
|
165
|
+
options: import_constants.sizes,
|
|
166
|
+
tip: "Font Size",
|
|
167
|
+
values: optionsToValues(import_constants.sizesReal),
|
|
168
|
+
zIndex: userProps?.zIndex || defaultZIndex
|
|
169
|
+
}
|
|
170
|
+
),
|
|
171
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {})
|
|
172
|
+
] })
|
|
173
|
+
] }),
|
|
174
|
+
(!BOLD || !ITALIC || !UNDERLINE || !STRIKE) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "ql-formats", children: [
|
|
175
|
+
!BOLD && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, { zIndex: userProps?.zIndex || defaultZIndex, className: "ql-bold", tip: "Bold" }),
|
|
176
|
+
!ITALIC && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, { zIndex: userProps?.zIndex || defaultZIndex, className: "ql-italic", tip: "Italic" }),
|
|
177
|
+
!UNDERLINE && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, { zIndex: userProps?.zIndex || defaultZIndex, className: "ql-underline", tip: "Underline" }),
|
|
178
|
+
!STRIKE && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, { zIndex: userProps?.zIndex || defaultZIndex, className: "ql-strike", tip: "Strike" })
|
|
179
|
+
] }),
|
|
180
|
+
(!SUB || !SUPER) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "ql-formats", children: [
|
|
181
|
+
!SUB && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, { zIndex: userProps?.zIndex || defaultZIndex, className: "ql-script", tip: "Sub", value: "sub" }),
|
|
182
|
+
!SUPER && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, { zIndex: userProps?.zIndex || defaultZIndex, className: "ql-script", tip: "Super", value: "super" }),
|
|
183
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {})
|
|
184
|
+
] }),
|
|
185
|
+
(!ORDERED_LIST || !BULLET_LIST) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "ql-formats", children: [
|
|
186
|
+
!ORDERED_LIST && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
187
|
+
import_TippedButton.TippedButton,
|
|
188
|
+
{
|
|
189
|
+
zIndex: userProps?.zIndex || defaultZIndex,
|
|
190
|
+
className: "ql-list",
|
|
191
|
+
tip: "Ordered List",
|
|
192
|
+
value: "ordered"
|
|
193
|
+
}
|
|
194
|
+
),
|
|
195
|
+
!BULLET_LIST && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
196
|
+
import_TippedButton.TippedButton,
|
|
197
|
+
{
|
|
198
|
+
zIndex: userProps?.zIndex || defaultZIndex,
|
|
199
|
+
className: "ql-list",
|
|
200
|
+
tip: "Bullet List",
|
|
201
|
+
value: "bullet"
|
|
202
|
+
}
|
|
203
|
+
)
|
|
204
|
+
] }),
|
|
205
|
+
(!INDENT_MINUS_ONE || !INDENT_PLUS_ONE) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "ql-formats", children: [
|
|
206
|
+
!INDENT_MINUS_ONE && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
207
|
+
import_TippedButton.TippedButton,
|
|
208
|
+
{
|
|
209
|
+
zIndex: userProps?.zIndex || defaultZIndex,
|
|
210
|
+
className: "ql-indent",
|
|
211
|
+
tip: "Indent -1",
|
|
212
|
+
value: "-1"
|
|
213
|
+
}
|
|
214
|
+
),
|
|
215
|
+
!INDENT_PLUS_ONE && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
216
|
+
import_TippedButton.TippedButton,
|
|
217
|
+
{
|
|
218
|
+
zIndex: userProps?.zIndex || defaultZIndex,
|
|
219
|
+
className: "ql-indent",
|
|
220
|
+
tip: "Indent +1",
|
|
221
|
+
value: "+1"
|
|
222
|
+
}
|
|
223
|
+
)
|
|
224
|
+
] }),
|
|
225
|
+
!ALIGN && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "ql-formats", children: [
|
|
226
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "ql-formats", children: [
|
|
227
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
228
|
+
import_TippedButton.TippedButton,
|
|
229
|
+
{
|
|
230
|
+
zIndex: userProps?.zIndex || defaultZIndex,
|
|
231
|
+
className: "ql-align",
|
|
232
|
+
tip: "Left",
|
|
233
|
+
value: ""
|
|
234
|
+
}
|
|
235
|
+
),
|
|
236
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
237
|
+
import_TippedButton.TippedButton,
|
|
238
|
+
{
|
|
239
|
+
zIndex: userProps?.zIndex || defaultZIndex,
|
|
240
|
+
className: "ql-align",
|
|
241
|
+
tip: "Center",
|
|
242
|
+
value: "center"
|
|
243
|
+
}
|
|
244
|
+
),
|
|
245
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
246
|
+
import_TippedButton.TippedButton,
|
|
247
|
+
{
|
|
248
|
+
zIndex: userProps?.zIndex || defaultZIndex,
|
|
249
|
+
className: "ql-align",
|
|
250
|
+
tip: "Right",
|
|
251
|
+
value: "right"
|
|
252
|
+
}
|
|
253
|
+
),
|
|
254
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
255
|
+
import_TippedButton.TippedButton,
|
|
256
|
+
{
|
|
257
|
+
zIndex: userProps?.zIndex || defaultZIndex,
|
|
258
|
+
className: "ql-align",
|
|
259
|
+
tip: "Justify",
|
|
260
|
+
value: "justify"
|
|
261
|
+
}
|
|
262
|
+
)
|
|
263
|
+
] }),
|
|
264
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {})
|
|
265
|
+
] }),
|
|
266
|
+
(!FONT_COLOR || !FONT_BACKGROUND_COLOR) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "ql-formats", children: [
|
|
267
|
+
!FONT_COLOR && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Colors, { zIndex: userProps?.zIndex || defaultZIndex, className: "ql-color", tip: "Font Color" }),
|
|
268
|
+
!FONT_BACKGROUND_COLOR && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Colors, { zIndex: userProps?.zIndex || defaultZIndex, className: "ql-background", tip: "Font Background Color" }),
|
|
269
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {})
|
|
270
|
+
] }),
|
|
271
|
+
(!HYPERLINK || !IMAGE) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "ql-formats", children: [
|
|
272
|
+
!HYPERLINK && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
273
|
+
import_TippedButton.TippedButton,
|
|
274
|
+
{
|
|
275
|
+
zIndex: userProps?.zIndex || defaultZIndex,
|
|
276
|
+
className: "ql-link",
|
|
277
|
+
tip: "Hyperlink: Select Text First"
|
|
278
|
+
}
|
|
279
|
+
),
|
|
280
|
+
!IMAGE && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, { zIndex: userProps?.zIndex || defaultZIndex, className: "ql-image", tip: "Insert Image" }),
|
|
281
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {})
|
|
282
|
+
] }),
|
|
283
|
+
!CLEAR_FORMAT && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ql-formats", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
284
|
+
import_TippedButton.TippedButton,
|
|
285
|
+
{
|
|
286
|
+
zIndex: userProps?.zIndex || defaultZIndex,
|
|
287
|
+
className: "ql-clean",
|
|
288
|
+
tip: "Clear Format (Select Text)"
|
|
289
|
+
}
|
|
290
|
+
) }),
|
|
291
|
+
!SHOW_HTML && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "ql-formats", children: [
|
|
292
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {}),
|
|
293
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
294
|
+
import_TippedButton.TippedButton,
|
|
295
|
+
{
|
|
296
|
+
zIndex: userProps?.zIndex || defaultZIndex,
|
|
297
|
+
style: {
|
|
298
|
+
width: "fit-content",
|
|
299
|
+
color: "#1e79c2",
|
|
300
|
+
fontWeight: "500"
|
|
301
|
+
},
|
|
302
|
+
onClick: handleShowHTML,
|
|
303
|
+
tip: showHTML ? "SHOW TEXT" : "SHOW HTML",
|
|
304
|
+
className: "ql-customFields-html",
|
|
305
|
+
children: showHTML ? "SHOW TEXT" : "SHOW HTML"
|
|
306
|
+
}
|
|
307
|
+
)
|
|
308
|
+
] }),
|
|
309
|
+
customFields && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "ql-formats", children: [
|
|
310
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {}),
|
|
311
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
312
|
+
import_TippedButton.TippedButton,
|
|
313
|
+
{
|
|
314
|
+
zIndex: userProps?.zIndex || defaultZIndex,
|
|
315
|
+
className: "ql-customFields",
|
|
316
|
+
tip: "Insert Custom Field",
|
|
317
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomFields, {})
|
|
318
|
+
}
|
|
319
|
+
)
|
|
320
|
+
] }),
|
|
321
|
+
customItems && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { display: "inline-flex" }, children: customItems.map((Item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
322
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {}),
|
|
323
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Item, {})
|
|
324
|
+
] })) })
|
|
325
|
+
] });
|
|
326
|
+
};
|
|
327
|
+
//# sourceMappingURL=CustomToolbar.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/CustomToolbar.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable complexity */\n/* eslint-disable jsx-a11y/control-has-associated-label */\n/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\n/* eslint-disable react/button-has-type */\nimport React, { useState, useContext } from 'react';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { Grid } from '@elliemae/ds-grid';\nimport { ArrowheadDown } from '@elliemae/ds-icons';\nimport { DSDropdownMenu } from '@elliemae/ds-dropdownmenu';\nimport { colors, fonts, sizes, sizesReal } from '../constants.js';\nimport { TippedButton } from './TippedButton.js';\nimport { TippedSelect } from './TippedSelect.js';\n\n// Functions -----------------------------------------\nconst optionsToValues = (options) => options.map((opt) => opt.toLowerCase().replace(' ', '-'));\n\n// Stateless Components -----------------------------------------\n\nconst CustomFields = () => <span>\u1438\u1433</span>; // eslint-disable-line react/jsx-one-expression-per-line\nconst Color = ({ color }) => <option value={color} />;\nconst Colors = ({ className, tip, zIndex }) => (\n <TippedSelect className={className} tip={tip} zIndex={zIndex}>\n {colors.map((color) => (\n <Color key={color} color={color} />\n ))}\n </TippedSelect>\n);\n\nexport const CustomDropdown = ({\n options,\n label,\n onSelectMenuItem = () => null,\n onClickOutsideMenu = () => null,\n onClose = () => null,\n closeMenuOnItemSelection,\n isOpen,\n minWidth,\n maxWidth,\n zIndex = 10,\n}) => (\n <DSDropdownMenu\n onClickOutsideMenu={onClickOutsideMenu}\n options={options}\n onSelectMenuItem={onSelectMenuItem}\n onClose={onClose}\n closeMenuOnItemSelection={closeMenuOnItemSelection}\n isOpen={isOpen}\n minWidth={minWidth}\n maxWidth={maxWidth}\n zIndex={zIndex}\n preventOverflow=\"scrollParent\"\n triggerComponent={\n <DSButtonV2 buttonType=\"text\" aria-label={label}>\n <Grid gap=\"xxs\" cols={['auto', 'max-content']}>\n {label}\n <ArrowheadDown />\n </Grid>\n </DSButtonV2>\n }\n />\n);\n\nconst Divider = () => (\n <div\n style={{\n height: '21px',\n width: '1px',\n margin: '0 10px',\n padding: '0',\n borderLeft: '1px solid #bbb',\n display: 'inline-block',\n }}\n ></div>\n);\n\nexport const CustomToolbar = ({\n customFields,\n customItems = [],\n hideItems = {},\n onShowHTML = () => {},\n id = 'toolbar',\n userProps,\n}) => {\n const {\n HEADER,\n FONT,\n FONT_SIZE,\n BOLD,\n ITALIC,\n UNDERLINE,\n STRIKE,\n SUB,\n SUPER,\n ORDERED_LIST,\n BULLET_LIST,\n INDENT_MINUS_ONE,\n INDENT_PLUS_ONE,\n ALIGN,\n FONT_COLOR,\n FONT_BACKGROUND_COLOR,\n HYPERLINK,\n IMAGE,\n CLEAR_FORMAT,\n SHOW_HTML,\n } = hideItems;\n const [showHTML, setShowHTML] = useState(false);\n\n const handleShowHTML = (e) => {\n e.preventDefault();\n setShowHTML(!showHTML);\n onShowHTML();\n };\n\n const theme = useContext(ThemeContext);\n const defaultZIndex = theme?.zIndex?.tooltip;\n return (\n <div id={id} className=\"ds-ql-custom-toolbar\">\n {(!HEADER || !FONT || !FONT_SIZE) && (\n <span className=\"ql-formats\">\n {!HEADER && (\n <>\n <TippedSelect\n className=\"ql-header\"\n tip=\"Header\"\n values={['', '1', '2', '3', '4', '5', '6']}\n zIndex={userProps?.zIndex || defaultZIndex}\n />\n <Divider />\n </>\n )}\n {!FONT && (\n <>\n <TippedSelect\n className=\"ql-font\"\n defaultValue=\"sans-serif\"\n options={fonts}\n tip=\"Font\"\n values={optionsToValues(fonts)}\n zIndex={userProps?.zIndex || defaultZIndex}\n />\n <Divider />\n </>\n )}\n {!FONT_SIZE && (\n <>\n <TippedSelect\n className=\"ql-size\"\n options={sizes}\n tip=\"Font Size\"\n values={optionsToValues(sizesReal)}\n zIndex={userProps?.zIndex || defaultZIndex}\n />\n <Divider />\n </>\n )}\n </span>\n )}\n {(!BOLD || !ITALIC || !UNDERLINE || !STRIKE) && (\n <span className=\"ql-formats\">\n {!BOLD && <TippedButton zIndex={userProps?.zIndex || defaultZIndex} className=\"ql-bold\" tip=\"Bold\" />}\n {!ITALIC && <TippedButton zIndex={userProps?.zIndex || defaultZIndex} className=\"ql-italic\" tip=\"Italic\" />}\n {!UNDERLINE && (\n <TippedButton zIndex={userProps?.zIndex || defaultZIndex} className=\"ql-underline\" tip=\"Underline\" />\n )}\n {!STRIKE && <TippedButton zIndex={userProps?.zIndex || defaultZIndex} className=\"ql-strike\" tip=\"Strike\" />}\n </span>\n )}\n {(!SUB || !SUPER) && (\n <span className=\"ql-formats\">\n {!SUB && (\n <TippedButton zIndex={userProps?.zIndex || defaultZIndex} className=\"ql-script\" tip=\"Sub\" value=\"sub\" />\n )}\n {!SUPER && (\n <TippedButton zIndex={userProps?.zIndex || defaultZIndex} className=\"ql-script\" tip=\"Super\" value=\"super\" />\n )}\n <Divider />\n </span>\n )}\n {(!ORDERED_LIST || !BULLET_LIST) && (\n <span className=\"ql-formats\">\n {!ORDERED_LIST && (\n <TippedButton\n zIndex={userProps?.zIndex || defaultZIndex}\n className=\"ql-list\"\n tip=\"Ordered List\"\n value=\"ordered\"\n />\n )}\n {!BULLET_LIST && (\n <TippedButton\n zIndex={userProps?.zIndex || defaultZIndex}\n className=\"ql-list\"\n tip=\"Bullet List\"\n value=\"bullet\"\n />\n )}\n </span>\n )}\n {(!INDENT_MINUS_ONE || !INDENT_PLUS_ONE) && (\n <span className=\"ql-formats\">\n {!INDENT_MINUS_ONE && (\n <TippedButton\n zIndex={userProps?.zIndex || defaultZIndex}\n className=\"ql-indent\"\n tip=\"Indent -1\"\n value=\"-1\"\n />\n )}\n {!INDENT_PLUS_ONE && (\n <TippedButton\n zIndex={userProps?.zIndex || defaultZIndex}\n className=\"ql-indent\"\n tip=\"Indent +1\"\n value=\"+1\"\n />\n )}\n </span>\n )}\n {!ALIGN && (\n <span className=\"ql-formats\">\n {/* <TippedSelect zIndex={userProps?.zIndex || defaultZIndex} className=\"ql-align\" tip=\"Align\"/> */}\n {/* \n quill js has a bug where using ql-align with the html tag \"select\" leave us with a can not read property innerhtml of undefined\n we can't update quill js because it's a peer dependency of react-quill\n this is a workaround to keep provide the ql-align module but not use the html tag \"select\"\n */}\n <span className=\"ql-formats\">\n <TippedButton\n zIndex={userProps?.zIndex || defaultZIndex}\n className=\"ql-align\"\n tip=\"Left\"\n value=\"\"\n ></TippedButton>\n <TippedButton\n zIndex={userProps?.zIndex || defaultZIndex}\n className=\"ql-align\"\n tip=\"Center\"\n value=\"center\"\n ></TippedButton>\n <TippedButton\n zIndex={userProps?.zIndex || defaultZIndex}\n className=\"ql-align\"\n tip=\"Right\"\n value=\"right\"\n ></TippedButton>\n <TippedButton\n zIndex={userProps?.zIndex || defaultZIndex}\n className=\"ql-align\"\n tip=\"Justify\"\n value=\"justify\"\n ></TippedButton>\n </span>\n <Divider />\n </span>\n )}\n {(!FONT_COLOR || !FONT_BACKGROUND_COLOR) && (\n <span className=\"ql-formats\">\n {!FONT_COLOR && <Colors zIndex={userProps?.zIndex || defaultZIndex} className=\"ql-color\" tip=\"Font Color\" />}\n {!FONT_BACKGROUND_COLOR && (\n <Colors zIndex={userProps?.zIndex || defaultZIndex} className=\"ql-background\" tip=\"Font Background Color\" />\n )}\n <Divider />\n </span>\n )}\n {(!HYPERLINK || !IMAGE) && (\n <span className=\"ql-formats\">\n {!HYPERLINK && (\n <TippedButton\n zIndex={userProps?.zIndex || defaultZIndex}\n className=\"ql-link\"\n tip=\"Hyperlink: Select Text First\"\n />\n )}\n {!IMAGE && (\n <TippedButton zIndex={userProps?.zIndex || defaultZIndex} className=\"ql-image\" tip=\"Insert Image\" />\n )}\n <Divider />\n </span>\n )}\n {!CLEAR_FORMAT && (\n <span className=\"ql-formats\">\n <TippedButton\n zIndex={userProps?.zIndex || defaultZIndex}\n className=\"ql-clean\"\n tip=\"Clear Format (Select Text)\"\n />\n </span>\n )}\n {!SHOW_HTML && (\n <span className=\"ql-formats\">\n <Divider />\n <TippedButton\n zIndex={userProps?.zIndex || defaultZIndex}\n style={{\n width: 'fit-content',\n color: '#1e79c2',\n fontWeight: '500',\n }}\n onClick={handleShowHTML}\n tip={showHTML ? 'SHOW TEXT' : 'SHOW HTML'}\n className=\"ql-customFields-html\"\n >\n {showHTML ? 'SHOW TEXT' : 'SHOW HTML'}\n </TippedButton>\n </span>\n )}\n {customFields && (\n <span className=\"ql-formats\">\n <Divider />\n <TippedButton\n zIndex={userProps?.zIndex || defaultZIndex}\n className=\"ql-customFields\"\n tip=\"Insert Custom Field\"\n >\n <CustomFields />\n </TippedButton>\n </span>\n )}\n {customItems && (\n <span style={{ display: 'inline-flex' }}>\n {customItems.map((Item) => (\n <>\n <Divider />\n <Item />\n </>\n ))}\n </span>\n )}\n </div>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqBI;AAf3B,mBAA4C;AAC5C,uBAA6B;AAC7B,0BAA2B;AAC3B,qBAAqB;AACrB,sBAA8B;AAC9B,6BAA+B;AAC/B,uBAAgD;AAChD,0BAA6B;AAC7B,0BAA6B;AAG7B,MAAM,kBAAkB,CAAC,YAAY,QAAQ,IAAI,CAAC,QAAQ,IAAI,YAAY,EAAE,QAAQ,KAAK,GAAG,CAAC;AAI7F,MAAM,eAAe,MAAM,4CAAC,UAAK,0BAAE;AACnC,MAAM,QAAQ,CAAC,EAAE,MAAM,MAAM,4CAAC,YAAO,OAAO,OAAO;AACnD,MAAM,SAAS,CAAC,EAAE,WAAW,KAAK,OAAO,MACvC,4CAAC,oCAAa,WAAsB,KAAU,QAC3C,kCAAO,IAAI,CAAC,UACX,4CAAC,SAAkB,SAAP,KAAqB,CAClC,GACH;AAGK,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA,mBAAmB,MAAM;AAAA,EACzB,qBAAqB,MAAM;AAAA,EAC3B,U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