@pie-element/explicit-constructed-response 3.11.6 → 3.12.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/module/print.js CHANGED
@@ -1,3952 +1,7 @@
1
- import {_dll_prop_types, _dll_react, _dll_material_ui__core_styles, _dll_classnames, _dll_react_dom, _dll_material_ui__core, _dll_debug, _dll_material_ui__core_collapse_index, _dll_lodash, _dll_react_dom_server} from "../../../@pie-lib/shared-module@^1.2.14/module/index.js";
2
- import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.17/module/index.js";
3
- import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.15/module/index.js";
4
- const React$y = _dll_react;
5
- const PropTypes$w = _dll_prop_types;
6
- const _jsxFileName$v = "/home/circleci/repo/node_modules/@pie-lib/icons/src/sized.jsx";
7
- const normalizeSize = size => {
8
- return typeof size === 'string' ? size : typeof size === 'number' ? `${size}px` : '30px';
9
- };
10
- const Sized = ({size, children}) => {
11
- size = normalizeSize(size);
12
- const style = {
13
- height: size,
14
- width: size,
15
- display: 'inline-block',
16
- position: 'relative'
17
- };
18
- return React$y.createElement('div', {
19
- style: style,
20
- __self: undefined,
21
- __source: {
22
- fileName: _jsxFileName$v,
23
- lineNumber: 18
24
- }
25
- }, children);
26
- };
27
- Sized.propTypes = {
28
- size: PropTypes$w.number,
29
- children: PropTypes$w.oneOfType([PropTypes$w.arrayOf(PropTypes$w.node), PropTypes$w.node]).isRequired
30
- };
31
- const React$x = _dll_react;
32
- const PropTypes$v = _dll_prop_types;
33
- const _jsxFileName$u = "/home/circleci/repo/node_modules/@pie-lib/icons/src/icon-root.jsx";
34
- const IconRoot = ({size, children}) => React$x.createElement(Sized, {
35
- size: size,
36
- __self: undefined,
37
- __source: {
38
- fileName: _jsxFileName$u,
39
- lineNumber: 10
40
- }
41
- }, React$x.createElement('svg', {
42
- preserveAspectRatio: "xMinYMin meet",
43
- version: "1.1",
44
- x: "0px",
45
- y: "0px",
46
- viewBox: "0 0 44 40",
47
- style: {
48
- enableBackground: 'new 0 0 44 40'
49
- },
50
- __self: undefined,
51
- __source: {
52
- fileName: _jsxFileName$u,
53
- lineNumber: 11
54
- }
55
- }, ' ', children));
56
- IconRoot.propTypes = {
57
- size: PropTypes$v.oneOf([PropTypes$v.string, PropTypes$v.number]),
58
- children: PropTypes$v.oneOfType([PropTypes$v.arrayOf(PropTypes$v.node), PropTypes$v.node]).isRequired
59
- };
60
- const getStyles = (name, fg, bg) => ({
61
- bg: {
62
- fill: `var(--icons-${name}-bg, ${bg})`
63
- },
64
- fg: {
65
- fill: `var(--icons-${name}-fg, ${fg})`
66
- }
67
- });
68
- ({
69
- className: PropTypes$v.string
70
- });
71
- const SquareFeedbackBox = ({className}) => React$x.createElement('polygon', {
72
- transform: "translate(2, 0)",
73
- className: className,
74
- points: "34.1,28.6 34.1,2.2 2,2.2 2,34.3 40.1,34.3",
75
- __self: undefined,
76
- __source: {
77
- fileName: _jsxFileName$u,
78
- lineNumber: 51
79
- }
80
- });
81
- SquareFeedbackBox.propTypes = {
82
- className: PropTypes$v.string
83
- };
84
- const RoundFeedbackBox = ({className}) => React$x.createElement('path', {
85
- transform: "translate(1, 0)",
86
- className: className,
87
- d: "M31.2,29.1v-0.3c2.2-2.8,3.6-6.3,3.6-10.1c0-8.9-7.2-16.1-16.1-16.1c-8.8,0.1-16,7.3-16,16.2 s7.2,16.1,16.1,16.1h18.5L31.2,29.1z",
88
- __self: undefined,
89
- __source: {
90
- fileName: _jsxFileName$u,
91
- lineNumber: 62
92
- }
93
- });
94
- RoundFeedbackBox.propTypes = {
95
- className: PropTypes$v.string
96
- };
97
- const Circle$1 = ({className}) => React$x.createElement('circle', {
98
- transform: "translate(-3, 0)",
99
- className: className,
100
- cx: "23",
101
- cy: "20.4",
102
- r: "16",
103
- __self: undefined,
104
- __source: {
105
- fileName: _jsxFileName$u,
106
- lineNumber: 73
107
- }
108
- });
109
- Circle$1.propTypes = {
110
- className: PropTypes$v.string
111
- };
112
- const Square = ({className}) => React$x.createElement('rect', {
113
- x: "3.6",
114
- y: "4.1",
115
- className: className,
116
- width: "32",
117
- height: "32",
118
- __self: undefined,
119
- __source: {
120
- fileName: _jsxFileName$u,
121
- lineNumber: 81
122
- }
123
- });
124
- Square.propTypes = {
125
- className: PropTypes$v.string
126
- };
127
- const PropTypes$u = _dll_prop_types;
128
- const React$w = _dll_react;
129
- const _jsxFileName$t = "/home/circleci/repo/node_modules/@pie-lib/icons/src/icon-base.jsx";
130
- var IconBase = (Action, Emoji) => {
131
- class IconBase extends React$w.Component {
132
- static __initStatic() {
133
- this.propTypes = {
134
- classes: PropTypes$u.object.isRequired,
135
- size: PropTypes$u.number
136
- };
137
- }
138
- constructor(props) {
139
- super(props);
140
- const {classes, size} = this.props;
141
- this.icons = {
142
- feedback: {
143
- round: {
144
- check: React$w.createElement(IconRoot, {
145
- size: size,
146
- __self: this,
147
- __source: {
148
- fileName: _jsxFileName$t,
149
- lineNumber: 20
150
- }
151
- }, React$w.createElement(RoundFeedbackBox, {
152
- className: classes.bg,
153
- __self: this,
154
- __source: {
155
- fileName: _jsxFileName$t,
156
- lineNumber: 21
157
- }
158
- }), React$w.createElement(Action, {
159
- className: classes.fg,
160
- __self: this,
161
- __source: {
162
- fileName: _jsxFileName$t,
163
- lineNumber: 22
164
- }
165
- })),
166
- emoji: React$w.createElement(IconRoot, {
167
- size: size,
168
- __self: this,
169
- __source: {
170
- fileName: _jsxFileName$t,
171
- lineNumber: 26
172
- }
173
- }, React$w.createElement(RoundFeedbackBox, {
174
- className: classes.bg,
175
- __self: this,
176
- __source: {
177
- fileName: _jsxFileName$t,
178
- lineNumber: 27
179
- }
180
- }), React$w.createElement(Emoji, {
181
- className: classes.fg,
182
- __self: this,
183
- __source: {
184
- fileName: _jsxFileName$t,
185
- lineNumber: 28
186
- }
187
- })),
188
- open: {
189
- check: React$w.createElement(IconRoot, {
190
- size: size,
191
- __self: this,
192
- __source: {
193
- fileName: _jsxFileName$t,
194
- lineNumber: 33
195
- }
196
- }, React$w.createElement(Action, {
197
- className: classes.bg,
198
- __self: this,
199
- __source: {
200
- fileName: _jsxFileName$t,
201
- lineNumber: 34
202
- }
203
- })),
204
- emoji: React$w.createElement(IconRoot, {
205
- size: size,
206
- __self: this,
207
- __source: {
208
- fileName: _jsxFileName$t,
209
- lineNumber: 38
210
- }
211
- }, React$w.createElement(Emoji, {
212
- className: classes.bg,
213
- __self: this,
214
- __source: {
215
- fileName: _jsxFileName$t,
216
- lineNumber: 39
217
- }
218
- }))
219
- }
220
- },
221
- square: {
222
- check: React$w.createElement(IconRoot, {
223
- size: size,
224
- __self: this,
225
- __source: {
226
- fileName: _jsxFileName$t,
227
- lineNumber: 46
228
- }
229
- }, React$w.createElement(SquareFeedbackBox, {
230
- className: classes.bg,
231
- __self: this,
232
- __source: {
233
- fileName: _jsxFileName$t,
234
- lineNumber: 47
235
- }
236
- }), React$w.createElement(Action, {
237
- className: classes.fg,
238
- __self: this,
239
- __source: {
240
- fileName: _jsxFileName$t,
241
- lineNumber: 48
242
- }
243
- })),
244
- emoji: React$w.createElement(IconRoot, {
245
- size: size,
246
- __self: this,
247
- __source: {
248
- fileName: _jsxFileName$t,
249
- lineNumber: 52
250
- }
251
- }, React$w.createElement(SquareFeedbackBox, {
252
- className: classes.bg,
253
- __self: this,
254
- __source: {
255
- fileName: _jsxFileName$t,
256
- lineNumber: 53
257
- }
258
- }), React$w.createElement(Emoji, {
259
- className: classes.fg,
260
- __self: this,
261
- __source: {
262
- fileName: _jsxFileName$t,
263
- lineNumber: 54
264
- }
265
- })),
266
- open: {
267
- check: React$w.createElement(IconRoot, {
268
- size: size,
269
- __self: this,
270
- __source: {
271
- fileName: _jsxFileName$t,
272
- lineNumber: 59
273
- }
274
- }, React$w.createElement(Action, {
275
- className: classes.bg,
276
- __self: this,
277
- __source: {
278
- fileName: _jsxFileName$t,
279
- lineNumber: 60
280
- }
281
- })),
282
- emoji: React$w.createElement(IconRoot, {
283
- size: size,
284
- __self: this,
285
- __source: {
286
- fileName: _jsxFileName$t,
287
- lineNumber: 64
288
- }
289
- }, React$w.createElement(Emoji, {
290
- className: classes.bg,
291
- __self: this,
292
- __source: {
293
- fileName: _jsxFileName$t,
294
- lineNumber: 65
295
- }
296
- }))
297
- }
298
- }
299
- },
300
- round: {
301
- check: React$w.createElement(IconRoot, {
302
- size: size,
303
- __self: this,
304
- __source: {
305
- fileName: _jsxFileName$t,
306
- lineNumber: 73
307
- }
308
- }, React$w.createElement(Circle$1, {
309
- className: classes.bg,
310
- __self: this,
311
- __source: {
312
- fileName: _jsxFileName$t,
313
- lineNumber: 74
314
- }
315
- }), React$w.createElement(Action, {
316
- className: classes.fg,
317
- __self: this,
318
- __source: {
319
- fileName: _jsxFileName$t,
320
- lineNumber: 75
321
- }
322
- })),
323
- emoji: React$w.createElement(IconRoot, {
324
- size: size,
325
- __self: this,
326
- __source: {
327
- fileName: _jsxFileName$t,
328
- lineNumber: 79
329
- }
330
- }, React$w.createElement(Circle$1, {
331
- className: classes.bg,
332
- __self: this,
333
- __source: {
334
- fileName: _jsxFileName$t,
335
- lineNumber: 80
336
- }
337
- }), React$w.createElement(Emoji, {
338
- className: classes.fg,
339
- __self: this,
340
- __source: {
341
- fileName: _jsxFileName$t,
342
- lineNumber: 81
343
- }
344
- })),
345
- open: {
346
- check: React$w.createElement(IconRoot, {
347
- size: size,
348
- __self: this,
349
- __source: {
350
- fileName: _jsxFileName$t,
351
- lineNumber: 86
352
- }
353
- }, React$w.createElement(Action, {
354
- className: classes.bg,
355
- __self: this,
356
- __source: {
357
- fileName: _jsxFileName$t,
358
- lineNumber: 87
359
- }
360
- })),
361
- emoji: React$w.createElement(IconRoot, {
362
- size: size,
363
- __self: this,
364
- __source: {
365
- fileName: _jsxFileName$t,
366
- lineNumber: 91
367
- }
368
- }, React$w.createElement(Emoji, {
369
- className: classes.bg,
370
- __self: this,
371
- __source: {
372
- fileName: _jsxFileName$t,
373
- lineNumber: 92
374
- }
375
- }))
376
- }
377
- },
378
- square: {
379
- check: React$w.createElement(IconRoot, {
380
- size: size,
381
- __self: this,
382
- __source: {
383
- fileName: _jsxFileName$t,
384
- lineNumber: 99
385
- }
386
- }, React$w.createElement(Square, {
387
- className: classes.bg,
388
- __self: this,
389
- __source: {
390
- fileName: _jsxFileName$t,
391
- lineNumber: 100
392
- }
393
- }), React$w.createElement(Action, {
394
- className: classes.fg,
395
- __self: this,
396
- __source: {
397
- fileName: _jsxFileName$t,
398
- lineNumber: 101
399
- }
400
- })),
401
- emoji: React$w.createElement(IconRoot, {
402
- size: size,
403
- __self: this,
404
- __source: {
405
- fileName: _jsxFileName$t,
406
- lineNumber: 105
407
- }
408
- }, React$w.createElement(Square, {
409
- className: classes.bg,
410
- __self: this,
411
- __source: {
412
- fileName: _jsxFileName$t,
413
- lineNumber: 106
414
- }
415
- }), React$w.createElement(Emoji, {
416
- className: classes.fg,
417
- __self: this,
418
- __source: {
419
- fileName: _jsxFileName$t,
420
- lineNumber: 107
421
- }
422
- })),
423
- open: {
424
- check: React$w.createElement(IconRoot, {
425
- size: size,
426
- __self: this,
427
- __source: {
428
- fileName: _jsxFileName$t,
429
- lineNumber: 112
430
- }
431
- }, React$w.createElement(Action, {
432
- className: classes.bg,
433
- __self: this,
434
- __source: {
435
- fileName: _jsxFileName$t,
436
- lineNumber: 113
437
- }
438
- })),
439
- emoji: React$w.createElement(IconRoot, {
440
- size: size,
441
- __self: this,
442
- __source: {
443
- fileName: _jsxFileName$t,
444
- lineNumber: 117
445
- }
446
- }, React$w.createElement(Emoji, {
447
- className: classes.bg,
448
- __self: this,
449
- __source: {
450
- fileName: _jsxFileName$t,
451
- lineNumber: 118
452
- }
453
- }))
454
- }
455
- }
456
- };
457
- }
458
- render() {
459
- if (this.props.category === undefined) {
460
- if (this.props.open === true) {
461
- return this.icons[this.props.shape].open[this.props.iconSet];
462
- } else {
463
- return this.icons[this.props.shape][this.props.iconSet];
464
- }
465
- } else {
466
- if (this.props.open === true) {
467
- return this.icons.feedback[this.props.shape].open[this.props.iconSet];
468
- } else {
469
- return this.icons.feedback[this.props.shape][this.props.iconSet];
470
- }
471
- }
472
- }
473
- }
474
- IconBase.__initStatic();
475
- IconBase.propTypes = {
476
- iconSet: PropTypes$u.oneOf(['emoji', 'check']),
477
- shape: PropTypes$u.oneOf(['round', 'square']),
478
- category: PropTypes$u.oneOf(['feedback', undefined]),
479
- open: PropTypes$u.bool
480
- };
481
- IconBase.defaultProps = {
482
- iconSet: 'check',
483
- shape: 'round',
484
- category: undefined,
485
- open: false
486
- };
487
- return IconBase;
488
- };
489
- const PropTypes$t = _dll_prop_types;
490
- const React$v = _dll_react;
491
- const {withStyles: withStyles$k} = _dll_material_ui__core_styles;
492
- const _jsxFileName$s = "/home/circleci/repo/node_modules/@pie-lib/icons/src/correct-icon.jsx";
493
- const styles$c = getStyles('correct', '#f8ffe2', '#4aaf46');
494
- const Emoji$3 = ({className}) => React$v.createElement('g', {
495
- transform: 'translate(1, 0)',
496
- __self: undefined,
497
- __source: {
498
- fileName: _jsxFileName$s,
499
- lineNumber: 10
500
- }
501
- }, React$v.createElement('path', {
502
- className: className,
503
- d: "M24.7,22.1c-1.5,1.7-3.6,2.7-5.8,2.7s-4.5-1.1-5.8-2.7l-2.8,1.6c2,2.7,5.2,4.2,8.7,4.2 c3.4,0,6.6-1.6,8.7-4.2L24.7,22.1z",
504
- __self: undefined,
505
- __source: {
506
- fileName: _jsxFileName$s,
507
- lineNumber: 11
508
- }
509
- }), React$v.createElement('rect', {
510
- x: "21.1",
511
- y: "13.1",
512
- className: className,
513
- width: "3.7",
514
- height: "4.7",
515
- __self: undefined,
516
- __source: {
517
- fileName: _jsxFileName$s,
518
- lineNumber: 16
519
- }
520
- }), React$v.createElement('rect', {
521
- x: "12.7",
522
- y: "13.1",
523
- className: className,
524
- width: "3.7",
525
- height: "4.7",
526
- __self: undefined,
527
- __source: {
528
- fileName: _jsxFileName$s,
529
- lineNumber: 17
530
- }
531
- }));
532
- Emoji$3.propTypes = {
533
- className: PropTypes$t.string
534
- };
535
- Emoji$3.defaultProps = {
536
- x: 0
537
- };
538
- const Check$1 = ({className, x, y}) => React$v.createElement('polygon', {
539
- transform: `translate(${x}, ${y})`,
540
- className: className,
541
- points: "19.1,28.6 11.8,22.3 14.4,19.2 17.9,22.1 23.9,11.4 27.5,13.4",
542
- __self: undefined,
543
- __source: {
544
- fileName: _jsxFileName$s,
545
- lineNumber: 30
546
- }
547
- });
548
- Check$1.propTypes = {
549
- x: PropTypes$t.number,
550
- y: PropTypes$t.number,
551
- className: PropTypes$t.string
552
- };
553
- Check$1.defaultProps = {
554
- x: 0,
555
- y: 0
556
- };
557
- const Correct = IconBase(Check$1, Emoji$3);
558
- Correct.propTypes = {
559
- iconSet: PropTypes$t.oneOf(['emoji', 'check']),
560
- shape: PropTypes$t.oneOf(['round', 'square']),
561
- category: PropTypes$t.oneOf(['feedback', undefined]),
562
- open: PropTypes$t.bool
563
- };
564
- Correct.defaultProps = {
565
- iconSet: 'check',
566
- shape: 'round',
567
- category: undefined,
568
- open: false
569
- };
570
- var correctIcon = withStyles$k(styles$c)(Correct);
571
- const PropTypes$s = _dll_prop_types;
572
- const React$u = _dll_react;
573
- const classNames$4 = _dll_classnames;
574
- const {withStyles: withStyles$j} = _dll_material_ui__core_styles;
575
- const _jsxFileName$r = "/home/circleci/repo/node_modules/@pie-lib/icons/src/correct-response-icon.jsx";
576
- const OpenIcon = ({bg, fg}) => React$u.createElement('svg', {
577
- preserveAspectRatio: "xMinYMin meet",
578
- version: "1.1",
579
- id: "Layer_1",
580
- x: "0px",
581
- y: "0px",
582
- viewBox: "-283 359 34 35",
583
- style: {
584
- enableBackground: 'new -283 359 34 35'
585
- },
586
- __self: undefined,
587
- __source: {
588
- fileName: _jsxFileName$r,
589
- lineNumber: 7
590
- }
591
- }, React$u.createElement('circle', {
592
- className: bg,
593
- cx: "-266",
594
- cy: "375.9",
595
- r: "14",
596
- __self: undefined,
597
- __source: {
598
- fileName: _jsxFileName$r,
599
- lineNumber: 16
600
- }
601
- }), React$u.createElement('path', {
602
- className: bg,
603
- d: "M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z",
604
- __self: undefined,
605
- __source: {
606
- fileName: _jsxFileName$r,
607
- lineNumber: 17
608
- }
609
- }), React$u.createElement('polygon', {
610
- className: fg,
611
- points: "-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6 ",
612
- __self: undefined,
613
- __source: {
614
- fileName: _jsxFileName$r,
615
- lineNumber: 22
616
- }
617
- }));
618
- OpenIcon.propTypes = {
619
- bg: PropTypes$s.string,
620
- fg: PropTypes$s.string
621
- };
622
- const CloseIcon = ({bg, fg, border}) => React$u.createElement('svg', {
623
- preserveAspectRatio: "xMinYMin meet",
624
- version: "1.1",
625
- x: "0px",
626
- y: "0px",
627
- viewBox: "-129.5 127 34 35",
628
- style: {
629
- enableBackground: 'new -129.5 127 34 35'
630
- },
631
- __self: undefined,
632
- __source: {
633
- fileName: _jsxFileName$r,
634
- lineNumber: 35
635
- }
636
- }, React$u.createElement('path', {
637
- style: {
638
- fill: '#D0CAC5',
639
- stroke: '#E6E3E0',
640
- strokeWidth: 0.75,
641
- strokeMiterlimit: 10
642
- },
643
- d: "M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z",
644
- __self: undefined,
645
- __source: {
646
- fileName: _jsxFileName$r,
647
- lineNumber: 43
648
- }
649
- }), React$u.createElement('path', {
650
- style: {
651
- fill: '#B3ABA4',
652
- stroke: '#CDC7C2',
653
- strokeWidth: 0.5,
654
- strokeMiterlimit: 10
655
- },
656
- d: "M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z",
657
- __self: undefined,
658
- __source: {
659
- fileName: _jsxFileName$r,
660
- lineNumber: 53
661
- }
662
- }), React$u.createElement('circle', {
663
- className: bg,
664
- cx: "-114.2",
665
- cy: "143.5",
666
- r: "14",
667
- __self: undefined,
668
- __source: {
669
- fileName: _jsxFileName$r,
670
- lineNumber: 62
671
- }
672
- }), React$u.createElement('path', {
673
- className: border,
674
- d: "M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z",
675
- __self: undefined,
676
- __source: {
677
- fileName: _jsxFileName$r,
678
- lineNumber: 63
679
- }
680
- }), React$u.createElement('polygon', {
681
- className: fg,
682
- points: "-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2",
683
- __self: undefined,
684
- __source: {
685
- fileName: _jsxFileName$r,
686
- lineNumber: 68
687
- }
688
- }));
689
- CloseIcon.propTypes = {
690
- bg: PropTypes$s.string,
691
- fg: PropTypes$s.string,
692
- border: PropTypes$s.string
693
- };
694
- const styles$b = {
695
- root: {
696
- width: props => props.size || '25px',
697
- height: props => props.size || '25px'
698
- },
699
- hideIconBg: {
700
- fill: '#bce2ff'
701
- },
702
- hideIconFg: {
703
- fill: '#1a9cff'
704
- },
705
- showIconBg: {
706
- fill: 'white'
707
- },
708
- showIconFg: {
709
- fill: '#1a9cff'
710
- },
711
- showIconBorder: {
712
- fill: '#bce2ff'
713
- }
714
- };
715
- const CorrectResponse = ({open, classes, className}) => React$u.createElement('div', {
716
- className: classNames$4(className, classes.root),
717
- __self: undefined,
718
- __source: {
719
- fileName: _jsxFileName$r,
720
- lineNumber: 104
721
- }
722
- }, open ? React$u.createElement(OpenIcon, {
723
- bg: classes.hideIconBg,
724
- fg: classes.hideIconFg,
725
- __self: undefined,
726
- __source: {
727
- fileName: _jsxFileName$r,
728
- lineNumber: 106
729
- }
730
- }) : React$u.createElement(CloseIcon, {
731
- bg: classes.showIconBg,
732
- border: classes.showIconBorder,
733
- fg: classes.showIconFg,
734
- __self: undefined,
735
- __source: {
736
- fileName: _jsxFileName$r,
737
- lineNumber: 108
738
- }
739
- }));
740
- CorrectResponse.propTypes = {
741
- classes: PropTypes$s.object.isRequired,
742
- open: PropTypes$s.bool,
743
- size: PropTypes$s.string,
744
- className: PropTypes$s.string
745
- };
746
- CorrectResponse.defaultProps = {
747
- open: false
748
- };
749
- var CorrectResponse$1 = withStyles$j(styles$b)(CorrectResponse);
750
- const PropTypes$r = _dll_prop_types;
751
- const React$t = _dll_react;
752
- const {withStyles: withStyles$i} = _dll_material_ui__core_styles;
753
- const _jsxFileName$q = "/home/circleci/repo/node_modules/@pie-lib/icons/src/incorrect-icon.jsx";
754
- const Ex = ({className}) => React$t.createElement('g', {
755
- transform: 'translate(0.5, 0.5)',
756
- __self: undefined,
757
- __source: {
758
- fileName: _jsxFileName$q,
759
- lineNumber: 8
760
- }
761
- }, React$t.createElement('rect', {
762
- x: "11",
763
- y: "17.3",
764
- transform: "matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)",
765
- className: className,
766
- width: "16.6",
767
- height: "3.7",
768
- __self: undefined,
769
- __source: {
770
- fileName: _jsxFileName$q,
771
- lineNumber: 9
772
- }
773
- }), React$t.createElement('rect', {
774
- x: "17.4",
775
- y: "10.7",
776
- transform: "matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)",
777
- className: className,
778
- width: "3.7",
779
- height: "16.6",
780
- __self: undefined,
781
- __source: {
782
- fileName: _jsxFileName$q,
783
- lineNumber: 17
784
- }
785
- }));
786
- Ex.propTypes = {
787
- className: PropTypes$r.string
788
- };
789
- const Emoji$2 = ({className}) => React$t.createElement('g', {
790
- transform: 'translate(1,0)',
791
- __self: undefined,
792
- __source: {
793
- fileName: _jsxFileName$q,
794
- lineNumber: 32
795
- }
796
- }, React$t.createElement('rect', {
797
- x: "21",
798
- y: "12.9",
799
- className: className,
800
- width: "3.7",
801
- height: "4.7",
802
- __self: undefined,
803
- __source: {
804
- fileName: _jsxFileName$q,
805
- lineNumber: 33
806
- }
807
- }), React$t.createElement('rect', {
808
- x: "12.7",
809
- y: "12.9",
810
- className: className,
811
- width: "3.7",
812
- height: "4.7",
813
- __self: undefined,
814
- __source: {
815
- fileName: _jsxFileName$q,
816
- lineNumber: 34
817
- }
818
- }), React$t.createElement('rect', {
819
- x: "12.2",
820
- y: "22.5",
821
- className: className,
822
- width: "13",
823
- height: "3.3",
824
- __self: undefined,
825
- __source: {
826
- fileName: _jsxFileName$q,
827
- lineNumber: 35
828
- }
829
- }));
830
- Emoji$2.propTypes = {
831
- className: PropTypes$r.string
832
- };
833
- const styles$a = getStyles('incorrect', '#fbf2e3', '#fcb733');
834
- const Incorrect = IconBase(Ex, Emoji$2);
835
- var incorrectIcon = withStyles$i(styles$a)(Incorrect);
836
- Incorrect.propTypes = {
837
- iconSet: PropTypes$r.oneOf(['emoji', 'check']),
838
- shape: PropTypes$r.oneOf(['round', 'square']),
839
- category: PropTypes$r.oneOf(['feedback', undefined]),
840
- open: PropTypes$r.bool
841
- };
842
- Incorrect.defaultProps = {
843
- iconSet: 'check',
844
- shape: 'round',
845
- category: undefined,
846
- open: false
847
- };
848
- const PropTypes$q = _dll_prop_types;
849
- const React$s = _dll_react;
850
- const _jsxFileName$p = "/home/circleci/repo/node_modules/@pie-lib/icons/src/instructions-icon.jsx";
851
- const Lines = () => {
852
- const style = {
853
- fill: 'none',
854
- stroke: '#BCE2FF',
855
- strokeWidth: 2,
856
- strokeMiterlimit: 10
857
- };
858
- return React$s.createElement('g', {
859
- __self: undefined,
860
- __source: {
861
- fileName: _jsxFileName$p,
862
- lineNumber: 13
863
- }
864
- }, React$s.createElement('line', {
865
- style: style,
866
- x1: "-98",
867
- y1: "142",
868
- x2: "-114.6",
869
- y2: "142",
870
- __self: undefined,
871
- __source: {
872
- fileName: _jsxFileName$p,
873
- lineNumber: 14
874
- }
875
- }), React$s.createElement('line', {
876
- style: style,
877
- x1: "-98",
878
- y1: "146.3",
879
- x2: "-114.6",
880
- y2: "146.3",
881
- __self: undefined,
882
- __source: {
883
- fileName: _jsxFileName$p,
884
- lineNumber: 15
885
- }
886
- }), React$s.createElement('line', {
887
- style: style,
888
- x1: "-104",
889
- y1: "150.7",
890
- x2: "-114.6",
891
- y2: "150.7",
892
- __self: undefined,
893
- __source: {
894
- fileName: _jsxFileName$p,
895
- lineNumber: 16
896
- }
897
- }));
898
- };
899
- const Root$1 = ({children, size}) => React$s.createElement(Sized, {
900
- size: size,
901
- __self: undefined,
902
- __source: {
903
- fileName: _jsxFileName$p,
904
- lineNumber: 22
905
- }
906
- }, React$s.createElement('svg', {
907
- version: "1.1",
908
- viewBox: "-128 129 31 31",
909
- style: {
910
- enableBackground: 'new -128 129 31 31'
911
- },
912
- __self: undefined,
913
- __source: {
914
- fileName: _jsxFileName$p,
915
- lineNumber: 23
916
- }
917
- }, children));
918
- Root$1.propTypes = {
919
- children: PropTypes$q.oneOfType([PropTypes$q.arrayOf(PropTypes$q.node), PropTypes$q.node]).isRequired,
920
- size: PropTypes$q.number
921
- };
922
- const GreyInfo = () => {
923
- return React$s.createElement('g', {
924
- __self: undefined,
925
- __source: {
926
- fileName: _jsxFileName$p,
927
- lineNumber: 36
928
- }
929
- }, React$s.createElement('rect', {
930
- x: "-123.9",
931
- y: "135.3",
932
- style: {
933
- fill: '#D0CAC5',
934
- stroke: '#E6E3E0',
935
- strokeWidth: 0.75,
936
- strokeLinejoin: 'round',
937
- strokeMiterlimit: 10
938
- },
939
- width: "4.1",
940
- height: "4.1",
941
- __self: undefined,
942
- __source: {
943
- fileName: _jsxFileName$p,
944
- lineNumber: 37
945
- }
946
- }), React$s.createElement('polygon', {
947
- style: {
948
- fill: '#D0CAC5',
949
- stroke: '#E6E3E0',
950
- strokeWidth: 0.75,
951
- strokeLinejoin: 'round',
952
- strokeMiterlimit: 10
953
- },
954
- points: "-119.8,150.4 -119.8,142.2 -125,142.2 -125,144.9 -122.6,144.9 -122.6,150.4 -125.6,150.4 -125.6,153.2 -116.8,153.2 -116.8,150.4 ",
955
- __self: undefined,
956
- __source: {
957
- fileName: _jsxFileName$p,
958
- lineNumber: 50
959
- }
960
- }), React$s.createElement('rect', {
961
- x: "-124.7",
962
- y: "134.7",
963
- style: {
964
- fill: '#B3ABA4',
965
- stroke: '#CDC7C2',
966
- strokeWidth: 0.5,
967
- strokeLinecap: 'round',
968
- strokeLinejoin: 'round',
969
- strokeMiterlimit: 10
970
- },
971
- width: "4.1",
972
- height: "4.1",
973
- __self: undefined,
974
- __source: {
975
- fileName: _jsxFileName$p,
976
- lineNumber: 61
977
- }
978
- }), React$s.createElement('polygon', {
979
- style: {
980
- fill: '#B3ABA4',
981
- stroke: '#CDC7C2',
982
- strokeWidth: 0.5,
983
- strokeLinecap: 'round',
984
- strokeLinejoin: 'round',
985
- strokeMiterlimit: 10
986
- },
987
- points: "-120.6,149.8 -120.6,141.5 -125.8,141.5 -125.8,144.3 -123.3,144.3 -123.3,149.8 -126.4,149.8 -126.4,152.5 -117.6,152.5 -117.6,149.8 ",
988
- __self: undefined,
989
- __source: {
990
- fileName: _jsxFileName$p,
991
- lineNumber: 76
992
- }
993
- }), React$s.createElement('rect', {
994
- x: "-125.5",
995
- y: "134",
996
- style: {
997
- fill: '#7FABC6'
998
- },
999
- width: "4.1",
1000
- height: "4.1",
1001
- __self: undefined,
1002
- __source: {
1003
- fileName: _jsxFileName$p,
1004
- lineNumber: 88
1005
- }
1006
- }), React$s.createElement('polygon', {
1007
- style: {
1008
- fill: '#7FABC6'
1009
- },
1010
- points: "-121.4,149.1 -121.4,140.9 -126.5,140.9 -126.5,143.6 -124.1,143.6 -124.1,149.1 -127.1,149.1 -127.1,151.9 -118.4,151.9 -118.4,149.1 ",
1011
- __self: undefined,
1012
- __source: {
1013
- fileName: _jsxFileName$p,
1014
- lineNumber: 89
1015
- }
1016
- }));
1017
- };
1018
- const BlueInfo = () => React$s.createElement('g', {
1019
- __self: undefined,
1020
- __source: {
1021
- fileName: _jsxFileName$p,
1022
- lineNumber: 99
1023
- }
1024
- }, React$s.createElement('rect', {
1025
- x: "-123.9",
1026
- y: "135.3",
1027
- style: {
1028
- fill: '#D0CAC5',
1029
- stroke: '#E6E3E0',
1030
- strokeWidth: 0.75,
1031
- strokeLinejoin: 'round',
1032
- strokeMiterlimit: 10
1033
- },
1034
- width: "4.1",
1035
- height: "4.1",
1036
- __self: undefined,
1037
- __source: {
1038
- fileName: _jsxFileName$p,
1039
- lineNumber: 100
1040
- }
1041
- }), React$s.createElement('polygon', {
1042
- style: {
1043
- fill: '#D0CAC5',
1044
- stroke: '#E6E3E0',
1045
- strokeWidth: 0.75,
1046
- strokeLinejoin: 'round',
1047
- strokeMiterlimit: 10
1048
- },
1049
- points: "-119.8,150.4 -119.8,142.2 -125,142.2 -125,144.9 -122.6,144.9 -122.6,150.4 -125.6,150.4 -125.6,153.2 -116.8,153.2 -116.8,150.4 ",
1050
- __self: undefined,
1051
- __source: {
1052
- fileName: _jsxFileName$p,
1053
- lineNumber: 113
1054
- }
1055
- }), React$s.createElement('rect', {
1056
- x: "-124.7",
1057
- y: "134.7",
1058
- style: {
1059
- fill: '#B3ABA4',
1060
- stroke: '#CDC7C2',
1061
- strokeWidth: 0.5,
1062
- strokeLinecap: 'round',
1063
- strokeLinejoin: 'round',
1064
- strokeMiterlimit: 10
1065
- },
1066
- width: "4.1",
1067
- height: "4.1",
1068
- __self: undefined,
1069
- __source: {
1070
- fileName: _jsxFileName$p,
1071
- lineNumber: 124
1072
- }
1073
- }), React$s.createElement('polygon', {
1074
- style: {
1075
- fill: '#B3ABA4',
1076
- stroke: '#CDC7C2',
1077
- strokeWidth: 0.5,
1078
- strokeLinecap: 'round',
1079
- strokeLinejoin: 'round',
1080
- strokeMiterlimit: 10
1081
- },
1082
- points: "-120.6,149.8 -120.6,141.5 -125.8,141.5 -125.8,144.3 -123.3,144.3 -123.3,149.8 -126.4,149.8 -126.4,152.5 -117.6,152.5 -117.6,149.8 ",
1083
- __self: undefined,
1084
- __source: {
1085
- fileName: _jsxFileName$p,
1086
- lineNumber: 138
1087
- }
1088
- }), React$s.createElement('rect', {
1089
- x: "-125.5",
1090
- y: "134",
1091
- style: {
1092
- fill: '#1A9CFF'
1093
- },
1094
- width: "4.1",
1095
- height: "4.1",
1096
- __self: undefined,
1097
- __source: {
1098
- fileName: _jsxFileName$p,
1099
- lineNumber: 150
1100
- }
1101
- }), React$s.createElement('polygon', {
1102
- style: {
1103
- fill: '#1A9CFF'
1104
- },
1105
- points: "-121.4,149.1 -121.4,140.9 -126.5,140.9 -126.5,143.6 -124.1,143.6 -124.1,149.1 -127.1,149.1 -127.1,151.9 -118.4,151.9 -118.4,149.1 ",
1106
- __self: undefined,
1107
- __source: {
1108
- fileName: _jsxFileName$p,
1109
- lineNumber: 151
1110
- }
1111
- }));
1112
- class Instructions extends React$s.Component {
1113
- constructor(props) {
1114
- super(props);
1115
- }
1116
- render() {
1117
- if (this.props.open === true) {
1118
- return React$s.createElement(Root$1, {
1119
- __self: this,
1120
- __source: {
1121
- fileName: _jsxFileName$p,
1122
- lineNumber: 167
1123
- }
1124
- }, React$s.createElement(GreyInfo, {
1125
- __self: this,
1126
- __source: {
1127
- fileName: _jsxFileName$p,
1128
- lineNumber: 168
1129
- }
1130
- }), React$s.createElement(Lines, {
1131
- __self: this,
1132
- __source: {
1133
- fileName: _jsxFileName$p,
1134
- lineNumber: 169
1135
- }
1136
- }));
1137
- } else {
1138
- return React$s.createElement(Root$1, {
1139
- __self: this,
1140
- __source: {
1141
- fileName: _jsxFileName$p,
1142
- lineNumber: 174
1143
- }
1144
- }, React$s.createElement(BlueInfo, {
1145
- __self: this,
1146
- __source: {
1147
- fileName: _jsxFileName$p,
1148
- lineNumber: 175
1149
- }
1150
- }), React$s.createElement(Lines, {
1151
- __self: this,
1152
- __source: {
1153
- fileName: _jsxFileName$p,
1154
- lineNumber: 176
1155
- }
1156
- }));
1157
- }
1158
- }
1159
- }
1160
- Instructions.propTypes = {
1161
- open: PropTypes$q.bool
1162
- };
1163
- Instructions.defaultProps = {
1164
- open: false
1165
- };
1166
- const PropTypes$p = _dll_prop_types;
1167
- const React$r = _dll_react;
1168
- const {withStyles: withStyles$h} = _dll_material_ui__core_styles;
1169
- const _jsxFileName$o = "/home/circleci/repo/node_modules/@pie-lib/icons/src/learn-more-icon.jsx";
1170
- const Glint = ({fill}) => React$r.createElement('path', {
1171
- fill: fill,
1172
- d: "M-130.4,142.1c0-2.1,1.7-3.9,3.9-3.9c0.3,0,0.5,0,0.8,0.1c-0.6-0.8-1.5-1.3-2.6-1.3c-1.8,0-3.3,1.5-3.3,3.3c0,1.1,0.5,2,1.3,2.6C-130.4,142.6-130.4,142.4-130.4,142.1z",
1173
- __self: undefined,
1174
- __source: {
1175
- fileName: _jsxFileName$o,
1176
- lineNumber: 7
1177
- }
1178
- });
1179
- Glint.propTypes = {
1180
- fill: PropTypes$p.string
1181
- };
1182
- class LearnMore extends React$r.Component {
1183
- static __initStatic() {
1184
- this.propTypes = {
1185
- classes: PropTypes$p.object.isRequired,
1186
- size: PropTypes$p.number
1187
- };
1188
- }
1189
- render() {
1190
- const {classes, size} = this.props;
1191
- if (this.props.open === true) {
1192
- return React$r.createElement(Sized, {
1193
- size: size,
1194
- __self: this,
1195
- __source: {
1196
- fileName: _jsxFileName$o,
1197
- lineNumber: 28
1198
- }
1199
- }, React$r.createElement('svg', {
1200
- preserveAspectRatio: "xMinYMin meet",
1201
- viewBox: "-135 129 16 32",
1202
- __self: this,
1203
- __source: {
1204
- fileName: _jsxFileName$o,
1205
- lineNumber: 29
1206
- }
1207
- }, React$r.createElement('path', {
1208
- className: classes.hideBg,
1209
- d: "M-122,141.1c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.8,144.7-122,143-122,141.1z",
1210
- __self: this,
1211
- __source: {
1212
- fileName: _jsxFileName$o,
1213
- lineNumber: 30
1214
- }
1215
- }), React$r.createElement('path', {
1216
- className: classes.hideBg,
1217
- d: "M-125.7,153h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.9,152.7-125.2,153-125.7,153z",
1218
- __self: this,
1219
- __source: {
1220
- fileName: _jsxFileName$o,
1221
- lineNumber: 34
1222
- }
1223
- }), React$r.createElement(Glint, {
1224
- fill: classes.hideFg.fill,
1225
- __self: this,
1226
- __source: {
1227
- fileName: _jsxFileName$o,
1228
- lineNumber: 38
1229
- }
1230
- })));
1231
- } else {
1232
- return React$r.createElement(Sized, {
1233
- size: size,
1234
- __self: this,
1235
- __source: {
1236
- fileName: _jsxFileName$o,
1237
- lineNumber: 44
1238
- }
1239
- }, React$r.createElement('svg', {
1240
- preserveAspectRatio: "xMinYMin meet",
1241
- viewBox: "-135 129 16 31",
1242
- __self: this,
1243
- __source: {
1244
- fileName: _jsxFileName$o,
1245
- lineNumber: 45
1246
- }
1247
- }, React$r.createElement('path', {
1248
- fill: "#D0CAC5",
1249
- stroke: "#E6E3E0",
1250
- className: "st0",
1251
- d: "M-120.7,142.4c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-121.6,146-120.7,144.3-120.7,142.4z",
1252
- __self: this,
1253
- __source: {
1254
- fileName: _jsxFileName$o,
1255
- lineNumber: 46
1256
- }
1257
- }), React$r.createElement('path', {
1258
- fill: "#D0CAC5",
1259
- stroke: "#E6E3E0",
1260
- className: "st0",
1261
- d: "M-124.4,154.3h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-123.6,153.9-123.9,154.3-124.4,154.3z",
1262
- __self: this,
1263
- __source: {
1264
- fileName: _jsxFileName$o,
1265
- lineNumber: 52
1266
- }
1267
- }), React$r.createElement('path', {
1268
- fill: "#B3ABA4",
1269
- stroke: "#CDC7C2",
1270
- className: "st1",
1271
- d: "M-121.3,141.8c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.2,145.3-121.3,143.7-121.3,141.8z",
1272
- __self: this,
1273
- __source: {
1274
- fileName: _jsxFileName$o,
1275
- lineNumber: 58
1276
- }
1277
- }), ",", React$r.createElement('path', {
1278
- fill: "#B3ABA4",
1279
- stroke: "#CDC7C2",
1280
- className: "st1",
1281
- d: "M-125,153.7h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.2,153.3-124.6,153.7-125,153.7z",
1282
- __self: this,
1283
- __source: {
1284
- fileName: _jsxFileName$o,
1285
- lineNumber: 65
1286
- }
1287
- }), React$r.createElement('path', {
1288
- className: classes.showBg,
1289
- d: "M-122,141.1c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.8,144.7-122,143-122,141.1z",
1290
- __self: this,
1291
- __source: {
1292
- fileName: _jsxFileName$o,
1293
- lineNumber: 71
1294
- }
1295
- }), React$r.createElement('path', {
1296
- className: classes.showBg,
1297
- d: "M-125.7,153h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.9,152.7-125.2,153-125.7,153z",
1298
- __self: this,
1299
- __source: {
1300
- fileName: _jsxFileName$o,
1301
- lineNumber: 75
1302
- }
1303
- }), React$r.createElement(Glint, {
1304
- fill: classes.hideFg.fill,
1305
- __self: this,
1306
- __source: {
1307
- fileName: _jsxFileName$o,
1308
- lineNumber: 79
1309
- }
1310
- })));
1311
- }
1312
- }
1313
- }
1314
- LearnMore.__initStatic();
1315
- const styles$9 = {
1316
- showBg: {
1317
- fill: '#1a9cff'
1318
- },
1319
- hideFg: {
1320
- fill: '#1a9cff'
1321
- },
1322
- hideBg: {
1323
- fill: '#bce2ff'
1324
- }
1325
- };
1326
- LearnMore.propTypes = {
1327
- open: PropTypes$p.bool
1328
- };
1329
- LearnMore.defaultProps = {
1330
- open: false
1331
- };
1332
- withStyles$h(styles$9)(LearnMore);
1333
- const PropTypes$o = _dll_prop_types;
1334
- const React$q = _dll_react;
1335
- const {withStyles: withStyles$g} = _dll_material_ui__core_styles;
1336
- const _jsxFileName$n = "/home/circleci/repo/node_modules/@pie-lib/icons/src/nothing-submitted-icon.jsx";
1337
- const Exclamation = ({className}) => React$q.createElement('g', {
1338
- __self: undefined,
1339
- __source: {
1340
- fileName: _jsxFileName$n,
1341
- lineNumber: 8
1342
- }
1343
- }, React$q.createElement('rect', {
1344
- x: "19.3",
1345
- y: "10.3",
1346
- className: className,
1347
- width: "4.5",
1348
- height: "12.7",
1349
- __self: undefined,
1350
- __source: {
1351
- fileName: _jsxFileName$n,
1352
- lineNumber: 9
1353
- }
1354
- }), React$q.createElement('rect', {
1355
- x: "19.3",
1356
- y: "26.2",
1357
- className: className,
1358
- width: "4.5",
1359
- height: "4.5",
1360
- __self: undefined,
1361
- __source: {
1362
- fileName: _jsxFileName$n,
1363
- lineNumber: 10
1364
- }
1365
- }));
1366
- const Octagon = ({className}) => React$q.createElement('polygon', {
1367
- className: className,
1368
- points: "14.8,4.5 5.6,13.8 5.6,27 14.8,36.5 28.1,36.5 37.6,27 37.6,13.8 28.1,4.5",
1369
- __self: undefined,
1370
- __source: {
1371
- fileName: _jsxFileName$n,
1372
- lineNumber: 15
1373
- }
1374
- });
1375
- const Emoji$1 = ({className}) => React$q.createElement('g', {
1376
- __self: undefined,
1377
- __source: {
1378
- fileName: _jsxFileName$n,
1379
- lineNumber: 22
1380
- }
1381
- }, React$q.createElement('rect', {
1382
- x: "23.8",
1383
- y: "15",
1384
- className: className,
1385
- width: "3.5",
1386
- height: "4.4",
1387
- __self: undefined,
1388
- __source: {
1389
- fileName: _jsxFileName$n,
1390
- lineNumber: 23
1391
- }
1392
- }), React$q.createElement('rect', {
1393
- x: "16",
1394
- y: "15",
1395
- className: className,
1396
- width: "3.5",
1397
- height: "4.4",
1398
- __self: undefined,
1399
- __source: {
1400
- fileName: _jsxFileName$n,
1401
- lineNumber: 24
1402
- }
1403
- }), React$q.createElement('path', {
1404
- className: className,
1405
- d: "M24.2,27.1h-5.1c-0.8,0-1.5-0.7-1.5-1.5v0c0-0.8,0.7-1.5,1.5-1.5h5.1c0.8,0,1.5,0.7,1.5,1.5v0 C25.7,26.4,25,27.1,24.2,27.1z",
1406
- __self: undefined,
1407
- __source: {
1408
- fileName: _jsxFileName$n,
1409
- lineNumber: 25
1410
- }
1411
- }));
1412
- Emoji$1.propTypes = Octagon.propTypes = Exclamation.propTypes = {
1413
- className: PropTypes$o.string
1414
- };
1415
- const styles$8 = getStyles('nothing-submitted', 'white', '#464146');
1416
- class NothingSubmitted extends React$q.Component {
1417
- static __initStatic() {
1418
- this.propTypes = {
1419
- classes: PropTypes$o.object.isRequired
1420
- };
1421
- }
1422
- constructor(props) {
1423
- super(props);
1424
- const {classes} = this.props;
1425
- this.icons = {
1426
- check: React$q.createElement(IconRoot, {
1427
- __self: this,
1428
- __source: {
1429
- fileName: _jsxFileName$n,
1430
- lineNumber: 48
1431
- }
1432
- }, React$q.createElement(Octagon, {
1433
- className: classes.bg,
1434
- __self: this,
1435
- __source: {
1436
- fileName: _jsxFileName$n,
1437
- lineNumber: 49
1438
- }
1439
- }), React$q.createElement(Exclamation, {
1440
- className: classes.fg,
1441
- __self: this,
1442
- __source: {
1443
- fileName: _jsxFileName$n,
1444
- lineNumber: 50
1445
- }
1446
- })),
1447
- emoji: React$q.createElement(IconRoot, {
1448
- __self: this,
1449
- __source: {
1450
- fileName: _jsxFileName$n,
1451
- lineNumber: 54
1452
- }
1453
- }, React$q.createElement(Octagon, {
1454
- className: classes.bg,
1455
- __self: this,
1456
- __source: {
1457
- fileName: _jsxFileName$n,
1458
- lineNumber: 55
1459
- }
1460
- }), React$q.createElement(Emoji$1, {
1461
- className: classes.fg,
1462
- __self: this,
1463
- __source: {
1464
- fileName: _jsxFileName$n,
1465
- lineNumber: 56
1466
- }
1467
- })),
1468
- feedback: {
1469
- check: React$q.createElement(IconRoot, {
1470
- __self: this,
1471
- __source: {
1472
- fileName: _jsxFileName$n,
1473
- lineNumber: 61
1474
- }
1475
- }, React$q.createElement(Octagon, {
1476
- className: classes.bg,
1477
- __self: this,
1478
- __source: {
1479
- fileName: _jsxFileName$n,
1480
- lineNumber: 62
1481
- }
1482
- }), React$q.createElement(Emoji$1, {
1483
- className: classes.fg,
1484
- __self: this,
1485
- __source: {
1486
- fileName: _jsxFileName$n,
1487
- lineNumber: 63
1488
- }
1489
- })),
1490
- emoji: React$q.createElement(IconRoot, {
1491
- __self: this,
1492
- __source: {
1493
- fileName: _jsxFileName$n,
1494
- lineNumber: 67
1495
- }
1496
- }, React$q.createElement(Octagon, {
1497
- className: classes.bg,
1498
- __self: this,
1499
- __source: {
1500
- fileName: _jsxFileName$n,
1501
- lineNumber: 68
1502
- }
1503
- }), React$q.createElement(Emoji$1, {
1504
- className: classes.fg,
1505
- __self: this,
1506
- __source: {
1507
- fileName: _jsxFileName$n,
1508
- lineNumber: 69
1509
- }
1510
- })),
1511
- square: {
1512
- check: React$q.createElement(IconRoot, {
1513
- __self: this,
1514
- __source: {
1515
- fileName: _jsxFileName$n,
1516
- lineNumber: 74
1517
- }
1518
- }, React$q.createElement(Octagon, {
1519
- className: classes.bg,
1520
- __self: this,
1521
- __source: {
1522
- fileName: _jsxFileName$n,
1523
- lineNumber: 75
1524
- }
1525
- }), React$q.createElement(Exclamation, {
1526
- className: classes.fg,
1527
- __self: this,
1528
- __source: {
1529
- fileName: _jsxFileName$n,
1530
- lineNumber: 76
1531
- }
1532
- })),
1533
- emoji: React$q.createElement(IconRoot, {
1534
- __self: this,
1535
- __source: {
1536
- fileName: _jsxFileName$n,
1537
- lineNumber: 80
1538
- }
1539
- }, React$q.createElement(Octagon, {
1540
- className: classes.bg,
1541
- __self: this,
1542
- __source: {
1543
- fileName: _jsxFileName$n,
1544
- lineNumber: 81
1545
- }
1546
- }), React$q.createElement(Emoji$1, {
1547
- className: classes.fg,
1548
- __self: this,
1549
- __source: {
1550
- fileName: _jsxFileName$n,
1551
- lineNumber: 82
1552
- }
1553
- })),
1554
- open: {
1555
- check: React$q.createElement(IconRoot, {
1556
- __self: this,
1557
- __source: {
1558
- fileName: _jsxFileName$n,
1559
- lineNumber: 87
1560
- }
1561
- }, React$q.createElement(Exclamation, {
1562
- className: classes.bg,
1563
- __self: this,
1564
- __source: {
1565
- fileName: _jsxFileName$n,
1566
- lineNumber: 88
1567
- }
1568
- })),
1569
- emoji: React$q.createElement(IconRoot, {
1570
- __self: this,
1571
- __source: {
1572
- fileName: _jsxFileName$n,
1573
- lineNumber: 92
1574
- }
1575
- }, React$q.createElement(Emoji$1, {
1576
- className: classes.bg,
1577
- __self: this,
1578
- __source: {
1579
- fileName: _jsxFileName$n,
1580
- lineNumber: 93
1581
- }
1582
- }))
1583
- }
1584
- }
1585
- }
1586
- };
1587
- }
1588
- render() {
1589
- if (this.props.category === undefined) {
1590
- return this.icons[this.props.iconSet];
1591
- } else {
1592
- if (this.props.shape === undefined) {
1593
- return this.icons.feedback[this.props.iconSet];
1594
- } else {
1595
- if (this.props.open === true) {
1596
- return this.icons.feedback.square.open[this.props.iconSet];
1597
- } else {
1598
- return this.icons.feedback.square[this.props.iconSet];
1599
- }
1600
- }
1601
- }
1602
- }
1603
- }
1604
- NothingSubmitted.__initStatic();
1605
- NothingSubmitted.propTypes = {
1606
- iconSet: PropTypes$o.oneOf(['emoji', 'check', undefined]),
1607
- shape: PropTypes$o.oneOf(['square', undefined]),
1608
- category: PropTypes$o.oneOf(['feedback', undefined]),
1609
- open: PropTypes$o.bool
1610
- };
1611
- NothingSubmitted.defaultProps = {
1612
- iconSet: 'check',
1613
- shape: undefined,
1614
- category: undefined,
1615
- open: false
1616
- };
1617
- var nothingSubmittedIcon = withStyles$g(styles$8)(NothingSubmitted);
1618
- const PropTypes$n = _dll_prop_types;
1619
- const React$p = _dll_react;
1620
- const {withStyles: withStyles$f} = _dll_material_ui__core_styles;
1621
- const _jsxFileName$m = "/home/circleci/repo/node_modules/@pie-lib/icons/src/partially-correct-icon.jsx";
1622
- const styles$7 = getStyles('partially-correct', '#4aaf46', '#c1e1ac');
1623
- const Check = ({className}) => React$p.createElement('g', {
1624
- transform: 'translate(0, 0)',
1625
- __self: undefined,
1626
- __source: {
1627
- fileName: _jsxFileName$m,
1628
- lineNumber: 10
1629
- }
1630
- }, React$p.createElement('polygon', {
1631
- className: className,
1632
- points: "27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6",
1633
- __self: undefined,
1634
- __source: {
1635
- fileName: _jsxFileName$m,
1636
- lineNumber: 11
1637
- }
1638
- }), React$p.createElement('polygon', {
1639
- className: className,
1640
- points: "16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3",
1641
- __self: undefined,
1642
- __source: {
1643
- fileName: _jsxFileName$m,
1644
- lineNumber: 12
1645
- }
1646
- }));
1647
- const Emoji = ({className}) => React$p.createElement('g', {
1648
- transform: 'translate(2, 0)',
1649
- __self: undefined,
1650
- __source: {
1651
- fileName: _jsxFileName$m,
1652
- lineNumber: 17
1653
- }
1654
- }, React$p.createElement('rect', {
1655
- x: "20.6",
1656
- y: "11.8",
1657
- className: className,
1658
- width: "4",
1659
- height: "5",
1660
- __self: undefined,
1661
- __source: {
1662
- fileName: _jsxFileName$m,
1663
- lineNumber: 18
1664
- }
1665
- }), React$p.createElement('rect', {
1666
- x: "11.5",
1667
- y: "11.8",
1668
- className: className,
1669
- width: "4",
1670
- height: "5",
1671
- __self: undefined,
1672
- __source: {
1673
- fileName: _jsxFileName$m,
1674
- lineNumber: 19
1675
- }
1676
- }), React$p.createElement('rect', {
1677
- x: "10.9",
1678
- y: "22.9",
1679
- transform: "matrix(0.9794 -0.2019 0.2019 0.9794 -4.6237 4.1559)",
1680
- className: className,
1681
- width: "14.3",
1682
- height: "3.7",
1683
- __self: undefined,
1684
- __source: {
1685
- fileName: _jsxFileName$m,
1686
- lineNumber: 20
1687
- }
1688
- }));
1689
- Emoji.propTypes = Check.propTypes = {
1690
- className: PropTypes$n.string
1691
- };
1692
- const PartiallyCorrect = IconBase(Check, Emoji);
1693
- PartiallyCorrect.propTypes = {
1694
- iconSet: PropTypes$n.oneOf(['emoji', 'check']),
1695
- shape: PropTypes$n.oneOf(['round', 'square']),
1696
- category: PropTypes$n.oneOf(['feedback', undefined]),
1697
- open: PropTypes$n.bool
1698
- };
1699
- PartiallyCorrect.defaultProps = {
1700
- iconSet: 'check',
1701
- shape: 'round',
1702
- category: undefined,
1703
- open: false
1704
- };
1705
- var partiallyCorrectIcon = withStyles$f(styles$7)(PartiallyCorrect);
1706
- const PropTypes$m = _dll_prop_types;
1707
- const React$o = _dll_react;
1708
- const {withStyles: withStyles$e} = _dll_material_ui__core_styles;
1709
- const _jsxFileName$l = "/home/circleci/repo/node_modules/@pie-lib/icons/src/show-rationale-icon.jsx";
1710
- const Info = ({fg}) => React$o.createElement('g', {
1711
- __self: undefined,
1712
- __source: {
1713
- fileName: _jsxFileName$l,
1714
- lineNumber: 7
1715
- }
1716
- }, React$o.createElement('rect', {
1717
- x: "-115",
1718
- y: "136.7",
1719
- className: fg,
1720
- width: "3",
1721
- height: "3",
1722
- __self: undefined,
1723
- __source: {
1724
- fileName: _jsxFileName$l,
1725
- lineNumber: 8
1726
- }
1727
- }), React$o.createElement('polygon', {
1728
- className: fg,
1729
- points: "-112,147.7 -112,141.7 -115.8,141.7 -115.8,143.7 -114,143.7 -114,147.7 -116.2,147.7 -116.2,149.7 -109.8,149.7 -109.8,147.7",
1730
- __self: undefined,
1731
- __source: {
1732
- fileName: _jsxFileName$l,
1733
- lineNumber: 9
1734
- }
1735
- }));
1736
- Info.propTypes = {
1737
- fg: PropTypes$m.string
1738
- };
1739
- const Border = ({className}) => React$o.createElement('path', {
1740
- className: className,
1741
- d: "M-113,158.5c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105,158.5-113,158.5zM-113,130.5c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-105.6,130.5-113,130.5z",
1742
- __self: undefined,
1743
- __source: {
1744
- fileName: _jsxFileName$l,
1745
- lineNumber: 21
1746
- }
1747
- });
1748
- Border.propTypes = {
1749
- className: PropTypes$m.string
1750
- };
1751
- const Circle = () => React$o.createElement('g', {
1752
- __self: undefined,
1753
- __source: {
1754
- fileName: _jsxFileName$l,
1755
- lineNumber: 30
1756
- }
1757
- }, React$o.createElement('path', {
1758
- style: {
1759
- fill: '#D0CAC5',
1760
- stroke: '#E6E3E0',
1761
- strokeWidth: 0.75,
1762
- strokeMiterlimit: 10
1763
- },
1764
- d: "M-111.7,160.9c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5C-96.2,154-103.1,160.9-111.7,160.9z",
1765
- __self: undefined,
1766
- __source: {
1767
- fileName: _jsxFileName$l,
1768
- lineNumber: 31
1769
- }
1770
- }), React$o.createElement('path', {
1771
- style: {
1772
- fill: '#B3ABA4',
1773
- stroke: '#CDC7C2',
1774
- strokeWidth: 0.5,
1775
- strokeMiterlimit: 10
1776
- },
1777
- d: "M-112,159.5c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-104,159.5-112,159.5z",
1778
- __self: undefined,
1779
- __source: {
1780
- fileName: _jsxFileName$l,
1781
- lineNumber: 40
1782
- }
1783
- }), React$o.createElement('circle', {
1784
- style: {
1785
- fill: '#FFFFFF'
1786
- },
1787
- cx: "-113",
1788
- cy: "144",
1789
- r: "14",
1790
- __self: undefined,
1791
- __source: {
1792
- fileName: _jsxFileName$l,
1793
- lineNumber: 49
1794
- }
1795
- }));
1796
- const Root = ({children, size}) => {
1797
- size = normalizeSize(size);
1798
- const style = {
1799
- height: size,
1800
- width: size,
1801
- display: 'inline-block',
1802
- position: 'relative'
1803
- };
1804
- return React$o.createElement('div', {
1805
- style: style,
1806
- __self: undefined,
1807
- __source: {
1808
- fileName: _jsxFileName$l,
1809
- lineNumber: 63
1810
- }
1811
- }, React$o.createElement('svg', {
1812
- preserveAspectRatio: "xMinYMin meet",
1813
- viewBox: "-129 128 34 34",
1814
- __self: undefined,
1815
- __source: {
1816
- fileName: _jsxFileName$l,
1817
- lineNumber: 64
1818
- }
1819
- }, children));
1820
- };
1821
- Root.propTypes = {
1822
- children: PropTypes$m.oneOfType([PropTypes$m.arrayOf(PropTypes$m.node), PropTypes$m.node]).isRequired,
1823
- size: PropTypes$m.number
1824
- };
1825
- const styles$6 = {
1826
- fg: {
1827
- fill: '#1a9cff'
1828
- },
1829
- bg: {
1830
- fill: '#bce2ff'
1831
- },
1832
- border: {
1833
- fill: '#bbe3fd'
1834
- },
1835
- whiteBorder: {
1836
- fill: 'white'
1837
- }
1838
- };
1839
- class ShowRationale extends React$o.Component {
1840
- static __initStatic() {
1841
- this.propTypes = {
1842
- classes: PropTypes$m.object.isRequired
1843
- };
1844
- }
1845
- constructor(props) {
1846
- super(props);
1847
- }
1848
- render() {
1849
- const {classes} = this.props;
1850
- const info = React$o.createElement(Info, {
1851
- fg: classes.fg,
1852
- __self: this,
1853
- __source: {
1854
- fileName: _jsxFileName$l,
1855
- lineNumber: 102
1856
- }
1857
- });
1858
- const icons = {
1859
- check: React$o.createElement(Root, {
1860
- __self: this,
1861
- __source: {
1862
- fileName: _jsxFileName$l,
1863
- lineNumber: 105
1864
- }
1865
- }, React$o.createElement(Circle, {
1866
- __self: this,
1867
- __source: {
1868
- fileName: _jsxFileName$l,
1869
- lineNumber: 106
1870
- }
1871
- }), info, React$o.createElement(Border, {
1872
- className: classes.border,
1873
- __self: this,
1874
- __source: {
1875
- fileName: _jsxFileName$l,
1876
- lineNumber: 108
1877
- }
1878
- })),
1879
- emoji: React$o.createElement(Root, {
1880
- __self: this,
1881
- __source: {
1882
- fileName: _jsxFileName$l,
1883
- lineNumber: 112
1884
- }
1885
- }, React$o.createElement(Circle, {
1886
- __self: this,
1887
- __source: {
1888
- fileName: _jsxFileName$l,
1889
- lineNumber: 113
1890
- }
1891
- }), info, React$o.createElement(Border, {
1892
- className: classes.border,
1893
- __self: this,
1894
- __source: {
1895
- fileName: _jsxFileName$l,
1896
- lineNumber: 115
1897
- }
1898
- })),
1899
- open: {
1900
- check: React$o.createElement(Root, {
1901
- __self: this,
1902
- __source: {
1903
- fileName: _jsxFileName$l,
1904
- lineNumber: 120
1905
- }
1906
- }, React$o.createElement('circle', {
1907
- style: {
1908
- fill: '#FFFFFF'
1909
- },
1910
- cx: "-113",
1911
- cy: "144",
1912
- r: "14",
1913
- __self: this,
1914
- __source: {
1915
- fileName: _jsxFileName$l,
1916
- lineNumber: 121
1917
- }
1918
- }), React$o.createElement(Info, {
1919
- fg: classes.bg,
1920
- border: classes.whiteBorder,
1921
- __self: this,
1922
- __source: {
1923
- fileName: _jsxFileName$l,
1924
- lineNumber: 122
1925
- }
1926
- })),
1927
- emoji: React$o.createElement(Root, {
1928
- __self: this,
1929
- __source: {
1930
- fileName: _jsxFileName$l,
1931
- lineNumber: 126
1932
- }
1933
- }, React$o.createElement('circle', {
1934
- style: {
1935
- fill: '#FFFFFF'
1936
- },
1937
- cx: "-113",
1938
- cy: "144",
1939
- r: "14",
1940
- __self: this,
1941
- __source: {
1942
- fileName: _jsxFileName$l,
1943
- lineNumber: 127
1944
- }
1945
- }), React$o.createElement(Info, {
1946
- fg: classes.bg,
1947
- border: classes.border,
1948
- __self: this,
1949
- __source: {
1950
- fileName: _jsxFileName$l,
1951
- lineNumber: 128
1952
- }
1953
- }))
1954
- }
1955
- };
1956
- if (this.props.open === true) {
1957
- return icons.open[this.props.iconSet];
1958
- } else {
1959
- return icons[this.props.iconSet];
1960
- }
1961
- }
1962
- }
1963
- ShowRationale.__initStatic();
1964
- ShowRationale.propTypes = {
1965
- iconSet: PropTypes$m.oneOf(['emoji', 'check']),
1966
- open: PropTypes$m.bool
1967
- };
1968
- ShowRationale.defaultProps = {
1969
- iconSet: 'check',
1970
- open: false
1971
- };
1972
- withStyles$e(styles$6)(ShowRationale);
1973
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
1974
- function getDefaultExportFromCjs(x) {
1975
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
1976
- }
1977
- function getAugmentedNamespace(n) {
1978
- if (n.__esModule) return n;
1979
- var a = Object.defineProperty({}, '__esModule', {
1980
- value: true
1981
- });
1982
- Object.keys(n).forEach(function (k) {
1983
- var d = Object.getOwnPropertyDescriptor(n, k);
1984
- Object.defineProperty(a, k, d.get ? d : {
1985
- enumerable: true,
1986
- get: function () {
1987
- return n[k];
1988
- }
1989
- });
1990
- });
1991
- return a;
1992
- }
1993
- var CSSTransition$1 = {
1994
- exports: {}
1995
- };
1996
- var addClass = {
1997
- exports: {}
1998
- };
1999
- var interopRequireDefault = {
2000
- exports: {}
2001
- };
2002
- (function (module) {
2003
- function _interopRequireDefault(obj) {
2004
- return obj && obj.__esModule ? obj : {
2005
- "default": obj
2006
- };
2007
- }
2008
- module.exports = _interopRequireDefault;
2009
- (module.exports["default"] = module.exports, module.exports.__esModule = true);
2010
- })(interopRequireDefault);
2011
- getDefaultExportFromCjs(interopRequireDefault.exports);
2012
- var hasClass = {
2013
- exports: {}
2014
- };
2015
- (function (module, exports) {
2016
- exports.__esModule = true;
2017
- exports.default = hasClass;
2018
- function hasClass(element, className) {
2019
- if (element.classList) return !!className && element.classList.contains(className); else return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1;
2020
- }
2021
- module.exports = exports["default"];
2022
- })(hasClass, hasClass.exports);
2023
- getDefaultExportFromCjs(hasClass.exports);
2024
- (function (module, exports) {
2025
- var _interopRequireDefault = interopRequireDefault.exports;
2026
- exports.__esModule = true;
2027
- exports.default = addClass;
2028
- var _hasClass = _interopRequireDefault(hasClass.exports);
2029
- function addClass(element, className) {
2030
- if (element.classList) element.classList.add(className); else if (!(0, _hasClass.default)(element, className)) if (typeof element.className === 'string') element.className = element.className + ' ' + className; else element.setAttribute('class', (element.className && element.className.baseVal || '') + ' ' + className);
2031
- }
2032
- module.exports = exports["default"];
2033
- })(addClass, addClass.exports);
2034
- getDefaultExportFromCjs(addClass.exports);
2035
- function replaceClassName(origClass, classToRemove) {
2036
- return origClass.replace(new RegExp('(^|\\s)' + classToRemove + '(?:\\s|$)', 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, '');
2037
- }
2038
- var removeClass = function removeClass(element, className) {
2039
- if (element.classList) element.classList.remove(className); else if (typeof element.className === 'string') element.className = replaceClassName(element.className, className); else element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));
2040
- };
2041
- var Transition$1 = {};
2042
- function componentWillMount() {
2043
- var state = this.constructor.getDerivedStateFromProps(this.props, this.state);
2044
- if (state !== null && state !== undefined) {
2045
- this.setState(state);
2046
- }
2047
- }
2048
- function componentWillReceiveProps(nextProps) {
2049
- function updater(prevState) {
2050
- var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);
2051
- return state !== null && state !== undefined ? state : null;
2052
- }
2053
- this.setState(updater.bind(this));
2054
- }
2055
- function componentWillUpdate(nextProps, nextState) {
2056
- try {
2057
- var prevProps = this.props;
2058
- var prevState = this.state;
2059
- this.props = nextProps;
2060
- this.state = nextState;
2061
- this.__reactInternalSnapshotFlag = true;
2062
- this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(prevProps, prevState);
2063
- } finally {
2064
- this.props = prevProps;
2065
- this.state = prevState;
2066
- }
2067
- }
2068
- componentWillMount.__suppressDeprecationWarning = true;
2069
- componentWillReceiveProps.__suppressDeprecationWarning = true;
2070
- componentWillUpdate.__suppressDeprecationWarning = true;
2071
- function polyfill(Component) {
2072
- var prototype = Component.prototype;
2073
- if (!prototype || !prototype.isReactComponent) {
2074
- throw new Error('Can only polyfill class components');
2075
- }
2076
- if (typeof Component.getDerivedStateFromProps !== 'function' && typeof prototype.getSnapshotBeforeUpdate !== 'function') {
2077
- return Component;
2078
- }
2079
- var foundWillMountName = null;
2080
- var foundWillReceivePropsName = null;
2081
- var foundWillUpdateName = null;
2082
- if (typeof prototype.componentWillMount === 'function') {
2083
- foundWillMountName = 'componentWillMount';
2084
- } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {
2085
- foundWillMountName = 'UNSAFE_componentWillMount';
2086
- }
2087
- if (typeof prototype.componentWillReceiveProps === 'function') {
2088
- foundWillReceivePropsName = 'componentWillReceiveProps';
2089
- } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {
2090
- foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
2091
- }
2092
- if (typeof prototype.componentWillUpdate === 'function') {
2093
- foundWillUpdateName = 'componentWillUpdate';
2094
- } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {
2095
- foundWillUpdateName = 'UNSAFE_componentWillUpdate';
2096
- }
2097
- if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
2098
- var componentName = Component.displayName || Component.name;
2099
- var newApiName = typeof Component.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';
2100
- throw Error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + componentName + ' uses ' + newApiName + ' but also contains the following legacy lifecycles:' + (foundWillMountName !== null ? '\n ' + foundWillMountName : '') + (foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '') + (foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') + '\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks');
2101
- }
2102
- if (typeof Component.getDerivedStateFromProps === 'function') {
2103
- prototype.componentWillMount = componentWillMount;
2104
- prototype.componentWillReceiveProps = componentWillReceiveProps;
2105
- }
2106
- if (typeof prototype.getSnapshotBeforeUpdate === 'function') {
2107
- if (typeof prototype.componentDidUpdate !== 'function') {
2108
- throw new Error('Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype');
2109
- }
2110
- prototype.componentWillUpdate = componentWillUpdate;
2111
- var componentDidUpdate = prototype.componentDidUpdate;
2112
- prototype.componentDidUpdate = function componentDidUpdatePolyfill(prevProps, prevState, maybeSnapshot) {
2113
- var snapshot = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : maybeSnapshot;
2114
- componentDidUpdate.call(this, prevProps, prevState, snapshot);
2115
- };
2116
- }
2117
- return Component;
2118
- }
2119
- var reactLifecyclesCompat_es = Object.freeze({
2120
- __proto__: null,
2121
- polyfill: polyfill
2122
- });
2123
- var require$$2$2 = getAugmentedNamespace(reactLifecyclesCompat_es);
2124
- var PropTypes$l = {};
2125
- const require$$0$5 = _dll_prop_types;
2126
- PropTypes$l.__esModule = true;
2127
- PropTypes$l.classNamesShape = PropTypes$l.timeoutsShape = void 0;
2128
- var _propTypes = _interopRequireDefault$2(require$$0$5);
2129
- function _interopRequireDefault$2(obj) {
2130
- return obj && obj.__esModule ? obj : {
2131
- default: obj
2132
- };
2133
- }
2134
- var timeoutsShape = _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
2135
- enter: _propTypes.default.number,
2136
- exit: _propTypes.default.number,
2137
- appear: _propTypes.default.number
2138
- }).isRequired]);
2139
- PropTypes$l.timeoutsShape = timeoutsShape;
2140
- var classNamesShape = _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({
2141
- enter: _propTypes.default.string,
2142
- exit: _propTypes.default.string,
2143
- active: _propTypes.default.string
2144
- }), _propTypes.default.shape({
2145
- enter: _propTypes.default.string,
2146
- enterDone: _propTypes.default.string,
2147
- enterActive: _propTypes.default.string,
2148
- exit: _propTypes.default.string,
2149
- exitDone: _propTypes.default.string,
2150
- exitActive: _propTypes.default.string
2151
- })]);
2152
- PropTypes$l.classNamesShape = classNamesShape;
2153
- const require$$0$4 = _dll_prop_types;
2154
- const require$$1$2 = _dll_react;
2155
- const require$$2$1 = _dll_react_dom;
2156
- Transition$1.__esModule = true;
2157
- Transition$1.default = Transition$1.EXITING = Transition$1.ENTERED = Transition$1.ENTERING = Transition$1.EXITED = Transition$1.UNMOUNTED = void 0;
2158
- var PropTypes$k = _interopRequireWildcard(require$$0$4);
2159
- var _react$1 = _interopRequireDefault$1(require$$1$2);
2160
- var _reactDom = _interopRequireDefault$1(require$$2$1);
2161
- var _reactLifecyclesCompat = require$$2$2;
2162
- var _PropTypes = PropTypes$l;
2163
- function _interopRequireDefault$1(obj) {
2164
- return obj && obj.__esModule ? obj : {
2165
- default: obj
2166
- };
2167
- }
2168
- function _interopRequireWildcard(obj) {
2169
- if (obj && obj.__esModule) {
2170
- return obj;
2171
- } else {
2172
- var newObj = {};
2173
- if (obj != null) {
2174
- for (var key in obj) {
2175
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
2176
- var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
2177
- if (desc.get || desc.set) {
2178
- Object.defineProperty(newObj, key, desc);
2179
- } else {
2180
- newObj[key] = obj[key];
2181
- }
2182
- }
2183
- }
2184
- }
2185
- newObj.default = obj;
2186
- return newObj;
2187
- }
2188
- }
2189
- function _objectWithoutPropertiesLoose(source, excluded) {
2190
- if (source == null) return {};
2191
- var target = {};
2192
- var sourceKeys = Object.keys(source);
2193
- var key, i;
2194
- for (i = 0; i < sourceKeys.length; i++) {
2195
- key = sourceKeys[i];
2196
- if (excluded.indexOf(key) >= 0) continue;
2197
- target[key] = source[key];
2198
- }
2199
- return target;
2200
- }
2201
- function _inheritsLoose(subClass, superClass) {
2202
- subClass.prototype = Object.create(superClass.prototype);
2203
- subClass.prototype.constructor = subClass;
2204
- subClass.__proto__ = superClass;
2205
- }
2206
- var UNMOUNTED = 'unmounted';
2207
- Transition$1.UNMOUNTED = UNMOUNTED;
2208
- var EXITED = 'exited';
2209
- Transition$1.EXITED = EXITED;
2210
- var ENTERING = 'entering';
2211
- Transition$1.ENTERING = ENTERING;
2212
- var ENTERED = 'entered';
2213
- Transition$1.ENTERED = ENTERED;
2214
- var EXITING = 'exiting';
2215
- Transition$1.EXITING = EXITING;
2216
- var Transition = (function (_React$Component) {
2217
- _inheritsLoose(Transition, _React$Component);
2218
- function Transition(props, context) {
2219
- var _this;
2220
- _this = _React$Component.call(this, props, context) || this;
2221
- var parentGroup = context.transitionGroup;
2222
- var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
2223
- var initialStatus;
2224
- _this.appearStatus = null;
2225
- if (props.in) {
2226
- if (appear) {
2227
- initialStatus = EXITED;
2228
- _this.appearStatus = ENTERING;
2229
- } else {
2230
- initialStatus = ENTERED;
2231
- }
2232
- } else {
2233
- if (props.unmountOnExit || props.mountOnEnter) {
2234
- initialStatus = UNMOUNTED;
2235
- } else {
2236
- initialStatus = EXITED;
2237
- }
2238
- }
2239
- _this.state = {
2240
- status: initialStatus
2241
- };
2242
- _this.nextCallback = null;
2243
- return _this;
2244
- }
2245
- var _proto = Transition.prototype;
2246
- _proto.getChildContext = function getChildContext() {
2247
- return {
2248
- transitionGroup: null
2249
- };
2250
- };
2251
- Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
2252
- var nextIn = _ref.in;
2253
- if (nextIn && prevState.status === UNMOUNTED) {
2254
- return {
2255
- status: EXITED
2256
- };
2257
- }
2258
- return null;
2259
- };
2260
- _proto.componentDidMount = function componentDidMount() {
2261
- this.updateStatus(true, this.appearStatus);
2262
- };
2263
- _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
2264
- var nextStatus = null;
2265
- if (prevProps !== this.props) {
2266
- var status = this.state.status;
2267
- if (this.props.in) {
2268
- if (status !== ENTERING && status !== ENTERED) {
2269
- nextStatus = ENTERING;
2270
- }
2271
- } else {
2272
- if (status === ENTERING || status === ENTERED) {
2273
- nextStatus = EXITING;
2274
- }
2275
- }
2276
- }
2277
- this.updateStatus(false, nextStatus);
2278
- };
2279
- _proto.componentWillUnmount = function componentWillUnmount() {
2280
- this.cancelNextCallback();
2281
- };
2282
- _proto.getTimeouts = function getTimeouts() {
2283
- var timeout = this.props.timeout;
2284
- var exit, enter, appear;
2285
- exit = enter = appear = timeout;
2286
- if (timeout != null && typeof timeout !== 'number') {
2287
- exit = timeout.exit;
2288
- enter = timeout.enter;
2289
- appear = timeout.appear !== undefined ? timeout.appear : enter;
2290
- }
2291
- return {
2292
- exit: exit,
2293
- enter: enter,
2294
- appear: appear
2295
- };
2296
- };
2297
- _proto.updateStatus = function updateStatus(mounting, nextStatus) {
2298
- if (mounting === void 0) {
2299
- mounting = false;
2300
- }
2301
- if (nextStatus !== null) {
2302
- this.cancelNextCallback();
2303
- var node = _reactDom.default.findDOMNode(this);
2304
- if (nextStatus === ENTERING) {
2305
- this.performEnter(node, mounting);
2306
- } else {
2307
- this.performExit(node);
2308
- }
2309
- } else if (this.props.unmountOnExit && this.state.status === EXITED) {
2310
- this.setState({
2311
- status: UNMOUNTED
2312
- });
2313
- }
2314
- };
2315
- _proto.performEnter = function performEnter(node, mounting) {
2316
- var _this2 = this;
2317
- var enter = this.props.enter;
2318
- var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting;
2319
- var timeouts = this.getTimeouts();
2320
- var enterTimeout = appearing ? timeouts.appear : timeouts.enter;
2321
- if (!mounting && !enter) {
2322
- this.safeSetState({
2323
- status: ENTERED
2324
- }, function () {
2325
- _this2.props.onEntered(node);
2326
- });
2327
- return;
2328
- }
2329
- this.props.onEnter(node, appearing);
2330
- this.safeSetState({
2331
- status: ENTERING
2332
- }, function () {
2333
- _this2.props.onEntering(node, appearing);
2334
- _this2.onTransitionEnd(node, enterTimeout, function () {
2335
- _this2.safeSetState({
2336
- status: ENTERED
2337
- }, function () {
2338
- _this2.props.onEntered(node, appearing);
2339
- });
2340
- });
2341
- });
2342
- };
2343
- _proto.performExit = function performExit(node) {
2344
- var _this3 = this;
2345
- var exit = this.props.exit;
2346
- var timeouts = this.getTimeouts();
2347
- if (!exit) {
2348
- this.safeSetState({
2349
- status: EXITED
2350
- }, function () {
2351
- _this3.props.onExited(node);
2352
- });
2353
- return;
2354
- }
2355
- this.props.onExit(node);
2356
- this.safeSetState({
2357
- status: EXITING
2358
- }, function () {
2359
- _this3.props.onExiting(node);
2360
- _this3.onTransitionEnd(node, timeouts.exit, function () {
2361
- _this3.safeSetState({
2362
- status: EXITED
2363
- }, function () {
2364
- _this3.props.onExited(node);
2365
- });
2366
- });
2367
- });
2368
- };
2369
- _proto.cancelNextCallback = function cancelNextCallback() {
2370
- if (this.nextCallback !== null) {
2371
- this.nextCallback.cancel();
2372
- this.nextCallback = null;
2373
- }
2374
- };
2375
- _proto.safeSetState = function safeSetState(nextState, callback) {
2376
- callback = this.setNextCallback(callback);
2377
- this.setState(nextState, callback);
2378
- };
2379
- _proto.setNextCallback = function setNextCallback(callback) {
2380
- var _this4 = this;
2381
- var active = true;
2382
- this.nextCallback = function (event) {
2383
- if (active) {
2384
- active = false;
2385
- _this4.nextCallback = null;
2386
- callback(event);
2387
- }
2388
- };
2389
- this.nextCallback.cancel = function () {
2390
- active = false;
2391
- };
2392
- return this.nextCallback;
2393
- };
2394
- _proto.onTransitionEnd = function onTransitionEnd(node, timeout, handler) {
2395
- this.setNextCallback(handler);
2396
- var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;
2397
- if (!node || doesNotHaveTimeoutOrListener) {
2398
- setTimeout(this.nextCallback, 0);
2399
- return;
2400
- }
2401
- if (this.props.addEndListener) {
2402
- this.props.addEndListener(node, this.nextCallback);
2403
- }
2404
- if (timeout != null) {
2405
- setTimeout(this.nextCallback, timeout);
2406
- }
2407
- };
2408
- _proto.render = function render() {
2409
- var status = this.state.status;
2410
- if (status === UNMOUNTED) {
2411
- return null;
2412
- }
2413
- var _this$props = this.props, children = _this$props.children, childProps = _objectWithoutPropertiesLoose(_this$props, ["children"]);
2414
- delete childProps.in;
2415
- delete childProps.mountOnEnter;
2416
- delete childProps.unmountOnExit;
2417
- delete childProps.appear;
2418
- delete childProps.enter;
2419
- delete childProps.exit;
2420
- delete childProps.timeout;
2421
- delete childProps.addEndListener;
2422
- delete childProps.onEnter;
2423
- delete childProps.onEntering;
2424
- delete childProps.onEntered;
2425
- delete childProps.onExit;
2426
- delete childProps.onExiting;
2427
- delete childProps.onExited;
2428
- if (typeof children === 'function') {
2429
- return children(status, childProps);
2430
- }
2431
- var child = _react$1.default.Children.only(children);
2432
- return _react$1.default.cloneElement(child, childProps);
2433
- };
2434
- return Transition;
2435
- })(_react$1.default.Component);
2436
- Transition.contextTypes = {
2437
- transitionGroup: PropTypes$k.object
2438
- };
2439
- Transition.childContextTypes = {
2440
- transitionGroup: function transitionGroup() {}
2441
- };
2442
- Transition.propTypes = {
2443
- children: PropTypes$k.oneOfType([PropTypes$k.func.isRequired, PropTypes$k.element.isRequired]).isRequired,
2444
- in: PropTypes$k.bool,
2445
- mountOnEnter: PropTypes$k.bool,
2446
- unmountOnExit: PropTypes$k.bool,
2447
- appear: PropTypes$k.bool,
2448
- enter: PropTypes$k.bool,
2449
- exit: PropTypes$k.bool,
2450
- timeout: function timeout(props) {
2451
- var pt = _PropTypes.timeoutsShape;
2452
- if (!props.addEndListener) pt = pt.isRequired;
2453
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2454
- args[_key - 1] = arguments[_key];
2455
- }
2456
- return pt.apply(void 0, [props].concat(args));
2457
- },
2458
- addEndListener: PropTypes$k.func,
2459
- onEnter: PropTypes$k.func,
2460
- onEntering: PropTypes$k.func,
2461
- onEntered: PropTypes$k.func,
2462
- onExit: PropTypes$k.func,
2463
- onExiting: PropTypes$k.func,
2464
- onExited: PropTypes$k.func
2465
- };
2466
- function noop$1() {}
2467
- Transition.defaultProps = {
2468
- in: false,
2469
- mountOnEnter: false,
2470
- unmountOnExit: false,
2471
- appear: false,
2472
- enter: true,
2473
- exit: true,
2474
- onEnter: noop$1,
2475
- onEntering: noop$1,
2476
- onEntered: noop$1,
2477
- onExit: noop$1,
2478
- onExiting: noop$1,
2479
- onExited: noop$1
2480
- };
2481
- Transition.UNMOUNTED = 0;
2482
- Transition.EXITED = 1;
2483
- Transition.ENTERING = 2;
2484
- Transition.ENTERED = 3;
2485
- Transition.EXITING = 4;
2486
- var _default = (0, _reactLifecyclesCompat.polyfill)(Transition);
2487
- Transition$1.default = _default;
2488
- const require$$0$3 = _dll_prop_types;
2489
- const require$$3 = _dll_react;
2490
- (function (module, exports) {
2491
- exports.__esModule = true;
2492
- exports.default = void 0;
2493
- var PropTypes = _interopRequireWildcard(require$$0$3);
2494
- var _addClass = _interopRequireDefault(addClass.exports);
2495
- var _removeClass = _interopRequireDefault(removeClass);
2496
- var _react = _interopRequireDefault(require$$3);
2497
- var _Transition = _interopRequireDefault(Transition$1);
2498
- var _PropTypes = PropTypes$l;
2499
- function _interopRequireDefault(obj) {
2500
- return obj && obj.__esModule ? obj : {
2501
- default: obj
2502
- };
2503
- }
2504
- function _interopRequireWildcard(obj) {
2505
- if (obj && obj.__esModule) {
2506
- return obj;
2507
- } else {
2508
- var newObj = {};
2509
- if (obj != null) {
2510
- for (var key in obj) {
2511
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
2512
- var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
2513
- if (desc.get || desc.set) {
2514
- Object.defineProperty(newObj, key, desc);
2515
- } else {
2516
- newObj[key] = obj[key];
2517
- }
2518
- }
2519
- }
2520
- }
2521
- newObj.default = obj;
2522
- return newObj;
2523
- }
2524
- }
2525
- function _extends() {
2526
- _extends = Object.assign || (function (target) {
2527
- for (var i = 1; i < arguments.length; i++) {
2528
- var source = arguments[i];
2529
- for (var key in source) {
2530
- if (Object.prototype.hasOwnProperty.call(source, key)) {
2531
- target[key] = source[key];
2532
- }
2533
- }
2534
- }
2535
- return target;
2536
- });
2537
- return _extends.apply(this, arguments);
2538
- }
2539
- function _inheritsLoose(subClass, superClass) {
2540
- subClass.prototype = Object.create(superClass.prototype);
2541
- subClass.prototype.constructor = subClass;
2542
- subClass.__proto__ = superClass;
2543
- }
2544
- var addClass$1 = function addClass(node, classes) {
2545
- return node && classes && classes.split(' ').forEach(function (c) {
2546
- return (0, _addClass.default)(node, c);
2547
- });
2548
- };
2549
- var removeClass$1 = function removeClass(node, classes) {
2550
- return node && classes && classes.split(' ').forEach(function (c) {
2551
- return (0, _removeClass.default)(node, c);
2552
- });
2553
- };
2554
- var CSSTransition = (function (_React$Component) {
2555
- _inheritsLoose(CSSTransition, _React$Component);
2556
- function CSSTransition() {
2557
- var _this;
2558
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2559
- args[_key] = arguments[_key];
2560
- }
2561
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
2562
- _this.onEnter = function (node, appearing) {
2563
- var _this$getClassNames = _this.getClassNames(appearing ? 'appear' : 'enter'), className = _this$getClassNames.className;
2564
- _this.removeClasses(node, 'exit');
2565
- addClass$1(node, className);
2566
- if (_this.props.onEnter) {
2567
- _this.props.onEnter(node, appearing);
2568
- }
2569
- };
2570
- _this.onEntering = function (node, appearing) {
2571
- var _this$getClassNames2 = _this.getClassNames(appearing ? 'appear' : 'enter'), activeClassName = _this$getClassNames2.activeClassName;
2572
- _this.reflowAndAddClass(node, activeClassName);
2573
- if (_this.props.onEntering) {
2574
- _this.props.onEntering(node, appearing);
2575
- }
2576
- };
2577
- _this.onEntered = function (node, appearing) {
2578
- var appearClassName = _this.getClassNames('appear').doneClassName;
2579
- var enterClassName = _this.getClassNames('enter').doneClassName;
2580
- var doneClassName = appearing ? appearClassName + " " + enterClassName : enterClassName;
2581
- _this.removeClasses(node, appearing ? 'appear' : 'enter');
2582
- addClass$1(node, doneClassName);
2583
- if (_this.props.onEntered) {
2584
- _this.props.onEntered(node, appearing);
2585
- }
2586
- };
2587
- _this.onExit = function (node) {
2588
- var _this$getClassNames3 = _this.getClassNames('exit'), className = _this$getClassNames3.className;
2589
- _this.removeClasses(node, 'appear');
2590
- _this.removeClasses(node, 'enter');
2591
- addClass$1(node, className);
2592
- if (_this.props.onExit) {
2593
- _this.props.onExit(node);
2594
- }
2595
- };
2596
- _this.onExiting = function (node) {
2597
- var _this$getClassNames4 = _this.getClassNames('exit'), activeClassName = _this$getClassNames4.activeClassName;
2598
- _this.reflowAndAddClass(node, activeClassName);
2599
- if (_this.props.onExiting) {
2600
- _this.props.onExiting(node);
2601
- }
2602
- };
2603
- _this.onExited = function (node) {
2604
- var _this$getClassNames5 = _this.getClassNames('exit'), doneClassName = _this$getClassNames5.doneClassName;
2605
- _this.removeClasses(node, 'exit');
2606
- addClass$1(node, doneClassName);
2607
- if (_this.props.onExited) {
2608
- _this.props.onExited(node);
2609
- }
2610
- };
2611
- _this.getClassNames = function (type) {
2612
- var classNames = _this.props.classNames;
2613
- var isStringClassNames = typeof classNames === 'string';
2614
- var prefix = isStringClassNames && classNames ? classNames + '-' : '';
2615
- var className = isStringClassNames ? prefix + type : classNames[type];
2616
- var activeClassName = isStringClassNames ? className + '-active' : classNames[type + 'Active'];
2617
- var doneClassName = isStringClassNames ? className + '-done' : classNames[type + 'Done'];
2618
- return {
2619
- className: className,
2620
- activeClassName: activeClassName,
2621
- doneClassName: doneClassName
2622
- };
2623
- };
2624
- return _this;
2625
- }
2626
- var _proto = CSSTransition.prototype;
2627
- _proto.removeClasses = function removeClasses(node, type) {
2628
- var _this$getClassNames6 = this.getClassNames(type), className = _this$getClassNames6.className, activeClassName = _this$getClassNames6.activeClassName, doneClassName = _this$getClassNames6.doneClassName;
2629
- className && removeClass$1(node, className);
2630
- activeClassName && removeClass$1(node, activeClassName);
2631
- doneClassName && removeClass$1(node, doneClassName);
2632
- };
2633
- _proto.reflowAndAddClass = function reflowAndAddClass(node, className) {
2634
- if (className) {
2635
- node && node.scrollTop;
2636
- addClass$1(node, className);
2637
- }
2638
- };
2639
- _proto.render = function render() {
2640
- var props = _extends({}, this.props);
2641
- delete props.classNames;
2642
- return _react.default.createElement(_Transition.default, _extends({}, props, {
2643
- onEnter: this.onEnter,
2644
- onEntered: this.onEntered,
2645
- onEntering: this.onEntering,
2646
- onExit: this.onExit,
2647
- onExiting: this.onExiting,
2648
- onExited: this.onExited
2649
- }));
2650
- };
2651
- return CSSTransition;
2652
- })(_react.default.Component);
2653
- CSSTransition.defaultProps = {
2654
- classNames: ''
2655
- };
2656
- CSSTransition.propTypes = _extends({}, _Transition.default.propTypes, {
2657
- classNames: _PropTypes.classNamesShape,
2658
- onEnter: PropTypes.func,
2659
- onEntering: PropTypes.func,
2660
- onEntered: PropTypes.func,
2661
- onExit: PropTypes.func,
2662
- onExiting: PropTypes.func,
2663
- onExited: PropTypes.func
2664
- });
2665
- var _default = CSSTransition;
2666
- exports.default = _default;
2667
- module.exports = exports["default"];
2668
- })(CSSTransition$1, CSSTransition$1.exports);
2669
- var CSSTransition = getDefaultExportFromCjs(CSSTransition$1.exports);
2670
- var ReplaceTransition = {
2671
- exports: {}
2672
- };
2673
- var TransitionGroup = {
2674
- exports: {}
2675
- };
2676
- var ChildMapping = {};
2677
- const require$$0$2 = _dll_react;
2678
- ChildMapping.__esModule = true;
2679
- ChildMapping.getChildMapping = getChildMapping;
2680
- ChildMapping.mergeChildMappings = mergeChildMappings;
2681
- ChildMapping.getInitialChildMapping = getInitialChildMapping;
2682
- ChildMapping.getNextChildMapping = getNextChildMapping;
2683
- var _react = require$$0$2;
2684
- function getChildMapping(children, mapFn) {
2685
- var mapper = function mapper(child) {
2686
- return mapFn && (0, _react.isValidElement)(child) ? mapFn(child) : child;
2687
- };
2688
- var result = Object.create(null);
2689
- if (children) _react.Children.map(children, function (c) {
2690
- return c;
2691
- }).forEach(function (child) {
2692
- result[child.key] = mapper(child);
2693
- });
2694
- return result;
2695
- }
2696
- function mergeChildMappings(prev, next) {
2697
- prev = prev || ({});
2698
- next = next || ({});
2699
- function getValueForKey(key) {
2700
- return (key in next) ? next[key] : prev[key];
2701
- }
2702
- var nextKeysPending = Object.create(null);
2703
- var pendingKeys = [];
2704
- for (var prevKey in prev) {
2705
- if ((prevKey in next)) {
2706
- if (pendingKeys.length) {
2707
- nextKeysPending[prevKey] = pendingKeys;
2708
- pendingKeys = [];
2709
- }
2710
- } else {
2711
- pendingKeys.push(prevKey);
2712
- }
2713
- }
2714
- var i;
2715
- var childMapping = {};
2716
- for (var nextKey in next) {
2717
- if (nextKeysPending[nextKey]) {
2718
- for (i = 0; i < nextKeysPending[nextKey].length; i++) {
2719
- var pendingNextKey = nextKeysPending[nextKey][i];
2720
- childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);
2721
- }
2722
- }
2723
- childMapping[nextKey] = getValueForKey(nextKey);
2724
- }
2725
- for (i = 0; i < pendingKeys.length; i++) {
2726
- childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);
2727
- }
2728
- return childMapping;
2729
- }
2730
- function getProp(child, prop, props) {
2731
- return props[prop] != null ? props[prop] : child.props[prop];
2732
- }
2733
- function getInitialChildMapping(props, onExited) {
2734
- return getChildMapping(props.children, function (child) {
2735
- return (0, _react.cloneElement)(child, {
2736
- onExited: onExited.bind(null, child),
2737
- in: true,
2738
- appear: getProp(child, 'appear', props),
2739
- enter: getProp(child, 'enter', props),
2740
- exit: getProp(child, 'exit', props)
2741
- });
2742
- });
2743
- }
2744
- function getNextChildMapping(nextProps, prevChildMapping, onExited) {
2745
- var nextChildMapping = getChildMapping(nextProps.children);
2746
- var children = mergeChildMappings(prevChildMapping, nextChildMapping);
2747
- Object.keys(children).forEach(function (key) {
2748
- var child = children[key];
2749
- if (!(0, _react.isValidElement)(child)) return;
2750
- var hasPrev = (key in prevChildMapping);
2751
- var hasNext = (key in nextChildMapping);
2752
- var prevChild = prevChildMapping[key];
2753
- var isLeaving = (0, _react.isValidElement)(prevChild) && !prevChild.props.in;
2754
- if (hasNext && (!hasPrev || isLeaving)) {
2755
- children[key] = (0, _react.cloneElement)(child, {
2756
- onExited: onExited.bind(null, child),
2757
- in: true,
2758
- exit: getProp(child, 'exit', nextProps),
2759
- enter: getProp(child, 'enter', nextProps)
2760
- });
2761
- } else if (!hasNext && hasPrev && !isLeaving) {
2762
- children[key] = (0, _react.cloneElement)(child, {
2763
- in: false
2764
- });
2765
- } else if (hasNext && hasPrev && (0, _react.isValidElement)(prevChild)) {
2766
- children[key] = (0, _react.cloneElement)(child, {
2767
- onExited: onExited.bind(null, child),
2768
- in: prevChild.props.in,
2769
- exit: getProp(child, 'exit', nextProps),
2770
- enter: getProp(child, 'enter', nextProps)
2771
- });
2772
- }
2773
- });
2774
- return children;
2775
- }
2776
- const require$$0$1 = _dll_prop_types;
2777
- const require$$1$1 = _dll_react;
2778
- (function (module, exports) {
2779
- exports.__esModule = true;
2780
- exports.default = void 0;
2781
- var _propTypes = _interopRequireDefault(require$$0$1);
2782
- var _react = _interopRequireDefault(require$$1$1);
2783
- var _reactLifecyclesCompat = require$$2$2;
2784
- var _ChildMapping = ChildMapping;
2785
- function _interopRequireDefault(obj) {
2786
- return obj && obj.__esModule ? obj : {
2787
- default: obj
2788
- };
2789
- }
2790
- function _objectWithoutPropertiesLoose(source, excluded) {
2791
- if (source == null) return {};
2792
- var target = {};
2793
- var sourceKeys = Object.keys(source);
2794
- var key, i;
2795
- for (i = 0; i < sourceKeys.length; i++) {
2796
- key = sourceKeys[i];
2797
- if (excluded.indexOf(key) >= 0) continue;
2798
- target[key] = source[key];
2799
- }
2800
- return target;
2801
- }
2802
- function _extends() {
2803
- _extends = Object.assign || (function (target) {
2804
- for (var i = 1; i < arguments.length; i++) {
2805
- var source = arguments[i];
2806
- for (var key in source) {
2807
- if (Object.prototype.hasOwnProperty.call(source, key)) {
2808
- target[key] = source[key];
2809
- }
2810
- }
2811
- }
2812
- return target;
2813
- });
2814
- return _extends.apply(this, arguments);
2815
- }
2816
- function _inheritsLoose(subClass, superClass) {
2817
- subClass.prototype = Object.create(superClass.prototype);
2818
- subClass.prototype.constructor = subClass;
2819
- subClass.__proto__ = superClass;
2820
- }
2821
- function _assertThisInitialized(self) {
2822
- if (self === void 0) {
2823
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2824
- }
2825
- return self;
2826
- }
2827
- var values = Object.values || (function (obj) {
2828
- return Object.keys(obj).map(function (k) {
2829
- return obj[k];
2830
- });
2831
- });
2832
- var defaultProps = {
2833
- component: 'div',
2834
- childFactory: function childFactory(child) {
2835
- return child;
2836
- }
2837
- };
2838
- var TransitionGroup = (function (_React$Component) {
2839
- _inheritsLoose(TransitionGroup, _React$Component);
2840
- function TransitionGroup(props, context) {
2841
- var _this;
2842
- _this = _React$Component.call(this, props, context) || this;
2843
- var handleExited = _this.handleExited.bind(_assertThisInitialized(_assertThisInitialized(_this)));
2844
- _this.state = {
2845
- handleExited: handleExited,
2846
- firstRender: true
2847
- };
2848
- return _this;
2849
- }
2850
- var _proto = TransitionGroup.prototype;
2851
- _proto.getChildContext = function getChildContext() {
2852
- return {
2853
- transitionGroup: {
2854
- isMounting: !this.appeared
2855
- }
2856
- };
2857
- };
2858
- _proto.componentDidMount = function componentDidMount() {
2859
- this.appeared = true;
2860
- this.mounted = true;
2861
- };
2862
- _proto.componentWillUnmount = function componentWillUnmount() {
2863
- this.mounted = false;
2864
- };
2865
- TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {
2866
- var prevChildMapping = _ref.children, handleExited = _ref.handleExited, firstRender = _ref.firstRender;
2867
- return {
2868
- children: firstRender ? (0, _ChildMapping.getInitialChildMapping)(nextProps, handleExited) : (0, _ChildMapping.getNextChildMapping)(nextProps, prevChildMapping, handleExited),
2869
- firstRender: false
2870
- };
2871
- };
2872
- _proto.handleExited = function handleExited(child, node) {
2873
- var currentChildMapping = (0, _ChildMapping.getChildMapping)(this.props.children);
2874
- if ((child.key in currentChildMapping)) return;
2875
- if (child.props.onExited) {
2876
- child.props.onExited(node);
2877
- }
2878
- if (this.mounted) {
2879
- this.setState(function (state) {
2880
- var children = _extends({}, state.children);
2881
- delete children[child.key];
2882
- return {
2883
- children: children
2884
- };
2885
- });
2886
- }
2887
- };
2888
- _proto.render = function render() {
2889
- var _this$props = this.props, Component = _this$props.component, childFactory = _this$props.childFactory, props = _objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]);
2890
- var children = values(this.state.children).map(childFactory);
2891
- delete props.appear;
2892
- delete props.enter;
2893
- delete props.exit;
2894
- if (Component === null) {
2895
- return children;
2896
- }
2897
- return _react.default.createElement(Component, props, children);
2898
- };
2899
- return TransitionGroup;
2900
- })(_react.default.Component);
2901
- TransitionGroup.childContextTypes = {
2902
- transitionGroup: _propTypes.default.object.isRequired
2903
- };
2904
- TransitionGroup.propTypes = {
2905
- component: _propTypes.default.any,
2906
- children: _propTypes.default.node,
2907
- appear: _propTypes.default.bool,
2908
- enter: _propTypes.default.bool,
2909
- exit: _propTypes.default.bool,
2910
- childFactory: _propTypes.default.func
2911
- };
2912
- TransitionGroup.defaultProps = defaultProps;
2913
- var _default = (0, _reactLifecyclesCompat.polyfill)(TransitionGroup);
2914
- exports.default = _default;
2915
- module.exports = exports["default"];
2916
- })(TransitionGroup, TransitionGroup.exports);
2917
- getDefaultExportFromCjs(TransitionGroup.exports);
2918
- const require$$0 = _dll_prop_types;
2919
- const require$$1 = _dll_react;
2920
- const require$$2 = _dll_react_dom;
2921
- (function (module, exports) {
2922
- exports.__esModule = true;
2923
- exports.default = void 0;
2924
- var _propTypes = _interopRequireDefault(require$$0);
2925
- var _react = _interopRequireDefault(require$$1);
2926
- var _reactDom = require$$2;
2927
- var _TransitionGroup = _interopRequireDefault(TransitionGroup.exports);
2928
- function _interopRequireDefault(obj) {
2929
- return obj && obj.__esModule ? obj : {
2930
- default: obj
2931
- };
2932
- }
2933
- function _objectWithoutPropertiesLoose(source, excluded) {
2934
- if (source == null) return {};
2935
- var target = {};
2936
- var sourceKeys = Object.keys(source);
2937
- var key, i;
2938
- for (i = 0; i < sourceKeys.length; i++) {
2939
- key = sourceKeys[i];
2940
- if (excluded.indexOf(key) >= 0) continue;
2941
- target[key] = source[key];
2942
- }
2943
- return target;
2944
- }
2945
- function _inheritsLoose(subClass, superClass) {
2946
- subClass.prototype = Object.create(superClass.prototype);
2947
- subClass.prototype.constructor = subClass;
2948
- subClass.__proto__ = superClass;
2949
- }
2950
- var ReplaceTransition = (function (_React$Component) {
2951
- _inheritsLoose(ReplaceTransition, _React$Component);
2952
- function ReplaceTransition() {
2953
- var _this;
2954
- for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
2955
- _args[_key] = arguments[_key];
2956
- }
2957
- _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;
2958
- _this.handleEnter = function () {
2959
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
2960
- args[_key2] = arguments[_key2];
2961
- }
2962
- return _this.handleLifecycle('onEnter', 0, args);
2963
- };
2964
- _this.handleEntering = function () {
2965
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
2966
- args[_key3] = arguments[_key3];
2967
- }
2968
- return _this.handleLifecycle('onEntering', 0, args);
2969
- };
2970
- _this.handleEntered = function () {
2971
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
2972
- args[_key4] = arguments[_key4];
2973
- }
2974
- return _this.handleLifecycle('onEntered', 0, args);
2975
- };
2976
- _this.handleExit = function () {
2977
- for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
2978
- args[_key5] = arguments[_key5];
2979
- }
2980
- return _this.handleLifecycle('onExit', 1, args);
2981
- };
2982
- _this.handleExiting = function () {
2983
- for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
2984
- args[_key6] = arguments[_key6];
2985
- }
2986
- return _this.handleLifecycle('onExiting', 1, args);
2987
- };
2988
- _this.handleExited = function () {
2989
- for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
2990
- args[_key7] = arguments[_key7];
2991
- }
2992
- return _this.handleLifecycle('onExited', 1, args);
2993
- };
2994
- return _this;
2995
- }
2996
- var _proto = ReplaceTransition.prototype;
2997
- _proto.handleLifecycle = function handleLifecycle(handler, idx, originalArgs) {
2998
- var _child$props;
2999
- var children = this.props.children;
3000
- var child = _react.default.Children.toArray(children)[idx];
3001
- if (child.props[handler]) (_child$props = child.props)[handler].apply(_child$props, originalArgs);
3002
- if (this.props[handler]) this.props[handler]((0, _reactDom.findDOMNode)(this));
3003
- };
3004
- _proto.render = function render() {
3005
- var _this$props = this.props, children = _this$props.children, inProp = _this$props.in, props = _objectWithoutPropertiesLoose(_this$props, ["children", "in"]);
3006
- var _React$Children$toArr = _react.default.Children.toArray(children), first = _React$Children$toArr[0], second = _React$Children$toArr[1];
3007
- delete props.onEnter;
3008
- delete props.onEntering;
3009
- delete props.onEntered;
3010
- delete props.onExit;
3011
- delete props.onExiting;
3012
- delete props.onExited;
3013
- return _react.default.createElement(_TransitionGroup.default, props, inProp ? _react.default.cloneElement(first, {
3014
- key: 'first',
3015
- onEnter: this.handleEnter,
3016
- onEntering: this.handleEntering,
3017
- onEntered: this.handleEntered
3018
- }) : _react.default.cloneElement(second, {
3019
- key: 'second',
3020
- onEnter: this.handleExit,
3021
- onEntering: this.handleExiting,
3022
- onEntered: this.handleExited
3023
- }));
3024
- };
3025
- return ReplaceTransition;
3026
- })(_react.default.Component);
3027
- ReplaceTransition.propTypes = {
3028
- in: _propTypes.default.bool.isRequired,
3029
- children: function children(props, propName) {
3030
- if (_react.default.Children.count(props[propName]) !== 2) return new Error("\"" + propName + "\" must be exactly two transition components.");
3031
- return null;
3032
- }
3033
- };
3034
- var _default = ReplaceTransition;
3035
- exports.default = _default;
3036
- module.exports = exports["default"];
3037
- })(ReplaceTransition, ReplaceTransition.exports);
3038
- getDefaultExportFromCjs(ReplaceTransition.exports);
3039
- var _CSSTransition = _interopRequireDefault(CSSTransition$1.exports);
3040
- var _ReplaceTransition = _interopRequireDefault(ReplaceTransition.exports);
3041
- var _TransitionGroup = _interopRequireDefault(TransitionGroup.exports);
3042
- var _Transition = _interopRequireDefault(Transition$1);
3043
- function _interopRequireDefault(obj) {
3044
- return obj && obj.__esModule ? obj : {
3045
- default: obj
3046
- };
3047
- }
3048
- var reactTransitionGroup = {
3049
- Transition: _Transition.default,
3050
- TransitionGroup: _TransitionGroup.default,
3051
- ReplaceTransition: _ReplaceTransition.default,
3052
- CSSTransition: _CSSTransition.default
3053
- };
3054
- const {colors: {green: green}} = _dll_material_ui__core;
3055
- const {colors: {orange: orange}} = _dll_material_ui__core;
3056
- const {colors: {pink: pink}} = _dll_material_ui__core;
3057
- const {colors: {indigo: indigo}} = _dll_material_ui__core;
3058
- const defaults = {
3059
- TEXT: 'black',
3060
- DISABLED: 'grey',
3061
- CORRECT: green[500],
3062
- INCORRECT: orange[500],
3063
- PRIMARY: indigo[500],
3064
- PRIMARY_LIGHT: indigo[200],
3065
- PRIMARY_DARK: indigo[800],
3066
- SECONDARY: pink.A400,
3067
- SECONDARY_LIGHT: pink[200],
3068
- SECONDARY_DARK: pink[900],
3069
- BACKGROUND: 'rgba(255,255,255,0)',
3070
- SECONDARY_BACKGROUND: 'rgba(241,241,241,1)'
3071
- };
3072
- Object.freeze(defaults);
3073
- const v = prefix => (...args) => {
3074
- const fallback = args.pop();
3075
- return args.reduceRight((acc, v) => {
3076
- return `var(--${prefix}-${v}, ${acc})`;
3077
- }, fallback);
3078
- };
3079
- const pv = v('pie');
3080
- const text = () => pv('text', defaults.TEXT);
3081
- const disabled = () => pv('disabled', defaults.DISABLED);
3082
- const correct = () => pv('correct', defaults.CORRECT);
3083
- const incorrect = () => pv('incorrect', defaults.INCORRECT);
3084
- const primary = () => pv('primary', defaults.PRIMARY);
3085
- const primaryDark = () => pv('primary-dark', defaults.PRIMARY_DARK);
3086
- const secondaryLight = () => pv('secondary-light', defaults.SECONDARY_LIGHT);
3087
- const background = () => pv('background', defaults.BACKGROUND);
3088
- const {withStyles: withStyles$d} = _dll_material_ui__core_styles;
3089
- const React$n = _dll_react;
3090
- const classNames$3 = _dll_classnames;
3091
- const PropTypes$j = _dll_prop_types;
3092
- const _jsxFileName$k = "/home/circleci/repo/node_modules/@pie-lib/render-ui/src/feedback.jsx";
3093
- const styleSheet = {
3094
- corespringFeedback: {
3095
- transformOrigin: '0% 0px 0px',
3096
- width: '100%',
3097
- display: 'block',
3098
- overflow: 'hidden',
3099
- '&:.incorrect': {
3100
- color: '#946202'
3101
- }
3102
- },
3103
- content: {
3104
- '-webkit-font-smoothing': 'antialiased',
3105
- backgroundColor: `var(--feedback-bg-color, ${disabled()})`,
3106
- borderRadius: '4px',
3107
- fontFamily: '"Roboto", "Noto", sans-serif',
3108
- fontSize: '12px',
3109
- lineHeight: '25px',
3110
- margin: '0px',
3111
- padding: '10px',
3112
- verticalAlign: 'middle',
3113
- color: 'var(--feedback-color, white)'
3114
- },
3115
- correct: {
3116
- backgroundColor: `var(--feedback-correct-bg-color, ${correct()})`
3117
- },
3118
- incorrect: {
3119
- backgroundColor: `var(--feedback-incorrect-bg-color, ${incorrect()})`
3120
- },
3121
- feedbackEnter: {
3122
- height: '1px'
3123
- },
3124
- feedbackEnterActive: {
3125
- height: '45px',
3126
- transition: 'height 500ms'
3127
- },
3128
- feedbackLeave: {
3129
- height: '45px'
3130
- },
3131
- feedbackLeaveActive: {
3132
- height: '1px',
3133
- transition: 'height 200ms'
3134
- }
3135
- };
3136
- class Feedback extends React$n.Component {
3137
- static __initStatic() {
3138
- this.propTypes = {
3139
- correctness: PropTypes$j.string,
3140
- feedback: PropTypes$j.string,
3141
- classes: PropTypes$j.object.isRequired
3142
- };
3143
- }
3144
- render() {
3145
- const {correctness, feedback, classes} = this.props;
3146
- function chooseFeedback(correctness) {
3147
- if (correctness && feedback) {
3148
- return React$n.createElement(reactTransitionGroup.CSSTransition, {
3149
- classNames: {
3150
- enter: classes.feedbackEnter,
3151
- enterActive: classes.feedbackEnterActive,
3152
- leave: classes.feedbackLeave,
3153
- leaveActive: classes.feedbackLeaveActive
3154
- },
3155
- key: "hasFeedback",
3156
- timeout: {
3157
- enter: 500,
3158
- exit: 300
3159
- },
3160
- __self: this,
3161
- __source: {
3162
- fileName: _jsxFileName$k,
3163
- lineNumber: 69
3164
- }
3165
- }, React$n.createElement('div', {
3166
- className: classes.corespringFeedback,
3167
- __self: this,
3168
- __source: {
3169
- fileName: _jsxFileName$k,
3170
- lineNumber: 79
3171
- }
3172
- }, React$n.createElement('div', {
3173
- className: classNames$3(classes.content, classes[correctness]),
3174
- dangerouslySetInnerHTML: {
3175
- __html: feedback
3176
- },
3177
- __self: this,
3178
- __source: {
3179
- fileName: _jsxFileName$k,
3180
- lineNumber: 80
3181
- }
3182
- })));
3183
- } else {
3184
- return null;
3185
- }
3186
- }
3187
- return React$n.createElement('div', {
3188
- __self: this,
3189
- __source: {
3190
- fileName: _jsxFileName$k,
3191
- lineNumber: 93
3192
- }
3193
- }, React$n.createElement(reactTransitionGroup.TransitionGroup, {
3194
- __self: this,
3195
- __source: {
3196
- fileName: _jsxFileName$k,
3197
- lineNumber: 94
3198
- }
3199
- }, chooseFeedback(correctness)));
3200
- }
3201
- }
3202
- Feedback.__initStatic();
3203
- var Feedback$1 = withStyles$d(styleSheet, {
3204
- name: 'Feedback'
3205
- })(Feedback);
3206
- const React$m = _dll_react;
3207
- const PropTypes$i = _dll_prop_types;
3208
- const {Popover: Popover} = _dll_material_ui__core;
3209
- const {withStyles: withStyles$c} = _dll_material_ui__core_styles;
3210
- const debug$5 = _dll_debug;
3211
- const _jsxFileName$j = "/home/circleci/repo/node_modules/@pie-lib/render-ui/src/response-indicators.jsx";
3212
- const log$4 = debug$5('pie-libs:render-ui:response-indicators');
3213
- const styles$5 = () => ({
3214
- responseIndicator: {
3215
- cursor: 'pointer'
3216
- },
3217
- paper: {
3218
- padding: '0',
3219
- borderRadius: '4px'
3220
- },
3221
- popover: {
3222
- cursor: 'pointer'
3223
- },
3224
- popperClose: {
3225
- cursor: 'pointer'
3226
- }
3227
- });
3228
- const BuildIndicator = (Icon, correctness) => {
3229
- class RawIndicator extends React$m.Component {
3230
- constructor(props) {
3231
- super(props);
3232
- RawIndicator.prototype.__init.call(this);
3233
- RawIndicator.prototype.__init2.call(this);
3234
- this.state = {};
3235
- }
3236
- __init() {
3237
- this.handlePopoverOpen = event => {
3238
- log$4('[handlePopoverOpen]', event.target);
3239
- this.setState({
3240
- anchorEl: event.target
3241
- });
3242
- };
3243
- }
3244
- __init2() {
3245
- this.handlePopoverClose = () => {
3246
- this.setState({
3247
- anchorEl: null
3248
- });
3249
- };
3250
- }
3251
- render() {
3252
- const {feedback, classes} = this.props;
3253
- const {anchorEl} = this.state;
3254
- return React$m.createElement('div', {
3255
- className: feedback && classes.responseIndicator,
3256
- __self: this,
3257
- __source: {
3258
- fileName: _jsxFileName$j,
3259
- lineNumber: 47
3260
- }
3261
- }, React$m.createElement('span', {
3262
- ref: r => this.icon = r,
3263
- onClick: this.handlePopoverOpen,
3264
- __self: this,
3265
- __source: {
3266
- fileName: _jsxFileName$j,
3267
- lineNumber: 48
3268
- }
3269
- }, React$m.createElement(Icon, {
3270
- __self: this,
3271
- __source: {
3272
- fileName: _jsxFileName$j,
3273
- lineNumber: 49
3274
- }
3275
- })), feedback && React$m.createElement(Popover, {
3276
- className: classes.popover,
3277
- classes: {
3278
- paper: classes.paper
3279
- },
3280
- open: !!anchorEl,
3281
- anchorEl: anchorEl,
3282
- anchorOrigin: {
3283
- vertical: 'bottom',
3284
- horizontal: 'left'
3285
- },
3286
- transformOrigin: {
3287
- vertical: 'top',
3288
- horizontal: 'left'
3289
- },
3290
- onClose: this.handlePopoverClose,
3291
- __self: this,
3292
- __source: {
3293
- fileName: _jsxFileName$j,
3294
- lineNumber: 53
3295
- }
3296
- }, React$m.createElement(Feedback$1, {
3297
- feedback: feedback,
3298
- correctness: correctness,
3299
- __self: this,
3300
- __source: {
3301
- fileName: _jsxFileName$j,
3302
- lineNumber: 70
3303
- }
3304
- })));
3305
- }
3306
- }
3307
- RawIndicator.propTypes = {
3308
- feedback: PropTypes$i.string,
3309
- classes: PropTypes$i.object.isRequired
3310
- };
3311
- return withStyles$c(styles$5)(RawIndicator);
3312
- };
3313
- BuildIndicator(correctIcon, 'correct');
3314
- BuildIndicator(incorrectIcon, 'incorrect');
3315
- BuildIndicator(partiallyCorrectIcon, 'partially-correct');
3316
- BuildIndicator(nothingSubmittedIcon, 'nothing-submitted');
3317
- const React$l = _dll_react;
3318
- const {withStyles: withStyles$b} = _dll_material_ui__core_styles;
3319
- const Collapse = _dll_material_ui__core_collapse_index;
3320
- const PropTypes$h = _dll_prop_types;
3321
- const {renderMath: renderMath$5} = _dll_pie_lib__math_rendering;
3322
- const _jsxFileName$i = "/home/circleci/repo/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx";
3323
- class Collapsible extends React$l.Component {
3324
- constructor(...args) {
3325
- super(...args);
3326
- Collapsible.prototype.__init.call(this);
3327
- Collapsible.prototype.__init2.call(this);
3328
- }
3329
- static __initStatic() {
3330
- this.propTypes = {
3331
- classes: PropTypes$h.object.isRequired,
3332
- className: PropTypes$h.string,
3333
- children: PropTypes$h.object,
3334
- labels: PropTypes$h.shape({
3335
- visible: PropTypes$h.string,
3336
- hidden: PropTypes$h.string
3337
- })
3338
- };
3339
- }
3340
- static __initStatic2() {
3341
- this.defaultProps = {
3342
- labels: {}
3343
- };
3344
- }
3345
- __init() {
3346
- this.state = {
3347
- expanded: false
3348
- };
3349
- }
3350
- __init2() {
3351
- this.toggleExpanded = () => {
3352
- this.setState(state => ({
3353
- expanded: !state.expanded
3354
- }));
3355
- };
3356
- }
3357
- componentDidMount() {
3358
- renderMath$5(this.root);
3359
- }
3360
- componentDidUpdate() {
3361
- renderMath$5(this.root);
3362
- }
3363
- render() {
3364
- const {classes, labels, children, className} = this.props;
3365
- const title = this.state.expanded ? labels.visible || 'Hide' : labels.hidden || 'Show';
3366
- return React$l.createElement('div', {
3367
- className: className,
3368
- ref: r => this.root = r,
3369
- __self: this,
3370
- __source: {
3371
- fileName: _jsxFileName$i,
3372
- lineNumber: 43
3373
- }
3374
- }, React$l.createElement('div', {
3375
- onClick: this.toggleExpanded,
3376
- __self: this,
3377
- __source: {
3378
- fileName: _jsxFileName$i,
3379
- lineNumber: 44
3380
- }
3381
- }, React$l.createElement('span', {
3382
- className: classes.title,
3383
- __self: this,
3384
- __source: {
3385
- fileName: _jsxFileName$i,
3386
- lineNumber: 45
3387
- }
3388
- }, title)), React$l.createElement(Collapse, {
3389
- in: this.state.expanded,
3390
- timeout: "auto",
3391
- unmountOnExit: true,
3392
- className: classes.collapsible,
3393
- __self: this,
3394
- __source: {
3395
- fileName: _jsxFileName$i,
3396
- lineNumber: 47
3397
- }
3398
- }, children));
3399
- }
3400
- }
3401
- Collapsible.__initStatic();
3402
- Collapsible.__initStatic2();
3403
- var Collapsible$1 = withStyles$b(theme => ({
3404
- title: {
3405
- color: theme.palette.primary.light,
3406
- borderBottom: `1px dotted ${theme.palette.primary.light}`
3407
- },
3408
- collapsible: {
3409
- paddingTop: theme.spacing.unit * 2
3410
- }
3411
- }))(Collapsible);
3412
- const React$k = _dll_react;
3413
- const {withStyles: withStyles$a} = _dll_material_ui__core_styles;
3414
- const {createMuiTheme: createMuiTheme} = _dll_material_ui__core_styles;
3415
- const PropTypes$g = _dll_prop_types;
3416
- const _jsxFileName$h = "/home/circleci/repo/node_modules/@pie-lib/render-ui/src/preview-layout.jsx";
3417
- class PreviewLayout extends React$k.Component {
3418
- static __initStatic() {
3419
- this.propTypes = {
3420
- children: PropTypes$g.oneOfType([PropTypes$g.arrayOf(PropTypes$g.node), PropTypes$g.node]).isRequired,
3421
- classes: PropTypes$g.object
3422
- };
3423
- }
3424
- render() {
3425
- const {children, classes} = this.props;
3426
- return React$k.createElement('div', {
3427
- className: classes.container,
3428
- __self: this,
3429
- __source: {
3430
- fileName: _jsxFileName$h,
3431
- lineNumber: 14
3432
- }
3433
- }, children);
3434
- }
3435
- }
3436
- PreviewLayout.__initStatic();
3437
- const styles$4 = () => ({
3438
- container: {
3439
- display: 'flex',
3440
- flexDirection: 'column',
3441
- position: 'relative'
3442
- }
3443
- });
3444
- createMuiTheme({
3445
- typography: {
3446
- useNextVariants: true
3447
- },
3448
- palette: {
3449
- action: {
3450
- disabled: 'rgba(0, 0, 0, 0.54);'
3451
- }
3452
- },
3453
- overrides: {
3454
- MuiRadio: {
3455
- root: {
3456
- '&$checked': {
3457
- color: '#3f51b5 !important'
3458
- }
3459
- }
3460
- },
3461
- MuiCheckbox: {
3462
- root: {
3463
- '&$checked': {
3464
- color: '#3f51b5 !important'
3465
- }
3466
- }
3467
- },
3468
- MuiTabs: {
3469
- root: {
3470
- borderBottom: '1px solid #eee'
3471
- }
3472
- },
3473
- MuiSwitch: {
3474
- root: {
3475
- '&$checked': {
3476
- color: '#3f51b5 !important',
3477
- '& + $bar': {
3478
- backgroundColor: '#3f51b5 !important',
3479
- opacity: 0.5
3480
- }
3481
- }
3482
- }
3483
- }
3484
- }
3485
- });
3486
- withStyles$a(styles$4)(PreviewLayout);
3487
- const React$j = _dll_react;
3488
- const PropTypes$f = _dll_prop_types;
3489
- const {renderMath: renderMath$4} = _dll_pie_lib__math_rendering;
3490
- const _jsxFileName$g = "/home/circleci/repo/node_modules/@pie-lib/render-ui/src/html-and-math.js";
3491
- class HtmlAndMath extends React$j.Component {
3492
- static __initStatic() {
3493
- this.propTypes = {
3494
- tag: PropTypes$f.string,
3495
- className: PropTypes$f.string,
3496
- html: PropTypes$f.string
3497
- };
3498
- }
3499
- static __initStatic2() {
3500
- this.defaultProps = {
3501
- tag: 'div',
3502
- html: ''
3503
- };
3504
- }
3505
- componentDidMount() {
3506
- if (this.node) {
3507
- renderMath$4(this.node);
3508
- }
3509
- }
3510
- componentDidUpdate() {
3511
- if (this.node) {
3512
- renderMath$4(this.node);
3513
- }
3514
- }
3515
- render() {
3516
- const {tag, className, html} = this.props;
3517
- const Tag = tag || 'div';
3518
- return React$j.createElement(Tag, {
3519
- ref: r => this.node = r,
3520
- className: className,
3521
- dangerouslySetInnerHTML: {
3522
- __html: html
3523
- },
3524
- __self: this,
3525
- __source: {
3526
- fileName: _jsxFileName$g,
3527
- lineNumber: 33
3528
- }
3529
- });
3530
- }
3531
- }
3532
- HtmlAndMath.__initStatic();
3533
- HtmlAndMath.__initStatic2();
3534
- const {InputLabel: InputLabel} = _dll_material_ui__core;
3535
- const {FormControl: FormControl} = _dll_material_ui__core;
3536
- const PropTypes$e = _dll_prop_types;
3537
- const React$i = _dll_react;
3538
- const classNames$2 = _dll_classnames;
3539
- const {withStyles: withStyles$9} = _dll_material_ui__core_styles;
3540
- const _jsxFileName$f = "/home/circleci/repo/node_modules/@pie-lib/render-ui/src/input-container.jsx";
3541
- const RawInputContainer = props => {
3542
- const {label, className, children, classes} = props;
3543
- const names = classNames$2(classes.formControl, className);
3544
- return React$i.createElement(FormControl, {
3545
- className: names,
3546
- __self: undefined,
3547
- __source: {
3548
- fileName: _jsxFileName$f,
3549
- lineNumber: 13
3550
- }
3551
- }, React$i.createElement(InputLabel, {
3552
- className: classes.label,
3553
- shrink: true,
3554
- __self: undefined,
3555
- __source: {
3556
- fileName: _jsxFileName$f,
3557
- lineNumber: 14
3558
- }
3559
- }, label), children);
3560
- };
3561
- RawInputContainer.propTypes = {
3562
- label: PropTypes$e.oneOfType([PropTypes$e.string, PropTypes$e.object]).isRequired,
3563
- className: PropTypes$e.string,
3564
- children: PropTypes$e.oneOfType([PropTypes$e.arrayOf(PropTypes$e.node), PropTypes$e.node]).isRequired,
3565
- classes: PropTypes$e.object.isRequired
3566
- };
3567
- withStyles$9(theme => ({
3568
- formControl: {
3569
- marginLeft: 0,
3570
- marginRight: theme.spacing.unit,
3571
- paddingBottom: theme.spacing.unit,
3572
- flex: '1 0 auto',
3573
- minWidth: theme.spacing.unit * 4
3574
- },
3575
- label: {
3576
- fontSize: 'inherit',
3577
- whiteSpace: 'nowrap'
3578
- }
3579
- }))(RawInputContainer);
3580
- const React$h = _dll_react;
3581
- const {Component: Component} = _dll_react;
3582
- const {withStyles: withStyles$8} = _dll_material_ui__core_styles;
3583
- const PropTypes$d = _dll_prop_types;
3584
- const _jsxFileName$e = "/home/circleci/repo/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx";
3585
- const NEWLINE_BLOCK_REGEX = /\\embed\{newLine\}\[\]/g;
3586
- const NEWLINE_LATEX = '\\newline ';
3587
- class PreviewPrompt extends Component {
3588
- constructor(...args) {
3589
- super(...args);
3590
- PreviewPrompt.prototype.__init.call(this);
3591
- }
3592
- static __initStatic() {
3593
- this.propTypes = {
3594
- classes: PropTypes$d.object,
3595
- prompt: PropTypes$d.string,
3596
- tagName: PropTypes$d.string,
3597
- className: PropTypes$d.string,
3598
- onClick: PropTypes$d.func,
3599
- defaultClassName: PropTypes$d.string
3600
- };
3601
- }
3602
- static __initStatic2() {
3603
- this.defaultProps = {
3604
- onClick: () => {}
3605
- };
3606
- }
3607
- __init() {
3608
- this.parsedText = text => {
3609
- const div = document.createElement('div');
3610
- div.innerHTML = text;
3611
- const audio = div.querySelector('audio');
3612
- if (audio) {
3613
- const source = document.createElement('source');
3614
- source.setAttribute('type', 'audio/mp3');
3615
- source.setAttribute('src', audio.getAttribute('src'));
3616
- audio.removeAttribute('src');
3617
- audio.appendChild(source);
3618
- }
3619
- return div.innerHTML;
3620
- };
3621
- }
3622
- render() {
3623
- const {prompt, classes, tagName, className, onClick, defaultClassName} = this.props;
3624
- const CustomTag = tagName || 'div';
3625
- const customClasses = `${classes.promptTable} ${classes[className] || ''} ${defaultClassName || ''}`;
3626
- return React$h.createElement(CustomTag, {
3627
- onClick: onClick,
3628
- className: customClasses,
3629
- dangerouslySetInnerHTML: {
3630
- __html: this.parsedText(prompt || '').replace(NEWLINE_BLOCK_REGEX, NEWLINE_LATEX)
3631
- },
3632
- __self: this,
3633
- __source: {
3634
- fileName: _jsxFileName$e,
3635
- lineNumber: 50
3636
- }
3637
- });
3638
- }
3639
- }
3640
- PreviewPrompt.__initStatic();
3641
- PreviewPrompt.__initStatic2();
3642
- const styles$3 = theme => ({
3643
- prompt: {
3644
- verticalAlign: 'middle',
3645
- color: text()
3646
- },
3647
- rationale: {
3648
- paddingLeft: theme.spacing.unit * 16
3649
- },
3650
- label: {
3651
- color: `${text()} !important`,
3652
- display: 'inline-block',
3653
- verticalAlign: 'middle',
3654
- cursor: 'pointer'
3655
- },
3656
- promptTable: {
3657
- '&:not(.MathJax) > table': {
3658
- borderCollapse: 'collapse'
3659
- },
3660
- '&:not(.MathJax) > table tr': {
3661
- '&:nth-child(2n)': {
3662
- backgroundColor: '#f6f8fa'
3663
- }
3664
- },
3665
- '&:not(.MathJax) > table td, &:not(.MathJax) > table th': {
3666
- padding: '.6em 1em',
3667
- textAlign: 'center'
3668
- }
3669
- }
3670
- });
3671
- var PreviewPrompt$1 = withStyles$8(styles$3)(PreviewPrompt);
3672
- const PropTypes$c = _dll_prop_types;
3673
- const React$g = _dll_react;
3674
- const Readable = props => {
3675
- return React$g.createElement(React$g.Fragment, null, React$g.Children.map(props.children, child => React$g.cloneElement(child, {
3676
- 'data-pie-readable': props.false === undefined
3677
- })));
3678
- };
3679
- Readable.propTypes = {
3680
- children: PropTypes$c.node,
3681
- false: PropTypes$c.bool
3682
- };
3683
- const PropTypes$b = _dll_prop_types;
3684
- ({
3685
- children: PropTypes$b.node,
3686
- purpose: PropTypes$b.string
3687
- });
3688
- const dp = new DOMParser();
3689
- const markupToText = s => {
3690
- const root = dp.parseFromString(s, 'text/html');
3691
- return root.body.textContent;
3692
- };
3693
- const hasText = s => {
3694
- if (!s) {
3695
- return false;
3696
- }
3697
- const tc = markupToText(s);
3698
- return !!(tc && tc.trim());
3699
- };
3700
- const noTouch = {
3701
- '-webkit-touchCcallout': 'none',
3702
- '-webkit-user-select': 'none',
3703
- '-khtml-user-select': 'none',
3704
- '-moz-user-select': 'none',
3705
- '-ms-user-select': 'none',
3706
- 'user-select': 'none'
3707
- };
3708
- var styles$2 = {
3709
- root: {
3710
- width: '100%',
3711
- cursor: 'pointer'
3712
- },
3713
- content: {
3714
- margin: '0 auto',
3715
- textAlign: 'center',
3716
- display: 'flex'
3717
- },
3718
- label: Object.assign({
3719
- width: '140px',
3720
- fontFamily: "'Roboto', sans-serif",
3721
- height: '25px',
3722
- lineHeight: '25px',
3723
- verticalAlign: 'middle',
3724
- color: `var(--correct-answer-toggle-label-color, ${text()})`,
3725
- fontSize: '15px',
3726
- fontWeight: 'normal'
3727
- }, noTouch),
3728
- icon: {
3729
- position: 'absolute',
3730
- width: '25px'
3731
- },
3732
- iconHolder: {
3733
- width: '25px',
3734
- marginRight: '5px'
3735
- },
3736
- enter: {
3737
- opacity: '0'
3738
- },
3739
- enterActive: {
3740
- opacity: '1',
3741
- transition: 'opacity 0.3s ease-in'
3742
- },
3743
- exit: {
3744
- opacity: '1'
3745
- },
3746
- exitActive: {
3747
- opacity: '0',
3748
- transition: 'opacity 0.3s ease-in'
3749
- }
3750
- };
3751
- const React$f = _dll_react;
3752
- const PropTypes$a = _dll_prop_types;
3753
- const {withStyles: withStyles$7} = _dll_material_ui__core_styles;
3754
- const _jsxFileName$d = "/home/circleci/repo/node_modules/@pie-lib/correct-answer-toggle/src/expander.jsx";
3755
- const Expander = props => {
3756
- const {classes, show, children} = props;
3757
- return React$f.createElement(reactTransitionGroup.CSSTransition, {
3758
- in: show,
3759
- appear: true,
3760
- mountOnEnter: false,
3761
- timeout: 300,
3762
- classNames: {
3763
- ...classes
3764
- },
3765
- __self: undefined,
3766
- __source: {
3767
- fileName: _jsxFileName$d,
3768
- lineNumber: 10
3769
- }
3770
- }, React$f.createElement('div', {
3771
- className: classes.expander,
3772
- __self: undefined,
3773
- __source: {
3774
- fileName: _jsxFileName$d,
3775
- lineNumber: 17
3776
- }
3777
- }, children));
3778
- };
3779
- Expander.propTypes = {
3780
- show: PropTypes$a.bool.isRequired,
3781
- className: PropTypes$a.string,
3782
- classes: PropTypes$a.object,
3783
- children: PropTypes$a.oneOfType([PropTypes$a.arrayOf(PropTypes$a.node), PropTypes$a.node]).isRequired
3784
- };
3785
- const transition = 'height ease-in 300ms, opacity ease-in 300ms';
3786
- var Expander$1 = withStyles$7(() => ({
3787
- expander: {
3788
- position: 'relative',
3789
- height: 0,
3790
- overflow: 'hidden',
3791
- display: 'flex',
3792
- visibility: 'hidden',
3793
- width: 0
3794
- },
3795
- enter: {
3796
- transition,
3797
- opacity: 1,
3798
- height: '25px',
3799
- width: 'auto',
3800
- visibility: 'visible'
3801
- },
3802
- enterDone: {
3803
- height: '25px',
3804
- visibility: 'visible',
3805
- width: 'auto'
3806
- },
3807
- exit: {
3808
- transition,
3809
- opacity: 0,
3810
- height: 0,
3811
- visibility: 'visible',
3812
- width: 0
3813
- },
3814
- exitDone: {
3815
- opacity: 0,
3816
- visibility: 'hidden',
3817
- height: 0,
3818
- width: 0
3819
- }
3820
- }))(Expander);
3821
- const {withStyles: withStyles$6} = _dll_material_ui__core_styles;
3822
- const React$e = _dll_react;
3823
- const classNames$1 = _dll_classnames;
3824
- const PropTypes$9 = _dll_prop_types;
3825
- const _jsxFileName$c = "/home/circleci/repo/node_modules/@pie-lib/correct-answer-toggle/src/index.jsx";
3826
- class CorrectAnswerToggle extends React$e.Component {
3827
- static __initStatic() {
3828
- this.propTypes = {
3829
- onToggle: PropTypes$9.func,
3830
- toggled: PropTypes$9.bool,
3831
- show: PropTypes$9.bool,
3832
- hideMessage: PropTypes$9.string,
3833
- showMessage: PropTypes$9.string,
3834
- classes: PropTypes$9.object.isRequired,
3835
- className: PropTypes$9.string
3836
- };
3837
- }
3838
- static __initStatic2() {
3839
- this.defaultProps = {
3840
- showMessage: 'Show correct answer',
3841
- hideMessage: 'Hide correct answer',
3842
- show: false,
3843
- toggled: false
3844
- };
3845
- }
3846
- constructor(props) {
3847
- super(props);
3848
- this.state = {
3849
- show: props.show
3850
- };
3851
- }
3852
- onClick() {
3853
- this.props.onToggle(!this.props.toggled);
3854
- }
3855
- componentWillReceiveProps(nextProps) {
3856
- this.setState({
3857
- show: nextProps.show
3858
- });
3859
- }
3860
- render() {
3861
- const {classes, className, toggled, hideMessage, showMessage} = this.props;
3862
- return React$e.createElement('div', {
3863
- className: classNames$1(classes.root, className),
3864
- __self: this,
3865
- __source: {
3866
- fileName: _jsxFileName$c,
3867
- lineNumber: 52
3868
- }
3869
- }, React$e.createElement(Expander$1, {
3870
- show: this.state.show,
3871
- className: classes.expander,
3872
- __self: this,
3873
- __source: {
3874
- fileName: _jsxFileName$c,
3875
- lineNumber: 53
3876
- }
3877
- }, React$e.createElement('div', {
3878
- className: classes.content,
3879
- onClick: this.onClick.bind(this),
3880
- __self: this,
3881
- __source: {
3882
- fileName: _jsxFileName$c,
3883
- lineNumber: 54
3884
- }
3885
- }, React$e.createElement('div', {
3886
- className: classes.iconHolder,
3887
- __self: this,
3888
- __source: {
3889
- fileName: _jsxFileName$c,
3890
- lineNumber: 55
3891
- }
3892
- }, React$e.createElement(CSSTransition, {
3893
- timeout: 400,
3894
- in: toggled,
3895
- exit: !toggled,
3896
- classNames: classes,
3897
- __self: this,
3898
- __source: {
3899
- fileName: _jsxFileName$c,
3900
- lineNumber: 56
3901
- }
3902
- }, React$e.createElement(CorrectResponse$1, {
3903
- open: toggled,
3904
- key: "correct-open",
3905
- className: classes.icon,
3906
- __self: this,
3907
- __source: {
3908
- fileName: _jsxFileName$c,
3909
- lineNumber: 57
3910
- }
3911
- })), React$e.createElement(CSSTransition, {
3912
- timeout: 5000,
3913
- in: !toggled,
3914
- exit: toggled,
3915
- classNames: classes,
3916
- __self: this,
3917
- __source: {
3918
- fileName: _jsxFileName$c,
3919
- lineNumber: 59
3920
- }
3921
- }, React$e.createElement(CorrectResponse$1, {
3922
- open: toggled,
3923
- key: "correct-closed",
3924
- className: classes.icon,
3925
- __self: this,
3926
- __source: {
3927
- fileName: _jsxFileName$c,
3928
- lineNumber: 60
3929
- }
3930
- }))), React$e.createElement(Readable, {
3931
- false: true,
3932
- __self: this,
3933
- __source: {
3934
- fileName: _jsxFileName$c,
3935
- lineNumber: 63
3936
- }
3937
- }, React$e.createElement('div', {
3938
- className: classes.label,
3939
- __self: this,
3940
- __source: {
3941
- fileName: _jsxFileName$c,
3942
- lineNumber: 64
3943
- }
3944
- }, toggled ? hideMessage : showMessage)))));
3945
- }
3946
- }
3947
- CorrectAnswerToggle.__initStatic();
3948
- CorrectAnswerToggle.__initStatic2();
3949
- var CorrectAnswerToggle$1 = withStyles$6(styles$2)(CorrectAnswerToggle);
1
+ import {_dll_debug, _dll_lodash, _dll_react, _dll_react_dom_server, _dll_prop_types, _dll_material_ui__core_styles, _dll_material_ui__core, _dll_classnames, _dll_react_dom, _dll_pie_lib__render_ui, _dll_pie_lib__correct_answer_toggle} from "../../../@pie-lib/shared-module@^1.2.17/module/index.js";
2
+ import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.20/module/index.js";
3
+ import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.18/module/index.js";
4
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
3950
5
  var toString$1 = Object.prototype.toString;
