@pie-element/fraction-model 6.1.2-next.1 → 6.1.2

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.
Files changed (85) hide show
  1. package/CHANGELOG.json +1 -0
  2. package/CHANGELOG.md +594 -0
  3. package/LICENSE.md +5 -0
  4. package/README.md +18 -0
  5. package/configure/CHANGELOG.json +1 -0
  6. package/configure/CHANGELOG.md +559 -0
  7. package/configure/lib/card-bar.js +57 -0
  8. package/configure/lib/card-bar.js.map +1 -0
  9. package/configure/lib/defaults.js +114 -0
  10. package/configure/lib/defaults.js.map +1 -0
  11. package/configure/lib/index.js +163 -0
  12. package/configure/lib/index.js.map +1 -0
  13. package/configure/lib/main.js +253 -0
  14. package/configure/lib/main.js.map +1 -0
  15. package/configure/lib/model-options.js +144 -0
  16. package/configure/lib/model-options.js.map +1 -0
  17. package/configure/lib/number-text-field.js +47 -0
  18. package/configure/lib/number-text-field.js.map +1 -0
  19. package/configure/package.json +24 -0
  20. package/controller/CHANGELOG.json +1 -0
  21. package/controller/CHANGELOG.md +484 -0
  22. package/controller/lib/defaults.js +20 -0
  23. package/controller/lib/defaults.js.map +1 -0
  24. package/controller/lib/index.js +215 -0
  25. package/controller/lib/index.js.map +1 -0
  26. package/controller/package.json +15 -0
  27. package/docs/config-schema.json +1796 -0
  28. package/docs/config-schema.json.md +1318 -0
  29. package/docs/demo/config.js +8 -0
  30. package/docs/demo/generate.js +6 -0
  31. package/docs/demo/index.html +1 -0
  32. package/docs/demo/session.js +6 -0
  33. package/docs/pie-schema.json +873 -0
  34. package/docs/pie-schema.json.md +639 -0
  35. package/lib/answer-fraction.js +109 -0
  36. package/lib/answer-fraction.js.map +1 -0
  37. package/lib/fraction-model-chart.js +279 -0
  38. package/lib/fraction-model-chart.js.map +1 -0
  39. package/lib/index.js +91 -0
  40. package/lib/index.js.map +1 -0
  41. package/lib/main.js +203 -0
  42. package/lib/main.js.map +1 -0
  43. package/package.json +19 -83
  44. package/configure.js +0 -2
  45. package/controller.js +0 -1
  46. package/dist/author/card-bar.d.ts +0 -20
  47. package/dist/author/card-bar.js +0 -40
  48. package/dist/author/defaults.d.ts +0 -113
  49. package/dist/author/defaults.js +0 -84
  50. package/dist/author/index.d.ts +0 -44
  51. package/dist/author/index.js +0 -88
  52. package/dist/author/main.d.ts +0 -25
  53. package/dist/author/main.js +0 -156
  54. package/dist/author/model-options.d.ts +0 -32
  55. package/dist/author/model-options.js +0 -85
  56. package/dist/author/number-text-field.d.ts +0 -15
  57. package/dist/author/number-text-field.js +0 -24
  58. package/dist/browser/author/index.js +0 -36733
  59. package/dist/browser/author/index.js.map +0 -1
  60. package/dist/browser/controller/index.js +0 -78
  61. package/dist/browser/controller/index.js.map +0 -1
  62. package/dist/browser/delivery/index.js +0 -2
  63. package/dist/browser/delivery-BwB7hVA6.js +0 -27725
  64. package/dist/browser/delivery-BwB7hVA6.js.map +0 -1
  65. package/dist/browser/dist-DSzihwLW.js +0 -85
  66. package/dist/browser/dist-DSzihwLW.js.map +0 -1
  67. package/dist/browser/fraction-model.css +0 -2
  68. package/dist/controller/defaults.d.ts +0 -21
  69. package/dist/controller/defaults.js +0 -13
  70. package/dist/controller/index.d.ts +0 -23
  71. package/dist/controller/index.js +0 -68
  72. package/dist/delivery/answer-fraction.d.ts +0 -27
  73. package/dist/delivery/answer-fraction.js +0 -69
  74. package/dist/delivery/fraction-model-chart.d.ts +0 -11
  75. package/dist/delivery/fraction-model-chart.js +0 -154
  76. package/dist/delivery/index.d.ts +0 -22
  77. package/dist/delivery/index.js +0 -54
  78. package/dist/delivery/main.d.ts +0 -38
  79. package/dist/delivery/main.js +0 -136
  80. package/dist/index.d.ts +0 -1
  81. package/dist/index.iife.d.ts +0 -8
  82. package/dist/index.iife.js +0 -179
  83. package/dist/index.js +0 -2
  84. package/dist/runtime-support.d.ts +0 -12
  85. package/dist/runtime-support.js +0 -12
