@elliemae/ds-wysiwygeditor 3.4.2 → 3.4.3
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 +17 -7
- package/dist/cjs/DSWYSIWYGEditor.js.map +2 -2
- package/dist/cjs/components/CustomImageUploader.js +51 -35
- package/dist/cjs/components/CustomImageUploader.js.map +2 -2
- package/dist/cjs/components/CustomToolbar.js +233 -143
- package/dist/cjs/components/CustomToolbar.js.map +2 -2
- package/dist/cjs/components/DSWYSIWYGEditorImpl.js +51 -40
- package/dist/cjs/components/DSWYSIWYGEditorImpl.js.map +2 -2
- package/dist/cjs/components/ImageLibraryModal.js +16 -10
- package/dist/cjs/components/ImageLibraryModal.js.map +2 -2
- package/dist/cjs/components/InsertFieldModal.js +46 -22
- package/dist/cjs/components/InsertFieldModal.js.map +2 -2
- package/dist/cjs/components/TippedButton.js +23 -17
- package/dist/cjs/components/TippedButton.js.map +1 -1
- package/dist/cjs/components/TippedSelect.js +28 -20
- package/dist/cjs/components/TippedSelect.js.map +1 -1
- package/dist/cjs/components/colors.js +4 -1
- package/dist/cjs/components/colors.js.map +1 -1
- package/dist/cjs/components/customFields.js +4 -1
- package/dist/cjs/components/customFields.js.map +1 -1
- package/dist/cjs/constants.js +4 -1
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/quillMatchers/clipboardLinkWithTagMatcher.js +4 -1
- package/dist/cjs/quillMatchers/clipboardLinkWithTagMatcher.js.map +1 -1
- package/dist/cjs/quillOverrides/Image.js +4 -1
- package/dist/cjs/quillOverrides/Image.js.map +1 -1
- package/dist/cjs/quillOverrides/IndentStyle.js +4 -1
- package/dist/cjs/quillOverrides/IndentStyle.js.map +1 -1
- package/dist/cjs/quillOverrides/LinkFormat.js +4 -1
- package/dist/cjs/quillOverrides/LinkFormat.js.map +1 -1
- package/dist/cjs/quillOverrides/PlainClipboard.js +4 -1
- package/dist/cjs/quillOverrides/PlainClipboard.js.map +1 -1
- package/dist/cjs/utils.js +4 -1
- package/dist/cjs/utils.js.map +1 -1
- package/dist/esm/DSWYSIWYGEditor.js +13 -6
- package/dist/esm/DSWYSIWYGEditor.js.map +1 -1
- package/dist/esm/components/CustomImageUploader.js +47 -34
- package/dist/esm/components/CustomImageUploader.js.map +1 -1
- package/dist/esm/components/CustomToolbar.js +229 -142
- package/dist/esm/components/CustomToolbar.js.map +1 -1
- package/dist/esm/components/DSWYSIWYGEditorImpl.js +47 -39
- package/dist/esm/components/DSWYSIWYGEditorImpl.js.map +2 -2
- package/dist/esm/components/ImageLibraryModal.js +12 -9
- package/dist/esm/components/ImageLibraryModal.js.map +2 -2
- package/dist/esm/components/InsertFieldModal.js +42 -21
- package/dist/esm/components/InsertFieldModal.js.map +2 -2
- package/dist/esm/components/TippedButton.js +19 -16
- package/dist/esm/components/TippedButton.js.map +1 -1
- package/dist/esm/components/TippedSelect.js +24 -19
- package/dist/esm/components/TippedSelect.js.map +1 -1
- package/dist/esm/components/colors.js.map +1 -1
- package/dist/esm/components/customFields.js.map +1 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/quillMatchers/clipboardLinkWithTagMatcher.js.map +1 -1
- package/dist/esm/quillOverrides/Image.js.map +1 -1
- package/dist/esm/quillOverrides/IndentStyle.js.map +1 -1
- package/dist/esm/quillOverrides/LinkFormat.js.map +1 -1
- package/dist/esm/quillOverrides/PlainClipboard.js.map +1 -1
- package/dist/esm/utils.js.map +1 -1
- package/package.json +10 -10
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var CustomToolbar_exports = {};
|
|
23
26
|
__export(CustomToolbar_exports, {
|
|
@@ -26,7 +29,8 @@ __export(CustomToolbar_exports, {
|
|
|
26
29
|
});
|
|
27
30
|
module.exports = __toCommonJS(CustomToolbar_exports);
|
|
28
31
|
var React = __toESM(require("react"));
|
|
29
|
-
var
|
|
32
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
|
+
var import_react = require("react");
|
|
30
34
|
var import_ds_button = __toESM(require("@elliemae/ds-button"));
|
|
31
35
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
32
36
|
var import_ds_dropdownmenu = __toESM(require("@elliemae/ds-dropdownmenu"));
|
|
@@ -34,18 +38,20 @@ var import_constants = require("../constants");
|
|
|
34
38
|
var import_TippedButton = require("./TippedButton");
|
|
35
39
|
var import_TippedSelect = require("./TippedSelect");
|
|
36
40
|
const optionsToValues = (options) => options.map((opt) => opt.toLowerCase().replace(" ", "-"));
|
|
37
|
-
const CustomFields = () => /* @__PURE__ */
|
|
38
|
-
|
|
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", {
|
|
39
45
|
value: color
|
|
40
46
|
});
|
|
41
|
-
const Colors = ({ className, tip, zIndex }) => /* @__PURE__ */
|
|
47
|
+
const Colors = ({ className, tip, zIndex }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TippedSelect.TippedSelect, {
|
|
42
48
|
className,
|
|
43
49
|
tip,
|
|
44
|
-
zIndex
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
color
|
|
48
|
-
})
|
|
50
|
+
zIndex,
|
|
51
|
+
children: import_constants.colors.map((color) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Color, {
|
|
52
|
+
color
|
|
53
|
+
}, color))
|
|
54
|
+
});
|
|
49
55
|
const CustomDropdown = ({
|
|
50
56
|
options,
|
|
51
57
|
label,
|
|
@@ -57,7 +63,7 @@ const CustomDropdown = ({
|
|
|
57
63
|
minWidth,
|
|
58
64
|
maxWidth,
|
|
59
65
|
zIndex = 10
|
|
60
|
-
}) => /* @__PURE__ */
|
|
66
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dropdownmenu.default, {
|
|
61
67
|
onClickOutsideMenu,
|
|
62
68
|
options,
|
|
63
69
|
onSelectMenuItem,
|
|
@@ -68,13 +74,13 @@ const CustomDropdown = ({
|
|
|
68
74
|
maxWidth,
|
|
69
75
|
zIndex,
|
|
70
76
|
preventOverflow: "scrollParent",
|
|
71
|
-
triggerComponent: /* @__PURE__ */
|
|
77
|
+
triggerComponent: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.default, {
|
|
72
78
|
labelText: label,
|
|
73
79
|
buttonType: "text",
|
|
74
|
-
icon: /* @__PURE__ */
|
|
80
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ArrowheadDown, {})
|
|
75
81
|
})
|
|
76
82
|
});
|
|
77
|
-
const Divider = () => /* @__PURE__ */
|
|
83
|
+
const Divider = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
78
84
|
style: {
|
|
79
85
|
height: "21px",
|
|
80
86
|
width: "1px",
|
|
@@ -121,135 +127,219 @@ const CustomToolbar = ({
|
|
|
121
127
|
setShowHTML(!showHTML);
|
|
122
128
|
onShowHTML();
|
|
123
129
|
};
|
|
124
|
-
return /* @__PURE__ */
|
|
130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
125
131
|
id,
|
|
126
|
-
className: "ds-ql-custom-toolbar"
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
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
|
+
});
|
|
254
344
|
};
|
|
255
345
|
//# sourceMappingURL=CustomToolbar.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/CustomToolbar.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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 } from 'react';\nimport DSButton from '@elliemae/ds-button';\nimport { ArrowheadDown } from '@elliemae/ds-icons';\nimport DSDropdownMenu from '@elliemae/ds-dropdownmenu';\nimport { colors, fonts, sizes, sizesReal } from '../constants';\nimport { TippedButton } from './TippedButton';\nimport { TippedSelect } from './TippedSelect';\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={<DSButton labelText={label} buttonType=\"text\" icon={<ArrowheadDown />} />}\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 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 || 1}\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 || 1}\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 || 1}\n />\n <Divider />\n </>\n )}\n </span>\n )}\n {(!BOLD || !ITALIC || !UNDERLINE || !STRIKE) && (\n <span className=\"ql-formats\">\n {!BOLD && <TippedButton zIndex={userProps?.zIndex || 1} className=\"ql-bold\" tip=\"Bold\" />}\n {!ITALIC && <TippedButton zIndex={userProps?.zIndex || 1} className=\"ql-italic\" tip=\"Italic\" />}\n {!UNDERLINE && <TippedButton zIndex={userProps?.zIndex || 1} className=\"ql-underline\" tip=\"Underline\" />}\n {!STRIKE && <TippedButton zIndex={userProps?.zIndex || 1} className=\"ql-strike\" tip=\"Strike\" />}\n </span>\n )}\n {(!SUB || !SUPER) && (\n <span className=\"ql-formats\">\n {!SUB && <TippedButton zIndex={userProps?.zIndex || 1} className=\"ql-script\" tip=\"Sub\" value=\"sub\" />}\n {!SUPER && <TippedButton zIndex={userProps?.zIndex || 1} className=\"ql-script\" tip=\"Super\" value=\"super\" />}\n <Divider />\n </span>\n )}\n {(!ORDERED_LIST || !BULLET_LIST) && (\n <span className=\"ql-formats\">\n {!ORDERED_LIST && (\n <TippedButton zIndex={userProps?.zIndex || 1} className=\"ql-list\" tip=\"Ordered List\" value=\"ordered\" />\n )}\n {!BULLET_LIST && (\n <TippedButton zIndex={userProps?.zIndex || 1} className=\"ql-list\" tip=\"Bullet List\" value=\"bullet\" />\n )}\n </span>\n )}\n {(!INDENT_MINUS_ONE || !INDENT_PLUS_ONE) && (\n <span className=\"ql-formats\">\n {!INDENT_MINUS_ONE && (\n <TippedButton zIndex={userProps?.zIndex || 1} className=\"ql-indent\" tip=\"Indent -1\" value=\"-1\" />\n )}\n {!INDENT_PLUS_ONE && (\n <TippedButton zIndex={userProps?.zIndex || 1} className=\"ql-indent\" tip=\"Indent +1\" value=\"+1\" />\n )}\n </span>\n )}\n {!ALIGN && (\n <span className=\"ql-formats\">\n <TippedSelect zIndex={userProps?.zIndex || 1} className=\"ql-align\" tip=\"Align\" />\n <Divider />\n </span>\n )}\n {(!FONT_COLOR || !FONT_BACKGROUND_COLOR) && (\n <span className=\"ql-formats\">\n {!FONT_COLOR && <Colors zIndex={userProps?.zIndex || 1} className=\"ql-color\" tip=\"Font Color\" />}\n {!FONT_BACKGROUND_COLOR && (\n <Colors zIndex={userProps?.zIndex || 1} 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 zIndex={userProps?.zIndex || 1} className=\"ql-link\" tip=\"Hyperlink: Select Text First\" />\n )}\n {!IMAGE && <TippedButton zIndex={userProps?.zIndex || 1} className=\"ql-image\" tip=\"Insert Image\" />}\n <Divider />\n </span>\n )}\n {!CLEAR_FORMAT && (\n <span className=\"ql-formats\">\n <TippedButton zIndex={userProps?.zIndex || 1} className=\"ql-clean\" tip=\"Clear Format (Select Text)\" />\n </span>\n )}\n {!SHOW_HTML && (\n <span className=\"ql-formats\">\n <Divider />\n <TippedButton\n zIndex={userProps?.zIndex || 1}\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 zIndex={userProps?.zIndex || 1} className=\"ql-customFields\" tip=\"Insert Custom Field\">\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": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAMA,mBAAgC;AAChC,uBAAqB;AACrB,sBAA8B;AAC9B,6BAA2B;AAC3B,uBAAgD;AAChD,0BAA6B;AAC7B,0BAA6B;AAG7B,MAAM,kBAAkB,CAAC,YAAY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;AAAA;AAAA,OACX;AAAA,MAED,CAAC,gBACA,4CAAC;AAAA,QAAK,WAAU;AAAA,QACd,sDAAC;AAAA,UAAa,QAAQ,WAAW,UAAU;AAAA,UAAG,WAAU;AAAA,UAAW,KAAI;AAAA,SAA6B;AAAA,OACtG;AAAA,MAED,CAAC,aACA,6CAAC;AAAA,QAAK,WAAU;AAAA,QACd;AAAA,sDAAC,WAAQ;AAAA,UACT,4CAAC;AAAA,YACC,QAAQ,WAAW,UAAU;AAAA,YAC7B,OAAO;AAAA,cACL,OAAO;AAAA,cACP,OAAO;AAAA,cACP,YAAY;AAAA,YACd;AAAA,YACA,SAAS;AAAA,YACT,KAAK,WAAW,cAAc;AAAA,YAC9B,WAAU;AAAA,YAET,qBAAW,cAAc;AAAA,WAC5B;AAAA;AAAA,OACF;AAAA,MAED,gBACC,6CAAC;AAAA,QAAK,WAAU;AAAA,QACd;AAAA,sDAAC,WAAQ;AAAA,UACT,4CAAC;AAAA,YAAa,QAAQ,WAAW,UAAU;AAAA,YAAG,WAAU;AAAA,YAAkB,KAAI;AAAA,YAC5E,sDAAC,gBAAa;AAAA,WAChB;AAAA;AAAA,OACF;AAAA,MAED,eACC,4CAAC;AAAA,QAAK,OAAO,EAAE,SAAS,cAAc;AAAA,QACnC,sBAAY,IAAI,CAAC,SAChB;AAAA,UACE;AAAA,wDAAC,WAAQ;AAAA,YACT,4CAAC,QAAK;AAAA;AAAA,SACR,CACD;AAAA,OACH;AAAA;AAAA,GAEJ;AAEJ;",
|
|
6
|
+
"names": ["DSDropdownMenu", "DSButton"]
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var DSWYSIWYGEditorImpl_exports = {};
|
|
23
26
|
__export(DSWYSIWYGEditorImpl_exports, {
|
|
@@ -25,6 +28,7 @@ __export(DSWYSIWYGEditorImpl_exports, {
|
|
|
25
28
|
});
|
|
26
29
|
module.exports = __toCommonJS(DSWYSIWYGEditorImpl_exports);
|
|
27
30
|
var React = __toESM(require("react"));
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
32
|
var import_react = __toESM(require("react"));
|
|
29
33
|
var import_react_quill = __toESM(require("react-quill"));
|
|
30
34
|
var import_quill_blot_formatter = __toESM(require("quill-blot-formatter"));
|
|
@@ -168,46 +172,53 @@ class DSWYSIWYGEditorImpl extends import_react.default.PureComponent {
|
|
|
168
172
|
hideItems,
|
|
169
173
|
...editorProps
|
|
170
174
|
} = this.props;
|
|
171
|
-
return /* @__PURE__ */
|
|
175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
172
176
|
...containerProps,
|
|
173
|
-
className: `quill-wysiwyg-editor ${showRawHTML ? "show-raw" : ""}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
177
|
+
className: `quill-wysiwyg-editor ${showRawHTML ? "show-raw" : ""}`,
|
|
178
|
+
children: [
|
|
179
|
+
customToolbar || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_CustomToolbar.CustomToolbar, {
|
|
180
|
+
customFields,
|
|
181
|
+
onShowHTML,
|
|
182
|
+
hideItems,
|
|
183
|
+
userProps: this.props
|
|
184
|
+
}),
|
|
185
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_quill.default, {
|
|
186
|
+
ref: this.quillRef,
|
|
187
|
+
modules: this.quillModules,
|
|
188
|
+
onChange: this.onChangeQuill,
|
|
189
|
+
value,
|
|
190
|
+
style: {
|
|
191
|
+
height,
|
|
192
|
+
borderBottom: "1px solid #ccc"
|
|
193
|
+
},
|
|
194
|
+
...editorProps,
|
|
195
|
+
id: "wysiwyg-text-container"
|
|
196
|
+
}),
|
|
197
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("textarea", {
|
|
198
|
+
className: "raw-editor ql-container ql-snow ql-editor",
|
|
199
|
+
style: {
|
|
200
|
+
width: "100%",
|
|
201
|
+
resize: "none",
|
|
202
|
+
height,
|
|
203
|
+
minHeight: "200px"
|
|
204
|
+
},
|
|
205
|
+
onChange: this.onChangeTextArea,
|
|
206
|
+
value: (0, import_utils.formatHTML)(value)
|
|
207
|
+
}),
|
|
208
|
+
imagesData && imagesData.length && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ImageLibraryModal.default, {
|
|
209
|
+
imagesData,
|
|
210
|
+
isOpen: isImageModalOpen,
|
|
211
|
+
onClose: this.onImageModalClose,
|
|
212
|
+
onConfirm: this.onImageConfirm
|
|
213
|
+
}),
|
|
214
|
+
customFields && customFields.length && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_InsertFieldModal.default, {
|
|
215
|
+
customFields,
|
|
216
|
+
isOpen: isFieldModalOpen,
|
|
217
|
+
onClose: this.onFieldModalClose,
|
|
218
|
+
onConfirm: this.onInserFieldConfirm
|
|
219
|
+
})
|
|
220
|
+
]
|
|
221
|
+
});
|
|
211
222
|
}
|
|
212
223
|
}
|
|
213
224
|
//# sourceMappingURL=DSWYSIWYGEditorImpl.js.map
|