3951
6
  var typeOf = function (val) {
3952
7
  switch (toString$1.call(val)) {
@@ -17294,6 +13349,7 @@ const debug$1 = _dll_debug;
17294
13349
  const {withStyles: withStyles$3} = _dll_material_ui__core_styles;
17295
13350
  const {Chip: Chip} = _dll_material_ui__core;
17296
13351
  const classnames$1 = _dll_classnames;
13352
+ const {color: color$3} = _dll_pie_lib__render_ui;
17297
13353
  const {renderMath: renderMath$2} = _dll_pie_lib__math_rendering;
17298
13354
  const {DragSource: DragSource} = _dll_pie_lib__drag;
17299
13355
  const {DropTarget: DropTarget} = _dll_pie_lib__drag;
@@ -17302,7 +13358,7 @@ const log$1 = debug$1('pie-lib:mask-markup:blank');
17302
13358
  const DRAG_TYPE = 'MaskBlank';
17303
13359
  const useStyles = withStyles$3(() => ({
17304
13360
  content: {
17305
- border: `solid 0px ${primary()}`,
13361
+ border: `solid 0px ${color$3.primary()}`,
17306
13362
  minWidth: '200px'
17307
13363
  },
17308
13364
  chip: {
@@ -17329,10 +13385,10 @@ const useStyles = withStyles$3(() => ({
17329
13385
  maxWidth: '60px'
17330
13386
  },
17331
13387
  correct: {
17332
- border: `solid 1px ${correct()}`
13388
+ border: `solid 1px ${color$3.correct()}`
17333
13389
  },
17334
13390
  incorrect: {
17335
- border: `solid 1px ${incorrect()}`
13391
+ border: `solid 1px ${color$3.incorrect()}`
17336
13392
  },
17337
13393
  over: {
17338
13394
  whiteSpace: 'nowrap',
@@ -17645,14 +13701,15 @@ const React$6 = _dll_react;
17645
13701
  const {OutlinedInput: OutlinedInput} = _dll_material_ui__core;
17646
13702
  const classnames = _dll_classnames;
17647
13703
  const {withStyles: withStyles$2} = _dll_material_ui__core_styles;
13704
+ const {color: color$2} = _dll_pie_lib__render_ui;
17648
13705
  const _jsxFileName$5 = "/home/circleci/repo/node_modules/@pie-lib/mask-markup/src/components/correct-input.jsx";
17649
13706
  const correctStyle = color => ({
17650
13707
  borderColor: `${color} !important`
17651
13708
  });
17652
13709
  var CorrectInput = withStyles$2(() => ({
17653
13710
  input: {
17654
- color: text(),
17655
- backgroundColor: background(),
13711
+ color: color$2.text(),
13712
+ backgroundColor: color$2.background(),
17656
13713
  borderRadius: '4px !important',
17657
13714
  borderWidth: '1px',
17658
13715
  borderStyle: 'solid',
@@ -17662,20 +13719,20 @@ var CorrectInput = withStyles$2(() => ({
17662
13719
  cursor: 'not-allowed !important'
17663
13720
  },
17664
13721
  '&:hover': {
17665
- borderColor: primary(),
13722
+ borderColor: color$2.primary(),
17666
13723
  '&:disabled': {
17667
13724
  borderColor: 'initial'
17668
13725
  }
17669
13726
  },
17670
13727
  '&:focus': {
17671
- borderColor: primaryDark()
13728
+ borderColor: color$2.primaryDark()
17672
13729
  }
17673
13730
  },
17674
13731
  crInput: {
17675
13732
  padding: '8px !important'
17676
13733
  },
17677
- correct: correctStyle(correct()),
17678
- incorrect: correctStyle(incorrect()),
13734
+ correct: correctStyle(color$2.correct()),
13735
+ incorrect: correctStyle(color$2.incorrect()),
17679
13736
  box: {
17680
13737
  fontSize: 'inherit'
17681
13738
  },
@@ -17687,7 +13744,7 @@ var CorrectInput = withStyles$2(() => ({
17687
13744
  }
17688
13745
  },
17689
13746
  notchedOutline: {
17690
- borderColor: correct()
13747
+ borderColor: color$2.correct()
17691
13748
  }
17692
13749
  }))(props => {
17693
13750
  const {correct, charactersLimit, classes, disabled, isBox, isConstructedResponse, width, ...rest} = props;
@@ -17788,6 +13845,7 @@ const PropTypes$1 = _dll_prop_types;
17788
13845
  const {Select: Select} = _dll_material_ui__core;
17789
13846
  const {MenuItem: MenuItem} = _dll_material_ui__core;
17790
13847
  const {withStyles: withStyles$1} = _dll_material_ui__core_styles;
13848
+ const {color: color$1} = _dll_pie_lib__render_ui;
17791
13849
  const _jsxFileName$2 = "/home/circleci/repo/node_modules/@pie-lib/mask-markup/src/components/dropdown.jsx";
17792
13850
  class Dropdown extends React$3.Component {
17793
13851
  static __initStatic() {
@@ -17903,16 +13961,16 @@ class Dropdown extends React$3.Component {
17903
13961
  Dropdown.__initStatic();
17904
13962
  const styles$1 = () => ({
17905
13963
  root: {
17906
- color: text(),
17907
- backgroundColor: background(),
17908
- borderColor: secondaryLight(),
13964
+ color: color$1.text(),
13965
+ backgroundColor: color$1.background(),
13966
+ borderColor: color$1.secondaryLight(),
17909
13967
  '& ul': {
17910
13968
  paddingTop: 0,
17911
13969
  paddingBottom: 0,
17912
- border: `1px solid ${text()}`,
13970
+ border: `1px solid ${color$1.text()}`,
17913
13971
  borderRadius: '5px',
17914
- color: text(),
17915
- backgroundColor: background()
13972
+ color: color$1.text(),
13973
+ backgroundColor: color$1.background()
17916
13974
  }
17917
13975
  },
17918
13976
  select: {
@@ -17921,7 +13979,7 @@ const styles$1 = () => ({
17921
13979
  }
17922
13980
  },
17923
13981
  selectMenu: {
17924
- backgroundColor: background(),
13982
+ backgroundColor: color$1.background(),
17925
13983
  '&:hover': {
17926
13984
  borderColor: 'initial'
17927
13985
  },
@@ -17930,26 +13988,26 @@ const styles$1 = () => ({
17930
13988
  }
17931
13989
  },
17932
13990
  icon: {
17933
- color: text()
13991
+ color: color$1.text()
17934
13992
  },
17935
13993
  selected: {
17936
- color: `${text()} !important`,
17937
- backgroundColor: `${background()} !important`,
13994
+ color: `${color$1.text()} !important`,
13995
+ backgroundColor: `${color$1.background()} !important`,
17938
13996
  '&:hover': {
17939
- color: text(),
17940
- backgroundColor: `${secondaryLight()} !important`
13997
+ color: color$1.text(),
13998
+ backgroundColor: `${color$1.secondaryLight()} !important`
17941
13999
  }
17942
14000
  },
17943
14001
  menuRoot: {
17944
- color: text(),
17945
- backgroundColor: background(),
14002
+ color: color$1.text(),
14003
+ backgroundColor: color$1.background(),
17946
14004
  '&:focus': {
17947
- color: text(),
17948
- backgroundColor: background()
14005
+ color: color$1.text(),
14006
+ backgroundColor: color$1.background()
17949
14007
  },
17950
14008
  '&:hover': {
17951
- color: text(),
17952
- backgroundColor: secondaryLight()
14009
+ color: color$1.text(),
14010
+ backgroundColor: color$1.secondaryLight()
17953
14011
  },
17954
14012
  boxSizing: 'border-box',
17955
14013
  padding: '25px',
@@ -17995,6 +14053,11 @@ const PropTypes = _dll_prop_types;
17995
14053
  const {debounce: debounce$1} = _dll_lodash;
17996
14054
  const {isEmpty: isEmpty} = _dll_lodash;
17997
14055
  const {isEqual: isEqual} = _dll_lodash;
14056
+ const CorrectAnswerToggle = _dll_pie_lib__correct_answer_toggle;
14057
+ const {color: color} = _dll_pie_lib__render_ui;
14058
+ const {Collapsible: Collapsible} = _dll_pie_lib__render_ui;
14059
+ const {hasText: hasText} = _dll_pie_lib__render_ui;
14060
+ const {PreviewPrompt: PreviewPrompt} = _dll_pie_lib__render_ui;
17998
14061
  const {withStyles: withStyles} = _dll_material_ui__core_styles;
17999
14062
  const classNames = _dll_classnames;
18000
14063
  const _jsxFileName = "/home/circleci/repo/packages/explicit-constructed-response/src/main.js";
@@ -18085,7 +14148,7 @@ class Main extends React$1.Component {
18085
14148
  const mainClasses = classNames([classes.mainContainer, {
18086
14149
  [classes.noBorderColor]: alwaysShowCorrect
18087
14150
  }]);
18088
- const teacherInstructionsDiv = React$1.createElement(PreviewPrompt$1, {
14151
+ const teacherInstructionsDiv = React$1.createElement(PreviewPrompt, {
18089
14152
  defaultClassName: "teacher-instructions",
18090
14153
  prompt: teacherInstructions,
18091
14154
  __self: this,
@@ -18094,7 +14157,7 @@ class Main extends React$1.Component {
18094
14157
  lineNumber: 97
18095
14158
  }
18096
14159
  });
18097
- const rationaleDiv = React$1.createElement(PreviewPrompt$1, {
14160
+ const rationaleDiv = React$1.createElement(PreviewPrompt, {
18098
14161
  prompt: rationale,
18099
14162
  __self: this,
18100
14163
  __source: {
@@ -18119,7 +14182,7 @@ class Main extends React$1.Component {
18119
14182
  fileName: _jsxFileName,
18120
14183
  lineNumber: 105
18121
14184
  }
18122
- }, !animationsDisabled ? React$1.createElement(Collapsible$1, {
14185
+ }, !animationsDisabled ? React$1.createElement(Collapsible, {
18123
14186
  labels: {
18124
14187
  hidden: 'Show Teacher Instructions',
18125
14188
  visible: 'Hide Teacher Instructions'
@@ -18129,7 +14192,7 @@ class Main extends React$1.Component {
18129
14192
  fileName: _jsxFileName,
18130
14193
  lineNumber: 106
18131
14194
  }
18132
- }, teacherInstructionsDiv) : teacherInstructionsDiv), !alwaysShowCorrect && React$1.createElement(CorrectAnswerToggle$1, {
14195
+ }, teacherInstructionsDiv) : teacherInstructionsDiv), !alwaysShowCorrect && React$1.createElement(CorrectAnswerToggle, {
18133
14196
  show: mode === 'evaluate',
18134
14197
  toggled: showCorrectAnswer,
18135
14198
  onToggle: this.toggleShowCorrect,
@@ -18138,7 +14201,7 @@ class Main extends React$1.Component {
18138
14201
  fileName: _jsxFileName,
18139
14202
  lineNumber: 115
18140
14203
  }
18141
- }), prompt && React$1.createElement(PreviewPrompt$1, {
14204
+ }), prompt && React$1.createElement(PreviewPrompt, {
18142
14205
  prompt: prompt,
18143
14206
  __self: this,
18144
14207
  __source: {
@@ -18174,7 +14237,7 @@ class Main extends React$1.Component {
18174
14237
  fileName: _jsxFileName,
18175
14238
  lineNumber: 136
18176
14239
  }
18177
- }, !animationsDisabled ? React$1.createElement(Collapsible$1, {
14240
+ }, !animationsDisabled ? React$1.createElement(Collapsible, {
18178
14241
  labels: {
18179
14242
  hidden: 'Show Rationale',
18180
14243
  visible: 'Hide Rationale'
@@ -18192,8 +14255,8 @@ Main.__initStatic2();
18192
14255
  const styles = theme => ({
18193
14256
  mainContainer: {
18194
14257
  padding: theme.spacing.unit,
18195
- color: text(),
18196
- backgroundColor: background()
14258
+ color: color.text(),
14259
+ backgroundColor: color.background()
18197
14260
  },
18198
14261
  inlineDisplay: {
18199
14262
  display: 'inline-block'
@@ -18209,7 +14272,7 @@ const styles = theme => ({
18209
14272
  },
18210
14273
  noBorderColor: {
18211
14274
  '& *': {
18212
- borderColor: `${text()} !important`
14275
+ borderColor: `${color.text()} !important`
18213
14276
  }
18214
14277
  }
18215
14278
  });