@pie-element/graphing 3.5.4-next.1014 → 3.5.4-next.1031
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 +58 -46
- package/configure/lib/configure.js.map +1 -1
- package/configure/lib/correct-response.js +101 -17
- package/configure/lib/correct-response.js.map +1 -1
- package/configure/lib/defaults.js +25 -2
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/graphing-config.js +33 -18
- package/configure/lib/graphing-config.js.map +1 -1
- package/configure/lib/index.js +21 -13
- package/configure/lib/index.js.map +1 -1
- package/controller/lib/index.js +13 -3
- package/controller/lib/index.js.map +1 -1
- package/docs/config-schema.json +235 -10
- package/docs/config-schema.json.md +180 -11
- package/docs/demo/generate.js +1 -0
- package/docs/pie-schema.json +150 -6
- package/docs/pie-schema.json.md +119 -7
- package/lib/main.js +2 -0
- package/lib/main.js.map +1 -1
- package/package.json +2 -2
package/docs/pie-schema.json
CHANGED
|
@@ -1485,6 +1485,22 @@
|
|
|
1485
1485
|
"type": "boolean",
|
|
1486
1486
|
"title": "coordinatesOnHover"
|
|
1487
1487
|
},
|
|
1488
|
+
"defaultTool": {
|
|
1489
|
+
"description": "Indicates the default selected tool for the graph",
|
|
1490
|
+
"enum": [
|
|
1491
|
+
"circle",
|
|
1492
|
+
"line",
|
|
1493
|
+
"parabola",
|
|
1494
|
+
"point",
|
|
1495
|
+
"polygon",
|
|
1496
|
+
"ray",
|
|
1497
|
+
"segment",
|
|
1498
|
+
"sine",
|
|
1499
|
+
"vector"
|
|
1500
|
+
],
|
|
1501
|
+
"type": "string",
|
|
1502
|
+
"title": "defaultTool"
|
|
1503
|
+
},
|
|
1488
1504
|
"domain": {
|
|
1489
1505
|
"title": "GraphSettings",
|
|
1490
1506
|
"type": "object",
|
|
@@ -1755,6 +1771,7 @@
|
|
|
1755
1771
|
"required": [
|
|
1756
1772
|
"answers",
|
|
1757
1773
|
"backgroundMarks",
|
|
1774
|
+
"defaultTool",
|
|
1758
1775
|
"domain",
|
|
1759
1776
|
"element",
|
|
1760
1777
|
"graph",
|
|
@@ -1766,22 +1783,128 @@
|
|
|
1766
1783
|
"teacherInstructionsEnabled"
|
|
1767
1784
|
],
|
|
1768
1785
|
"definitions": {
|
|
1769
|
-
"
|
|
1770
|
-
"title": "
|
|
1786
|
+
"AuthoringConfigProp": {
|
|
1787
|
+
"title": "AuthoringConfigProp",
|
|
1771
1788
|
"type": "object",
|
|
1772
1789
|
"properties": {
|
|
1773
1790
|
"settings": {
|
|
1774
|
-
"description": "Indicates if the item
|
|
1791
|
+
"description": "Indicates if the item is displayed in the Settings Panel",
|
|
1775
1792
|
"type": "boolean",
|
|
1776
1793
|
"title": "settings"
|
|
1777
1794
|
},
|
|
1778
1795
|
"label": {
|
|
1779
|
-
"description": "Indicates the label for the item that
|
|
1796
|
+
"description": "Indicates the label for the item that is displayed in the Settings Panel",
|
|
1780
1797
|
"type": "string",
|
|
1781
1798
|
"title": "label"
|
|
1782
1799
|
},
|
|
1783
1800
|
"enabled": {
|
|
1784
|
-
"description": "Indicates
|
|
1801
|
+
"description": "Indicates if the Grid Setup Panel is displayed",
|
|
1802
|
+
"type": "boolean",
|
|
1803
|
+
"title": "enabled"
|
|
1804
|
+
},
|
|
1805
|
+
"includeAxesEnabled": {
|
|
1806
|
+
"description": "Indicates if the \"includeAxes\" toggle is displayed in the Grid Setup Panel",
|
|
1807
|
+
"type": "boolean",
|
|
1808
|
+
"title": "includeAxesEnabled"
|
|
1809
|
+
},
|
|
1810
|
+
"standardGridEnabled": {
|
|
1811
|
+
"description": "Indicates if the \"standardGrid\" toggle is displayed in the Grid Setup Panel",
|
|
1812
|
+
"type": "boolean",
|
|
1813
|
+
"title": "standardGridEnabled"
|
|
1814
|
+
},
|
|
1815
|
+
"min": {
|
|
1816
|
+
"title": "GridPanelConfigProp",
|
|
1817
|
+
"type": "object",
|
|
1818
|
+
"properties": {
|
|
1819
|
+
"label": {
|
|
1820
|
+
"description": "Indicates the label for the item that is displayed in the Grid Setup Panel",
|
|
1821
|
+
"type": "string",
|
|
1822
|
+
"title": "label"
|
|
1823
|
+
},
|
|
1824
|
+
"enabled": {
|
|
1825
|
+
"description": "Indicates if the item is displayed in the Grid Setup Panel",
|
|
1826
|
+
"type": "boolean",
|
|
1827
|
+
"title": "enabled"
|
|
1828
|
+
}
|
|
1829
|
+
}
|
|
1830
|
+
},
|
|
1831
|
+
"max": {
|
|
1832
|
+
"title": "GridPanelConfigProp",
|
|
1833
|
+
"type": "object",
|
|
1834
|
+
"properties": {
|
|
1835
|
+
"label": {
|
|
1836
|
+
"description": "Indicates the label for the item that is displayed in the Grid Setup Panel",
|
|
1837
|
+
"type": "string",
|
|
1838
|
+
"title": "label"
|
|
1839
|
+
},
|
|
1840
|
+
"enabled": {
|
|
1841
|
+
"description": "Indicates if the item is displayed in the Grid Setup Panel",
|
|
1842
|
+
"type": "boolean",
|
|
1843
|
+
"title": "enabled"
|
|
1844
|
+
}
|
|
1845
|
+
}
|
|
1846
|
+
},
|
|
1847
|
+
"axisLabel": {
|
|
1848
|
+
"title": "GridPanelConfigProp",
|
|
1849
|
+
"type": "object",
|
|
1850
|
+
"properties": {
|
|
1851
|
+
"label": {
|
|
1852
|
+
"description": "Indicates the label for the item that is displayed in the Grid Setup Panel",
|
|
1853
|
+
"type": "string",
|
|
1854
|
+
"title": "label"
|
|
1855
|
+
},
|
|
1856
|
+
"enabled": {
|
|
1857
|
+
"description": "Indicates if the item is displayed in the Grid Setup Panel",
|
|
1858
|
+
"type": "boolean",
|
|
1859
|
+
"title": "enabled"
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
},
|
|
1863
|
+
"step": {
|
|
1864
|
+
"title": "GridPanelConfigProp",
|
|
1865
|
+
"type": "object",
|
|
1866
|
+
"properties": {
|
|
1867
|
+
"label": {
|
|
1868
|
+
"description": "Indicates the label for the item that is displayed in the Grid Setup Panel",
|
|
1869
|
+
"type": "string",
|
|
1870
|
+
"title": "label"
|
|
1871
|
+
},
|
|
1872
|
+
"enabled": {
|
|
1873
|
+
"description": "Indicates if the item is displayed in the Grid Setup Panel",
|
|
1874
|
+
"type": "boolean",
|
|
1875
|
+
"title": "enabled"
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
},
|
|
1879
|
+
"labelStep": {
|
|
1880
|
+
"title": "GridPanelConfigProp",
|
|
1881
|
+
"type": "object",
|
|
1882
|
+
"properties": {
|
|
1883
|
+
"label": {
|
|
1884
|
+
"description": "Indicates the label for the item that is displayed in the Grid Setup Panel",
|
|
1885
|
+
"type": "string",
|
|
1886
|
+
"title": "label"
|
|
1887
|
+
},
|
|
1888
|
+
"enabled": {
|
|
1889
|
+
"description": "Indicates if the item is displayed in the Grid Setup Panel",
|
|
1890
|
+
"type": "boolean",
|
|
1891
|
+
"title": "enabled"
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
},
|
|
1897
|
+
"GridPanelConfigProp": {
|
|
1898
|
+
"title": "GridPanelConfigProp",
|
|
1899
|
+
"type": "object",
|
|
1900
|
+
"properties": {
|
|
1901
|
+
"label": {
|
|
1902
|
+
"description": "Indicates the label for the item that is displayed in the Grid Setup Panel",
|
|
1903
|
+
"type": "string",
|
|
1904
|
+
"title": "label"
|
|
1905
|
+
},
|
|
1906
|
+
"enabled": {
|
|
1907
|
+
"description": "Indicates if the item is displayed in the Grid Setup Panel",
|
|
1785
1908
|
"type": "boolean",
|
|
1786
1909
|
"title": "enabled"
|
|
1787
1910
|
}
|
|
@@ -1910,6 +2033,27 @@
|
|
|
1910
2033
|
}
|
|
1911
2034
|
}
|
|
1912
2035
|
},
|
|
2036
|
+
"ConfigurePropWithEnabled": {
|
|
2037
|
+
"title": "ConfigurePropWithEnabled",
|
|
2038
|
+
"type": "object",
|
|
2039
|
+
"properties": {
|
|
2040
|
+
"settings": {
|
|
2041
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
2042
|
+
"type": "boolean",
|
|
2043
|
+
"title": "settings"
|
|
2044
|
+
},
|
|
2045
|
+
"label": {
|
|
2046
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
2047
|
+
"type": "string",
|
|
2048
|
+
"title": "label"
|
|
2049
|
+
},
|
|
2050
|
+
"enabled": {
|
|
2051
|
+
"description": "Indicates the value of the item if it affects config-ui\n(eg.: if item is a switch and displaying an input on the config-ui depends on the switch value: on/off)",
|
|
2052
|
+
"type": "boolean",
|
|
2053
|
+
"title": "enabled"
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
},
|
|
1913
2057
|
"ConfigureMaxImageDimensionsProp": {
|
|
1914
2058
|
"title": "ConfigureMaxImageDimensionsProp",
|
|
1915
2059
|
"type": "object",
|
|
@@ -2792,4 +2936,4 @@
|
|
|
2792
2936
|
}
|
|
2793
2937
|
},
|
|
2794
2938
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
2795
|
-
}
|
|
2939
|
+
}
|
package/docs/pie-schema.json.md
CHANGED
|
@@ -72,6 +72,22 @@ Additional restrictions:
|
|
|
72
72
|
|
|
73
73
|
Indicates if coordinates of a point are displayed on hover
|
|
74
74
|
|
|
75
|
+
# `defaultTool` (string, enum, required)
|
|
76
|
+
|
|
77
|
+
Indicates the default selected tool for the graph
|
|
78
|
+
|
|
79
|
+
This element must be one of the following enum values:
|
|
80
|
+
|
|
81
|
+
* `circle`
|
|
82
|
+
* `line`
|
|
83
|
+
* `parabola`
|
|
84
|
+
* `point`
|
|
85
|
+
* `polygon`
|
|
86
|
+
* `ray`
|
|
87
|
+
* `segment`
|
|
88
|
+
* `sine`
|
|
89
|
+
* `vector`
|
|
90
|
+
|
|
75
91
|
# `domain` (object, required)
|
|
76
92
|
|
|
77
93
|
Properties of the `domain` object:
|
|
@@ -243,22 +259,101 @@ The html Element tag name
|
|
|
243
259
|
|
|
244
260
|
The schema defines the following additional types:
|
|
245
261
|
|
|
246
|
-
## `
|
|
262
|
+
## `AuthoringConfigProp` (object)
|
|
247
263
|
|
|
248
|
-
Properties of the `
|
|
264
|
+
Properties of the `AuthoringConfigProp` object:
|
|
249
265
|
|
|
250
266
|
### `settings` (boolean)
|
|
251
267
|
|
|
252
|
-
Indicates if the item
|
|
268
|
+
Indicates if the item is displayed in the Settings Panel
|
|
253
269
|
|
|
254
270
|
### `label` (string)
|
|
255
271
|
|
|
256
|
-
Indicates the label for the item that
|
|
272
|
+
Indicates the label for the item that is displayed in the Settings Panel
|
|
257
273
|
|
|
258
274
|
### `enabled` (boolean)
|
|
259
275
|
|
|
260
|
-
Indicates
|
|
261
|
-
|
|
276
|
+
Indicates if the Grid Setup Panel is displayed
|
|
277
|
+
|
|
278
|
+
### `includeAxesEnabled` (boolean)
|
|
279
|
+
|
|
280
|
+
Indicates if the "includeAxes" toggle is displayed in the Grid Setup Panel
|
|
281
|
+
|
|
282
|
+
### `standardGridEnabled` (boolean)
|
|
283
|
+
|
|
284
|
+
Indicates if the "standardGrid" toggle is displayed in the Grid Setup Panel
|
|
285
|
+
|
|
286
|
+
### `min` (object)
|
|
287
|
+
|
|
288
|
+
Properties of the `min` object:
|
|
289
|
+
|
|
290
|
+
#### `label` (string)
|
|
291
|
+
|
|
292
|
+
Indicates the label for the item that is displayed in the Grid Setup Panel
|
|
293
|
+
|
|
294
|
+
#### `enabled` (boolean)
|
|
295
|
+
|
|
296
|
+
Indicates if the item is displayed in the Grid Setup Panel
|
|
297
|
+
|
|
298
|
+
### `max` (object)
|
|
299
|
+
|
|
300
|
+
Properties of the `max` object:
|
|
301
|
+
|
|
302
|
+
#### `label` (string)
|
|
303
|
+
|
|
304
|
+
Indicates the label for the item that is displayed in the Grid Setup Panel
|
|
305
|
+
|
|
306
|
+
#### `enabled` (boolean)
|
|
307
|
+
|
|
308
|
+
Indicates if the item is displayed in the Grid Setup Panel
|
|
309
|
+
|
|
310
|
+
### `axisLabel` (object)
|
|
311
|
+
|
|
312
|
+
Properties of the `axisLabel` object:
|
|
313
|
+
|
|
314
|
+
#### `label` (string)
|
|
315
|
+
|
|
316
|
+
Indicates the label for the item that is displayed in the Grid Setup Panel
|
|
317
|
+
|
|
318
|
+
#### `enabled` (boolean)
|
|
319
|
+
|
|
320
|
+
Indicates if the item is displayed in the Grid Setup Panel
|
|
321
|
+
|
|
322
|
+
### `step` (object)
|
|
323
|
+
|
|
324
|
+
Properties of the `step` object:
|
|
325
|
+
|
|
326
|
+
#### `label` (string)
|
|
327
|
+
|
|
328
|
+
Indicates the label for the item that is displayed in the Grid Setup Panel
|
|
329
|
+
|
|
330
|
+
#### `enabled` (boolean)
|
|
331
|
+
|
|
332
|
+
Indicates if the item is displayed in the Grid Setup Panel
|
|
333
|
+
|
|
334
|
+
### `labelStep` (object)
|
|
335
|
+
|
|
336
|
+
Properties of the `labelStep` object:
|
|
337
|
+
|
|
338
|
+
#### `label` (string)
|
|
339
|
+
|
|
340
|
+
Indicates the label for the item that is displayed in the Grid Setup Panel
|
|
341
|
+
|
|
342
|
+
#### `enabled` (boolean)
|
|
343
|
+
|
|
344
|
+
Indicates if the item is displayed in the Grid Setup Panel
|
|
345
|
+
|
|
346
|
+
## `GridPanelConfigProp` (object)
|
|
347
|
+
|
|
348
|
+
Properties of the `GridPanelConfigProp` object:
|
|
349
|
+
|
|
350
|
+
### `label` (string)
|
|
351
|
+
|
|
352
|
+
Indicates the label for the item that is displayed in the Grid Setup Panel
|
|
353
|
+
|
|
354
|
+
### `enabled` (boolean)
|
|
355
|
+
|
|
356
|
+
Indicates if the item is displayed in the Grid Setup Panel
|
|
262
357
|
|
|
263
358
|
## `ArrowsConfigProp` (object)
|
|
264
359
|
|
|
@@ -352,6 +447,23 @@ Indicates the maximum value for the graph width and height
|
|
|
352
447
|
|
|
353
448
|
Indicates the increase/decrease value for the graph width and height
|
|
354
449
|
|
|
450
|
+
## `ConfigurePropWithEnabled` (object)
|
|
451
|
+
|
|
452
|
+
Properties of the `ConfigurePropWithEnabled` object:
|
|
453
|
+
|
|
454
|
+
### `settings` (boolean)
|
|
455
|
+
|
|
456
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
457
|
+
|
|
458
|
+
### `label` (string)
|
|
459
|
+
|
|
460
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
461
|
+
|
|
462
|
+
### `enabled` (boolean)
|
|
463
|
+
|
|
464
|
+
Indicates the value of the item if it affects config-ui
|
|
465
|
+
(eg.: if item is a switch and displaying an input on the config-ui depends on the switch value: on/off)
|
|
466
|
+
|
|
355
467
|
## `ConfigureMaxImageDimensionsProp` (object)
|
|
356
468
|
|
|
357
469
|
Properties of the `ConfigureMaxImageDimensionsProp` object:
|
|
@@ -598,4 +710,4 @@ Label for left side of the graph
|
|
|
598
710
|
|
|
599
711
|
### `right` (string, required)
|
|
600
712
|
|
|
601
|
-
Label for right side of the graph
|
|
713
|
+
Label for right side of the graph
|
package/lib/main.js
CHANGED
|
@@ -86,6 +86,7 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
86
86
|
backgroundMarks = _ref2.backgroundMarks,
|
|
87
87
|
coordinatesOnHover = _ref2.coordinatesOnHover,
|
|
88
88
|
correctResponse = _ref2.correctResponse,
|
|
89
|
+
defaultTool = _ref2.defaultTool,
|
|
89
90
|
disabled = _ref2.disabled,
|
|
90
91
|
domain = _ref2.domain,
|
|
91
92
|
labels = _ref2.labels,
|
|
@@ -140,6 +141,7 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
140
141
|
},
|
|
141
142
|
backgroundMarks: backgroundMarks,
|
|
142
143
|
coordinatesOnHover: coordinatesOnHover,
|
|
144
|
+
defaultTool: defaultTool,
|
|
143
145
|
disabled: disabled,
|
|
144
146
|
domain: domain,
|
|
145
147
|
labels: labels,
|
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","disabled","domain","labels","prompt","range","rationale","size","showToggle","title","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,UAAAA,cAAc;AAAA,aAAI,MAAKC,QAAL,CAAc;AAAED,QAAAA,cAAc,EAAdA;AAAF,OAAd,CAAJ;AAAA,K;;;;;;WAE9B,kBAAS;AACP,wBAAqD,KAAKE,KAA1D;AAAA,UAAQC,KAAR,eAAQA,KAAR;AAAA,UAAeC,OAAf,eAAeA,OAAf;AAAA,UAAwBC,eAAxB,eAAwBA,eAAxB;AAAA,UAAyCC,OAAzC,eAAyCA,OAAzC;AACA,UAAQN,cAAR,GAA2B,KAAKO,KAAhC,CAAQP,cAAR;;AACA,iBAAmBM,OAAO,IAAI,EAA9B;AAAA,UAAQE,MAAR,QAAQA,MAAR;;AACA,
|
|
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","prompt","range","rationale","size","showToggle","title","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,UAAAA,cAAc;AAA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,QAAA,MAAM,EAAEC,MANV;AAOE,QAAA,MAAM,EAAEC,MAPV;AAQE,QAAA,KAAK,EAAES,KART;AASE,QAAA,aAAa,EAAErB,eATjB;AAUE,QAAA,KAAK,EAAEc,KAVT;AAWE,QAAA,IAAI,EAAEE,IAXR;AAYE,QAAA,KAAK,EAAEE,KAZT;AAaE,QAAA,YAAY,EAAEE;AAbhB,QA1CF,eA0DE,2CA1DF,EA6DIL,SAAS,IAAI,uBAAQA,SAAR,CAAb,iBACE,gCAAC,qBAAD;AAAa,QAAA,MAAM,EAAE;AAAEa,UAAAA,MAAM,EAAE,gBAAV;AAA4BC,UAAAA,OAAO,EAAE;AAArC;AAArB,sBACE,gCAAC,uBAAD;AAAe,QAAA,MAAM,EAAEd;AAAvB,QADF,CA9DN,CADF;AAsED;;;EA/GuBe,kBAAMC,S;;;iCAAnBrC,I,eACQ;AACjBK,EAAAA,OAAO,EAAEiC,sBAAUC,MADF;AAEjBnC,EAAAA,KAAK,EAAEkC,sBAAUC,MAAV,CAAiBC,UAFP;AAGjBjC,EAAAA,OAAO,EAAE+B,sBAAUC,MAAV,CAAiBC,UAHT;AAIjBlC,EAAAA,eAAe,EAAEgC,sBAAUG;AAJV,C;iCADRzC,I,kBAQW;AACpBK,EAAAA,OAAO,EAAE;AADW,C;;AA0GxB,IAAMqC,MAAM,GAAG,SAATA,MAAS,CAAAC,KAAK;AAAA,SAAK;AACvBf,IAAAA,aAAa,EAAE;AACbgB,MAAAA,OAAO,EAAED,KAAK,CAACE,OAAN,CAAcC,IADV;AAEbC,MAAAA,KAAK,EAAEA,gBAAMC,IAAN,EAFM;AAGbC,MAAAA,eAAe,EAAEF,gBAAMG,UAAN;AAHJ;AADQ,GAAL;AAAA,CAApB;;eAQe,wBAAWR,MAAX,EAAmB1C,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 prompt,\n range,\n rationale,\n size,\n showToggle,\n title,\n teacherInstructions,\n toolbarTools\n } = model || {};\n const marks = answersCorrected || answer || [];\n\n return (\n <div className={classes.mainContainer}>\n <CorrectAnswerToggle\n show={showToggle}\n toggled={showingCorrect}\n onToggle={this.toggleCorrect}\n />\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 {\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\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 domain={domain}\n labels={labels}\n marks={marks}\n onChangeMarks={onAnswersChange}\n range={range}\n size={size}\n title={title}\n toolbarTools={toolbarTools}\n />\n\n <br />\n\n {\n rationale && hasText(rationale) && (\n <Collapsible labels={{ hidden: 'Show Rationale', visible: 'Hide Rationale' }}>\n <PreviewPrompt prompt={rationale} />\n </Collapsible>\n )\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/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"repository": "pie-framework/pie-elements",
|
|
7
|
-
"version": "3.5.4-next.
|
|
7
|
+
"version": "3.5.4-next.1031+5885a0888",
|
|
8
8
|
"description": "",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"author": "",
|
|
26
26
|
"license": "ISC",
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "5885a0888cc8eebb8501e970e2aa9a3addef5547",
|
|
28
28
|
"main": "lib/index.js",
|
|
29
29
|
"module": "src/index.js"
|
|
30
30
|
}
|