@pie-element/ebsr 12.3.4-next.3 → 13.0.0-beta.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.
Files changed (101) hide show
  1. package/configure/lib/defaults.js +23 -36
  2. package/configure/lib/defaults.js.map +1 -1
  3. package/configure/lib/index.js +114 -202
  4. package/configure/lib/index.js.map +1 -1
  5. package/configure/lib/main.js +188 -271
  6. package/configure/lib/main.js.map +1 -1
  7. package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.json +1972 -0
  8. package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.md +4213 -0
  9. package/configure/node_modules/@pie-element/multiple-choice/PRINT.md +35 -0
  10. package/configure/node_modules/@pie-element/multiple-choice/README.md +56 -0
  11. package/configure/node_modules/@pie-element/multiple-choice/choice.png +0 -0
  12. package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.json +1387 -0
  13. package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.md +3351 -0
  14. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/__tests__/root.test.js +248 -0
  15. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js +200 -0
  16. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js.map +1 -0
  17. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js +211 -0
  18. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js.map +1 -0
  19. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js +477 -0
  20. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js.map +1 -0
  21. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js +18 -0
  22. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js.map +1 -0
  23. package/configure/node_modules/@pie-element/multiple-choice/configure/package.json +22 -0
  24. package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.json +527 -0
  25. package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.md +2316 -0
  26. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/__tests__/index.test.js +520 -0
  27. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/__tests__/utils.test.js +8 -0
  28. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js +33 -0
  29. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js.map +1 -0
  30. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js +251 -0
  31. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js.map +1 -0
  32. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js +16 -0
  33. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js.map +1 -0
  34. package/configure/node_modules/@pie-element/multiple-choice/controller/package.json +15 -0
  35. package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json +2993 -0
  36. package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json.md +2217 -0
  37. package/configure/node_modules/@pie-element/multiple-choice/docs/demo/config.js +8 -0
  38. package/configure/node_modules/@pie-element/multiple-choice/docs/demo/generate.js +61 -0
  39. package/configure/node_modules/@pie-element/multiple-choice/docs/demo/index.html +1 -0
  40. package/configure/node_modules/@pie-element/multiple-choice/docs/demo/pie.manifest.json +11 -0
  41. package/configure/node_modules/@pie-element/multiple-choice/docs/demo/session.js +7 -0
  42. package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json +1332 -0
  43. package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json.md +1015 -0
  44. package/configure/node_modules/@pie-element/multiple-choice/lib/__tests__/choice-input-test.js +117 -0
  45. package/configure/node_modules/@pie-element/multiple-choice/lib/__tests__/index-test.js +151 -0
  46. package/configure/node_modules/@pie-element/multiple-choice/lib/__tests__/key-events-test.js +95 -0
  47. package/configure/node_modules/@pie-element/multiple-choice/lib/__tests__/multiple-choice-test.js +223 -0
  48. package/configure/node_modules/@pie-element/multiple-choice/lib/__tests__/session-updater-test.js +70 -0
  49. package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js +370 -0
  50. package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js.map +1 -0
  51. package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js +197 -0
  52. package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js.map +1 -0
  53. package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js +130 -0
  54. package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js.map +1 -0
  55. package/configure/node_modules/@pie-element/multiple-choice/lib/index.js +292 -0
  56. package/configure/node_modules/@pie-element/multiple-choice/lib/index.js.map +1 -0
  57. package/configure/node_modules/@pie-element/multiple-choice/lib/main.js +54 -0
  58. package/configure/node_modules/@pie-element/multiple-choice/lib/main.js.map +1 -0
  59. package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js +386 -0
  60. package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js.map +1 -0
  61. package/configure/node_modules/@pie-element/multiple-choice/lib/print.js +92 -0
  62. package/configure/node_modules/@pie-element/multiple-choice/lib/print.js.map +1 -0
  63. package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js +37 -0
  64. package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js.map +1 -0
  65. package/configure/node_modules/@pie-element/multiple-choice/package.json +39 -0
  66. package/configure/package.json +9 -6
  67. package/configure/src/__tests__/index.test.js +99 -108
  68. package/configure/src/index.js +13 -6
  69. package/configure/src/main.jsx +14 -18
  70. package/controller/lib/defaults.js +20 -32
  71. package/controller/lib/defaults.js.map +1 -1
  72. package/controller/lib/index.js +224 -349
  73. package/controller/lib/index.js.map +1 -1
  74. package/controller/lib/utils.js +4 -18
  75. package/controller/lib/utils.js.map +1 -1
  76. package/controller/package.json +3 -3
  77. package/lib/index.js +113 -181
  78. package/lib/index.js.map +1 -1
  79. package/lib/print.js +120 -204
  80. package/lib/print.js.map +1 -1
  81. package/package.json +5 -13
  82. package/src/__tests__/index.test.js +18 -5
  83. package/configure/src/__tests__/__snapshots__/index.test.js.snap +0 -83
  84. package/esm/configure.js +0 -12003
  85. package/esm/configure.js.map +0 -1
  86. package/esm/controller.js +0 -3358
  87. package/esm/controller.js.map +0 -1
  88. package/esm/element.js +0 -2203
  89. package/esm/element.js.map +0 -1
  90. package/esm/package.json +0 -3
  91. package/esm/print.js +0 -4092
  92. package/esm/print.js.map +0 -1
  93. package/module/configure.js +0 -1
  94. package/module/controller.js +0 -6469
  95. package/module/demo.js +0 -77
  96. package/module/element.js +0 -1
  97. package/module/index.html +0 -21
  98. package/module/manifest.json +0 -14
  99. package/module/print-demo.js +0 -115
  100. package/module/print.html +0 -18
  101. package/module/print.js +0 -1