@@ -0,0 +1,639 @@
1
+ The schema defines the following properties:
2
+
3
+ # `correctResponse` (array, required)
4
+
5
+ Array of ResponseObject for correct response
6
+
7
+ The object is an array with all elements of the type `object`.
8
+
9
+ The array object has the following properties:
10
+
11
+ ## `id` (number, required)
12
+
13
+ Indicates the response id for bar or pie model
14
+
15
+ ## `value` (number, required)
16
+
17
+ Indicates the selected response sector for model value
18
+
19
+ # `title` (string, required)
20
+
21
+ The title prompt of the item
22
+
23
+ # `prompt` (string, required)
24
+
25
+ The question prompt or item stem
26
+
27
+ # `modelTypeSelected` (string, enum)
28
+
29
+ Indicates if the model type should be Bar or Pie model
30
+
31
+ This element must be one of the following enum values:
32
+
33
+ * `bar`
34
+ * `pie`
35
+
36
+ Default: `": 'bar'"`
37
+
38
+ # `maxModelSelected` (number)
39
+
40
+ Indicates max no of models to be selected
41
+
42
+ Default: `": 1"`
43
+
44
+ # `partsPerModel` (number)
45
+
46
+ Indicates parts per model to be selected
47
+
48
+ Default: `": 5"`
49
+
50
+ # `allowedStudentConfig` (boolean)
51
+
52
+ Indicates if student can configure no of models and parts per model
53
+
54
+ Default: `": false"`
55
+
56
+ # `showGraphLabels` (boolean)
57
+
58
+ Determines if graph labels visible or not
59
+
60
+ Default: `": false"`
61
+
62
+ # `language` (string)
63
+
64
+ Indicates the language of the component
65
+ Supported options: en, es, en_US, en-US, es_ES, es-ES, es_MX, es-MX
66
+
67
+ # `id` (string, required)
68
+
69
+ Identifier to identify the Pie Element in html markup, Must be unique within a pie item config.
70
+
71
+ # `element` (string, required)
72
+
73
+ The html Element tag name
74
+
75
+ ---
76
+
77
+ # Sub Schemas
78
+
79
+ The schema defines the following additional types:
80
+
81
+ ## `EditableHtmlConfigureProp` (object)
82
+
83
+ Properties of the `EditableHtmlConfigureProp` object:
84
+
85
+ ### `math` (object)
86
+
87
+ Properties of the `math` object:
88
+
89
+ #### `disabled` (boolean)
90
+
91
+ Indicates if the plugin is disabled or not
92
+
93
+ ### `audio` (object)
94
+
95
+ Properties of the `audio` object:
96
+
97
+ #### `disabled` (boolean)
98
+
99
+ Indicates if the plugin is disabled or not
100
+
101
+ ### `video` (object)
102
+
103
+ Properties of the `video` object:
104
+
105
+ #### `disabled` (boolean)
106
+
107
+ Indicates if the plugin is disabled or not
108
+
109
+ ### `image` (object)
110
+
111
+ Properties of the `image` object:
112
+
113
+ #### `disabled` (boolean)
114
+
115
+ Indicates if the plugin is disabled or not
116
+
117
+ ### `customPlugins` (array)
118
+
119
+ An array of objects that determine custom plugins.
120
+ A custom plugin is an object which determines how the button will look like (icon) and the event name that will be triggered when button gets pressed (event).
121
+ Example can be found at https://github.com/pie-framework/pie-lib/blob/develop/packages/demo/pages/editable-html.js#L425.
122
+
123
+ The object is an array with all elements of the type `object`.
124
+
125
+ The array object has the following properties:
126
+
127
+ #### `event` (string, required)
128
+
129
+ The name of the custom event. It needs to be valid (only letters, numbers and "_" can be used).
130
+ PIE will emit the event prefixed with "PIE-".
131
+ Eg: event = 'client_custom_event_A' => the emitted event will be "PIE-client_custom_event_A"
132
+
133
+ #### `iconAlt` (string, required)
134
+
135
+ The alt for the custom button icon
136
+
137
+ #### `iconType` (string, required)
138
+
139
+ The icon type.
140
+ Currently, only "SVG" is supported.
141
+
142
+ #### `icon` (string, required)
143
+
144
+ The icon string. Currently, only "SVG" is supported, so it needs to be a valid svg.
145
+
146
+ ### `blockquote` (object)
147
+
148
+ Properties of the `blockquote` object:
149
+
150
+ #### `disabled` (boolean)
151
+
152
+ Indicates if the plugin is disabled or not
153
+
154
+ ### `h3` (object)
155
+
156
+ Properties of the `h3` object:
157
+
158
+ #### `disabled` (boolean)
159
+
160
+ Indicates if the plugin is disabled or not
161
+
162
+ ### `characters` (object)
163
+
164
+ Properties of the `characters` object:
165
+
166
+ #### `disabled` (boolean)
167
+
168
+ Indicates if the plugin is disabled or not
169
+
170
+ ### `bold` (object)
171
+
172
+ Properties of the `bold` object:
173
+
174
+ #### `disabled` (boolean)
175
+
176
+ Indicates if the plugin is disabled or not
177
+
178
+ ### `html` (object)
179
+
180
+ Properties of the `html` object:
181
+
182
+ #### `disabled` (boolean)
183
+
184
+ Indicates if the plugin is disabled or not
185
+
186
+ ### `italic` (object)
187
+
188
+ Properties of the `italic` object:
189
+
190
+ #### `disabled` (boolean)
191
+
192
+ Indicates if the plugin is disabled or not
193
+
194
+ ### `ol_list` (object)
195
+
196
+ Properties of the `ol_list` object:
197
+
198
+ #### `disabled` (boolean)
199
+
200
+ Indicates if the plugin is disabled or not
201
+
202
+ ### `redo` (object)
203
+
204
+ Properties of the `redo` object:
205
+
206
+ #### `disabled` (boolean)
207
+
208
+ Indicates if the plugin is disabled or not
209
+
210
+ ### `strikethrough` (object)
211
+
212
+ Properties of the `strikethrough` object:
213
+
214
+ #### `disabled` (boolean)
215
+
216
+ Indicates if the plugin is disabled or not
217
+
218
+ ### `sub` (object)
219
+
220
+ Properties of the `sub` object:
221
+
222
+ #### `disabled` (boolean)
223
+
224
+ Indicates if the plugin is disabled or not
225
+
226
+ ### `sup` (object)
227
+
228
+ Properties of the `sup` object:
229
+
230
+ #### `disabled` (boolean)
231
+
232
+ Indicates if the plugin is disabled or not
233
+
234
+ ### `table` (object)
235
+
236
+ Properties of the `table` object:
237
+
238
+ #### `disabled` (boolean)
239
+
240
+ Indicates if the plugin is disabled or not
241
+
242
+ ### `ul_list` (object)
243
+
244
+ Properties of the `ul_list` object:
245
+
246
+ #### `disabled` (boolean)
247
+
248
+ Indicates if the plugin is disabled or not
249
+
250
+ ### `underline` (object)
251
+
252
+ Properties of the `underline` object:
253
+
254
+ #### `disabled` (boolean)
255
+
256
+ Indicates if the plugin is disabled or not
257
+
258
+ ### `undo` (object)
259
+
260
+ Properties of the `undo` object:
261
+
262
+ #### `disabled` (boolean)
263
+
264
+ Indicates if the plugin is disabled or not
265
+
266
+ ## `EditableHtmlButtonConfigure` (object)
267
+
268
+ Properties of the `EditableHtmlButtonConfigure` object:
269
+
270
+ ### `disabled` (boolean)
271
+
272
+ Indicates if the plugin is disabled or not
273
+
274
+ ## `CustomPlugin` (object)
275
+
276
+ Properties of the `CustomPlugin` object:
277
+
278
+ ### `event` (string, required)
279
+
280
+ The name of the custom event. It needs to be valid (only letters, numbers and "_" can be used).
281
+ PIE will emit the event prefixed with "PIE-".
282
+ Eg: event = 'client_custom_event_A' => the emitted event will be "PIE-client_custom_event_A"
283
+
284
+ ### `iconAlt` (string, required)
285
+
286
+ The alt for the custom button icon
287
+
288
+ ### `iconType` (string, required)
289
+
290
+ The icon type.
291
+ Currently, only "SVG" is supported.
292
+
293
+ ### `icon` (string, required)
294
+
295
+ The icon string. Currently, only "SVG" is supported, so it needs to be a valid svg.
296
+
297
+ ## `EditableHtmlPluginConfigure` (object)
298
+
299
+ Properties of the `EditableHtmlPluginConfigure` object:
300
+
301
+ ### `inputConfiguration` (object)
302
+
303
+ Properties of the `inputConfiguration` object:
304
+
305
+ #### `math` (object)
306
+
307
+ Properties of the `math` object:
308
+
309
+ ##### `disabled` (boolean)
310
+
311
+ Indicates if the plugin is disabled or not
312
+
313
+ #### `audio` (object)
314
+
315
+ Properties of the `audio` object:
316
+
317
+ ##### `disabled` (boolean)
318
+
319
+ Indicates if the plugin is disabled or not
320
+
321
+ #### `video` (object)
322
+
323
+ Properties of the `video` object:
324
+
325
+ ##### `disabled` (boolean)
326
+
327
+ Indicates if the plugin is disabled or not
328
+
329
+ #### `image` (object)
330
+
331
+ Properties of the `image` object:
332
+
333
+ ##### `disabled` (boolean)
334
+
335
+ Indicates if the plugin is disabled or not
336
+
337
+ #### `customPlugins` (array)
338
+
339
+ An array of objects that determine custom plugins.
340
+ A custom plugin is an object which determines how the button will look like (icon) and the event name that will be triggered when button gets pressed (event).
341
+ Example can be found at https://github.com/pie-framework/pie-lib/blob/develop/packages/demo/pages/editable-html.js#L425.
342
+
343
+ The object is an array with all elements of the type `object`.
344
+
345
+ The array object has the following properties:
346
+
347
+ ##### `event` (string, required)
348
+
349
+ The name of the custom event. It needs to be valid (only letters, numbers and "_" can be used).
350
+ PIE will emit the event prefixed with "PIE-".
351
+ Eg: event = 'client_custom_event_A' => the emitted event will be "PIE-client_custom_event_A"
352
+
353
+ ##### `iconAlt` (string, required)
354
+
355
+ The alt for the custom button icon
356
+
357
+ ##### `iconType` (string, required)
358
+
359
+ The icon type.
360
+ Currently, only "SVG" is supported.
361
+
362
+ ##### `icon` (string, required)
363
+
364
+ The icon string. Currently, only "SVG" is supported, so it needs to be a valid svg.
365
+
366
+ #### `blockquote` (object)
367
+
368
+ Properties of the `blockquote` object:
369
+
370
+ ##### `disabled` (boolean)
371
+
372
+ Indicates if the plugin is disabled or not
373
+
374
+ #### `h3` (object)
375
+
376
+ Properties of the `h3` object:
377
+
378
+ ##### `disabled` (boolean)
379
+
380
+ Indicates if the plugin is disabled or not
381
+
382
+ #### `characters` (object)
383
+
384
+ Properties of the `characters` object:
385
+
386
+ ##### `disabled` (boolean)
387
+
388
+ Indicates if the plugin is disabled or not
389
+
390
+ #### `bold` (object)
391
+
392
+ Properties of the `bold` object:
393
+
394
+ ##### `disabled` (boolean)
395
+
396
+ Indicates if the plugin is disabled or not
397
+
398
+ #### `html` (object)
399
+
400
+ Properties of the `html` object:
401
+
402
+ ##### `disabled` (boolean)
403
+
404
+ Indicates if the plugin is disabled or not
405
+
406
+ #### `italic` (object)
407
+
408
+ Properties of the `italic` object:
409
+
410
+ ##### `disabled` (boolean)
411
+
412
+ Indicates if the plugin is disabled or not
413
+
414
+ #### `ol_list` (object)
415
+
416
+ Properties of the `ol_list` object:
417
+
418
+ ##### `disabled` (boolean)
419
+
420
+ Indicates if the plugin is disabled or not
421
+
422
+ #### `redo` (object)
423
+
424
+ Properties of the `redo` object:
425
+
426
+ ##### `disabled` (boolean)
427
+
428
+ Indicates if the plugin is disabled or not
429
+
430
+ #### `strikethrough` (object)
431
+
432
+ Properties of the `strikethrough` object:
433
+
434
+ ##### `disabled` (boolean)
435
+
436
+ Indicates if the plugin is disabled or not
437
+
438
+ #### `sub` (object)
439
+
440
+ Properties of the `sub` object:
441
+
442
+ ##### `disabled` (boolean)
443
+
444
+ Indicates if the plugin is disabled or not
445
+
446
+ #### `sup` (object)
447
+
448
+ Properties of the `sup` object:
449
+
450
+ ##### `disabled` (boolean)
451
+
452
+ Indicates if the plugin is disabled or not
453
+
454
+ #### `table` (object)
455
+
456
+ Properties of the `table` object:
457
+
458
+ ##### `disabled` (boolean)
459
+
460
+ Indicates if the plugin is disabled or not
461
+
462
+ #### `ul_list` (object)
463
+
464
+ Properties of the `ul_list` object:
465
+
466
+ ##### `disabled` (boolean)
467
+
468
+ Indicates if the plugin is disabled or not
469
+
470
+ #### `underline` (object)
471
+
472
+ Properties of the `underline` object:
473
+
474
+ ##### `disabled` (boolean)
475
+
476
+ Indicates if the plugin is disabled or not
477
+
478
+ #### `undo` (object)
479
+
480
+ Properties of the `undo` object:
481
+
482
+ ##### `disabled` (boolean)
483
+
484
+ Indicates if the plugin is disabled or not
485
+
486
+ ### `settings` (boolean)
487
+
488
+ Indicates if the item has to be displayed in the Settings Panel
489
+
490
+ ### `label` (string)
491
+
492
+ Indicates the label for the item that has to be displayed in the Settings Panel
493
+
494
+ ## `FractionModelOptionsConfigure` (object)
495
+
496
+ Properties of the `FractionModelOptionsConfigure` object:
497
+
498
+ ### `maxOfModel` (object)
499
+
500
+ Properties of the `maxOfModel` object:
501
+
502
+ #### `min` (number)
503
+
504
+ Indicates the min value for number model
505
+
506
+ #### `max` (number)
507
+
508
+ Indicates the max value for number model
509
+
510
+ #### `default` (number)
511
+
512
+ Indicates the default value for number model
513
+
514
+ ### `partsPerModel` (object)
515
+
516
+ Properties of the `partsPerModel` object:
517
+
518
+ #### `min` (number)
519
+
520
+ Indicates the min value for number model
521
+
522
+ #### `max` (number)
523
+
524
+ Indicates the max value for number model
525
+
526
+ #### `default` (number)
527
+
528
+ Indicates the default value for number model
529
+
530
+ ### `modelTypeChoices` (array)
531
+
532
+ Indicates the model types of item
533
+
534
+ The object is an array with all elements of the type `object`.
535
+
536
+ The array object has the following properties:
537
+
538
+ #### `value` (string, required)
539
+
540
+ Indicates the value for model choice
541
+
542
+ #### `label` (string, required)
543
+
544
+ Indicates the label for model choice
545
+
546
+ ## `ModelConfig` (object)
547
+
548
+ Properties of the `ModelConfig` object:
549
+
550
+ ### `min` (number)
551
+
552
+ Indicates the min value for number model
553
+
554
+ ### `max` (number)
555
+
556
+ Indicates the max value for number model
557
+
558
+ ### `default` (number)
559
+
560
+ Indicates the default value for number model
561
+
562
+ ## `ChoiceConfig` (object)
563
+
564
+ Properties of the `ChoiceConfig` object:
565
+
566
+ ### `value` (string, required)
567
+
568
+ Indicates the value for model choice
569
+
570
+ ### `label` (string, required)
571
+
572
+ Indicates the label for model choice
573
+
574
+ ## `ConfigureMathMLProp` (object)
575
+
576
+ Properties of the `ConfigureMathMLProp` object:
577
+
578
+ ### `mmlOutput` (number)
579
+
580
+ Indicates if model should have mathML output instead of latex
581
+
582
+ ### `mmlEditing` (number)
583
+
584
+ Indicates if mathML that's already in model should be editable
585
+
586
+ ## `ConfigurePropWithEnabled` (object)
587
+
588
+ Properties of the `ConfigurePropWithEnabled` object:
589
+
590
+ ### `enabled` (boolean)
591
+
592
+ Indicates the value of the item if it affects config-ui
593
+ (eg.: if item is a switch and displaying an input on the config-ui depends on the switch value: on/off)
594
+
595
+ ### `settings` (boolean)
596
+
597
+ Indicates if the item has to be displayed in the Settings Panel
598
+
599
+ ### `label` (string)
600
+
601
+ Indicates the label for the item that has to be displayed in the Settings Panel
602
+
603
+ ## `ConfigureLanguageOptionsProp` (object)
604
+
605
+ Properties of the `ConfigureLanguageOptionsProp` object:
606
+
607
+ ### `value` (string, required)
608
+
609
+ Value of the language option
610
+
611
+ ### `label` (string, required)
612
+
613
+ Label of the language option
614
+
615
+ ## `ConfigureProp` (object)
616
+
617
+ Properties of the `ConfigureProp` object:
618
+
619
+ ### `settings` (boolean)
620
+
621
+ Indicates if the item has to be displayed in the Settings Panel
622
+
623
+ ### `label` (string)
624
+
625
+ Indicates the label for the item that has to be displayed in the Settings Panel
626
+
627
+ ## `ResponseObject` (object)
628
+
629
+ Model for the @pie-elements/fraction-model
630
+
631
+ Properties of the `ResponseObject` object:
632
+
633
+ ### `id` (number, required)
634
+
635
+ Indicates the response id for bar or pie model
636
+
637
+ ### `value` (number, required)
638
+
639
+ Indicates the selected response sector for model value