@elliemae/ds-wysiwygeditor 3.5.0-rc.9 → 3.6.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.
Files changed (33) hide show
  1. package/dist/cjs/DSWYSIWYGEditor.js +3 -2
  2. package/dist/cjs/DSWYSIWYGEditor.js.map +2 -2
  3. package/dist/cjs/components/CustomImageUploader.js +47 -34
  4. package/dist/cjs/components/CustomImageUploader.js.map +2 -2
  5. package/dist/cjs/components/CustomToolbar.js +229 -142
  6. package/dist/cjs/components/CustomToolbar.js.map +2 -2
  7. package/dist/cjs/components/DSWYSIWYGEditorImpl.js +47 -39
  8. package/dist/cjs/components/DSWYSIWYGEditorImpl.js.map +1 -1
  9. package/dist/cjs/components/ImageLibraryModal.js +2 -1
  10. package/dist/cjs/components/ImageLibraryModal.js.map +1 -1
  11. package/dist/cjs/components/InsertFieldModal.js +42 -21
  12. package/dist/cjs/components/InsertFieldModal.js.map +1 -1
  13. package/dist/cjs/components/TippedButton.js +19 -16
  14. package/dist/cjs/components/TippedButton.js.map +2 -2
  15. package/dist/cjs/components/TippedSelect.js +24 -19
  16. package/dist/cjs/components/TippedSelect.js.map +2 -2
  17. package/dist/esm/DSWYSIWYGEditor.js +3 -2
  18. package/dist/esm/DSWYSIWYGEditor.js.map +2 -2
  19. package/dist/esm/components/CustomImageUploader.js +47 -34
  20. package/dist/esm/components/CustomImageUploader.js.map +2 -2
  21. package/dist/esm/components/CustomToolbar.js +229 -142
  22. package/dist/esm/components/CustomToolbar.js.map +2 -2
  23. package/dist/esm/components/DSWYSIWYGEditorImpl.js +47 -39
  24. package/dist/esm/components/DSWYSIWYGEditorImpl.js.map +1 -1
  25. package/dist/esm/components/ImageLibraryModal.js +2 -1
  26. package/dist/esm/components/ImageLibraryModal.js.map +1 -1
  27. package/dist/esm/components/InsertFieldModal.js +42 -21
  28. package/dist/esm/components/InsertFieldModal.js.map +1 -1
  29. package/dist/esm/components/TippedButton.js +19 -16
  30. package/dist/esm/components/TippedButton.js.map +2 -2
  31. package/dist/esm/components/TippedSelect.js +24 -19
  32. package/dist/esm/components/TippedSelect.js.map +2 -2
  33. package/package.json +10 -10
@@ -30,7 +30,8 @@ __export(DSWYSIWYGEditor_exports, {
30
30
  });
31
31
  module.exports = __toCommonJS(DSWYSIWYGEditor_exports);
32
32
  var React = __toESM(require("react"));
33
- var import_react = __toESM(require("react"));
33
+ var import_jsx_runtime = require("react/jsx-runtime");
34
+ var import_react = require("react");
34
35
  var import_ds_utilities = require("@elliemae/ds-utilities");
35
36
  var import_DSWYSIWYGEditorImpl = __toESM(require("./components/DSWYSIWYGEditorImpl"));