@@ -0,0 +1,35 @@
1
+ # print how to
2
+
3
+ Brief guide on how to build pie-element print modules. Each element can have their own print module. It needs to be defined in the package.json `exports` map.
4
+
5
+
6
+ These modules will be published as part of the npm package.
7
+
8
+ We will then have a new element that 3rd parties can use to load up these elements:
9
+
10
+ ```html
11
+ <pie-print config={} options={}></pie-print>
12
+ ```
13
+
14
+ This is being developed in another repo: https://github.com/key-data-systems/pie-print-support
15
+
16
+
17
+
18
+ ## how to run a single element that will recompile when there are changes (no HMR):
19
+
20
+ `yarn pslb serve --config pslb/pslb.config.js --package @pie-element/multiple-choice --logLevel info`
21
+
22
+ Then go to:
23
+
24
+ http://localhost:7752/multiple-choice/module/index.html
25
+
26
+
27
+ ## how to build
28
+
29
+ You prob won't need this but for your edification:
30
+
31
+ `yarn pslb --config pslb/pslb.config.js --package @pie-element/multiple-choice --logLevel info`
32
+
33
+
34
+
35
+
@@ -0,0 +1,56 @@
1
+ # @pie-element/multiple-choice
2
+
3
+
4
+ A [pie][pie]choice component.
5
+
6
+ ![choice.png](choice.png)
7
+
8
+ ## Usage
9
+
10
+ To use this pie, you need to configure it within an Assessment Item. This means that you'll need to add it to the `index.html` and `config.json` files.
11
+
12
+ ```html
13
+ <multiple-choice pie-id="1"></multiple-choice>
14
+ ```
15
+
16
+ ```javascript
17
+ {
18
+ elements: {
19
+ 'multiple-choice': '@pie-element/multiple-choice@^1.0.0'
20
+ },
21
+ models: [
22
+ {
23
+ id : "1",
24
+ element: 'multiple-choice',
25
+ prompt : "1 + 1 equals?",
26
+ // more configuration...
27
+ }
28
+ ]
29
+ ```
30
+
31
+ ### Pie Demo
32
+ There is a demo in `docs/demo` that you can run to see an example of it's usage.
33
+
34
+ To preview it in that context you'll need the [pie][pie] tool.
35
+
36
+ ```shell
37
+ npm install -g pie
38
+ cd multiple-choice/docs/demo
39
+ pie serve #will build and serve the pie... then go to http://localhost:4000
40
+ ```
41
+
42
+ ## Test
43
+
44
+ ```shell
45
+ npm test # run client and controller tests
46
+ npm run client-test # run client tests
47
+ npm run controller-test # run controller tests
48
+ ```
49
+ ## Release
50
+
51
+ ```shell
52
+ gulp release
53
+ git checkout master
54
+ npm publish
55
+ ```
56
+ [pie]: http://npmjs.org/package/pie