@elliemae/ds-wysiwygeditor 2.2.0-alpha.2 → 2.2.0-beta.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/cjs/DSWYSIWYGEditor.js +72 -83
- package/cjs/components/CustomImageUploader.js +94 -92
- package/cjs/components/CustomToolbar.js +193 -172
- package/cjs/components/DSWYSIWYGEditorImpl.js +185 -147
- package/cjs/components/ImageLibraryModal.js +55 -75
- package/cjs/components/InsertFieldModal.js +142 -109
- package/cjs/components/TippedButton.js +54 -56
- package/cjs/components/TippedSelect.js +39 -50
- package/cjs/components/colors.js +21 -41
- package/cjs/components/customFields.js +47 -66
- package/cjs/constants.js +38 -112
- package/cjs/index.js +21 -39
- package/cjs/quillMatchers/clipboardLinkWithTagMatcher.js +22 -37
- package/cjs/quillOverrides/IndentStyle.js +19 -41
- package/cjs/quillOverrides/LinkFormat.js +39 -57
- package/cjs/quillOverrides/PlainClipboard.js +21 -41
- package/cjs/utils.js +18 -41
- package/esm/DSWYSIWYGEditor.js +58 -50
- package/esm/components/CustomImageUploader.js +81 -60
- package/esm/components/CustomToolbar.js +184 -145
- package/esm/components/DSWYSIWYGEditorImpl.js +169 -113
- package/esm/components/ImageLibraryModal.js +47 -46
- package/esm/components/InsertFieldModal.js +124 -72
- package/esm/components/TippedButton.js +44 -27
- package/esm/components/TippedSelect.js +31 -21
- package/esm/components/colors.js +17 -12
- package/esm/components/customFields.js +40 -38
- package/esm/constants.js +30 -83
- package/esm/index.js +4 -10
- package/esm/quillMatchers/clipboardLinkWithTagMatcher.js +18 -8
- package/esm/quillOverrides/IndentStyle.js +17 -12
- package/esm/quillOverrides/LinkFormat.js +37 -28
- package/esm/quillOverrides/PlainClipboard.js +19 -12
- package/esm/utils.js +14 -12
- package/package.json +9 -9
- package/types/DSWYSIWYGEditor.d.ts +1 -12
- package/cjs/DSWYSIWYGEditor.js.map +0 -7
- package/cjs/components/CustomImageUploader.js.map +0 -7
- package/cjs/components/CustomToolbar.js.map +0 -7
- package/cjs/components/DSWYSIWYGEditorImpl.js.map +0 -7
- package/cjs/components/ImageLibraryModal.js.map +0 -7
- package/cjs/components/InsertFieldModal.js.map +0 -7
- package/cjs/components/TippedButton.js.map +0 -7
- package/cjs/components/TippedSelect.js.map +0 -7
- package/cjs/components/colors.js.map +0 -7
- package/cjs/components/customFields.js.map +0 -7
- package/cjs/constants.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/cjs/quillMatchers/clipboardLinkWithTagMatcher.js.map +0 -7
- package/cjs/quillOverrides/IndentStyle.js.map +0 -7
- package/cjs/quillOverrides/LinkFormat.js.map +0 -7
- package/cjs/quillOverrides/PlainClipboard.js.map +0 -7
- package/cjs/utils.js.map +0 -7
- package/esm/DSWYSIWYGEditor.js.map +0 -7
- package/esm/components/CustomImageUploader.js.map +0 -7
- package/esm/components/CustomToolbar.js.map +0 -7
- package/esm/components/DSWYSIWYGEditorImpl.js.map +0 -7
- package/esm/components/ImageLibraryModal.js.map +0 -7
- package/esm/components/InsertFieldModal.js.map +0 -7
- package/esm/components/TippedButton.js.map +0 -7
- package/esm/components/TippedSelect.js.map +0 -7
- package/esm/components/colors.js.map +0 -7
- package/esm/components/customFields.js.map +0 -7
- package/esm/constants.js.map +0 -7
- package/esm/index.js.map +0 -7
- package/esm/quillMatchers/clipboardLinkWithTagMatcher.js.map +0 -7
- package/esm/quillOverrides/IndentStyle.js.map +0 -7
- package/esm/quillOverrides/LinkFormat.js.map +0 -7
- package/esm/quillOverrides/PlainClipboard.js.map +0 -7
- package/esm/utils.js.map +0 -7
|
@@ -1,71 +1,101 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
4
|
+
import 'core-js/modules/es.string.replace.js';
|
|
5
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
6
|
+
import { useState } from 'react';
|
|
7
|
+
import DSButton from '@elliemae/ds-button';
|
|
8
|
+
import { ArrowheadDown } from '@elliemae/ds-icons';
|
|
9
|
+
import DSDropdownMenu from '@elliemae/ds-dropdownmenu';
|
|
10
|
+
import { fonts, sizes, sizesReal, colors } from '../constants.js';
|
|
11
|
+
import { TippedButton } from './TippedButton.js';
|
|
12
|
+
import { TippedSelect } from './TippedSelect.js';
|
|
13
|
+
import { jsxs, Fragment } from 'react/jsx-runtime';
|
|
14
|
+
|
|
15
|
+
var _span, _ArrowheadDown, _Divider, _Divider2, _Divider3, _Divider4, _Divider5, _Divider6, _Divider7, _Divider8, _Divider9, _CustomFields, _Divider10;
|
|
16
|
+
|
|
17
|
+
const optionsToValues = options => options.map(opt => opt.toLowerCase().replace(' ', '-')); // Stateless Components -----------------------------------------
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
const CustomFields = () => _span || (_span = /*#__PURE__*/_jsx("span", {}, void 0, "\u1438\u1433")); // eslint-disable-line react/jsx-one-expression-per-line
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
const Color = _ref => {
|
|
24
|
+
let {
|
|
25
|
+
color
|
|
26
|
+
} = _ref;
|
|
27
|
+
return /*#__PURE__*/_jsx("option", {
|
|
28
|
+
value: color
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const Colors = _ref2 => {
|
|
33
|
+
let {
|
|
34
|
+
className,
|
|
35
|
+
tip,
|
|
36
|
+
zIndex
|
|
37
|
+
} = _ref2;
|
|
38
|
+
return /*#__PURE__*/_jsx(TippedSelect, {
|
|
39
|
+
className: className,
|
|
40
|
+
tip: tip,
|
|
41
|
+
zIndex: zIndex
|
|
42
|
+
}, void 0, colors.map(color => /*#__PURE__*/_jsx(Color, {
|
|
43
|
+
color: color
|
|
44
|
+
}, color)));
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const CustomDropdown = _ref3 => {
|
|
48
|
+
let {
|
|
49
|
+
options,
|
|
50
|
+
label,
|
|
51
|
+
onSelectMenuItem = () => null,
|
|
52
|
+
onClickOutsideMenu = () => null,
|
|
53
|
+
onClose = () => null,
|
|
54
|
+
closeMenuOnItemSelection,
|
|
55
|
+
isOpen,
|
|
56
|
+
minWidth,
|
|
57
|
+
maxWidth,
|
|
58
|
+
zIndex = 10
|
|
59
|
+
} = _ref3;
|
|
60
|
+
return /*#__PURE__*/_jsx(DSDropdownMenu, {
|
|
61
|
+
onClickOutsideMenu: onClickOutsideMenu,
|
|
62
|
+
options: options,
|
|
63
|
+
onSelectMenuItem: onSelectMenuItem,
|
|
64
|
+
onClose: onClose,
|
|
65
|
+
closeMenuOnItemSelection: closeMenuOnItemSelection,
|
|
66
|
+
isOpen: isOpen,
|
|
67
|
+
minWidth: minWidth,
|
|
68
|
+
maxWidth: maxWidth,
|
|
69
|
+
zIndex: zIndex,
|
|
70
|
+
preventOverflow: "scrollParent",
|
|
71
|
+
triggerComponent: /*#__PURE__*/_jsx(DSButton, {
|
|
72
|
+
labelText: label,
|
|
73
|
+
buttonType: "text",
|
|
74
|
+
icon: _ArrowheadDown || (_ArrowheadDown = /*#__PURE__*/_jsx(ArrowheadDown, {}))
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const Divider = () => /*#__PURE__*/_jsx("div", {
|
|
51
80
|
style: {
|
|
52
|
-
height:
|
|
53
|
-
width:
|
|
54
|
-
margin:
|
|
55
|
-
padding:
|
|
56
|
-
borderLeft:
|
|
57
|
-
display:
|
|
81
|
+
height: '21px',
|
|
82
|
+
width: '1px',
|
|
83
|
+
margin: '0 10px',
|
|
84
|
+
padding: '0',
|
|
85
|
+
borderLeft: '1px solid #bbb',
|
|
86
|
+
display: 'inline-block'
|
|
58
87
|
}
|
|
59
88
|
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
89
|
+
|
|
90
|
+
const CustomToolbar = _ref4 => {
|
|
91
|
+
let {
|
|
92
|
+
customFields,
|
|
93
|
+
customItems = [],
|
|
94
|
+
hideItems = {},
|
|
95
|
+
onShowHTML = () => {},
|
|
96
|
+
id = 'toolbar',
|
|
97
|
+
userProps
|
|
98
|
+
} = _ref4;
|
|
69
99
|
const {
|
|
70
100
|
HEADER,
|
|
71
101
|
FONT,
|
|
@@ -89,144 +119,153 @@ const CustomToolbar = ({
|
|
|
89
119
|
SHOW_HTML
|
|
90
120
|
} = hideItems;
|
|
91
121
|
const [showHTML, setShowHTML] = useState(false);
|
|
92
|
-
|
|
122
|
+
|
|
123
|
+
const handleShowHTML = e => {
|
|
93
124
|
e.preventDefault();
|
|
94
125
|
setShowHTML(!showHTML);
|
|
95
126
|
onShowHTML();
|
|
96
127
|
};
|
|
97
|
-
|
|
98
|
-
|
|
128
|
+
|
|
129
|
+
return /*#__PURE__*/_jsx("div", {
|
|
130
|
+
id: id,
|
|
99
131
|
className: "ds-ql-custom-toolbar"
|
|
100
|
-
}, (!HEADER || !FONT || !FONT_SIZE) &&
|
|
132
|
+
}, void 0, (!HEADER || !FONT || !FONT_SIZE) && /*#__PURE__*/_jsx("span", {
|
|
101
133
|
className: "ql-formats"
|
|
102
|
-
}, !HEADER &&
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
134
|
+
}, void 0, !HEADER && /*#__PURE__*/jsxs(Fragment, {
|
|
135
|
+
children: [/*#__PURE__*/_jsx(TippedSelect, {
|
|
136
|
+
className: "ql-header",
|
|
137
|
+
tip: "Header",
|
|
138
|
+
values: ['', '1', '2', '3', '4', '5', '6'],
|
|
139
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1
|
|
140
|
+
}), _Divider || (_Divider = /*#__PURE__*/_jsx(Divider, {}))]
|
|
141
|
+
}), !FONT && /*#__PURE__*/jsxs(Fragment, {
|
|
142
|
+
children: [/*#__PURE__*/_jsx(TippedSelect, {
|
|
143
|
+
className: "ql-font",
|
|
144
|
+
defaultValue: "sans-serif",
|
|
145
|
+
options: fonts,
|
|
146
|
+
tip: "Font",
|
|
147
|
+
values: optionsToValues(fonts),
|
|
148
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1
|
|
149
|
+
}), _Divider2 || (_Divider2 = /*#__PURE__*/_jsx(Divider, {}))]
|
|
150
|
+
}), !FONT_SIZE && /*#__PURE__*/jsxs(Fragment, {
|
|
151
|
+
children: [/*#__PURE__*/_jsx(TippedSelect, {
|
|
152
|
+
className: "ql-size",
|
|
153
|
+
options: sizes,
|
|
154
|
+
tip: "Font Size",
|
|
155
|
+
values: optionsToValues(sizesReal),
|
|
156
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1
|
|
157
|
+
}), _Divider3 || (_Divider3 = /*#__PURE__*/_jsx(Divider, {}))]
|
|
158
|
+
})), (!BOLD || !ITALIC || !UNDERLINE || !STRIKE) && /*#__PURE__*/_jsx("span", {
|
|
121
159
|
className: "ql-formats"
|
|
122
|
-
}, !BOLD &&
|
|
123
|
-
zIndex: userProps
|
|
160
|
+
}, void 0, !BOLD && /*#__PURE__*/_jsx(TippedButton, {
|
|
161
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1,
|
|
124
162
|
className: "ql-bold",
|
|
125
163
|
tip: "Bold"
|
|
126
|
-
}), !ITALIC &&
|
|
127
|
-
zIndex: userProps
|
|
164
|
+
}), !ITALIC && /*#__PURE__*/_jsx(TippedButton, {
|
|
165
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1,
|
|
128
166
|
className: "ql-italic",
|
|
129
167
|
tip: "Italic"
|
|
130
|
-
}), !UNDERLINE &&
|
|
131
|
-
zIndex: userProps
|
|
168
|
+
}), !UNDERLINE && /*#__PURE__*/_jsx(TippedButton, {
|
|
169
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1,
|
|
132
170
|
className: "ql-underline",
|
|
133
171
|
tip: "Underline"
|
|
134
|
-
}), !STRIKE &&
|
|
135
|
-
zIndex: userProps
|
|
172
|
+
}), !STRIKE && /*#__PURE__*/_jsx(TippedButton, {
|
|
173
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1,
|
|
136
174
|
className: "ql-strike",
|
|
137
175
|
tip: "Strike"
|
|
138
|
-
})), (!SUB || !SUPER) &&
|
|
176
|
+
})), (!SUB || !SUPER) && /*#__PURE__*/_jsx("span", {
|
|
139
177
|
className: "ql-formats"
|
|
140
|
-
}, !SUB &&
|
|
141
|
-
zIndex: userProps
|
|
178
|
+
}, void 0, !SUB && /*#__PURE__*/_jsx(TippedButton, {
|
|
179
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1,
|
|
142
180
|
className: "ql-script",
|
|
143
181
|
tip: "Sub",
|
|
144
182
|
value: "sub"
|
|
145
|
-
}), !SUPER &&
|
|
146
|
-
zIndex: userProps
|
|
183
|
+
}), !SUPER && /*#__PURE__*/_jsx(TippedButton, {
|
|
184
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1,
|
|
147
185
|
className: "ql-script",
|
|
148
186
|
tip: "Super",
|
|
149
187
|
value: "super"
|
|
150
|
-
}),
|
|
188
|
+
}), _Divider4 || (_Divider4 = /*#__PURE__*/_jsx(Divider, {}))), (!ORDERED_LIST || !BULLET_LIST) && /*#__PURE__*/_jsx("span", {
|
|
151
189
|
className: "ql-formats"
|
|
152
|
-
}, !ORDERED_LIST &&
|
|
153
|
-
zIndex: userProps
|
|
190
|
+
}, void 0, !ORDERED_LIST && /*#__PURE__*/_jsx(TippedButton, {
|
|
191
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1,
|
|
154
192
|
className: "ql-list",
|
|
155
193
|
tip: "Ordered List",
|
|
156
194
|
value: "ordered"
|
|
157
|
-
}), !BULLET_LIST &&
|
|
158
|
-
zIndex: userProps
|
|
195
|
+
}), !BULLET_LIST && /*#__PURE__*/_jsx(TippedButton, {
|
|
196
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1,
|
|
159
197
|
className: "ql-list",
|
|
160
198
|
tip: "Bullet List",
|
|
161
199
|
value: "bullet"
|
|
162
|
-
})), (!INDENT_MINUS_ONE || !INDENT_PLUS_ONE) &&
|
|
200
|
+
})), (!INDENT_MINUS_ONE || !INDENT_PLUS_ONE) && /*#__PURE__*/_jsx("span", {
|
|
163
201
|
className: "ql-formats"
|
|
164
|
-
}, !INDENT_MINUS_ONE &&
|
|
165
|
-
zIndex: userProps
|
|
202
|
+
}, void 0, !INDENT_MINUS_ONE && /*#__PURE__*/_jsx(TippedButton, {
|
|
203
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1,
|
|
166
204
|
className: "ql-indent",
|
|
167
205
|
tip: "Indent -1",
|
|
168
206
|
value: "-1"
|
|
169
|
-
}), !INDENT_PLUS_ONE &&
|
|
170
|
-
zIndex: userProps
|
|
207
|
+
}), !INDENT_PLUS_ONE && /*#__PURE__*/_jsx(TippedButton, {
|
|
208
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1,
|
|
171
209
|
className: "ql-indent",
|
|
172
210
|
tip: "Indent +1",
|
|
173
211
|
value: "+1"
|
|
174
|
-
})), !ALIGN &&
|
|
212
|
+
})), !ALIGN && /*#__PURE__*/_jsx("span", {
|
|
175
213
|
className: "ql-formats"
|
|
176
|
-
},
|
|
177
|
-
zIndex: userProps
|
|
214
|
+
}, void 0, /*#__PURE__*/_jsx(TippedSelect, {
|
|
215
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1,
|
|
178
216
|
className: "ql-align",
|
|
179
217
|
tip: "Align"
|
|
180
|
-
}),
|
|
218
|
+
}), _Divider5 || (_Divider5 = /*#__PURE__*/_jsx(Divider, {}))), (!FONT_COLOR || !FONT_BACKGROUND_COLOR) && /*#__PURE__*/_jsx("span", {
|
|
181
219
|
className: "ql-formats"
|
|
182
|
-
}, !FONT_COLOR &&
|
|
183
|
-
zIndex: userProps
|
|
220
|
+
}, void 0, !FONT_COLOR && /*#__PURE__*/_jsx(Colors, {
|
|
221
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1,
|
|
184
222
|
className: "ql-color",
|
|
185
223
|
tip: "Font Color"
|
|
186
|
-
}), !FONT_BACKGROUND_COLOR &&
|
|
187
|
-
zIndex: userProps
|
|
224
|
+
}), !FONT_BACKGROUND_COLOR && /*#__PURE__*/_jsx(Colors, {
|
|
225
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1,
|
|
188
226
|
className: "ql-background",
|
|
189
227
|
tip: "Font Background Color"
|
|
190
|
-
}),
|
|
228
|
+
}), _Divider6 || (_Divider6 = /*#__PURE__*/_jsx(Divider, {}))), (!HYPERLINK || !IMAGE) && /*#__PURE__*/_jsx("span", {
|
|
191
229
|
className: "ql-formats"
|
|
192
|
-
}, !HYPERLINK &&
|
|
193
|
-
zIndex: userProps
|
|
230
|
+
}, void 0, !HYPERLINK && /*#__PURE__*/_jsx(TippedButton, {
|
|
231
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1,
|
|
194
232
|
className: "ql-link",
|
|
195
233
|
tip: "Hyperlink: Select Text First"
|
|
196
|
-
}), !IMAGE &&
|
|
197
|
-
zIndex: userProps
|
|
234
|
+
}), !IMAGE && /*#__PURE__*/_jsx(TippedButton, {
|
|
235
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1,
|
|
198
236
|
className: "ql-image",
|
|
199
237
|
tip: "Insert Image"
|
|
200
|
-
}),
|
|
238
|
+
}), _Divider7 || (_Divider7 = /*#__PURE__*/_jsx(Divider, {}))), !CLEAR_FORMAT && /*#__PURE__*/_jsx("span", {
|
|
201
239
|
className: "ql-formats"
|
|
202
|
-
},
|
|
203
|
-
zIndex: userProps
|
|
240
|
+
}, void 0, /*#__PURE__*/_jsx(TippedButton, {
|
|
241
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1,
|
|
204
242
|
className: "ql-clean",
|
|
205
243
|
tip: "Clear Format (Select Text)"
|
|
206
|
-
})), !SHOW_HTML &&
|
|
244
|
+
})), !SHOW_HTML && /*#__PURE__*/_jsx("span", {
|
|
207
245
|
className: "ql-formats"
|
|
208
|
-
},
|
|
209
|
-
zIndex: userProps
|
|
246
|
+
}, void 0, _Divider8 || (_Divider8 = /*#__PURE__*/_jsx(Divider, {})), /*#__PURE__*/_jsx(TippedButton, {
|
|
247
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1,
|
|
210
248
|
style: {
|
|
211
|
-
width:
|
|
212
|
-
color:
|
|
213
|
-
fontWeight:
|
|
249
|
+
width: 'fit-content',
|
|
250
|
+
color: '#1e79c2',
|
|
251
|
+
fontWeight: '500'
|
|
214
252
|
},
|
|
215
253
|
onClick: handleShowHTML,
|
|
216
|
-
tip: showHTML ?
|
|
254
|
+
tip: showHTML ? 'SHOW TEXT' : 'SHOW HTML',
|
|
217
255
|
className: "ql-customFields-html"
|
|
218
|
-
}, showHTML ?
|
|
256
|
+
}, void 0, showHTML ? 'SHOW TEXT' : 'SHOW HTML')), customFields && /*#__PURE__*/_jsx("span", {
|
|
219
257
|
className: "ql-formats"
|
|
220
|
-
},
|
|
221
|
-
zIndex: userProps
|
|
258
|
+
}, void 0, _Divider9 || (_Divider9 = /*#__PURE__*/_jsx(Divider, {})), /*#__PURE__*/_jsx(TippedButton, {
|
|
259
|
+
zIndex: (userProps === null || userProps === void 0 ? void 0 : userProps.zIndex) || 1,
|
|
222
260
|
className: "ql-customFields",
|
|
223
261
|
tip: "Insert Custom Field"
|
|
224
|
-
},
|
|
225
|
-
style: {
|
|
226
|
-
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
262
|
+
}, void 0, _CustomFields || (_CustomFields = /*#__PURE__*/_jsx(CustomFields, {})))), customItems && /*#__PURE__*/_jsx("span", {
|
|
263
|
+
style: {
|
|
264
|
+
display: 'inline-flex'
|
|
265
|
+
}
|
|
266
|
+
}, void 0, customItems.map(Item => /*#__PURE__*/jsxs(Fragment, {
|
|
267
|
+
children: [_Divider10 || (_Divider10 = /*#__PURE__*/_jsx(Divider, {})), /*#__PURE__*/_jsx(Item, {})]
|
|
268
|
+
}))));
|
|
231
269
|
};
|
|
232
|
-
|
|
270
|
+
|
|
271
|
+
export { CustomDropdown, CustomToolbar };
|