36
37
  const DSWYSIWYGEditor = ({
@@ -49,7 +50,7 @@ const DSWYSIWYGEditor = ({
49
50
  };
50
51
  const [showHTML, setShowHTML] = (0, import_react.useState)(showRawHTML);
51
52
  (0, import_react.useEffect)(() => setShowHTML(showRawHTML), [showRawHTML]);
52
- return /* @__PURE__ */ import_react.default.createElement(import_DSWYSIWYGEditorImpl.default, {
53
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSWYSIWYGEditorImpl.default, {
53
54
  forceHttpLink: true,
54
55
  handleCustomFieldClick: emptyAction,
55
56
  handleImageClick: emptyAction,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/DSWYSIWYGEditor.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
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": ";;;;;;;;;;;;;;;;;;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;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF,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;AAAA,IACzB;AAAA,EACF;AAAA,EACA,WAAW,8BAAU,OAAO,YAAY,mDAAmD,EAAE,aAAa,CAAC,CAAC;AAAA,EAC5G,QAAQ,8BAAU,OAAO;AAAA,IACvB;AAAA,EACF;AACF;AAEA,gBAAgB,YAAY;AAC5B,gBAAgB,cAAc;AAC9B,MAAM,uBAAmB,8BAAS,eAAe;AACjD,iBAAiB,YAAY;AAG7B,IAAO,0BAAQ;",
6
+ "names": ["DSWYSIWYGEditorImpl"]
7
7
  }
@@ -28,7 +28,8 @@ __export(CustomImageUploader_exports, {
28
28
  });
29
29
  module.exports = __toCommonJS(CustomImageUploader_exports);
30
30
  var React = __toESM(require("react"));
31
- var import_react = __toESM(require("react"));
31
+ var import_jsx_runtime = require("react/jsx-runtime");
32
+ var import_react = require("react");
32
33
  var import_ds_icons = require("@elliemae/ds-icons");
33
34
  var import_ds_uploader = __toESM(require("@elliemae/ds-uploader"));
34
35
  var import_ds_modal = __toESM(require("@elliemae/ds-modal"));
@@ -83,38 +84,50 @@ const CustomImageUploader = ({
83
84
  }
84
85
  }
85
86
  };
86
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_TippedButton.TippedButton, {
87
- zIndex,
88
- tip: "Insert Image",
89
- onClick: () => {
90
- setLastSelection(quillRef?.getEditor().getSelection());
91
- setIsOpen(true);
92
- }
93
- }, /* @__PURE__ */ import_react.default.createElement(import_ds_icons.Image, {
94
- color: ["neutral", 500],
95
- size: "s"
96
- })), /* @__PURE__ */ import_react.default.createElement(import_ds_modal.default, {
97
- isOpen,
98
- title: "",
99
- onConfirm: () => {
100
- setIsOpen(false);
101
- },
102
- onClose: () => {
103
- setIsOpen(false);
104
- },
105
- showClose: true,
106
- version: 2,
107
- size: "xsmall",
108
- modalType: import_ds_modal.MODAL_TYPE_V2.DECISION,
109
- confirmLabel: "Cancel",
110
- message: ""
111
- }, !inProgress && /* @__PURE__ */ import_react.default.createElement(import_ds_uploader.default, {
112
- containerProps: { id: elementId },
113
- showAltAction: false,
114
- acceptedTypesText: allowedImageTypes,
115
- onDrop: handleFileChange
116
- }), inProgress && "Upload in progress...", error && /* @__PURE__ */ import_react.default.createElement("div", {
117
- style: { color: "red", marginTop: "10px" }
118
- }, error)));
87
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
88
+ children: [
89
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, {
90
+ zIndex,
91
+ tip: "Insert Image",
92
+ onClick: () => {
93
+ setLastSelection(quillRef?.getEditor().getSelection());
94
+ setIsOpen(true);
95
+ },
96
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.Image, {
97
+ color: ["neutral", 500],
98
+ size: "s"
99
+ })
100
+ }),
101
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_modal.default, {
102
+ isOpen,
103
+ title: "",
104
+ onConfirm: () => {
105
+ setIsOpen(false);
106
+ },
107
+ onClose: () => {
108
+ setIsOpen(false);
109
+ },
110
+ showClose: true,
111
+ version: 2,
112
+ size: "xsmall",
113
+ modalType: import_ds_modal.MODAL_TYPE_V2.DECISION,
114
+ confirmLabel: "Cancel",
115
+ message: "",
116
+ children: [
117
+ !inProgress && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_uploader.default, {
118
+ containerProps: { id: elementId },
119
+ showAltAction: false,
120
+ acceptedTypesText: allowedImageTypes,
121
+ onDrop: handleFileChange
122
+ }),
123
+ inProgress && "Upload in progress...",
124
+ error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
125
+ style: { color: "red", marginTop: "10px" },
126
+ children: error
127
+ })
128
+ ]
129
+ })
130
+ ]
131
+ });
119
132
  };
