@jotforminc/dnd-builder 2.4.1 → 2.4.4
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/CHANGELOG.md +23 -0
- package/lib/cjs/assets/svg/page_settings.svg.js +4 -26
- package/lib/cjs/assets/svg/page_settings.svg.js.map +1 -1
- package/lib/cjs/assets/svg/presentation/enter_fullscreen.svg.js +6 -3
- package/lib/cjs/assets/svg/presentation/enter_fullscreen.svg.js.map +1 -1
- package/lib/cjs/assets/svg/presentation/exit_fullscreen.svg.js +7 -4
- package/lib/cjs/assets/svg/presentation/exit_fullscreen.svg.js.map +1 -1
- package/lib/cjs/components/Builder/ZoomControls.js +3 -3
- package/lib/cjs/components/Builder/ZoomControls.js.map +1 -1
- package/lib/cjs/components/TextEditor/CustomToolbar/CustomToolbar.js +2 -2
- package/lib/cjs/components/TextEditor/CustomToolbar/CustomToolbar.js.map +1 -1
- package/lib/cjs/components/TextEditor/textEditorConstants.js +30 -1
- package/lib/cjs/components/TextEditor/textEditorConstants.js.map +1 -1
- package/lib/cjs/styles/_jfDarkTheme.scss +1 -1
- package/lib/cjs/styles/_jfLightTheme.scss +1 -1
- package/lib/cjs/styles/_jfReportsFloatings.scss +61 -32
- package/lib/cjs/styles/_jfReportsPages.scss +7 -2
- package/lib/cjs/styles/_jfReportsPanelElements.scss +12 -8
- package/lib/cjs/styles/_jfReportsPanels.scss +1 -1
- package/lib/cjs/styles/_jfReportsReportItem.scss +21 -7
- package/lib/cjs/styles/_jfReportsSVG.scss +1 -1
- package/lib/cjs/styles/_jfReportsTextEditor.scss +84 -33
- package/lib/cjs/styles/_jfReportsVariables.scss +2 -2
- package/lib/cjs/styles/_jfReportsViewModes.scss +6 -0
- package/lib/esm/assets/svg/page_settings.svg.js +4 -26
- package/lib/esm/assets/svg/page_settings.svg.js.map +1 -1
- package/lib/esm/assets/svg/presentation/enter_fullscreen.svg.js +6 -3
- package/lib/esm/assets/svg/presentation/enter_fullscreen.svg.js.map +1 -1
- package/lib/esm/assets/svg/presentation/exit_fullscreen.svg.js +7 -4
- package/lib/esm/assets/svg/presentation/exit_fullscreen.svg.js.map +1 -1
- package/lib/esm/components/Builder/ZoomControls.js +3 -3
- package/lib/esm/components/Builder/ZoomControls.js.map +1 -1
- package/lib/esm/components/TextEditor/CustomToolbar/CustomToolbar.js +2 -2
- package/lib/esm/components/TextEditor/CustomToolbar/CustomToolbar.js.map +1 -1
- package/lib/esm/components/TextEditor/textEditorConstants.js +30 -1
- package/lib/esm/components/TextEditor/textEditorConstants.js.map +1 -1
- package/lib/esm/styles/_jfDarkTheme.scss +1 -1
- package/lib/esm/styles/_jfLightTheme.scss +1 -1
- package/lib/esm/styles/_jfReportsFloatings.scss +61 -32
- package/lib/esm/styles/_jfReportsPages.scss +7 -2
- package/lib/esm/styles/_jfReportsPanelElements.scss +12 -8
- package/lib/esm/styles/_jfReportsPanels.scss +1 -1
- package/lib/esm/styles/_jfReportsReportItem.scss +21 -7
- package/lib/esm/styles/_jfReportsSVG.scss +1 -1
- package/lib/esm/styles/_jfReportsTextEditor.scss +84 -33
- package/lib/esm/styles/_jfReportsVariables.scss +2 -2
- package/lib/esm/styles/_jfReportsViewModes.scss +6 -0
- package/package.json +1 -1
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
top: 0;
|
|
222
222
|
right: -24px;
|
|
223
223
|
background-color: $blue;
|
|
224
|
-
border-radius:
|
|
224
|
+
border-radius: 4px;
|
|
225
225
|
text-align: center;
|
|
226
226
|
pointer-events: all;
|
|
227
227
|
animation: .2s fadeRight forwards;
|
|
@@ -238,20 +238,34 @@
|
|
|
238
238
|
transition: .3s ease-in-out;
|
|
239
239
|
transform: translateZ(0);
|
|
240
240
|
}
|
|
241
|
-
|
|
242
|
-
&:hover svg {
|
|
243
|
-
opacity: .7;
|
|
244
|
-
}
|
|
245
241
|
}
|
|
246
242
|
|
|
247
243
|
&:not(.forLocked) {
|
|
244
|
+
padding: 0 4px;
|
|
248
245
|
.reportItemMenu-item {
|
|
246
|
+
display: inline-flex;
|
|
247
|
+
align-items: center;
|
|
248
|
+
justify-content: center;
|
|
249
|
+
width: 20px;
|
|
250
|
+
height: 20px;
|
|
251
|
+
padding: 0;
|
|
252
|
+
border-radius: 3px;
|
|
253
|
+
transition: 0.3s ease-in;
|
|
254
|
+
|
|
255
|
+
+ .reportItemMenu-item {
|
|
256
|
+
margin-top: 4px;
|
|
257
|
+
}
|
|
258
|
+
|
|
249
259
|
&:first-child {
|
|
250
|
-
margin-top:
|
|
260
|
+
margin-top: 4px;
|
|
251
261
|
}
|
|
252
262
|
|
|
253
263
|
&:last-child {
|
|
254
|
-
margin-bottom:
|
|
264
|
+
margin-bottom: 4px;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
&:hover {
|
|
268
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
255
269
|
}
|
|
256
270
|
}
|
|
257
271
|
}
|
|
@@ -51,16 +51,12 @@
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.ql-toolbar.ql-snow {
|
|
55
|
-
padding: 0;
|
|
56
|
-
border: none;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
54
|
.ql-toolbar {
|
|
60
55
|
font-family: inherit;
|
|
61
56
|
font-size: .75rem;
|
|
62
57
|
margin-top: 10px;
|
|
63
58
|
width: 100%;
|
|
59
|
+
background-color: transparent;
|
|
64
60
|
|
|
65
61
|
.toolbarWrapper {
|
|
66
62
|
flex-wrap: nowrap;
|
|
@@ -69,6 +65,8 @@
|
|
|
69
65
|
border-radius: 3px;
|
|
70
66
|
max-width: 100%;
|
|
71
67
|
padding: 4px;
|
|
68
|
+
right: 0;
|
|
69
|
+
box-shadow: 0 2px 4px 0 rgba(#0A1551, 0.04);
|
|
72
70
|
|
|
73
71
|
&.isOpened {
|
|
74
72
|
width: auto;
|
|
@@ -76,11 +74,11 @@
|
|
|
76
74
|
}
|
|
77
75
|
|
|
78
76
|
.ql-button {
|
|
79
|
-
width:
|
|
77
|
+
width: 20px;
|
|
80
78
|
flex-shrink: 0;
|
|
81
79
|
|
|
82
80
|
svg {
|
|
83
|
-
width:
|
|
81
|
+
width: 16px;
|
|
84
82
|
}
|
|
85
83
|
|
|
86
84
|
&.hiddenVisibility {
|
|
@@ -88,21 +86,21 @@
|
|
|
88
86
|
}
|
|
89
87
|
|
|
90
88
|
.ql-stroke {
|
|
91
|
-
stroke: #
|
|
89
|
+
stroke: #6F76A7;
|
|
92
90
|
}
|
|
93
91
|
|
|
94
92
|
.ql-fill {
|
|
95
|
-
fill: #
|
|
93
|
+
fill: #6F76A7;
|
|
96
94
|
stroke-width: 0;
|
|
97
95
|
}
|
|
98
96
|
|
|
99
97
|
&.ql-active {
|
|
100
98
|
.ql-stroke {
|
|
101
|
-
stroke: #
|
|
99
|
+
stroke: #6F76A7;
|
|
102
100
|
}
|
|
103
101
|
|
|
104
102
|
.ql-fill {
|
|
105
|
-
fill: #
|
|
103
|
+
fill: #6F76A7;
|
|
106
104
|
}
|
|
107
105
|
}
|
|
108
106
|
}
|
|
@@ -111,11 +109,11 @@
|
|
|
111
109
|
display: inline-flex;
|
|
112
110
|
justify-content: center;
|
|
113
111
|
align-items: center;
|
|
114
|
-
height:
|
|
112
|
+
height: 20px;
|
|
115
113
|
padding: 0;
|
|
116
|
-
border-radius:
|
|
114
|
+
border-radius: 3px;
|
|
117
115
|
border: none;
|
|
118
|
-
|
|
116
|
+
color: #6F76A7;
|
|
119
117
|
|
|
120
118
|
&:hover {
|
|
121
119
|
stroke: $blue;
|
|
@@ -124,13 +122,12 @@
|
|
|
124
122
|
&.ql-active {
|
|
125
123
|
color: #8D8FA8;
|
|
126
124
|
background-color: rgba($inputGrayBorder, .3);
|
|
127
|
-
border-radius:
|
|
125
|
+
border-radius: 3px;
|
|
128
126
|
}
|
|
129
127
|
}
|
|
130
128
|
|
|
131
|
-
|
|
132
129
|
.qlMore {
|
|
133
|
-
height:
|
|
130
|
+
height: 20px;
|
|
134
131
|
color: #8D8FA8;
|
|
135
132
|
position: absolute;
|
|
136
133
|
right: 0;
|
|
@@ -143,7 +140,7 @@
|
|
|
143
140
|
}
|
|
144
141
|
|
|
145
142
|
.ql-picker.ql-size {
|
|
146
|
-
width:
|
|
143
|
+
width: 52px;
|
|
147
144
|
|
|
148
145
|
.ql-picker-label {
|
|
149
146
|
justify-content: flex-start;
|
|
@@ -154,7 +151,7 @@
|
|
|
154
151
|
|
|
155
152
|
.ql-select {
|
|
156
153
|
width: auto;
|
|
157
|
-
height:
|
|
154
|
+
height: 20px;
|
|
158
155
|
flex-shrink: 0;
|
|
159
156
|
font-size: .75rem;
|
|
160
157
|
|
|
@@ -170,7 +167,8 @@
|
|
|
170
167
|
}
|
|
171
168
|
|
|
172
169
|
.ql-select:not(.ql-size) .ql-picker-label {
|
|
173
|
-
width:
|
|
170
|
+
width: 20px;
|
|
171
|
+
margin-left: 0;
|
|
174
172
|
}
|
|
175
173
|
|
|
176
174
|
.ql-divider {
|
|
@@ -189,7 +187,7 @@
|
|
|
189
187
|
}
|
|
190
188
|
|
|
191
189
|
.ql-color svg, .ql-align .ql-picker-label svg {
|
|
192
|
-
width:
|
|
190
|
+
width: 16px;
|
|
193
191
|
}
|
|
194
192
|
|
|
195
193
|
.ql-align .ql-picker-options {
|
|
@@ -202,29 +200,36 @@
|
|
|
202
200
|
}
|
|
203
201
|
|
|
204
202
|
.ql-tooltip {
|
|
205
|
-
position: fixed;
|
|
206
|
-
/* stylelint-disable-next-line declaration-no-important */
|
|
207
|
-
top: auto !important;
|
|
208
203
|
/* stylelint-disable-next-line declaration-no-important */
|
|
209
|
-
|
|
204
|
+
position: static !important;
|
|
210
205
|
align-items: center;
|
|
211
|
-
height:
|
|
212
|
-
|
|
206
|
+
height: 30px;
|
|
207
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
208
|
+
margin-top: 38px !important;
|
|
209
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
210
|
+
transform: none !important;
|
|
213
211
|
background-color: $inputGray;
|
|
214
212
|
border: 1px solid $inputGrayBorder;
|
|
215
213
|
border-radius: 3px;
|
|
216
214
|
box-shadow: none;
|
|
217
215
|
font-size: .75rem;
|
|
218
216
|
font-weight: 500;
|
|
219
|
-
|
|
220
|
-
padding: 4px;
|
|
217
|
+
padding: 4px 4px 4px 8px;
|
|
221
218
|
color: #8483A9;
|
|
219
|
+
width: 100%;
|
|
220
|
+
max-width: 394px;
|
|
221
|
+
min-width: 325px;
|
|
222
|
+
margin-left: auto;
|
|
222
223
|
|
|
223
224
|
input[type="text"] {
|
|
224
225
|
border-radius: 3px;
|
|
225
|
-
height:
|
|
226
|
+
height: 20px;
|
|
226
227
|
font-size: .75rem;
|
|
227
228
|
padding: 0 5px;
|
|
229
|
+
background-color: #F3F3FE;
|
|
230
|
+
color: rgba(#6F76A7, 0.6);
|
|
231
|
+
border: 0;
|
|
232
|
+
width: 100%;
|
|
228
233
|
}
|
|
229
234
|
|
|
230
235
|
&:not(.ql-hidden) {
|
|
@@ -233,11 +238,12 @@
|
|
|
233
238
|
|
|
234
239
|
a.ql-action {
|
|
235
240
|
margin-left: 4px;
|
|
236
|
-
padding:
|
|
241
|
+
padding: 2px 8px;
|
|
242
|
+
height: 20px;
|
|
237
243
|
color: $white;
|
|
238
244
|
background-color: $blue;
|
|
239
|
-
line-height:
|
|
240
|
-
border-radius:
|
|
245
|
+
line-height: 16px;
|
|
246
|
+
border-radius: 3px;
|
|
241
247
|
|
|
242
248
|
&:after {
|
|
243
249
|
margin: 0;
|
|
@@ -245,9 +251,54 @@
|
|
|
245
251
|
border: none;
|
|
246
252
|
}
|
|
247
253
|
}
|
|
254
|
+
|
|
255
|
+
&.ql-editing {
|
|
256
|
+
background-color: $white;
|
|
257
|
+
box-shadow: 0 0 4px rgba(10, 21, 81, 0.06);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
&[data-mode="link"]:before {
|
|
261
|
+
content: "Link";
|
|
262
|
+
color: #6F76A7;
|
|
263
|
+
}
|
|
248
264
|
}
|
|
249
265
|
|
|
250
266
|
.ql-editing {
|
|
251
267
|
z-index: 100000;
|
|
252
268
|
}
|
|
269
|
+
|
|
270
|
+
.ql-toolbar.ql-snow {
|
|
271
|
+
padding: 0;
|
|
272
|
+
border: none;
|
|
273
|
+
|
|
274
|
+
.ql-picker {
|
|
275
|
+
border-radius: 3px;
|
|
276
|
+
&:hover {
|
|
277
|
+
background-color: #F3F3FE;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.ql-button,
|
|
282
|
+
.ql-icon-picker,
|
|
283
|
+
.ql-color-picker,
|
|
284
|
+
.ql-color + .ql-divider {
|
|
285
|
+
margin-left: 8px;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.reportItemMenu + .ql-toolbar.ql-snow {
|
|
290
|
+
.ql-stroke {
|
|
291
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
292
|
+
stroke: #6F76A7 !important;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.ql-fill {
|
|
296
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
297
|
+
fill: #6F76A7 !important;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.reportItemMenu + .ql-toolbar.ql-snow .ql-button:hover {
|
|
303
|
+
background-color: #F3F3FE;
|
|
253
304
|
}
|
|
@@ -10,9 +10,9 @@ $blue: #4277FF;
|
|
|
10
10
|
$white: #FFFFFF;
|
|
11
11
|
$danger: #d13723;
|
|
12
12
|
$lightGray: #cccdd9;
|
|
13
|
-
$gray: #
|
|
13
|
+
$gray: #6F76A7;
|
|
14
14
|
$inputGray: #fbfbfe;
|
|
15
|
-
$inputGrayBorder: #
|
|
15
|
+
$inputGrayBorder: #E3E5F5;
|
|
16
16
|
$inputDarkGrayBorder:#303339;
|
|
17
17
|
$ctaGreen: #04bd6f;
|
|
18
18
|
$ctaBlue: #0099FF;
|
|
@@ -1,38 +1,16 @@
|
|
|
1
1
|
import { createElement } from 'react';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _path;
|
|
4
4
|
|
|
5
5
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
6
6
|
|
|
7
7
|
function SvgPageSettings(props) {
|
|
8
8
|
return /*#__PURE__*/createElement("svg", _extends({
|
|
9
|
-
viewBox: "0 0
|
|
9
|
+
viewBox: "0 0 12 13",
|
|
10
10
|
fill: "none",
|
|
11
11
|
xmlns: "http://www.w3.org/2000/svg"
|
|
12
|
-
}, props),
|
|
13
|
-
|
|
14
|
-
maskUnits: "userSpaceOnUse",
|
|
15
|
-
x: 0,
|
|
16
|
-
y: 1.371,
|
|
17
|
-
width: 11,
|
|
18
|
-
height: 12,
|
|
19
|
-
fill: "#000"
|
|
20
|
-
}, /*#__PURE__*/createElement("path", {
|
|
21
|
-
fill: "#fff",
|
|
22
|
-
d: "M0 1.371h11v12H0z"
|
|
23
|
-
}), /*#__PURE__*/createElement("path", {
|
|
24
|
-
fillRule: "evenodd",
|
|
25
|
-
clipRule: "evenodd",
|
|
26
|
-
d: "M8.262 6.214a.869.869 0 00-.23.408c-.067.265-.24.378-.436.378h-.192c-.197 0-.37-.113-.436-.378a.875.875 0 00-1.299-.539c-.234.14-.436.099-.576-.04l-.135-.136c-.14-.14-.182-.342-.041-.576a.875.875 0 00-.539-1.299C4.113 3.965 4 3.792 4 3.596v-.192c0-.197.114-.37.378-.436a.87.87 0 00.626-.597H6.83A1.312 1.312 0 108.262 4.57v1.645zm0 1.625c-.218.114-.45.161-.666.161h-.192a1.417 1.417 0 01-1.246-.729.333.333 0 00-.376-.156 1.417 1.417 0 01-1.396-.366l-.134-.134a1.418 1.418 0 01-.367-1.398.333.333 0 00-.156-.375A1.416 1.416 0 013 3.596v-.192a1.417 1.417 0 01.439-1.033H1.734A.734.734 0 001 3.106v8.16c0 .405.329.734.734.734h5.794a.734.734 0 00.734-.734V7.839z"
|
|
27
|
-
}))), _path || (_path = /*#__PURE__*/createElement("path", {
|
|
28
|
-
clipRule: "evenodd",
|
|
29
|
-
d: "M8.262 6.214a.869.869 0 00-.23.408c-.067.265-.24.378-.436.378h-.192c-.197 0-.37-.113-.436-.378a.875.875 0 00-1.299-.539c-.234.14-.436.099-.576-.04l-.135-.136c-.14-.14-.182-.342-.041-.576a.875.875 0 00-.539-1.299C4.113 3.965 4 3.792 4 3.596v-.192c0-.197.114-.37.378-.436a.87.87 0 00.626-.597H6.83A1.312 1.312 0 108.262 4.57v1.645zm0 1.625c-.218.114-.45.161-.666.161h-.192a1.417 1.417 0 01-1.246-.729.333.333 0 00-.376-.156 1.417 1.417 0 01-1.396-.366l-.134-.134a1.418 1.418 0 01-.367-1.398.333.333 0 00-.156-.375A1.416 1.416 0 013 3.596v-.192a1.417 1.417 0 01.439-1.033H1.734A.734.734 0 001 3.106v8.16c0 .405.329.734.734.734h5.794a.734.734 0 00.734-.734V7.839z"
|
|
30
|
-
})), _path2 || (_path2 = /*#__PURE__*/createElement("path", {
|
|
31
|
-
d: "M8.032 6.622l.97.242-.97-.242zm.23-.408l.706.71.294-.294v-.416h-1zm-1.294.408l.97-.242-.97.242zm-1.299-.539l-.514-.857h-.001l.515.857zm-.576-.04l-.707.706.707-.707zm-.135-.136l.707-.707-.001-.002-.706.709zm-.041-.576l.857.515-.857-.515zm-.539-1.299l-.242.97.242-.97zm0-1.064l-.242-.97.242.97zm.626-.597v-1h-.742l-.215.711.957.29zm1.826 0l.511.86 3.126-1.86H6.83v1zM8.262 4.57h1V2.625l-1.581 1.13.581.814zm0 3.27h1V6.186l-1.464.767.464.886zm-1.753-.15l-.627.778.627-.778zm-.351-.418l.872-.49-.872.49zm-.376-.156l-.27-.962.27.962zm-.542.047l.106-.994-.106.994zm-.854-.413l-.707.708.707-.708zm-.134-.134l.707-.707-.001-.001-.706.708zm-.414-.854l.994-.106-.994.106zm.047-.544l.962.27-.962-.27zm-.156-.375l-.49.872.49-.872zm-.418-.351l.779-.628-.779.628zm.001-1.983l-.778-.628.778.628zm.127-.137l.688.726 1.82-1.726H3.438v1zm5.563 4.493a.137.137 0 01-.035.059l-1.41-1.418c-.234.233-.41.53-.495.874l1.94.485zM7.596 8c.294 0 .617-.087.895-.311.277-.224.436-.524.511-.825l-1.94-.485a.494.494 0 01.173-.247.584.584 0 01.36-.132v2zm-.192 0h.192V6h-.192v2zM5.998 6.863c.075.302.234.602.511.826.278.224.601.311.895.311V6c.097 0 .235.03.36.132.126.1.165.212.174.248l-1.94.483zm.185.078a.125.125 0 01-.185-.077l1.94-.484a1.875 1.875 0 00-2.783-1.154L6.183 6.94zm-1.797-.192c.209.209.499.375.854.413.353.038.678-.062.944-.221l-1.03-1.715c.032-.02.14-.07.298-.052.16.017.28.092.348.161L4.386 6.75zm-.135-.135l.135.135L5.8 5.335 5.665 5.2 4.25 6.614zm-.192-1.798c-.16.266-.26.591-.221.945.038.356.205.646.414.854l1.412-1.417a.585.585 0 01.162.35.495.495 0 01-.052.298l-1.715-1.03zm.077.186a.125.125 0 01-.077-.186l1.715 1.03A1.875 1.875 0 004.62 3.062l-.485 1.94zM3 3.596c0 .294.087.617.311.895.224.277.524.436.825.511l.485-1.94a.494.494 0 01.247.173.584.584 0 01.132.36H3zm0-.192v.192h2v-.192H3zm1.136-1.406c-.3.075-.6.234-.824.51-.224.278-.312.6-.312.896h2a.584.584 0 01-.132.361.494.494 0 01-.247.173l-.485-1.94zm-.09.084a.12.12 0 01.032-.05.133.133 0 01.058-.034l.484 1.94A1.87 1.87 0 005.962 2.66l-1.915-.578zm.958 1.29H6.83v-2H5.004v2zm1.315-1.86A2.312 2.312 0 005.188 3.5h2c0-.113.059-.213.153-.27L6.32 1.513zM5.188 3.5A2.312 2.312 0 007.5 5.813v-2a.312.312 0 01-.313-.313h-2zM7.5 5.813c.5 0 .965-.16 1.344-.43L7.68 3.754a.307.307 0 01-.181.058v2zm-.238-1.244v1.645h2V4.57h-2zM7.8 6.953A.437.437 0 017.595 7v2c.36 0 .753-.078 1.13-.276l-.928-1.771zM7.595 7h-.192v2h.192V7zm-.192 0a.417.417 0 01-.267-.09L5.882 8.467c.48.388 1.034.533 1.522.533V7zm-.267-.09a.436.436 0 01-.107-.128l-1.744.979c.143.255.339.5.596.706L7.137 6.91zm-.107-.128a1.333 1.333 0 00-1.518-.63l.54 1.926a.667.667 0 01-.766-.317l1.744-.98zm-1.518-.63a.436.436 0 01-.166.016l-.212 1.989c.327.035.637 0 .918-.079l-.54-1.925zm-.166.016a.418.418 0 01-.253-.126L3.68 7.457c.347.346.841.634 1.455.7l.212-1.99zm-.253-.126l-.134-.134-1.414 1.414.134.135 1.414-1.415zm-.135-.135a.418.418 0 01-.126-.252l-1.989.213c.066.615.357 1.11.702 1.455l1.413-1.416zm-.126-.252a.436.436 0 01.015-.167l-1.925-.541c-.08.282-.114.593-.079.921l1.989-.213zm.015-.167a1.333 1.333 0 00-.629-1.518L3.24 5.714a.667.667 0 01-.318-.767l1.925.54zM4.218 3.97a.437.437 0 01-.128-.107L2.533 5.119c.207.256.451.452.707.595l.978-1.744zm-.128-.107A.417.417 0 014 3.596H2c0 .488.145 1.042.533 1.523L4.09 3.863zM4 3.596v-.192H2v.192h2zm0-.192c0-.1.029-.192.09-.267L2.534 1.88A2.417 2.417 0 002 3.404h2zm.09-.267a.413.413 0 01.037-.04L2.751 1.646c-.076.072-.148.15-.217.234L4.09 3.137zm-2.356.234H3.44v-2H1.734v2zM2 3.106a.266.266 0 01-.266.265v-2C.777 1.371 0 2.148 0 3.106h2zm0 8.16v-8.16H0v8.16h2zM1.734 11c.147 0 .266.119.266.266H0C0 12.223.777 13 1.734 13v-2zm5.794 0H1.734v2h5.794v-2zm-.266.266c0-.147.12-.266.266-.266v2c.958 0 1.734-.777 1.734-1.734h-2zm0-3.427v3.427h2V7.839h-2z",
|
|
32
|
-
fill: "#fff",
|
|
33
|
-
mask: "url(#page_settings_svg__a)"
|
|
34
|
-
})), _path3 || (_path3 = /*#__PURE__*/createElement("path", {
|
|
35
|
-
d: "M10.622 2.968a.875.875 0 01-.539-1.299c.141-.234.099-.437-.04-.576L9.906.958c-.14-.14-.342-.182-.576-.041A.875.875 0 018.032.378C7.966.113 7.792 0 7.596 0h-.192c-.197 0-.37.113-.436.378a.875.875 0 01-1.299.539c-.234-.141-.437-.099-.576.04l-.136.136c-.139.139-.181.342-.04.576a.875.875 0 01-.539 1.299c-.264.066-.378.239-.378.436v.192c0 .197.113.37.378.436.57.143.84.795.539 1.299-.141.234-.099.437.04.576l.136.135c.14.14.342.182.576.041a.875.875 0 011.299.539c.066.265.24.378.436.378h.192c.197 0 .37-.113.436-.378a.875.875 0 011.299-.539c.234.14.436.099.576-.04l.135-.136c.14-.14.182-.342.041-.576a.875.875 0 01.539-1.299c.265-.066.378-.24.378-.436v-.192c0-.197-.114-.37-.378-.436zM7.5 4.813a1.312 1.312 0 110-2.625 1.312 1.312 0 010 2.624z"
|
|
12
|
+
}, props), _path || (_path = /*#__PURE__*/createElement("path", {
|
|
13
|
+
d: "M11.351 5.096a1.5 1.5 0 01-.922-2.227c.241-.402.168-.749-.07-.987l-.233-.233c-.239-.238-.585-.31-.987-.07A1.5 1.5 0 016.912.656c-.113-.455-.41-.648-.748-.648h-.328c-.338 0-.634.193-.748.648a1.5 1.5 0 01-2.227.923c-.402-.242-.749-.169-.988.07l-.232.232c-.238.239-.311.586-.07.988A1.5 1.5 0 01.65 5.096c-.454.113-.649.41-.649.747v.329c0 .337.194.634.649.748a1.5 1.5 0 01.922 2.226c-.241.402-.168.749.07.987l.233.233c.24.24.587.311.987.07a1.5 1.5 0 012.227.923c.113.455.41.649.748.649h.328c.338 0 .634-.194.748-.65a1.5 1.5 0 012.227-.922c.401.241.748.17.987-.07l.232-.233c.239-.238.311-.585.07-.987a1.5 1.5 0 01.923-2.226c.455-.114.649-.41.649-.748v-.329c0-.338-.195-.634-.649-.747zM6 8.258a2.25 2.25 0 110-4.5 2.25 2.25 0 010 4.5z"
|
|
36
14
|
})));
|
|
37
15
|
}
|
|
38
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page_settings.svg.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"page_settings.svg.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createElement } from 'react';
|
|
2
2
|
|
|
3
|
-
var _path, _path2;
|
|
3
|
+
var _path, _path2, _path3;
|
|
4
4
|
|
|
5
5
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
6
6
|
|
|
@@ -10,10 +10,13 @@ function SvgEnterFullscreen(props) {
|
|
|
10
10
|
fill: "none",
|
|
11
11
|
xmlns: "http://www.w3.org/2000/svg"
|
|
12
12
|
}, props), _path || (_path = /*#__PURE__*/createElement("path", {
|
|
13
|
-
d: "
|
|
13
|
+
d: "M1.627 7.534a.621.621 0 00-.629.629l.027 3.16v.01c.003.35.29.637.64.64l3.17.027a.621.621 0 00.629-.629.647.647 0 00-.64-.64l-2.536-.02-.022-2.537a.647.647 0 00-.64-.64z",
|
|
14
14
|
fill: "#fff"
|
|
15
15
|
})), _path2 || (_path2 = /*#__PURE__*/createElement("path", {
|
|
16
|
-
d: "M1.
|
|
16
|
+
d: "M1.953 10.06a.696.696 0 00.984.985L6.22 7.764a.696.696 0 00-.985-.985l-3.281 3.282zM12.37 4.466a.621.621 0 00.628-.629l-.027-3.16v-.01a.647.647 0 00-.64-.64L9.162 0a.621.621 0 00-.629.629c.003.35.29.636.64.64l2.536.02.022 2.537c.003.35.289.637.64.64z",
|
|
17
|
+
fill: "#fff"
|
|
18
|
+
})), _path3 || (_path3 = /*#__PURE__*/createElement("path", {
|
|
19
|
+
d: "M12.043 1.94a.696.696 0 00-.984-.985L7.777 4.236a.696.696 0 00.985.985l3.281-3.282z",
|
|
17
20
|
fill: "#fff"
|
|
18
21
|
})));
|
|
19
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enter_fullscreen.svg.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"enter_fullscreen.svg.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import { createElement } from 'react';
|
|
2
2
|
|
|
3
|
-
var _path, _path2;
|
|
3
|
+
var _path, _path2, _path3;
|
|
4
4
|
|
|
5
5
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
6
6
|
|
|
7
7
|
function SvgExitFullscreen(props) {
|
|
8
8
|
return /*#__PURE__*/createElement("svg", _extends({
|
|
9
|
-
viewBox: "0 0
|
|
9
|
+
viewBox: "0 0 13 12",
|
|
10
10
|
fill: "none",
|
|
11
11
|
xmlns: "http://www.w3.org/2000/svg"
|
|
12
12
|
}, props), _path || (_path = /*#__PURE__*/createElement("path", {
|
|
13
|
-
d: "
|
|
13
|
+
d: "M8.203.959a.621.621 0 00-.629.629l.027 3.16v.01c.003.35.289.637.64.64l3.17.027a.621.621 0 00.629-.63.647.647 0 00-.64-.639l-2.536-.021-.022-2.537a.647.647 0 00-.64-.64z",
|
|
14
14
|
fill: "#fff"
|
|
15
15
|
})), _path2 || (_path2 = /*#__PURE__*/createElement("path", {
|
|
16
|
-
d: "M8.
|
|
16
|
+
d: "M8.529 3.485a.696.696 0 00.984.985l3.281-3.282a.693.693 0 000-.984.696.696 0 00-.984 0L8.529 3.485zM5.793 11.041a.621.621 0 00.63-.629l-.028-3.16v-.01a.647.647 0 00-.64-.64l-3.17-.027a.621.621 0 00-.629.63c.003.35.29.636.64.639l2.536.021.022 2.537c.003.35.29.636.64.64z",
|
|
17
|
+
fill: "#fff"
|
|
18
|
+
})), _path3 || (_path3 = /*#__PURE__*/createElement("path", {
|
|
19
|
+
d: "M5.468 8.515a.696.696 0 00-.985-.985l-3.281 3.282a.696.696 0 10.984.984l3.282-3.281z",
|
|
17
20
|
fill: "#fff"
|
|
18
21
|
})));
|
|
19
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exit_fullscreen.svg.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"exit_fullscreen.svg.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -70,9 +70,9 @@ var ZoomControls = function ZoomControls(_ref) {
|
|
|
70
70
|
return /*#__PURE__*/jsxs("div", {
|
|
71
71
|
className: "floatingController forZoom".concat(!showZoom ? ' hidden' : ''),
|
|
72
72
|
children: [/*#__PURE__*/jsxs("div", {
|
|
73
|
-
className: "floatingController-container",
|
|
73
|
+
className: "floatingController-container isGray",
|
|
74
74
|
children: [/*#__PURE__*/jsx("button", {
|
|
75
|
-
className: "controllerItem
|
|
75
|
+
className: "controllerItem isWhite",
|
|
76
76
|
onClick: increaseZoom,
|
|
77
77
|
title: ZOOM_IN,
|
|
78
78
|
type: "button",
|
|
@@ -83,7 +83,7 @@ var ZoomControls = function ZoomControls(_ref) {
|
|
|
83
83
|
className: "controllerIndicator",
|
|
84
84
|
children: [zoomValue, "%"]
|
|
85
85
|
}), /*#__PURE__*/jsx("button", {
|
|
86
|
-
className: "controllerItem
|
|
86
|
+
className: "controllerItem isWhite",
|
|
87
87
|
onClick: decreaseZoom,
|
|
88
88
|
title: ZOOM_OUT,
|
|
89
89
|
type: "button",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoomControls.js","sources":["../../../../src/components/Builder/ZoomControls.js"],"sourcesContent":["import { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport * as icons from '../../utils/icons';\nimport { useBuilderContext } from '../../utils/builderContext';\nimport { usePropContext } from '../../utils/propContext';\nimport {\n ZOOM_STEP,\n ZOOM_MIN,\n ZOOM_MAX,\n ZOOM_MULTIPLIER,\n} from '../../constants/zoom';\nimport { useTranslatedTexts } from '../../utils/hooks';\n\nconst ZoomControls = ({\n mode,\n showZoom,\n}) => {\n const { setZoom, zoom } = useBuilderContext();\n const {\n onAnEventTrigger,\n settings,\n } = usePropContext();\n const { reportLayoutHeight = 794, reportLayoutWidth = 1123 } = settings;\n const isModeCustomize = mode === 'customize';\n const decreaseZoom = () => {\n onAnEventTrigger('zoomOut', 'report');\n if (zoom > (ZOOM_STEP + ZOOM_MIN)) {\n setZoom(parseFloat((zoom - ZOOM_STEP).toFixed(1)), isModeCustomize, reportLayoutWidth);\n }\n };\n const increaseZoom = () => {\n onAnEventTrigger('zoomIn', 'report');\n if (zoom < (ZOOM_MAX)) {\n setZoom(parseFloat((zoom + ZOOM_STEP).toFixed(1)), isModeCustomize, reportLayoutWidth);\n }\n };\n const fitZoom = () => {\n const { innerHeight, innerWidth } = window;\n const newScale = Math.min(\n (innerWidth - 400) / reportLayoutWidth,\n innerHeight / reportLayoutHeight,\n );\n let newZoom = Math.floor(newScale * 10) / 10;\n if (newZoom < 0.5) newZoom = 0.5;\n if (newZoom > 1) newZoom = 1;\n onAnEventTrigger('fitZoom', 'report');\n setZoom(newZoom, isModeCustomize, reportLayoutWidth);\n };\n\n const zoomValue = useMemo(() => {\n return Number.isNaN(zoom) ? 100 : (zoom * ZOOM_MULTIPLIER).toFixed(0);\n }, [zoom, ZOOM_MULTIPLIER]);\n\n const { FIT_TO_SCENE, ZOOM_IN, ZOOM_OUT } = useTranslatedTexts();\n\n return (\n <div className={`floatingController forZoom${!showZoom ? ' hidden' : ''}`}>\n <div className=\"floatingController-container\">\n <button\n className=\"controllerItem
|
|
1
|
+
{"version":3,"file":"ZoomControls.js","sources":["../../../../src/components/Builder/ZoomControls.js"],"sourcesContent":["import { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport * as icons from '../../utils/icons';\nimport { useBuilderContext } from '../../utils/builderContext';\nimport { usePropContext } from '../../utils/propContext';\nimport {\n ZOOM_STEP,\n ZOOM_MIN,\n ZOOM_MAX,\n ZOOM_MULTIPLIER,\n} from '../../constants/zoom';\nimport { useTranslatedTexts } from '../../utils/hooks';\n\nconst ZoomControls = ({\n mode,\n showZoom,\n}) => {\n const { setZoom, zoom } = useBuilderContext();\n const {\n onAnEventTrigger,\n settings,\n } = usePropContext();\n const { reportLayoutHeight = 794, reportLayoutWidth = 1123 } = settings;\n const isModeCustomize = mode === 'customize';\n const decreaseZoom = () => {\n onAnEventTrigger('zoomOut', 'report');\n if (zoom > (ZOOM_STEP + ZOOM_MIN)) {\n setZoom(parseFloat((zoom - ZOOM_STEP).toFixed(1)), isModeCustomize, reportLayoutWidth);\n }\n };\n const increaseZoom = () => {\n onAnEventTrigger('zoomIn', 'report');\n if (zoom < (ZOOM_MAX)) {\n setZoom(parseFloat((zoom + ZOOM_STEP).toFixed(1)), isModeCustomize, reportLayoutWidth);\n }\n };\n const fitZoom = () => {\n const { innerHeight, innerWidth } = window;\n const newScale = Math.min(\n (innerWidth - 400) / reportLayoutWidth,\n innerHeight / reportLayoutHeight,\n );\n let newZoom = Math.floor(newScale * 10) / 10;\n if (newZoom < 0.5) newZoom = 0.5;\n if (newZoom > 1) newZoom = 1;\n onAnEventTrigger('fitZoom', 'report');\n setZoom(newZoom, isModeCustomize, reportLayoutWidth);\n };\n\n const zoomValue = useMemo(() => {\n return Number.isNaN(zoom) ? 100 : (zoom * ZOOM_MULTIPLIER).toFixed(0);\n }, [zoom, ZOOM_MULTIPLIER]);\n\n const { FIT_TO_SCENE, ZOOM_IN, ZOOM_OUT } = useTranslatedTexts();\n\n return (\n <div className={`floatingController forZoom${!showZoom ? ' hidden' : ''}`}>\n <div className=\"floatingController-container isGray\">\n <button\n className=\"controllerItem isWhite\"\n onClick={increaseZoom}\n title={ZOOM_IN}\n type=\"button\"\n >\n <icons.plus className=\"jfReportSVG controllerItem-icon\" />\n </button>\n <div className=\"controllerIndicator\">\n {zoomValue}\n %\n </div>\n <button\n className=\"controllerItem isWhite\"\n onClick={decreaseZoom}\n title={ZOOM_OUT}\n type=\"button\"\n >\n <icons.minus className=\"jfReportSVG controllerItem-icon\" />\n </button>\n </div>\n <div className=\"floatingController-container\">\n <button\n className=\"controllerItem isSingle\"\n onClick={fitZoom}\n title={FIT_TO_SCENE}\n type=\"button\"\n >\n <icons.fit className=\"jfReportSVG icon-fit\" />\n </button>\n </div>\n </div>\n );\n};\n\nZoomControls.propTypes = {\n mode: PropTypes.string,\n showZoom: PropTypes.bool,\n};\n\nZoomControls.defaultProps = {\n mode: '',\n showZoom: true,\n};\n\nexport default ZoomControls;\n"],"names":["ZoomControls","mode","showZoom","useBuilderContext","setZoom","zoom","usePropContext","onAnEventTrigger","settings","reportLayoutHeight","reportLayoutWidth","isModeCustomize","decreaseZoom","ZOOM_STEP","ZOOM_MIN","parseFloat","toFixed","increaseZoom","ZOOM_MAX","fitZoom","window","innerHeight","innerWidth","newScale","Math","min","newZoom","floor","zoomValue","useMemo","Number","isNaN","ZOOM_MULTIPLIER","useTranslatedTexts","FIT_TO_SCENE","ZOOM_IN","ZOOM_OUT","_jsxs","_jsx","icons.plus","icons.minus","icons.fit","propTypes","PropTypes","string","bool","defaultProps"],"mappings":";;;;;;;;;;;;;;IAaMA,YAAY,GAAG,SAAfA,YAAe,OAGf;AAAA,MAFJC,IAEI,QAFJA,IAEI;AAAA,MADJC,QACI,QADJA,QACI;;AACJ,2BAA0BC,iBAAiB,EAA3C;AAAA,MAAQC,OAA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AI,EAAC,QAJP;AAAA,+BAMEE,IAACE,QAAD;AAAa,UAAA,SAAS,EAAC;AAAvB;AANF,QAbF;AAAA,MADF,eAuBEF;AAAK,MAAA,SAAS,EAAC,8BAAf;AAAA,6BACEA;AACE,QAAA,SAAS,EAAC,yBADZ;AAEE,QAAA,OAAO,EAAEnB,OAFX;AAGE,QAAA,KAAK,EAAEe,YAHT;AAIE,QAAA,IAAI,EAAC,QAJP;AAAA,+BAMEI,IAACG,YAAD;AAAW,UAAA,SAAS,EAAC;AAArB;AANF;AADF,MAvBF;AAAA,IADF;AAoCD;;AAEDzC,YAAY,CAAC0C,SAAb,GAAyB;AACvBzC,EAAAA,IAAI,EAAE0C,SAAS,CAACC,MADO;AAEvB1C,EAAAA,QAAQ,EAAEyC,SAAS,CAACE;AAFG,CAAzB;AAKA7C,YAAY,CAAC8C,YAAb,GAA4B;AAC1B7C,EAAAA,IAAI,EAAE,EADoB;AAE1BC,EAAAA,QAAQ,EAAE;AAFgB,CAA5B;;;;"}
|
|
@@ -53,8 +53,8 @@ var CustomToolbar = function CustomToolbar(_ref) {
|
|
|
53
53
|
isOpened: isOpened
|
|
54
54
|
}),
|
|
55
55
|
style: {
|
|
56
|
-
maxWidth: isOpened ? 'none' : '100%'
|
|
57
|
-
|
|
56
|
+
maxWidth: isOpened ? 'none' : '100%' // minWidth: `${itemWidth}px`,
|
|
57
|
+
|
|
58
58
|
},
|
|
59
59
|
children: [/*#__PURE__*/jsx("select", {
|
|
60
60
|
"aria-label": "Size",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomToolbar.js","sources":["../../../../../src/components/TextEditor/CustomToolbar/CustomToolbar.js"],"sourcesContent":["import {\n useState, useCallback, useLayoutEffect, useRef,\n} from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { fontSizes } from '../../../constants/fonts';\n\nconst SELECT_WIDTH = 70;\nconst BUTTON_WIDTH = 26;\nconst BAR_WIDTH = SELECT_WIDTH + (BUTTON_WIDTH * 8);\n\nconst CustomToolbar = ({ itemWidth }) => {\n const overflow = BAR_WIDTH > itemWidth;\n const [isOpened, setIsOpened] = useState(overflow ? false : true);\n const onClickMore = useCallback(() => setIsOpened(true), []);\n const wrapper = useRef();\n\n function getVisibleClass(limit) {\n return overflow && itemWidth < limit ? ' hiddenVisibility' : '';\n }\n\n useLayoutEffect(() => {\n if (!isOpened || wrapper.current === null) return;\n Array.from(wrapper.current.children).forEach(el => el.classList.remove('hiddenVisibility'));\n }, [isOpened]);\n\n return (\n <div\n ref={wrapper}\n className={classNames('toolbarWrapper p-absolute d-flex', { isOpened })}\n style={{\n maxWidth: isOpened ? 'none' : '100%',\n minWidth: `${itemWidth}px`,\n }}\n >\n <select\n aria-label=\"Size\"\n className=\"ql-size ql-select ql-textselect\"\n defaultValue=\"16px\"\n onChange={e => e.persist()}\n >\n {fontSizes.map(size => (\n <option\n key={size}\n value={`${size}px`}\n >\n {size}\n px\n </option>\n ))}\n </select>\n <div className=\"ql-divider\" />\n <button\n aria-label=\"Bold\"\n className={`ql-bold ql-button${getVisibleClass(SELECT_WIDTH + BUTTON_WIDTH)}`}\n type=\"button\"\n />\n <button\n aria-label=\"Italic\"\n className={`ql-italic ql-button${getVisibleClass(SELECT_WIDTH + (BUTTON_WIDTH * 2))}`}\n type=\"button\"\n />\n <button\n aria-label=\"Underline\"\n className={`ql-underline ql-button${getVisibleClass(SELECT_WIDTH + (BUTTON_WIDTH * 3))}`}\n type=\"button\"\n />\n <select\n aria-label=\"Text Color\"\n className={`ql-color ql-select${getVisibleClass(SELECT_WIDTH + (BUTTON_WIDTH * 4))}`}\n defaultValue=\"\"\n onChange={e => e.persist()}\n />\n <div className=\"ql-divider\" />\n <select\n aria-label=\"Alignment\"\n className={`ql-align ql-select${getVisibleClass(SELECT_WIDTH + (BUTTON_WIDTH * 5))}`}\n defaultValue=\"\"\n onChange={e => e.persist()}\n />\n <button\n aria-label=\"Ordered List\"\n className={`ql-list ql-button${getVisibleClass(SELECT_WIDTH + (BUTTON_WIDTH * 6))}`}\n type=\"button\"\n value=\"ordered\"\n />\n <button\n aria-label=\"Bullet List\"\n className={`ql-list ql-button${getVisibleClass(SELECT_WIDTH + (BUTTON_WIDTH * 7))}`}\n type=\"button\"\n value=\"bullet\"\n />\n <button\n aria-label=\"Link\"\n className={`ql-link ql-button${getVisibleClass(SELECT_WIDTH + (BUTTON_WIDTH * 8))}`}\n type=\"button\"\n />\n {overflow && !isOpened && (\n <button\n aria-label=\"More Options\"\n className=\"qlMore\"\n onClick={onClickMore}\n type=\"button\"\n >\n >>\n </button>\n )}\n </div>\n );\n};\n\nCustomToolbar.propTypes = {\n itemWidth: PropTypes.number,\n};\n\nCustomToolbar.defaultProps = {\n itemWidth: 0,\n};\n\nexport default CustomToolbar;\n"],"names":["SELECT_WIDTH","BUTTON_WIDTH","BAR_WIDTH","CustomToolbar","itemWidth","overflow","useState","isOpened","setIsOpened","onClickMore","useCallback","wrapper","useRef","getVisibleClass","limit","useLayoutEffect","current","Array","from","children","forEach","el","classList","remove","_jsxs","classNames","maxWidth","
|
|
1
|
+
{"version":3,"file":"CustomToolbar.js","sources":["../../../../../src/components/TextEditor/CustomToolbar/CustomToolbar.js"],"sourcesContent":["import {\n useState, useCallback, useLayoutEffect, useRef,\n} from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { fontSizes } from '../../../constants/fonts';\n\nconst SELECT_WIDTH = 70;\nconst BUTTON_WIDTH = 26;\nconst BAR_WIDTH = SELECT_WIDTH + (BUTTON_WIDTH * 8);\n\nconst CustomToolbar = ({ itemWidth }) => {\n const overflow = BAR_WIDTH > itemWidth;\n const [isOpened, setIsOpened] = useState(overflow ? false : true);\n const onClickMore = useCallback(() => setIsOpened(true), []);\n const wrapper = useRef();\n\n function getVisibleClass(limit) {\n return overflow && itemWidth < limit ? ' hiddenVisibility' : '';\n }\n\n useLayoutEffect(() => {\n if (!isOpened || wrapper.current === null) return;\n Array.from(wrapper.current.children).forEach(el => el.classList.remove('hiddenVisibility'));\n }, [isOpened]);\n\n return (\n <div\n ref={wrapper}\n className={classNames('toolbarWrapper p-absolute d-flex', { isOpened })}\n style={{\n maxWidth: isOpened ? 'none' : '100%',\n // minWidth: `${itemWidth}px`,\n }}\n >\n <select\n aria-label=\"Size\"\n className=\"ql-size ql-select ql-textselect\"\n defaultValue=\"16px\"\n onChange={e => e.persist()}\n >\n {fontSizes.map(size => (\n <option\n key={size}\n value={`${size}px`}\n >\n {size}\n px\n </option>\n ))}\n </select>\n <div className=\"ql-divider\" />\n <button\n aria-label=\"Bold\"\n className={`ql-bold ql-button${getVisibleClass(SELECT_WIDTH + BUTTON_WIDTH)}`}\n type=\"button\"\n />\n <button\n aria-label=\"Italic\"\n className={`ql-italic ql-button${getVisibleClass(SELECT_WIDTH + (BUTTON_WIDTH * 2))}`}\n type=\"button\"\n />\n <button\n aria-label=\"Underline\"\n className={`ql-underline ql-button${getVisibleClass(SELECT_WIDTH + (BUTTON_WIDTH * 3))}`}\n type=\"button\"\n />\n <select\n aria-label=\"Text Color\"\n className={`ql-color ql-select${getVisibleClass(SELECT_WIDTH + (BUTTON_WIDTH * 4))}`}\n defaultValue=\"\"\n onChange={e => e.persist()}\n />\n <div className=\"ql-divider\" />\n <select\n aria-label=\"Alignment\"\n className={`ql-align ql-select${getVisibleClass(SELECT_WIDTH + (BUTTON_WIDTH * 5))}`}\n defaultValue=\"\"\n onChange={e => e.persist()}\n />\n <button\n aria-label=\"Ordered List\"\n className={`ql-list ql-button${getVisibleClass(SELECT_WIDTH + (BUTTON_WIDTH * 6))}`}\n type=\"button\"\n value=\"ordered\"\n />\n <button\n aria-label=\"Bullet List\"\n className={`ql-list ql-button${getVisibleClass(SELECT_WIDTH + (BUTTON_WIDTH * 7))}`}\n type=\"button\"\n value=\"bullet\"\n />\n <button\n aria-label=\"Link\"\n className={`ql-link ql-button${getVisibleClass(SELECT_WIDTH + (BUTTON_WIDTH * 8))}`}\n type=\"button\"\n />\n {overflow && !isOpened && (\n <button\n aria-label=\"More Options\"\n className=\"qlMore\"\n onClick={onClickMore}\n type=\"button\"\n >\n >>\n </button>\n )}\n </div>\n );\n};\n\nCustomToolbar.propTypes = {\n itemWidth: PropTypes.number,\n};\n\nCustomToolbar.defaultProps = {\n itemWidth: 0,\n};\n\nexport default CustomToolbar;\n"],"names":["SELECT_WIDTH","BUTTON_WIDTH","BAR_WIDTH","CustomToolbar","itemWidth","overflow","useState","isOpened","setIsOpened","onClickMore","useCallback","wrapper","useRef","getVisibleClass","limit","useLayoutEffect","current","Array","from","children","forEach","el","classList","remove","_jsxs","classNames","maxWidth","_jsx","e","persist","fontSizes","map","size","propTypes","PropTypes","number","defaultProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,YAAY,GAAG,EAArB;AACA,IAAMC,YAAY,GAAG,EAArB;AACA,IAAMC,SAAS,GAAGF,YAAY,GAAIC,YAAY,GAAG,CAAjD;;IAEME,aAAa,GAAG,SAAhBA,aAAgB,OAAmB;AAAA,MAAhBC,SAAgB,QAAhBA,SAAgB;AACvC,MAAMC,QAAQ,GAAGH,SAAS,GAAGE,SAA7B;;AACA,kBAAgCE,QAAQ,CAACD,QAAQ,GAAG,KAAH,GAAW,IAApB,CAAxC;AAAA;AAAA,MAAOE,QAAP;AAAA,MAAiBC,WAAjB;;AACA,MAAMC,WAAW,GAAGC,WAAW,CAAC;AAAA,WAAMF,WAAW,CAAC,IAAD,CAAjB;AAAA,GAAD,EAA0B,EAA1B,CAA/B;AACA,MAAMG,OAAO,GAAGC,MAAM,EAAtB;;AAEA,WAASC,eAAT,CAAyBC,KAAzB,EAAgC;AAC9B,WAAOT,QAAQ,IAAID,SAAS,GAAGU,KAAxB,GAAgC,mBAAhC,GAAsD,EAA7D;AACD;;AAEDC,EAAAA,eAAe,CAAC,YAAM;AACpB,QAAI,CAACR,QAAD,IAAaI,OAAO,CAACK,OAAR,KAAoB,IAArC,EAA2C;AAC3CC,IAAAA,KA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QAJP;AAAA;AAAA,MAvEJ;AAAA,IADF;AAmFD;;AAEDN,aAAa,CAAC8B,SAAd,GAA0B;AACxB7B,EAAAA,SAAS,EAAE8B,SAAS,CAACC;AADG,CAA1B;AAIAhC,aAAa,CAACiC,YAAd,GAA6B;AAC3BhC,EAAAA,SAAS,EAAE;AADgB,CAA7B;;;;"}
|
|
@@ -1,8 +1,37 @@
|
|
|
1
|
+
var handleKeyDown = function handleKeyDown(e) {
|
|
2
|
+
e.stopPropagation();
|
|
3
|
+
};
|
|
4
|
+
|
|
1
5
|
var modules = {
|
|
2
6
|
clipboard: {
|
|
3
7
|
matchVisual: false
|
|
4
8
|
},
|
|
5
|
-
toolbar:
|
|
9
|
+
toolbar: {
|
|
10
|
+
container: '#toolbar',
|
|
11
|
+
handlers: {
|
|
12
|
+
link: function customLink(value) {
|
|
13
|
+
var input = document.querySelector('.ql-tooltip [data-link]');
|
|
14
|
+
|
|
15
|
+
if (value) {
|
|
16
|
+
var range = this.quill.getSelection();
|
|
17
|
+
|
|
18
|
+
if (range === null || range.length === 0) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
var tooltip = this.quill.theme.tooltip;
|
|
23
|
+
var toolbar = document.getElementById('toolbar');
|
|
24
|
+
toolbar.appendChild(tooltip.root);
|
|
25
|
+
tooltip.edit('link', this.quill.getText(range));
|
|
26
|
+
input.setAttribute('placeholder', 'Enter a link');
|
|
27
|
+
input.addEventListener('keydown', handleKeyDown);
|
|
28
|
+
} else {
|
|
29
|
+
input.removeEventListener('keydown', handleKeyDown);
|
|
30
|
+
this.quill.format('link', false);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
6
35
|
};
|
|
7
36
|
var formats = ['align', 'header', 'font', 'size', 'bold', 'italic', 'underline', 'strike', 'blockquote', 'list', 'bullet', 'indent', 'link', 'image', 'color'];
|
|
8
37
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textEditorConstants.js","sources":["../../../../src/components/TextEditor/textEditorConstants.js"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"textEditorConstants.js","sources":["../../../../src/components/TextEditor/textEditorConstants.js"],"sourcesContent":["const handleKeyDown = e => {\n e.stopPropagation();\n};\n\nexport const modules = {\n clipboard: {\n matchVisual: false,\n },\n toolbar: {\n container: '#toolbar',\n handlers: {\n link: function customLink(value) {\n const input = document.querySelector('.ql-tooltip [data-link]');\n if (value) {\n const range = this.quill.getSelection();\n if (range === null || range.length === 0) {\n return;\n }\n const { tooltip } = this.quill.theme;\n const toolbar = document.getElementById('toolbar');\n toolbar.appendChild(tooltip.root);\n tooltip.edit('link', this.quill.getText(range));\n input.setAttribute('placeholder', 'Enter a link');\n input.addEventListener('keydown', handleKeyDown);\n } else {\n input.removeEventListener('keydown', handleKeyDown);\n this.quill.format('link', false);\n }\n },\n },\n },\n};\n\nexport const formats = [\n 'align',\n 'header',\n 'font',\n 'size',\n 'bold',\n 'italic',\n 'underline',\n 'strike',\n 'blockquote',\n 'list',\n 'bullet',\n 'indent',\n 'link',\n 'image',\n 'color',\n];\n"],"names":["handleKeyDown","e","stopPropagation","modules","clipboard","matchVisual","toolbar","container","handlers","link","customLink","value","input","document","querySelector","range","quill","getSelection","length","tooltip","theme","getElementById","appendChild","root","edit","getText","setAttribute","addEventListener","removeEventListener","format","formats"],"mappings":"AAAA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAAAC,CAAC,EAAI;AACzBA,EAAAA,CAAC,CAACC,eAAF;AACD,CAFD;;IAIaC,OAAO,GAAG;AACrBC,EAAAA,SAAS,EAAE;AACTC,IAAAA,WAAW,EAAE;AADJ,GADU;AAIrBC,EAAAA,OAAO,EAAE;AACPC,IAAAA,SAAS,EAAE,UADJ;AAEPC,IAAAA,QAAQ,EAAE;AACRC,MAAAA,IAAI,EAAE,SAASC,UAAT,CAAoBC,KAApB,EAA2B;AAC/B,YAAMC,KAAK,GAAGC,QAAQ,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