@pie-element/graphing 4.4.4-next.8 → 4.4.4-next.88
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/configure/lib/configure.js +6 -2
- package/configure/lib/configure.js.map +1 -1
- package/configure/lib/correct-response.js +37 -12
- package/configure/lib/correct-response.js.map +1 -1
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/graphing-config.js +0 -1
- package/configure/lib/graphing-config.js.map +1 -1
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/utils.js +26 -26
- package/configure/lib/utils.js.map +1 -1
- package/configure/package.json +3 -3
- package/controller/lib/defaults.js.map +1 -1
- package/controller/lib/index.js +34 -0
- package/controller/lib/index.js.map +1 -1
- package/controller/lib/utils.js.map +1 -1
- package/docs/config-schema.json.md +1 -1
- package/docs/demo/config.js +2 -2
- package/docs/demo/generate.js +24 -20
- package/docs/pie-schema.json +0 -360
- package/docs/pie-schema.json.md +1 -25
- package/lib/index.js.map +1 -1
- package/lib/main.js.map +1 -1
- package/lib/utils.js.map +1 -1
- package/package.json +3 -3
package/docs/pie-schema.json
CHANGED
|
@@ -105,46 +105,6 @@
|
|
|
105
105
|
"y"
|
|
106
106
|
]
|
|
107
107
|
},
|
|
108
|
-
"center": {
|
|
109
|
-
"title": "Point",
|
|
110
|
-
"type": "object",
|
|
111
|
-
"properties": {
|
|
112
|
-
"x": {
|
|
113
|
-
"description": "Indicates x coordinate",
|
|
114
|
-
"type": "number",
|
|
115
|
-
"title": "x"
|
|
116
|
-
},
|
|
117
|
-
"y": {
|
|
118
|
-
"description": "Indicates y coordinate",
|
|
119
|
-
"type": "number",
|
|
120
|
-
"title": "y"
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
"required": [
|
|
124
|
-
"x",
|
|
125
|
-
"y"
|
|
126
|
-
]
|
|
127
|
-
},
|
|
128
|
-
"outerPoint": {
|
|
129
|
-
"title": "Point",
|
|
130
|
-
"type": "object",
|
|
131
|
-
"properties": {
|
|
132
|
-
"x": {
|
|
133
|
-
"description": "Indicates x coordinate",
|
|
134
|
-
"type": "number",
|
|
135
|
-
"title": "x"
|
|
136
|
-
},
|
|
137
|
-
"y": {
|
|
138
|
-
"description": "Indicates y coordinate",
|
|
139
|
-
"type": "number",
|
|
140
|
-
"title": "y"
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
"required": [
|
|
144
|
-
"x",
|
|
145
|
-
"y"
|
|
146
|
-
]
|
|
147
|
-
},
|
|
148
108
|
"closed": {
|
|
149
109
|
"description": "Indicates if mark is closed if type is polygon, sine",
|
|
150
110
|
"type": "boolean",
|
|
@@ -337,46 +297,6 @@
|
|
|
337
297
|
"y"
|
|
338
298
|
]
|
|
339
299
|
},
|
|
340
|
-
"center": {
|
|
341
|
-
"title": "Point",
|
|
342
|
-
"type": "object",
|
|
343
|
-
"properties": {
|
|
344
|
-
"x": {
|
|
345
|
-
"description": "Indicates x coordinate",
|
|
346
|
-
"type": "number",
|
|
347
|
-
"title": "x"
|
|
348
|
-
},
|
|
349
|
-
"y": {
|
|
350
|
-
"description": "Indicates y coordinate",
|
|
351
|
-
"type": "number",
|
|
352
|
-
"title": "y"
|
|
353
|
-
}
|
|
354
|
-
},
|
|
355
|
-
"required": [
|
|
356
|
-
"x",
|
|
357
|
-
"y"
|
|
358
|
-
]
|
|
359
|
-
},
|
|
360
|
-
"outerPoint": {
|
|
361
|
-
"title": "Point",
|
|
362
|
-
"type": "object",
|
|
363
|
-
"properties": {
|
|
364
|
-
"x": {
|
|
365
|
-
"description": "Indicates x coordinate",
|
|
366
|
-
"type": "number",
|
|
367
|
-
"title": "x"
|
|
368
|
-
},
|
|
369
|
-
"y": {
|
|
370
|
-
"description": "Indicates y coordinate",
|
|
371
|
-
"type": "number",
|
|
372
|
-
"title": "y"
|
|
373
|
-
}
|
|
374
|
-
},
|
|
375
|
-
"required": [
|
|
376
|
-
"x",
|
|
377
|
-
"y"
|
|
378
|
-
]
|
|
379
|
-
},
|
|
380
300
|
"closed": {
|
|
381
301
|
"description": "Indicates if mark is closed if type is polygon, sine",
|
|
382
302
|
"type": "boolean",
|
|
@@ -588,46 +508,6 @@
|
|
|
588
508
|
"y"
|
|
589
509
|
]
|
|
590
510
|
},
|
|
591
|
-
"center": {
|
|
592
|
-
"title": "Point",
|
|
593
|
-
"type": "object",
|
|
594
|
-
"properties": {
|
|
595
|
-
"x": {
|
|
596
|
-
"description": "Indicates x coordinate",
|
|
597
|
-
"type": "number",
|
|
598
|
-
"title": "x"
|
|
599
|
-
},
|
|
600
|
-
"y": {
|
|
601
|
-
"description": "Indicates y coordinate",
|
|
602
|
-
"type": "number",
|
|
603
|
-
"title": "y"
|
|
604
|
-
}
|
|
605
|
-
},
|
|
606
|
-
"required": [
|
|
607
|
-
"x",
|
|
608
|
-
"y"
|
|
609
|
-
]
|
|
610
|
-
},
|
|
611
|
-
"outerPoint": {
|
|
612
|
-
"title": "Point",
|
|
613
|
-
"type": "object",
|
|
614
|
-
"properties": {
|
|
615
|
-
"x": {
|
|
616
|
-
"description": "Indicates x coordinate",
|
|
617
|
-
"type": "number",
|
|
618
|
-
"title": "x"
|
|
619
|
-
},
|
|
620
|
-
"y": {
|
|
621
|
-
"description": "Indicates y coordinate",
|
|
622
|
-
"type": "number",
|
|
623
|
-
"title": "y"
|
|
624
|
-
}
|
|
625
|
-
},
|
|
626
|
-
"required": [
|
|
627
|
-
"x",
|
|
628
|
-
"y"
|
|
629
|
-
]
|
|
630
|
-
},
|
|
631
511
|
"closed": {
|
|
632
512
|
"description": "Indicates if mark is closed if type is polygon, sine",
|
|
633
513
|
"type": "boolean",
|
|
@@ -820,46 +700,6 @@
|
|
|
820
700
|
"y"
|
|
821
701
|
]
|
|
822
702
|
},
|
|
823
|
-
"center": {
|
|
824
|
-
"title": "Point",
|
|
825
|
-
"type": "object",
|
|
826
|
-
"properties": {
|
|
827
|
-
"x": {
|
|
828
|
-
"description": "Indicates x coordinate",
|
|
829
|
-
"type": "number",
|
|
830
|
-
"title": "x"
|
|
831
|
-
},
|
|
832
|
-
"y": {
|
|
833
|
-
"description": "Indicates y coordinate",
|
|
834
|
-
"type": "number",
|
|
835
|
-
"title": "y"
|
|
836
|
-
}
|
|
837
|
-
},
|
|
838
|
-
"required": [
|
|
839
|
-
"x",
|
|
840
|
-
"y"
|
|
841
|
-
]
|
|
842
|
-
},
|
|
843
|
-
"outerPoint": {
|
|
844
|
-
"title": "Point",
|
|
845
|
-
"type": "object",
|
|
846
|
-
"properties": {
|
|
847
|
-
"x": {
|
|
848
|
-
"description": "Indicates x coordinate",
|
|
849
|
-
"type": "number",
|
|
850
|
-
"title": "x"
|
|
851
|
-
},
|
|
852
|
-
"y": {
|
|
853
|
-
"description": "Indicates y coordinate",
|
|
854
|
-
"type": "number",
|
|
855
|
-
"title": "y"
|
|
856
|
-
}
|
|
857
|
-
},
|
|
858
|
-
"required": [
|
|
859
|
-
"x",
|
|
860
|
-
"y"
|
|
861
|
-
]
|
|
862
|
-
},
|
|
863
703
|
"closed": {
|
|
864
704
|
"description": "Indicates if mark is closed if type is polygon, sine",
|
|
865
705
|
"type": "boolean",
|
|
@@ -1101,46 +941,6 @@
|
|
|
1101
941
|
"y"
|
|
1102
942
|
]
|
|
1103
943
|
},
|
|
1104
|
-
"center": {
|
|
1105
|
-
"title": "Point",
|
|
1106
|
-
"type": "object",
|
|
1107
|
-
"properties": {
|
|
1108
|
-
"x": {
|
|
1109
|
-
"description": "Indicates x coordinate",
|
|
1110
|
-
"type": "number",
|
|
1111
|
-
"title": "x"
|
|
1112
|
-
},
|
|
1113
|
-
"y": {
|
|
1114
|
-
"description": "Indicates y coordinate",
|
|
1115
|
-
"type": "number",
|
|
1116
|
-
"title": "y"
|
|
1117
|
-
}
|
|
1118
|
-
},
|
|
1119
|
-
"required": [
|
|
1120
|
-
"x",
|
|
1121
|
-
"y"
|
|
1122
|
-
]
|
|
1123
|
-
},
|
|
1124
|
-
"outerPoint": {
|
|
1125
|
-
"title": "Point",
|
|
1126
|
-
"type": "object",
|
|
1127
|
-
"properties": {
|
|
1128
|
-
"x": {
|
|
1129
|
-
"description": "Indicates x coordinate",
|
|
1130
|
-
"type": "number",
|
|
1131
|
-
"title": "x"
|
|
1132
|
-
},
|
|
1133
|
-
"y": {
|
|
1134
|
-
"description": "Indicates y coordinate",
|
|
1135
|
-
"type": "number",
|
|
1136
|
-
"title": "y"
|
|
1137
|
-
}
|
|
1138
|
-
},
|
|
1139
|
-
"required": [
|
|
1140
|
-
"x",
|
|
1141
|
-
"y"
|
|
1142
|
-
]
|
|
1143
|
-
},
|
|
1144
944
|
"closed": {
|
|
1145
945
|
"description": "Indicates if mark is closed if type is polygon, sine",
|
|
1146
946
|
"type": "boolean",
|
|
@@ -1333,46 +1133,6 @@
|
|
|
1333
1133
|
"y"
|
|
1334
1134
|
]
|
|
1335
1135
|
},
|
|
1336
|
-
"center": {
|
|
1337
|
-
"title": "Point",
|
|
1338
|
-
"type": "object",
|
|
1339
|
-
"properties": {
|
|
1340
|
-
"x": {
|
|
1341
|
-
"description": "Indicates x coordinate",
|
|
1342
|
-
"type": "number",
|
|
1343
|
-
"title": "x"
|
|
1344
|
-
},
|
|
1345
|
-
"y": {
|
|
1346
|
-
"description": "Indicates y coordinate",
|
|
1347
|
-
"type": "number",
|
|
1348
|
-
"title": "y"
|
|
1349
|
-
}
|
|
1350
|
-
},
|
|
1351
|
-
"required": [
|
|
1352
|
-
"x",
|
|
1353
|
-
"y"
|
|
1354
|
-
]
|
|
1355
|
-
},
|
|
1356
|
-
"outerPoint": {
|
|
1357
|
-
"title": "Point",
|
|
1358
|
-
"type": "object",
|
|
1359
|
-
"properties": {
|
|
1360
|
-
"x": {
|
|
1361
|
-
"description": "Indicates x coordinate",
|
|
1362
|
-
"type": "number",
|
|
1363
|
-
"title": "x"
|
|
1364
|
-
},
|
|
1365
|
-
"y": {
|
|
1366
|
-
"description": "Indicates y coordinate",
|
|
1367
|
-
"type": "number",
|
|
1368
|
-
"title": "y"
|
|
1369
|
-
}
|
|
1370
|
-
},
|
|
1371
|
-
"required": [
|
|
1372
|
-
"x",
|
|
1373
|
-
"y"
|
|
1374
|
-
]
|
|
1375
|
-
},
|
|
1376
1136
|
"closed": {
|
|
1377
1137
|
"description": "Indicates if mark is closed if type is polygon, sine",
|
|
1378
1138
|
"type": "boolean",
|
|
@@ -2571,46 +2331,6 @@
|
|
|
2571
2331
|
"y"
|
|
2572
2332
|
]
|
|
2573
2333
|
},
|
|
2574
|
-
"center": {
|
|
2575
|
-
"title": "Point",
|
|
2576
|
-
"type": "object",
|
|
2577
|
-
"properties": {
|
|
2578
|
-
"x": {
|
|
2579
|
-
"description": "Indicates x coordinate",
|
|
2580
|
-
"type": "number",
|
|
2581
|
-
"title": "x"
|
|
2582
|
-
},
|
|
2583
|
-
"y": {
|
|
2584
|
-
"description": "Indicates y coordinate",
|
|
2585
|
-
"type": "number",
|
|
2586
|
-
"title": "y"
|
|
2587
|
-
}
|
|
2588
|
-
},
|
|
2589
|
-
"required": [
|
|
2590
|
-
"x",
|
|
2591
|
-
"y"
|
|
2592
|
-
]
|
|
2593
|
-
},
|
|
2594
|
-
"outerPoint": {
|
|
2595
|
-
"title": "Point",
|
|
2596
|
-
"type": "object",
|
|
2597
|
-
"properties": {
|
|
2598
|
-
"x": {
|
|
2599
|
-
"description": "Indicates x coordinate",
|
|
2600
|
-
"type": "number",
|
|
2601
|
-
"title": "x"
|
|
2602
|
-
},
|
|
2603
|
-
"y": {
|
|
2604
|
-
"description": "Indicates y coordinate",
|
|
2605
|
-
"type": "number",
|
|
2606
|
-
"title": "y"
|
|
2607
|
-
}
|
|
2608
|
-
},
|
|
2609
|
-
"required": [
|
|
2610
|
-
"x",
|
|
2611
|
-
"y"
|
|
2612
|
-
]
|
|
2613
|
-
},
|
|
2614
2334
|
"closed": {
|
|
2615
2335
|
"description": "Indicates if mark is closed if type is polygon, sine",
|
|
2616
2336
|
"type": "boolean",
|
|
@@ -2803,46 +2523,6 @@
|
|
|
2803
2523
|
"y"
|
|
2804
2524
|
]
|
|
2805
2525
|
},
|
|
2806
|
-
"center": {
|
|
2807
|
-
"title": "Point",
|
|
2808
|
-
"type": "object",
|
|
2809
|
-
"properties": {
|
|
2810
|
-
"x": {
|
|
2811
|
-
"description": "Indicates x coordinate",
|
|
2812
|
-
"type": "number",
|
|
2813
|
-
"title": "x"
|
|
2814
|
-
},
|
|
2815
|
-
"y": {
|
|
2816
|
-
"description": "Indicates y coordinate",
|
|
2817
|
-
"type": "number",
|
|
2818
|
-
"title": "y"
|
|
2819
|
-
}
|
|
2820
|
-
},
|
|
2821
|
-
"required": [
|
|
2822
|
-
"x",
|
|
2823
|
-
"y"
|
|
2824
|
-
]
|
|
2825
|
-
},
|
|
2826
|
-
"outerPoint": {
|
|
2827
|
-
"title": "Point",
|
|
2828
|
-
"type": "object",
|
|
2829
|
-
"properties": {
|
|
2830
|
-
"x": {
|
|
2831
|
-
"description": "Indicates x coordinate",
|
|
2832
|
-
"type": "number",
|
|
2833
|
-
"title": "x"
|
|
2834
|
-
},
|
|
2835
|
-
"y": {
|
|
2836
|
-
"description": "Indicates y coordinate",
|
|
2837
|
-
"type": "number",
|
|
2838
|
-
"title": "y"
|
|
2839
|
-
}
|
|
2840
|
-
},
|
|
2841
|
-
"required": [
|
|
2842
|
-
"x",
|
|
2843
|
-
"y"
|
|
2844
|
-
]
|
|
2845
|
-
},
|
|
2846
2526
|
"closed": {
|
|
2847
2527
|
"description": "Indicates if mark is closed if type is polygon, sine",
|
|
2848
2528
|
"type": "boolean",
|
|
@@ -3041,46 +2721,6 @@
|
|
|
3041
2721
|
"y"
|
|
3042
2722
|
]
|
|
3043
2723
|
},
|
|
3044
|
-
"center": {
|
|
3045
|
-
"title": "Point",
|
|
3046
|
-
"type": "object",
|
|
3047
|
-
"properties": {
|
|
3048
|
-
"x": {
|
|
3049
|
-
"description": "Indicates x coordinate",
|
|
3050
|
-
"type": "number",
|
|
3051
|
-
"title": "x"
|
|
3052
|
-
},
|
|
3053
|
-
"y": {
|
|
3054
|
-
"description": "Indicates y coordinate",
|
|
3055
|
-
"type": "number",
|
|
3056
|
-
"title": "y"
|
|
3057
|
-
}
|
|
3058
|
-
},
|
|
3059
|
-
"required": [
|
|
3060
|
-
"x",
|
|
3061
|
-
"y"
|
|
3062
|
-
]
|
|
3063
|
-
},
|
|
3064
|
-
"outerPoint": {
|
|
3065
|
-
"title": "Point",
|
|
3066
|
-
"type": "object",
|
|
3067
|
-
"properties": {
|
|
3068
|
-
"x": {
|
|
3069
|
-
"description": "Indicates x coordinate",
|
|
3070
|
-
"type": "number",
|
|
3071
|
-
"title": "x"
|
|
3072
|
-
},
|
|
3073
|
-
"y": {
|
|
3074
|
-
"description": "Indicates y coordinate",
|
|
3075
|
-
"type": "number",
|
|
3076
|
-
"title": "y"
|
|
3077
|
-
}
|
|
3078
|
-
},
|
|
3079
|
-
"required": [
|
|
3080
|
-
"x",
|
|
3081
|
-
"y"
|
|
3082
|
-
]
|
|
3083
|
-
},
|
|
3084
2724
|
"closed": {
|
|
3085
2725
|
"description": "Indicates if mark is closed if type is polygon, sine",
|
|
3086
2726
|
"type": "boolean",
|
package/docs/pie-schema.json.md
CHANGED
|
@@ -821,30 +821,6 @@ Indicates x coordinate
|
|
|
821
821
|
|
|
822
822
|
Indicates y coordinate
|
|
823
823
|
|
|
824
|
-
### `center` (object)
|
|
825
|
-
|
|
826
|
-
Properties of the `center` object:
|
|
827
|
-
|
|
828
|
-
#### `x` (number, required)
|
|
829
|
-
|
|
830
|
-
Indicates x coordinate
|
|
831
|
-
|
|
832
|
-
#### `y` (number, required)
|
|
833
|
-
|
|
834
|
-
Indicates y coordinate
|
|
835
|
-
|
|
836
|
-
### `outerPoint` (object)
|
|
837
|
-
|
|
838
|
-
Properties of the `outerPoint` object:
|
|
839
|
-
|
|
840
|
-
#### `x` (number, required)
|
|
841
|
-
|
|
842
|
-
Indicates x coordinate
|
|
843
|
-
|
|
844
|
-
#### `y` (number, required)
|
|
845
|
-
|
|
846
|
-
Indicates y coordinate
|
|
847
|
-
|
|
848
824
|
### `closed` (boolean)
|
|
849
825
|
|
|
850
826
|
Indicates if mark is closed if type is polygon, sine
|
|
@@ -891,4 +867,4 @@ Indicates x coordinate
|
|
|
891
867
|
|
|
892
868
|
### `y` (number, required)
|
|
893
869
|
|
|
894
|
-
Indicates y coordinate
|
|
870
|
+
Indicates y coordinate
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":["Graphing","answer","Array","isArray","length","_session","dispatchEvent","SessionChangedEvent","tagName","toLowerCase","isComplete","_render","m","_model","s","el","React","createElement","Main","model","session","onAnswersChange","changeAnswers","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;IAIqBA,Q;;;;;AACnB,sBAAc;AAAA;;AAAA;AACZ;AADY,mGAsBD,
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":["Graphing","answer","Array","isArray","length","_session","dispatchEvent","SessionChangedEvent","tagName","toLowerCase","isComplete","_render","m","_model","s","el","React","createElement","Main","model","session","onAnswersChange","changeAnswers","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;IAIqBA,Q;;;;;AACnB,sBAAc;AAAA;;AAAA;AACZ;AADY,mGAsBD,UAACC,MAAD;AAAA,aAAYC,KAAK,CAACC,OAAN,CAAcF,MAAd,KAAyBA,MAAM,CAACG,MAAP,GAAgB,CAArD;AAAA,KAtBC;AAAA,sGAwBE,UAACH,MAAD,EAAY;AAC1B,YAAKI,QAAL,CAAcJ,MAAd,GAAuB,iCAAqBA,MAArB,CAAvB;;AAEA,YAAKK,aAAL,CAAmB,IAAIC,oCAAJ,CAAwB,MAAKC,OAAL,CAAaC,WAAb,EAAxB,EAAoD,MAAKC,UAAL,CAAgB,MAAKL,QAAL,CAAcJ,MAA9B,CAApD,CAAnB;;AAEA,YAAKU,OAAL;AACD,KA9Ba;AAAA;AAEb;;;;SAED,aAAUC,CAAV,EAAa;AACX,WAAKC,MAAL,GAAcD,CAAd;;AACA,WAAKD,OAAL;AACD;;;SAOD,eAAc;AACZ,aAAO,KAAKN,QAAZ;AACD,K;SAPD,aAAYS,CAAZ,EAAe;AACb,WAAKT,QAAL,GAAgBS,CAAhB;;AACA,WAAKH,OAAL;AACD;;;WAMD,6BAAoB;AAClB,WAAKA,OAAL;AACD;;;WAYD,mBAAU;AAAA;;AACR,UAAI,CAAC,KAAKE,MAAN,IAAgB,CAAC,KAAKR,QAA1B,EAAoC;AAClC;AACD;;AAED,UAAMU,EAAE,gBAAGC,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACnCC,QAAAA,KAAK,EAAE,KAAKN,MADuB;AAEnCO,QAAAA,OAAO,EAAE,KAAKf,QAFqB;AAGnCgB,QAAAA,eAAe,EAAE,KAAKC;AAHa,OAA1B,CAAX;;AAMAC,2BAASC,MAAT,CAAgBT,EAAhB,EAAoB,IAApB,EAA0B,YAAM;AAC9B,uCAAW,MAAX;AACD,OAFD;AAGD;;;kDA/CmCU,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { SessionChangedEvent } from '@pie-framework/pie-player-events';\nimport { renderMath } from '@pie-lib/math-rendering';\n\nimport { removeInvalidAnswers } from './utils';\nimport Main from './main';\n\nexport { Main as Component };\n\nexport default class Graphing extends HTMLElement {\n constructor() {\n super();\n }\n\n set model(m) {\n this._model = m;\n this._render();\n }\n\n set session(s) {\n this._session = s;\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n connectedCallback() {\n this._render();\n }\n\n isComplete = (answer) => Array.isArray(answer) && answer.length > 0;\n\n changeAnswers = (answer) => {\n this._session.answer = removeInvalidAnswers(answer);\n\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete(this._session.answer)));\n\n this._render();\n };\n\n _render() {\n if (!this._model || !this._session) {\n return;\n }\n\n const el = React.createElement(Main, {\n model: this._model,\n session: this._session,\n onAnswersChange: this.changeAnswers,\n });\n\n ReactDOM.render(el, this, () => {\n renderMath(this);\n });\n }\n}\n"],"file":"index.js"}
|
package/lib/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main.jsx"],"names":["Main","showingCorrect","setState","props","model","classes","onAnswersChange","session","state","answer","answersCorrected","arrows","backgroundMarks","coordinatesOnHover","correctResponse","defaultTool","disabled","domain","labels","labelsEnabled","prompt","range","rationale","size","showToggle","title","titleEnabled","teacherInstructions","toolbarTools","marks","mainContainer","toggleCorrect","includeArrows","map","i","correctness","hidden","visible","React","Component","PropTypes","object","isRequired","func","styles","theme","padding","spacing","unit","color","text","backgroundColor","background"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;IAEaA,I;;;;;;;;;;;;;;;8FAYH;AAAEC,MAAAA,cAAc,EAAE;AAAlB,K;sGAEQ,
|
|
1
|
+
{"version":3,"sources":["../src/main.jsx"],"names":["Main","showingCorrect","setState","props","model","classes","onAnswersChange","session","state","answer","answersCorrected","arrows","backgroundMarks","coordinatesOnHover","correctResponse","defaultTool","disabled","domain","labels","labelsEnabled","prompt","range","rationale","size","showToggle","title","titleEnabled","teacherInstructions","toolbarTools","marks","mainContainer","toggleCorrect","includeArrows","map","i","correctness","hidden","visible","React","Component","PropTypes","object","isRequired","func","styles","theme","padding","spacing","unit","color","text","backgroundColor","background"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;IAEaA,I;;;;;;;;;;;;;;;8FAYH;AAAEC,MAAAA,cAAc,EAAE;AAAlB,K;sGAEQ,UAACA,cAAD;AAAA,aAAoB,MAAKC,QAAL,CAAc;AAAED,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J;AADU,GAAZ;AAAA,CAAf;;eAQe,wBAAWR,MAAX,EAAmB5C,IAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport { GraphContainer } from '@pie-lib/graphing';\nimport { color, Collapsible, hasText, PreviewPrompt } from '@pie-lib/render-ui';\nimport CorrectAnswerToggle from '@pie-lib/correct-answer-toggle';\n\nexport class Main extends React.Component {\n static propTypes = {\n classes: PropTypes.object,\n model: PropTypes.object.isRequired,\n session: PropTypes.object.isRequired,\n onAnswersChange: PropTypes.func,\n };\n\n static defaultProps = {\n classes: {},\n };\n\n state = { showingCorrect: false };\n\n toggleCorrect = (showingCorrect) => this.setState({ showingCorrect });\n\n render() {\n const { model, classes, onAnswersChange, session } = this.props;\n const { showingCorrect } = this.state;\n const { answer } = session || {};\n const {\n answersCorrected,\n arrows,\n backgroundMarks,\n coordinatesOnHover,\n correctResponse,\n defaultTool,\n disabled,\n domain,\n labels,\n labelsEnabled,\n prompt,\n range,\n rationale,\n size,\n showToggle,\n title,\n titleEnabled,\n teacherInstructions,\n toolbarTools,\n } = model || {};\n const marks = answersCorrected || answer || [];\n\n return (\n <div className={classes.mainContainer}>\n <CorrectAnswerToggle show={showToggle} toggled={showingCorrect} onToggle={this.toggleCorrect} />\n\n {showingCorrect && showToggle && (\n <GraphContainer\n axesSettings={{ includeArrows: arrows }}\n backgroundMarks={backgroundMarks}\n coordinatesOnHover={coordinatesOnHover}\n disabled={true}\n domain={domain}\n labels={labels}\n marks={correctResponse.map((i) => ({ ...i, correctness: 'correct' }))}\n onChangeMarks={onAnswersChange}\n range={range}\n size={size}\n title={title}\n toolbarTools={toolbarTools}\n />\n )}\n\n {teacherInstructions && hasText(teacherInstructions) && (\n <React.Fragment>\n <Collapsible labels={{ hidden: 'Show Teacher Instructions', visible: 'Hide Teacher Instructions' }}>\n <PreviewPrompt prompt={teacherInstructions} />\n </Collapsible>\n <br />\n </React.Fragment>\n )}\n\n {prompt && (\n <React.Fragment>\n <PreviewPrompt className=\"prompt\" prompt={prompt} />\n <br />\n </React.Fragment>\n )}\n\n <GraphContainer\n axesSettings={{ includeArrows: arrows }}\n backgroundMarks={backgroundMarks}\n coordinatesOnHover={coordinatesOnHover}\n defaultTool={defaultTool}\n disabled={disabled}\n disabledLabels={true}\n disabledTitle={true}\n domain={domain}\n labels={labels}\n marks={marks}\n onChangeMarks={onAnswersChange}\n range={range}\n showLabels={labelsEnabled}\n showTitle={titleEnabled}\n size={size}\n title={title}\n toolbarTools={toolbarTools}\n />\n\n <br />\n\n {rationale && hasText(rationale) && (\n <Collapsible labels={{ hidden: 'Show Rationale', visible: 'Hide Rationale' }}>\n <PreviewPrompt prompt={rationale} />\n </Collapsible>\n )}\n </div>\n );\n }\n}\n\nconst styles = (theme) => ({\n mainContainer: {\n padding: theme.spacing.unit,\n color: color.text(),\n backgroundColor: color.background(),\n },\n});\n\nexport default withStyles(styles)(Main);\n"],"file":"main.js"}
|
package/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils.js"],"names":["completePoint","point","Number","isFinite","x","y","completeFromTo","item","completeMark","from","to","completeRootEdge","edge","root","completePoints","points","length","filter","line","ray","segment","vector","circle","parabola","sine","polygon","removeInvalidAnswers","answers","type","answer"],"mappings":";;;;;;;;;;;;;AAAA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,
|
|
1
|
+
{"version":3,"sources":["../src/utils.js"],"names":["completePoint","point","Number","isFinite","x","y","completeFromTo","item","completeMark","from","to","completeRootEdge","edge","root","completePoints","points","length","filter","line","ray","segment","vector","circle","parabola","sine","polygon","removeInvalidAnswers","answers","type","answer"],"mappings":";;;;;;;;;;;;;AAAA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD;AAAA,SAAWA,KAAK,IAAIC,MAAM,CAACC,QAAP,CAAgBF,KAAK,CAACG,CAAtB,CAAT,IAAqCF,MAAM,CAACC,QAAP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,CAACA,OAAO,IAAI,EAAZ,EAAgBV,MAAhB,CAAuB;AAAA,QAAGW,IAAH,QAAGA,IAAH;AAAA,QAAYC,MAAZ;AAAA,WAA0BrB,YAAY,CAACoB,IAAD,CAAZ,GAAqBpB,YAAY,CAACoB,IAAD,CAAZ,CAAmBC,MAAnB,CAArB,GAAkD,KAA5E;AAAA,GAAvB,CADG,GAEH,EAH8B;AAAA,CAA7B","sourcesContent":["const completePoint = (point) => point && Number.isFinite(point.x) && Number.isFinite(point.y);\nconst completeFromTo = (item) => item && completeMark.point(item.from) && completeMark.point(item.to);\nconst completeRootEdge = (item) => item && completeMark.point(item.edge) && completeMark.point(item.root);\nconst completePoints = (item) =>\n item &&\n item.points &&\n item.points.length &&\n (item.points.filter((point) => completePoint(point)) || []).length === item.points.length;\n\nconst completeMark = {\n point: completePoint,\n line: completeFromTo,\n ray: completeFromTo,\n segment: completeFromTo,\n vector: completeFromTo,\n circle: completeRootEdge,\n parabola: completeRootEdge,\n sine: completeRootEdge,\n polygon: completePoints,\n};\n\nexport const removeInvalidAnswers = (answers) =>\n answers\n ? (answers || []).filter(({ type, ...answer }) => (completeMark[type] ? completeMark[type](answer) : false))\n : [];\n"],"file":"utils.js"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"repository": "pie-framework/pie-elements",
|
|
7
|
-
"version": "4.4.4-next.
|
|
7
|
+
"version": "4.4.4-next.88+35317ee7f",
|
|
8
8
|
"description": "",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@material-ui/core": "^3.9.2",
|
|
15
15
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
16
16
|
"@pie-lib/correct-answer-toggle": "2.3.47",
|
|
17
|
-
"@pie-lib/graphing": "^2.11.
|
|
17
|
+
"@pie-lib/graphing": "^2.11.5",
|
|
18
18
|
"@pie-lib/math-rendering": "^2.5.1",
|
|
19
19
|
"@pie-lib/render-ui": "^4.13.7",
|
|
20
20
|
"classnames": "^2.2.5",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"author": "",
|
|
26
26
|
"license": "ISC",
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "35317ee7f7bd3990de5f98bdcc36702e3c38a39b",
|
|
28
28
|
"main": "lib/index.js",
|
|
29
29
|
"module": "src/index.js"
|
|
30
30
|
}
|