120
133
  //# sourceMappingURL=CustomImageUploader.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/CustomImageUploader.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
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';\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;ADIvB,mBAAgC;AAChC,sBAAsB;AACtB,yBAAuB;AACvB,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,EAC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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,4CAAC,mBAAAC,SAAA;AAAA,YACC,gBAAgB,EAAE,IAAI,UAAU;AAAA,YAChC,eAAe;AAAA,YACf,mBAAmB;AAAA,YACnB,QAAQ;AAAA,WACV;AAAA,UAED,cAAc;AAAA,UACd,SAAS,4CAAC;AAAA,YAAI,OAAO,EAAE,OAAO,OAAO,WAAW,OAAO;AAAA,YAAI;AAAA,WAAM;AAAA;AAAA,OACpE;AAAA;AAAA,GACF;AAEJ;",
6
+ "names": ["DSModal", "DSUploader"]
7
7
  }
@@ -29,7 +29,8 @@ __export(CustomToolbar_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(CustomToolbar_exports);
31
31
  var React = __toESM(require("react"));
32
- var import_react = __toESM(require("react"));
32
+ var import_jsx_runtime = require("react/jsx-runtime");
33
+ var import_react = require("react");
33
34
  var import_ds_button = __toESM(require("@elliemae/ds-button"));
34
35
  var import_ds_icons = require("@elliemae/ds-icons");
35
36
  var import_ds_dropdownmenu = __toESM(require("@elliemae/ds-dropdownmenu"));
@@ -37,18 +38,20 @@ var import_constants = require("../constants");
37
38
  var import_TippedButton = require("./TippedButton");
38
39
  var import_TippedSelect = require("./TippedSelect");
39
40
  const optionsToValues = (options) => options.map((opt) => opt.toLowerCase().replace(" ", "-"));
40
- const CustomFields = () => /* @__PURE__ */ import_react.default.createElement("span", null, "\u1438\u1433");
41
- const Color = ({ color }) => /* @__PURE__ */ import_react.default.createElement("option", {
41
+ const CustomFields = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
42
+ children: "\u1438\u1433"
43
+ });
44
+ const Color = ({ color }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", {
42
45
  value: color
43
46
  });
44
- const Colors = ({ className, tip, zIndex }) => /* @__PURE__ */ import_react.default.createElement(import_TippedSelect.TippedSelect, {
47
+ const Colors = ({ className, tip, zIndex }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedSelect.TippedSelect, {
45
48
  className,
46
49
  tip,
47
- zIndex
48
- }, import_constants.colors.map((color) => /* @__PURE__ */ import_react.default.createElement(Color, {
49
- key: color,
50
- color
51
- })));
50
+ zIndex,
51
+ children: import_constants.colors.map((color) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Color, {
52
+ color
53
+ }, color))
54
+ });
52
55
  const CustomDropdown = ({
53
56
  options,
54
57
  label,
@@ -60,7 +63,7 @@ const CustomDropdown = ({
60
63
  minWidth,
61
64
  maxWidth,
62
65
  zIndex = 10
63
- }) => /* @__PURE__ */ import_react.default.createElement(import_ds_dropdownmenu.default, {
66
+ }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dropdownmenu.default, {
64
67
  onClickOutsideMenu,
65
68
  options,
66
69
  onSelectMenuItem,
@@ -71,13 +74,13 @@ const CustomDropdown = ({
71
74
  maxWidth,
72
75
  zIndex,
73
76
  preventOverflow: "scrollParent",
74
- triggerComponent: /* @__PURE__ */ import_react.default.createElement(import_ds_button.default, {
77
+ triggerComponent: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.default, {
75
78
  labelText: label,
76
79
  buttonType: "text",
77
- icon: /* @__PURE__ */ import_react.default.createElement(import_ds_icons.ArrowheadDown, null)
80
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ArrowheadDown, {})
78
81
  })
79
82
  });
80
- const Divider = () => /* @__PURE__ */ import_react.default.createElement("div", {
83
+ const Divider = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
81
84
  style: {
82
85
  height: "21px",
83
86
  width: "1px",
@@ -124,135 +127,219 @@ const CustomToolbar = ({
124
127
  setShowHTML(!showHTML);
125
128
  onShowHTML();
126
129
  };
127
- return /* @__PURE__ */ import_react.default.createElement("div", {
130
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
128
131
  id,
129
- className: "ds-ql-custom-toolbar"
130
- }, (!HEADER || !FONT || !FONT_SIZE) && /* @__PURE__ */ import_react.default.createElement("span", {
131
- className: "ql-formats"
132
- }, !HEADER && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_TippedSelect.TippedSelect, {
133
- className: "ql-header",
134
- tip: "Header",
135
- values: ["", "1", "2", "3", "4", "5", "6"],
136
- zIndex: userProps?.zIndex || 1
137
- }), /* @__PURE__ */ import_react.default.createElement(Divider, null)), !FONT && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_TippedSelect.TippedSelect, {
138
- className: "ql-font",
139
- defaultValue: "sans-serif",
140
- options: import_constants.fonts,
141
- tip: "Font",
142
- values: optionsToValues(import_constants.fonts),
143
- zIndex: userProps?.zIndex || 1
144
- }), /* @__PURE__ */ import_react.default.createElement(Divider, null)), !FONT_SIZE && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_TippedSelect.TippedSelect, {
145
- className: "ql-size",
146
- options: import_constants.sizes,
147
- tip: "Font Size",
148
- values: optionsToValues(import_constants.sizesReal),
149
- zIndex: userProps?.zIndex || 1
150
- }), /* @__PURE__ */ import_react.default.createElement(Divider, null))), (!BOLD || !ITALIC || !UNDERLINE || !STRIKE) && /* @__PURE__ */ import_react.default.createElement("span", {
151
- className: "ql-formats"
152
- }, !BOLD && /* @__PURE__ */ import_react.default.createElement(import_TippedButton.TippedButton, {
153
- zIndex: userProps?.zIndex || 1,
154
- className: "ql-bold",
155
- tip: "Bold"
156
- }), !ITALIC && /* @__PURE__ */ import_react.default.createElement(import_TippedButton.TippedButton, {
157
- zIndex: userProps?.zIndex || 1,
158
- className: "ql-italic",
159
- tip: "Italic"
160
- }), !UNDERLINE && /* @__PURE__ */ import_react.default.createElement(import_TippedButton.TippedButton, {
161
- zIndex: userProps?.zIndex || 1,
162
- className: "ql-underline",
163
- tip: "Underline"
164
- }), !STRIKE && /* @__PURE__ */ import_react.default.createElement(import_TippedButton.TippedButton, {
165
- zIndex: userProps?.zIndex || 1,
166
- className: "ql-strike",
167
- tip: "Strike"
168
- })), (!SUB || !SUPER) && /* @__PURE__ */ import_react.default.createElement("span", {
169
- className: "ql-formats"
170
- }, !SUB && /* @__PURE__ */ import_react.default.createElement(import_TippedButton.TippedButton, {
171
- zIndex: userProps?.zIndex || 1,
172
- className: "ql-script",
173
- tip: "Sub",
174
- value: "sub"
175
- }), !SUPER && /* @__PURE__ */ import_react.default.createElement(import_TippedButton.TippedButton, {
176
- zIndex: userProps?.zIndex || 1,
177
- className: "ql-script",
178
- tip: "Super",
179
- value: "super"
180
- }), /* @__PURE__ */ import_react.default.createElement(Divider, null)), (!ORDERED_LIST || !BULLET_LIST) && /* @__PURE__ */ import_react.default.createElement("span", {
181
- className: "ql-formats"
182
- }, !ORDERED_LIST && /* @__PURE__ */ import_react.default.createElement(import_TippedButton.TippedButton, {
183
- zIndex: userProps?.zIndex || 1,
184
- className: "ql-list",
185
- tip: "Ordered List",
186
- value: "ordered"
187
- }), !BULLET_LIST && /* @__PURE__ */ import_react.default.createElement(import_TippedButton.TippedButton, {
188
- zIndex: userProps?.zIndex || 1,
189
- className: "ql-list",
190
- tip: "Bullet List",
191
- value: "bullet"
192
- })), (!INDENT_MINUS_ONE || !INDENT_PLUS_ONE) && /* @__PURE__ */ import_react.default.createElement("span", {
193
- className: "ql-formats"
194
- }, !INDENT_MINUS_ONE && /* @__PURE__ */ import_react.default.createElement(import_TippedButton.TippedButton, {
195
- zIndex: userProps?.zIndex || 1,
196
- className: "ql-indent",
197
- tip: "Indent -1",
198
- value: "-1"
199
- }), !INDENT_PLUS_ONE && /* @__PURE__ */ import_react.default.createElement(import_TippedButton.TippedButton, {
200
- zIndex: userProps?.zIndex || 1,
201
- className: "ql-indent",
202
- tip: "Indent +1",
203
- value: "+1"
204
- })), !ALIGN && /* @__PURE__ */ import_react.default.createElement("span", {
205
- className: "ql-formats"
206
- }, /* @__PURE__ */ import_react.default.createElement(import_TippedSelect.TippedSelect, {
207
- zIndex: userProps?.zIndex || 1,
208
- className: "ql-align",
209
- tip: "Align"
210
- }), /* @__PURE__ */ import_react.default.createElement(Divider, null)), (!FONT_COLOR || !FONT_BACKGROUND_COLOR) && /* @__PURE__ */ import_react.default.createElement("span", {
211
- className: "ql-formats"
212
- }, !FONT_COLOR && /* @__PURE__ */ import_react.default.createElement(Colors, {
213
- zIndex: userProps?.zIndex || 1,
214
- className: "ql-color",
215
- tip: "Font Color"
216
- }), !FONT_BACKGROUND_COLOR && /* @__PURE__ */ import_react.default.createElement(Colors, {
217
- zIndex: userProps?.zIndex || 1,
218
- className: "ql-background",
219
- tip: "Font Background Color"
220
- }), /* @__PURE__ */ import_react.default.createElement(Divider, null)), (!HYPERLINK || !IMAGE) && /* @__PURE__ */ import_react.default.createElement("span", {
221
- className: "ql-formats"
222
- }, !HYPERLINK && /* @__PURE__ */ import_react.default.createElement(import_TippedButton.TippedButton, {
223
- zIndex: userProps?.zIndex || 1,
224
- className: "ql-link",
225
- tip: "Hyperlink: Select Text First"
226
- }), !IMAGE && /* @__PURE__ */ import_react.default.createElement(import_TippedButton.TippedButton, {
227
- zIndex: userProps?.zIndex || 1,
228
- className: "ql-image",
229
- tip: "Insert Image"
230
- }), /* @__PURE__ */ import_react.default.createElement(Divider, null)), !CLEAR_FORMAT && /* @__PURE__ */ import_react.default.createElement("span", {
231
- className: "ql-formats"
232
- }, /* @__PURE__ */ import_react.default.createElement(import_TippedButton.TippedButton, {
233
- zIndex: userProps?.zIndex || 1,
234
- className: "ql-clean",
235
- tip: "Clear Format (Select Text)"
236
- })), !SHOW_HTML && /* @__PURE__ */ import_react.default.createElement("span", {
237
- className: "ql-formats"
238
- }, /* @__PURE__ */ import_react.default.createElement(Divider, null), /* @__PURE__ */ import_react.default.createElement(import_TippedButton.TippedButton, {
239
- zIndex: userProps?.zIndex || 1,
240
- style: {
241
- width: "fit-content",
242
- color: "#1e79c2",
243
- fontWeight: "500"
244
- },
245
- onClick: handleShowHTML,
246
- tip: showHTML ? "SHOW TEXT" : "SHOW HTML",
247
- className: "ql-customFields-html"
248
- }, showHTML ? "SHOW TEXT" : "SHOW HTML")), customFields && /* @__PURE__ */ import_react.default.createElement("span", {
249
- className: "ql-formats"
250
- }, /* @__PURE__ */ import_react.default.createElement(Divider, null), /* @__PURE__ */ import_react.default.createElement(import_TippedButton.TippedButton, {
251
- zIndex: userProps?.zIndex || 1,
252
- className: "ql-customFields",
253
- tip: "Insert Custom Field"
254
- }, /* @__PURE__ */ import_react.default.createElement(CustomFields, null))), customItems && /* @__PURE__ */ import_react.default.createElement("span", {
255
- style: { display: "inline-flex" }
256
- }, customItems.map((Item) => /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(Divider, null), /* @__PURE__ */ import_react.default.createElement(Item, null)))));
132
+ className: "ds-ql-custom-toolbar",
133
+ children: [
134
+ (!HEADER || !FONT || !FONT_SIZE) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
135
+ className: "ql-formats",
136
+ children: [
137
+ !HEADER && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
138
+ children: [
139
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedSelect.TippedSelect, {
140
+ className: "ql-header",
141
+ tip: "Header",
142
+ values: ["", "1", "2", "3", "4", "5", "6"],
143
+ zIndex: userProps?.zIndex || 1
144
+ }),
145
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {})
146
+ ]
147
+ }),
148
+ !FONT && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
149
+ children: [
150
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedSelect.TippedSelect, {
151
+ className: "ql-font",
152
+ defaultValue: "sans-serif",
153
+ options: import_constants.fonts,
154
+ tip: "Font",
155
+ values: optionsToValues(import_constants.fonts),
156
+ zIndex: userProps?.zIndex || 1
157
+ }),
158
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {})
159
+ ]
160
+ }),
161
+ !FONT_SIZE && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
162
+ children: [
163
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedSelect.TippedSelect, {
164
+ className: "ql-size",
165
+ options: import_constants.sizes,
166
+ tip: "Font Size",
167
+ values: optionsToValues(import_constants.sizesReal),
168
+ zIndex: userProps?.zIndex || 1
169
+ }),
170
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {})
171
+ ]
172
+ })
173
+ ]
174
+ }),
175
+ (!BOLD || !ITALIC || !UNDERLINE || !STRIKE) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
176
+ className: "ql-formats",
177
+ children: [
178
+ !BOLD && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, {
179
+ zIndex: userProps?.zIndex || 1,
180
+ className: "ql-bold",
181
+ tip: "Bold"
182
+ }),
183
+ !ITALIC && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, {
184
+ zIndex: userProps?.zIndex || 1,
185
+ className: "ql-italic",
186
+ tip: "Italic"
187
+ }),
188
+ !UNDERLINE && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, {
189
+ zIndex: userProps?.zIndex || 1,
190
+ className: "ql-underline",
191
+ tip: "Underline"
192
+ }),
193
+ !STRIKE && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, {
194
+ zIndex: userProps?.zIndex || 1,
195
+ className: "ql-strike",
196
+ tip: "Strike"
197
+ })
198
+ ]
199
+ }),
200
+ (!SUB || !SUPER) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
201
+ className: "ql-formats",
202
+ children: [
203
+ !SUB && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, {
204
+ zIndex: userProps?.zIndex || 1,
205
+ className: "ql-script",
206
+ tip: "Sub",
207
+ value: "sub"
208
+ }),
209
+ !SUPER && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, {
210
+ zIndex: userProps?.zIndex || 1,
211
+ className: "ql-script",
212
+ tip: "Super",
213
+ value: "super"
214
+ }),
215
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {})
216
+ ]
217
+ }),
218
+ (!ORDERED_LIST || !BULLET_LIST) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
219
+ className: "ql-formats",
220
+ children: [
221
+ !ORDERED_LIST && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, {
222
+ zIndex: userProps?.zIndex || 1,
223
+ className: "ql-list",
224
+ tip: "Ordered List",
225
+ value: "ordered"
226
+ }),
227
+ !BULLET_LIST && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, {
228
+ zIndex: userProps?.zIndex || 1,
229
+ className: "ql-list",
230
+ tip: "Bullet List",
231
+ value: "bullet"
232
+ })
233
+ ]
234
+ }),
235
+ (!INDENT_MINUS_ONE || !INDENT_PLUS_ONE) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
236
+ className: "ql-formats",
237
+ children: [
238
+ !INDENT_MINUS_ONE && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, {
239
+ zIndex: userProps?.zIndex || 1,
240
+ className: "ql-indent",
241
+ tip: "Indent -1",
242
+ value: "-1"
243
+ }),
244
+ !INDENT_PLUS_ONE && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, {
245
+ zIndex: userProps?.zIndex || 1,
246
+ className: "ql-indent",
247
+ tip: "Indent +1",
248
+ value: "+1"
249
+ })
250
+ ]
251
+ }),
252
+ !ALIGN && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
253
+ className: "ql-formats",
254
+ children: [
255
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedSelect.TippedSelect, {
256
+ zIndex: userProps?.zIndex || 1,
257
+ className: "ql-align",
258
+ tip: "Align"
259
+ }),
260
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {})
261
+ ]
262
+ }),
263
+ (!FONT_COLOR || !FONT_BACKGROUND_COLOR) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
264
+ className: "ql-formats",
265
+ children: [
266
+ !FONT_COLOR && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Colors, {
267
+ zIndex: userProps?.zIndex || 1,
268
+ className: "ql-color",
269
+ tip: "Font Color"
270
+ }),
271
+ !FONT_BACKGROUND_COLOR && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Colors, {
272
+ zIndex: userProps?.zIndex || 1,
273
+ className: "ql-background",
274
+ tip: "Font Background Color"
275
+ }),
276
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {})
277
+ ]
278
+ }),
279
+ (!HYPERLINK || !IMAGE) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
280
+ className: "ql-formats",
281
+ children: [
282
+ !HYPERLINK && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, {
283
+ zIndex: userProps?.zIndex || 1,
284
+ className: "ql-link",
285
+ tip: "Hyperlink: Select Text First"
286
+ }),
287
+ !IMAGE && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, {
288
+ zIndex: userProps?.zIndex || 1,
289
+ className: "ql-image",
290
+ tip: "Insert Image"
291
+ }),
292
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {})
293
+ ]
294
+ }),
295
+ !CLEAR_FORMAT && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
296
+ className: "ql-formats",
297
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, {
298
+ zIndex: userProps?.zIndex || 1,
299
+ className: "ql-clean",
300
+ tip: "Clear Format (Select Text)"
301
+ })
302
+ }),
303
+ !SHOW_HTML && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
304
+ className: "ql-formats",
305
+ children: [
306
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {}),
307
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, {
308
+ zIndex: userProps?.zIndex || 1,
309
+ style: {
310
+ width: "fit-content",
311
+ color: "#1e79c2",
312
+ fontWeight: "500"
313
+ },
314
+ onClick: handleShowHTML,
315
+ tip: showHTML ? "SHOW TEXT" : "SHOW HTML",
316
+ className: "ql-customFields-html",
317
+ children: showHTML ? "SHOW TEXT" : "SHOW HTML"
318
+ })
319
+ ]
320
+ }),
321
+ customFields && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
322
+ className: "ql-formats",
323
+ children: [
324
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {}),
325
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedButton.TippedButton, {
326
+ zIndex: userProps?.zIndex || 1,
327
+ className: "ql-customFields",
328
+ tip: "Insert Custom Field",
329
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomFields, {})
330
+ })
331
+ ]
332
+ }),
333
+ customItems && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
334
+ style: { display: "inline-flex" },
335
+ children: customItems.map((Item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
336
+ children: [
337
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Divider, {}),
338
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Item, {})
339
+ ]
340
+ }))
341
+ })
342
+ ]
343
+ });
257
344
  };
258
345
  //# sourceMappingURL=CustomToolbar.js.map