@pie-element/ebsr 6.6.2 → 6.6.3-next.1016
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/CHANGELOG.md +169 -0
- package/configure/CHANGELOG.md +169 -0
- package/configure/lib/defaults.js +29 -12
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/index.js +30 -23
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/main.js +70 -43
- package/configure/lib/main.js.map +1 -1
- package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.json +1972 -0
- package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.md +1793 -0
- package/configure/node_modules/@pie-element/multiple-choice/LICENSE.md +5 -0
- package/configure/node_modules/@pie-element/multiple-choice/PRINT.md +35 -0
- package/configure/node_modules/@pie-element/multiple-choice/README.md +56 -0
- package/configure/node_modules/@pie-element/multiple-choice/choice.png +0 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.json +1387 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.md +1334 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js +104 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js +198 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js +599 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js +18 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/package.json +20 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.json +527 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.md +768 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js +18 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js +305 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js +36 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/package.json +15 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json +353 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json.md +277 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/config.js +8 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/generate.js +52 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/index.html +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/session.js +7 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json +338 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json.md +274 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js +298 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js +157 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js +174 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/index.js +151 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/main.js +97 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js +254 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/print.js +129 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/print.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js +35 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/configure.js +843 -0
- package/{module → configure/node_modules/@pie-element/multiple-choice/module}/controller.js +17399 -17113
- package/configure/node_modules/@pie-element/multiple-choice/module/demo.js +77 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/element.js +2019 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/index.html +21 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/manifest.json +14 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/print-demo.js +115 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/print.html +18 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/print.js +1983 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/CHANGELOG.json +1677 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/CHANGELOG.md +1645 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/LICENSE.md +5 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/README.md +12 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/alert-dialog.js +44 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/alert-dialog.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/checkbox.js +86 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/checkbox.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js +180 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js +409 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-utils.js +54 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js +196 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js +75 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js +189 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/form-section.js +46 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/form-section.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/help.js +156 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/help.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/index.js +216 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/input.js +152 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/input.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/inputs.js +131 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/inputs.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/langs.js +191 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/langs.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js +113 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/index.js +24 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js +115 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js +99 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/mui-box/index.js +79 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/mui-box/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js +370 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field.js +278 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/radio-with-label.js +41 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/radio-with-label.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/display-size.js +77 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/display-size.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/index.js +140 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/panel.js +426 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/panel.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js +43 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/toggle.js +56 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/toggle.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tabs/index.js +117 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tabs/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tags-input/index.js +210 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tags-input/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/two-choice.js +192 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/two-choice.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js +95 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/CHANGELOG.json +672 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/CHANGELOG.md +449 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/LICENSE.md +5 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/index.js +30 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +316 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +23 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +123 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/normalization.js +103 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/render-math.js +276 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/package.json +19 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/playground/demo.html +872 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/playground/demo.js +108 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/playground/main.html +156 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/playground/main.js +16 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +29 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/src/index.js +4 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +215 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/src/mstack/index.js +13 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +24 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/src/normalization.js +69 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/src/render-math.js +230 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/CHANGELOG.json +937 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/CHANGELOG.md +618 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/LICENSE.md +5 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/README.md +33 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +146 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/color.js +134 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/color.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/feedback.js +160 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/feedback.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/has-text.js +24 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/has-text.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/html-and-math.js +102 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/index.js +104 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/input-container.js +60 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/input-container.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/preview-layout.js +133 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +162 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/purpose.js +28 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/purpose.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/readable.js +28 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/readable.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/response-indicators.js +160 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +206 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/package.json +30 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +68 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/color.js +48 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/feedback.jsx +100 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/has-text.js +14 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/html-and-math.js +40 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/index.js +27 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/input-container.jsx +41 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +77 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +90 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/purpose.jsx +19 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/readable.jsx +19 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +89 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +118 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/package.json +30 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/alert-dialog.jsx +43 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/checkbox.jsx +63 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-configuration/feedback-menu.jsx +103 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-configuration/index.jsx +315 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-utils.js +30 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/feedback-selector.jsx +116 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/group.jsx +54 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/index.jsx +98 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/form-section.jsx +23 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/help.jsx +88 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/index.js +58 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/input.jsx +72 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/inputs.jsx +96 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/langs.jsx +122 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/config-layout.jsx +64 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/index.js +4 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/layout-contents.jsx +60 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/settings-box.jsx +31 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/mui-box/index.jsx +64 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/number-text-field-custom.jsx +279 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/number-text-field.jsx +196 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/radio-with-label.jsx +18 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/display-size.jsx +52 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/index.js +75 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/panel.jsx +297 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/settings-radio-label.jsx +20 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/toggle.jsx +31 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/tabs/index.jsx +51 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/tags-input/index.jsx +121 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/two-choice.jsx +94 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/with-stateful-model.jsx +36 -0
- package/configure/node_modules/@pie-element/multiple-choice/package.json +34 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.json +547 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.md +516 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/README.md +64 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js +86 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js +155 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js +65 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/CHANGELOG.json +672 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/CHANGELOG.md +449 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/index.js +30 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +316 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +23 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +123 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/normalization.js +103 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/render-math.js +276 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/package.json +19 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/playground/demo.html +872 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/playground/demo.js +108 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/playground/main.html +156 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/playground/main.js +16 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +29 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/src/index.js +4 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +215 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/src/mstack/index.js +13 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +24 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/src/normalization.js +69 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/src/render-math.js +230 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/CHANGELOG.json +937 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/CHANGELOG.md +618 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/README.md +33 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +146 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/color.js +134 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/color.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/feedback.js +160 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/feedback.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/has-text.js +24 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/has-text.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/html-and-math.js +102 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/index.js +104 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/input-container.js +60 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/input-container.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/preview-layout.js +133 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +162 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/purpose.js +28 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/purpose.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/readable.js +28 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/readable.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/response-indicators.js +160 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +206 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/package.json +30 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +68 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/color.js +48 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/feedback.jsx +100 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/has-text.js +14 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/html-and-math.js +40 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/index.js +27 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/input-container.jsx +41 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +77 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +90 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/purpose.jsx +19 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/readable.jsx +19 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +89 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +118 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/package.json +36 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/preview.png +0 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/src/expander.jsx +65 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/src/index.jsx +75 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/src/styles.js +60 -0
- package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.json +3327 -0
- package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.md +1616 -0
- package/configure/node_modules/@pie-lib/editable-html/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/editable-html/README.md +45 -0
- package/configure/node_modules/@pie-lib/editable-html/deploy.sh +16 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/editor.js +752 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/editor.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/index.js +236 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js +16 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js +250 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js +143 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js +219 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js +139 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js +135 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js +204 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js +347 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js +344 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js +449 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js +109 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js +106 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js +264 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js +97 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js +54 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js +93 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js +288 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js +70 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js +110 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js +69 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js +497 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js +169 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js +132 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js +50 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js +275 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js +32 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js +179 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js +358 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js +62 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js +411 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/theme.js +9 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/theme.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/CHANGELOG.json +672 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/CHANGELOG.md +449 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/index.js +30 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +316 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +23 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +123 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/normalization.js +103 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/render-math.js +276 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/package.json +19 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/playground/demo.html +872 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/playground/demo.js +108 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/playground/main.html +156 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/playground/main.js +16 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +29 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/src/index.js +4 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +215 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/src/mstack/index.js +13 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +24 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/src/normalization.js +69 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/src/render-math.js +230 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/CHANGELOG.json +937 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/CHANGELOG.md +618 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/README.md +33 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +146 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/color.js +134 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/color.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/feedback.js +160 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/feedback.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/has-text.js +24 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/has-text.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/html-and-math.js +102 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/index.js +104 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/input-container.js +60 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/input-container.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/preview-layout.js +133 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +162 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/purpose.js +28 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/purpose.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/readable.js +28 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/readable.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/response-indicators.js +160 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +206 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/package.json +30 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +68 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/color.js +48 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/feedback.jsx +100 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/has-text.js +14 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/html-and-math.js +40 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/index.js +27 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/input-container.jsx +41 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +77 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +90 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/purpose.jsx +19 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/readable.jsx +19 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +89 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +118 -0
- package/configure/node_modules/@pie-lib/editable-html/package.json +51 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/image/data.js +59 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/image/index.html +24 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/image/index.jsx +83 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/index.html +27 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.html +25 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.jsx +151 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/package.json +15 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.html +26 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.jsx +30 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/data.js +29 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/image-plugin.jsx +40 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.html +23 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.jsx +96 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/data.js +29 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/image-plugin.jsx +40 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.html +24 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.jsx +12 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/static.json +3 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/table-examples.html +67 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/webpack.config.js +42 -0
- package/configure/node_modules/@pie-lib/editable-html/src/editor.jsx +641 -0
- package/configure/node_modules/@pie-lib/editable-html/src/index.jsx +145 -0
- package/configure/node_modules/@pie-lib/editable-html/src/parse-html.js +8 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/README.md +27 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/component.jsx +166 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/image-toolbar.jsx +62 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/index.jsx +180 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/insert-image-handler.js +93 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/index.jsx +112 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/list/index.jsx +175 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/math/index.jsx +283 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/index.jsx +284 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-dialog.js +372 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-toolbar.jsx +53 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-wrapper.jsx +43 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/choice.jsx +187 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/index.jsx +78 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/explicit-constructed-response/index.jsx +45 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/icons/index.jsx +68 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/index.jsx +259 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/inline-dropdown/index.jsx +63 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/utils.jsx +77 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/icons/index.jsx +59 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/index.jsx +437 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/table-toolbar.jsx +104 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/default-toolbar.jsx +111 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/done-button.jsx +36 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/editor-and-toolbar.jsx +225 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/index.jsx +21 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar-buttons.jsx +97 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar.jsx +316 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/utils.js +32 -0
- package/configure/node_modules/@pie-lib/editable-html/src/serialization.jsx +376 -0
- package/configure/node_modules/@pie-lib/editable-html/src/theme.js +1 -0
- package/configure/node_modules/@pie-lib/editable-html/static.json +1 -0
- package/configure/node_modules/@pie-lib/math-input/CHANGELOG.json +1547 -0
- package/configure/node_modules/@pie-lib/math-input/CHANGELOG.md +757 -0
- package/configure/node_modules/@pie-lib/math-input/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/math-input/README.md +27 -0
- package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js +126 -0
- package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/index.js +80 -0
- package/configure/node_modules/@pie-lib/math-input/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js +417 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js +34 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js +41 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js +17 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js +46 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js +43 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js +53 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js +16 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js +35 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js +31 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js +165 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js +295 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js +54 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js +32 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js +23 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js +23 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js +69 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js +23 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js +17 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js +45 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js +23 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js +53 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js +130 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js +29 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/math-input.js +206 -0
- package/configure/node_modules/@pie-lib/math-input/lib/math-input.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js +23 -0
- package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js +24 -0
- package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js +257 -0
- package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js +224 -0
- package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/package.json +26 -0
- package/configure/node_modules/@pie-lib/math-input/src/horizontal-keypad.jsx +54 -0
- package/configure/node_modules/@pie-lib/math-input/src/index.jsx +27 -0
- package/configure/node_modules/@pie-lib/math-input/src/keypad/index.jsx +335 -0
- package/configure/node_modules/@pie-lib/math-input/src/keypad/keys-layout.js +17 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/basic-operators.js +32 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/chars.js +5 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/comparison.js +27 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/constants.js +35 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/digits.js +40 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/edit.js +3 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/exponent.js +27 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/fractions.js +23 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/geometry.js +140 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/grades.js +379 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/index.js +21 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/log.js +22 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/logic.js +15 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/matrices.js +15 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/misc.js +60 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/navigation.js +8 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/operators.js +9 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/statistics.js +36 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/sub-sup.js +15 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/trigonometry.js +15 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/utils.js +71 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/vars.js +19 -0
- package/configure/node_modules/@pie-lib/math-input/src/math-input.jsx +128 -0
- package/configure/node_modules/@pie-lib/math-input/src/mq/custom-elements.js +11 -0
- package/configure/node_modules/@pie-lib/math-input/src/mq/index.js +4 -0
- package/configure/node_modules/@pie-lib/math-input/src/mq/input.jsx +163 -0
- package/configure/node_modules/@pie-lib/math-input/src/mq/static.jsx +145 -0
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.json +672 -0
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.md +427 -0
- package/configure/node_modules/@pie-lib/math-rendering/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/index.js +30 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +316 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +23 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +123 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js +103 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js +275 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/package.json +19 -0
- package/configure/node_modules/@pie-lib/math-rendering/playground/demo.html +872 -0
- package/configure/node_modules/@pie-lib/math-rendering/playground/demo.js +108 -0
- package/configure/node_modules/@pie-lib/math-rendering/playground/main.html +156 -0
- package/configure/node_modules/@pie-lib/math-rendering/playground/main.js +16 -0
- package/configure/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +29 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/index.js +4 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +215 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/index.js +13 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +24 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/normalization.js +69 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/render-math.js +234 -0
- package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.json +862 -0
- package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.md +631 -0
- package/configure/node_modules/@pie-lib/math-toolbar/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js +53 -0
- package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js +463 -0
- package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js +271 -0
- package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js +173 -0
- package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-toolbar/package.json +37 -0
- package/configure/node_modules/@pie-lib/math-toolbar/src/done-button.jsx +39 -0
- package/configure/node_modules/@pie-lib/math-toolbar/src/editor-and-pad.jsx +373 -0
- package/configure/node_modules/@pie-lib/math-toolbar/src/index.jsx +193 -0
- package/configure/node_modules/@pie-lib/math-toolbar/src/math-preview.jsx +107 -0
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.json +937 -0
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.md +602 -0
- package/configure/node_modules/@pie-lib/render-ui/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/render-ui/README.md +33 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +146 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/color.js +134 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/color.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js +160 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js +24 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js +102 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/index.js +104 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js +60 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js +133 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +162 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js +28 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/readable.js +28 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/readable.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js +160 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +206 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/package.json +30 -0
- package/configure/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +68 -0
- package/configure/node_modules/@pie-lib/render-ui/src/color.js +48 -0
- package/configure/node_modules/@pie-lib/render-ui/src/feedback.jsx +100 -0
- package/configure/node_modules/@pie-lib/render-ui/src/has-text.js +14 -0
- package/configure/node_modules/@pie-lib/render-ui/src/html-and-math.js +40 -0
- package/configure/node_modules/@pie-lib/render-ui/src/index.js +27 -0
- package/configure/node_modules/@pie-lib/render-ui/src/input-container.jsx +41 -0
- package/configure/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +77 -0
- package/configure/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +90 -0
- package/configure/node_modules/@pie-lib/render-ui/src/purpose.jsx +19 -0
- package/configure/node_modules/@pie-lib/render-ui/src/readable.jsx +19 -0
- package/configure/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +89 -0
- package/configure/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +118 -0
- package/configure/package.json +3 -3
- package/configure/src/__tests__/__snapshots__/index.test.js.snap +12 -4
- package/configure/src/__tests__/index.test.js +4 -2
- package/configure/src/defaults.js +27 -11
- package/configure/src/index.js +14 -35
- package/configure/src/main.jsx +69 -35
- package/controller/CHANGELOG.md +25 -0
- package/controller/lib/index.js +113 -23
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +1 -1
- package/controller/src/index.js +62 -5
- package/docs/config-schema.json +311 -3
- package/docs/config-schema.json.md +243 -7
- package/docs/demo/config.js +1 -1
- package/docs/pie-schema.json +139 -1
- package/docs/pie-schema.json.md +106 -2
- package/lib/index.js +10 -7
- package/lib/index.js.map +1 -1
- package/lib/print.js +243 -0
- package/lib/print.js.map +1 -0
- package/package.json +8 -4
- package/src/index.js +4 -0
- package/src/print.js +181 -0
- package/docs/demo/pie.manifest.json +0 -11
- package/module/configure.js +0 -1546
- package/module/demo.js +0 -79
- package/module/element.js +0 -1326
- package/module/index.html +0 -16
- package/module/manifest.json +0 -10
package/configure/src/index.js
CHANGED
|
@@ -23,11 +23,6 @@ defineMultipleChoice();
|
|
|
23
23
|
const prepareCustomizationObject = (config, model) => {
|
|
24
24
|
const configuration = defaults(config, sensibleDefaults.configuration);
|
|
25
25
|
configuration.settingsPanelDisabled = true;
|
|
26
|
-
// it is required for ebsr partA not to allow changing response type
|
|
27
|
-
configuration.partA.choiceMode = {
|
|
28
|
-
settings: false,
|
|
29
|
-
label: 'Response Type'
|
|
30
|
-
};
|
|
31
26
|
|
|
32
27
|
return {
|
|
33
28
|
configuration,
|
|
@@ -35,17 +30,21 @@ const prepareCustomizationObject = (config, model) => {
|
|
|
35
30
|
};
|
|
36
31
|
};
|
|
37
32
|
|
|
33
|
+
const { model: modelDefault } = sensibleDefaults || {};
|
|
34
|
+
|
|
38
35
|
export default class EbsrConfigure extends HTMLElement {
|
|
39
|
-
static createDefaultModel = (model = {}) => ({
|
|
40
|
-
...
|
|
36
|
+
static createDefaultModel = ({ partA = {}, partB = {}, ...model } = {}, defaults = modelDefault) => ({
|
|
37
|
+
...defaults,
|
|
41
38
|
...model,
|
|
42
39
|
partA: {
|
|
43
|
-
...
|
|
44
|
-
...
|
|
40
|
+
...defaults.partA,
|
|
41
|
+
...partA,
|
|
42
|
+
choicesLayout: partA.choicesLayout || (partA.verticalMode === false && 'horizontal') || defaults.partA.choicesLayout
|
|
45
43
|
},
|
|
46
44
|
partB: {
|
|
47
|
-
...
|
|
48
|
-
...
|
|
45
|
+
...defaults.partB,
|
|
46
|
+
...partB,
|
|
47
|
+
choicesLayout: partB.choicesLayout || (partB.verticalMode === false && 'horizontal') || defaults.partB.choicesLayout
|
|
49
48
|
},
|
|
50
49
|
});
|
|
51
50
|
|
|
@@ -53,23 +52,13 @@ export default class EbsrConfigure extends HTMLElement {
|
|
|
53
52
|
super();
|
|
54
53
|
|
|
55
54
|
this._model = EbsrConfigure.createDefaultModel();
|
|
55
|
+
|
|
56
56
|
this._configuration = sensibleDefaults.configuration;
|
|
57
57
|
this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
set model(m) {
|
|
61
|
-
this._model =
|
|
62
|
-
...this._model,
|
|
63
|
-
...m,
|
|
64
|
-
partA: {
|
|
65
|
-
...this._model.partA,
|
|
66
|
-
...m.partA,
|
|
67
|
-
},
|
|
68
|
-
partB: {
|
|
69
|
-
...this._model.partB,
|
|
70
|
-
...m.partB,
|
|
71
|
-
}
|
|
72
|
-
};
|
|
61
|
+
this._model = EbsrConfigure.createDefaultModel(m, this._model);
|
|
73
62
|
|
|
74
63
|
this._render();
|
|
75
64
|
}
|
|
@@ -81,18 +70,7 @@ export default class EbsrConfigure extends HTMLElement {
|
|
|
81
70
|
}
|
|
82
71
|
|
|
83
72
|
onModelChanged = (m, reset) => {
|
|
84
|
-
this._model =
|
|
85
|
-
...this._model,
|
|
86
|
-
...m,
|
|
87
|
-
partA: {
|
|
88
|
-
...this._model.partA,
|
|
89
|
-
...m.partA,
|
|
90
|
-
},
|
|
91
|
-
partB: {
|
|
92
|
-
...this._model.partB,
|
|
93
|
-
...m.partB,
|
|
94
|
-
}
|
|
95
|
-
};
|
|
73
|
+
this._model = EbsrConfigure.createDefaultModel(m, this._model);
|
|
96
74
|
|
|
97
75
|
this.dispatchModelUpdated(reset);
|
|
98
76
|
this._render();
|
|
@@ -117,6 +95,7 @@ export default class EbsrConfigure extends HTMLElement {
|
|
|
117
95
|
}
|
|
118
96
|
|
|
119
97
|
onModelUpdated = e => {
|
|
98
|
+
|
|
120
99
|
if (e.target === this) {
|
|
121
100
|
return;
|
|
122
101
|
}
|
package/configure/src/main.jsx
CHANGED
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { settings, layout } from '@pie-lib/config-ui';
|
|
4
4
|
import { withStyles } from '@material-ui/core/styles';
|
|
5
|
-
import cloneDeep from 'lodash/cloneDeep';
|
|
6
5
|
|
|
7
6
|
const { Panel, toggle, radio, dropdown } = settings;
|
|
8
7
|
|
|
@@ -26,34 +25,39 @@ export class Main extends React.Component {
|
|
|
26
25
|
onConfigurationChanged: PropTypes.func
|
|
27
26
|
};
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
removeExtraChoices = (choices) => {
|
|
29
|
+
let correctFound = false;
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
return (choices || []).map(choice => {
|
|
32
|
+
if (correctFound) {
|
|
33
|
+
choice.correct = false;
|
|
34
|
+
return choice;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (choice.correct) {
|
|
38
|
+
correctFound = true;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return choice;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
35
44
|
|
|
36
|
-
|
|
45
|
+
onModelChanged = (model, key) => {
|
|
46
|
+
const { onModelChanged } = this.props;
|
|
37
47
|
|
|
38
|
-
if (
|
|
39
|
-
|
|
48
|
+
if (key === 'partA.choiceMode' && model.partA.choiceMode === 'radio') {
|
|
49
|
+
model.partA.choices = this.removeExtraChoices(model.partA.choices);
|
|
40
50
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (correctFound) {
|
|
44
|
-
c.correct = false;
|
|
45
|
-
return c;
|
|
46
|
-
};
|
|
51
|
+
return onModelChanged(model, true);
|
|
52
|
+
}
|
|
47
53
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
};
|
|
54
|
+
if (key === 'partB.choiceMode' && model.partB.choiceMode === 'radio') {
|
|
55
|
+
model.partB.choices = this.removeExtraChoices(model.partB.choices);
|
|
51
56
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
57
|
+
return onModelChanged(model, true);
|
|
58
|
+
}
|
|
55
59
|
|
|
56
|
-
return onModelChanged(model
|
|
60
|
+
return onModelChanged(model);
|
|
57
61
|
}
|
|
58
62
|
|
|
59
63
|
render() {
|
|
@@ -63,7 +67,7 @@ export class Main extends React.Component {
|
|
|
63
67
|
configuration,
|
|
64
68
|
onConfigurationChanged
|
|
65
69
|
} = this.props;
|
|
66
|
-
const { partLabelType } = model;
|
|
70
|
+
const { partLabelType, partA: modelPartA, partB: modelPartB } = model;
|
|
67
71
|
const { partA, partB, partialScoring, scoringType, ...generalConfiguration } = configuration;
|
|
68
72
|
const {
|
|
69
73
|
feedback: feedbackA = {},
|
|
@@ -73,8 +77,10 @@ export class Main extends React.Component {
|
|
|
73
77
|
prompt: promptA = {},
|
|
74
78
|
teacherInstructions: teacherInstructionsA = {},
|
|
75
79
|
studentInstructions: studentInstructionsA = {},
|
|
76
|
-
|
|
77
|
-
|
|
80
|
+
choicesLayout: choicesLayoutA = {},
|
|
81
|
+
gridColumns: gridColumnsA = {},
|
|
82
|
+
rationale: rationaleA = {},
|
|
83
|
+
spellCheck: spellCheckA = {}
|
|
78
84
|
} = partA || {};
|
|
79
85
|
const {
|
|
80
86
|
feedback: feedbackB = {},
|
|
@@ -84,13 +90,21 @@ export class Main extends React.Component {
|
|
|
84
90
|
prompt: promptB = {},
|
|
85
91
|
teacherInstructions: teacherInstructionsB = {},
|
|
86
92
|
studentInstructions: studentInstructionsB = {},
|
|
87
|
-
|
|
88
|
-
|
|
93
|
+
choicesLayout: choicesLayoutB = {},
|
|
94
|
+
gridColumns: gridColumnsB = {},
|
|
95
|
+
rationale: rationaleB = {},
|
|
96
|
+
spellCheck: spellCheckB = {}
|
|
89
97
|
} = partB || {};
|
|
90
98
|
const type = partLabelType || 'Numbers';
|
|
91
99
|
const typeIsNumber = type === 'Numbers';
|
|
92
100
|
const firstPart = `Part ${typeIsNumber ? '1' : 'A'}`;
|
|
93
101
|
const secondPart = `Part ${typeIsNumber ? '2' : 'B'}`;
|
|
102
|
+
const nrOfColumnsAvailable = {
|
|
103
|
+
partA: modelPartA.choices && modelPartA.choices.length ?
|
|
104
|
+
Array.from({length: modelPartA.choices.length}, (_, i) => (`${i + 1}`)) : [],
|
|
105
|
+
partB: modelPartB.choices && modelPartB.choices.length ?
|
|
106
|
+
Array.from({length: modelPartB.choices.length}, (_, i) => (`${i + 1}`)) : [],
|
|
107
|
+
};
|
|
94
108
|
|
|
95
109
|
return (
|
|
96
110
|
<div className={classes.design}>
|
|
@@ -122,8 +136,13 @@ export class Main extends React.Component {
|
|
|
122
136
|
radio(choicePrefixA.label, ['numbers', 'letters']),
|
|
123
137
|
'partA.lockChoiceOrder':
|
|
124
138
|
lockChoiceOrderA.settings && toggle(lockChoiceOrderA.label),
|
|
125
|
-
'partA.
|
|
126
|
-
|
|
139
|
+
'partA.choicesLayout':
|
|
140
|
+
choicesLayoutA.settings &&
|
|
141
|
+
dropdown(choicesLayoutA.label, ['vertical', 'grid', 'horizontal']),
|
|
142
|
+
'partA.gridColumns':
|
|
143
|
+
choicesLayoutA.settings && modelPartA.choicesLayout === 'grid' &&
|
|
144
|
+
nrOfColumnsAvailable.partA.length > 0 &&
|
|
145
|
+
dropdown(gridColumnsA.label, nrOfColumnsAvailable.partA)
|
|
127
146
|
},
|
|
128
147
|
[`Properties ${firstPart}`]: {
|
|
129
148
|
'partA.feedbackEnabled': feedbackA.settings &&
|
|
@@ -137,7 +156,9 @@ export class Main extends React.Component {
|
|
|
137
156
|
studentInstructionsA.settings &&
|
|
138
157
|
toggle(studentInstructionsA.label),
|
|
139
158
|
'partA.rationaleEnabled':
|
|
140
|
-
rationaleA.settings && toggle(rationaleA.label)
|
|
159
|
+
rationaleA.settings && toggle(rationaleA.label),
|
|
160
|
+
'partA.spellCheckEnabled':
|
|
161
|
+
spellCheckA.settings && toggle(spellCheckA.label),
|
|
141
162
|
},
|
|
142
163
|
[`Settings ${secondPart}`]: {
|
|
143
164
|
'partB.choiceMode':
|
|
@@ -148,8 +169,13 @@ export class Main extends React.Component {
|
|
|
148
169
|
radio(choicePrefixB.label, ['numbers', 'letters']),
|
|
149
170
|
'partB.lockChoiceOrder':
|
|
150
171
|
lockChoiceOrderB.settings && toggle(lockChoiceOrderB.label),
|
|
151
|
-
'partB.
|
|
152
|
-
|
|
172
|
+
'partB.choicesLayout':
|
|
173
|
+
choicesLayoutB.settings &&
|
|
174
|
+
dropdown(choicesLayoutB.label, ['vertical', 'grid', 'horizontal']),
|
|
175
|
+
'partB.gridColumns':
|
|
176
|
+
choicesLayoutB.settings && modelPartB.choicesLayout === 'grid' &&
|
|
177
|
+
nrOfColumnsAvailable.partB.length > 0 &&
|
|
178
|
+
dropdown(gridColumnsB.label, nrOfColumnsAvailable.partB)
|
|
153
179
|
},
|
|
154
180
|
[`Properties ${secondPart}`]: {
|
|
155
181
|
'partB.feedbackEnabled':
|
|
@@ -163,7 +189,9 @@ export class Main extends React.Component {
|
|
|
163
189
|
studentInstructionsB.settings &&
|
|
164
190
|
toggle(studentInstructionsB.label),
|
|
165
191
|
'partB.rationaleEnabled':
|
|
166
|
-
rationaleB.settings && toggle(rationaleB.label)
|
|
192
|
+
rationaleB.settings && toggle(rationaleB.label),
|
|
193
|
+
'partB.spellCheckEnabled':
|
|
194
|
+
spellCheckB.settings && toggle(spellCheckB.label),
|
|
167
195
|
}
|
|
168
196
|
}}
|
|
169
197
|
/>
|
|
@@ -179,7 +207,10 @@ export class Main extends React.Component {
|
|
|
179
207
|
if (ref) {
|
|
180
208
|
// do not use destructuring to get model from props
|
|
181
209
|
this.partA = ref;
|
|
182
|
-
this.partA._model =
|
|
210
|
+
this.partA._model = {
|
|
211
|
+
...this.props.model.partA,
|
|
212
|
+
errors: this.props.model.errors && this.props.model.errors.partA || {}
|
|
213
|
+
};
|
|
183
214
|
this.partA.configuration = {
|
|
184
215
|
...partA,
|
|
185
216
|
...generalConfiguration
|
|
@@ -198,7 +229,10 @@ export class Main extends React.Component {
|
|
|
198
229
|
if (ref) {
|
|
199
230
|
// do not use destructuring to get model from props
|
|
200
231
|
this.partB = ref;
|
|
201
|
-
this.partB._model =
|
|
232
|
+
this.partB._model ={
|
|
233
|
+
...this.props.model.partB,
|
|
234
|
+
errors: this.props.model.errors && this.props.model.errors.partB || {}
|
|
235
|
+
};
|
|
202
236
|
this.partB.configuration = {
|
|
203
237
|
...partB,
|
|
204
238
|
...generalConfiguration
|
package/controller/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,31 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [6.0.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/ebsr-controller@6.0.0...@pie-element/ebsr-controller@6.0.1) (2021-09-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/ebsr-controller
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [6.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/ebsr-controller@5.2.2...@pie-element/ebsr-controller@6.0.0) (2021-08-09)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **ebsr:** Added choicesLayout support ([33fb7e7](https://github.com/pie-framework/pie-elements/commit/33fb7e765146a7343a58663f3667f4a5de472960))
|
|
20
|
+
* **ebsr:** Added choicesLayout support \n BREAKING CHANGE: removed vertical mode ([348fc00](https://github.com/pie-framework/pie-elements/commit/348fc0031536d458071a1105e742c3d19399a15e))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### BREAKING CHANGES
|
|
24
|
+
|
|
25
|
+
* **ebsr:** removed vertical mode.
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
6
31
|
## [5.2.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/ebsr-controller@5.2.0...@pie-element/ebsr-controller@5.2.2) (2021-08-05)
|
|
7
32
|
|
|
8
33
|
|
package/controller/lib/index.js
CHANGED
|
@@ -5,14 +5,20 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
+
exports.createDefaultModel = exports.createCorrectResponseSession = void 0;
|
|
8
9
|
exports.model = model;
|
|
10
|
+
exports.normalize = void 0;
|
|
9
11
|
exports.outcome = outcome;
|
|
10
|
-
exports.
|
|
12
|
+
exports.validate = void 0;
|
|
11
13
|
|
|
12
14
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
13
15
|
|
|
16
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
17
|
+
|
|
14
18
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
15
19
|
|
|
20
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
21
|
+
|
|
16
22
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
23
|
|
|
18
24
|
var _defaults = _interopRequireDefault(require("./defaults"));
|
|
@@ -25,9 +31,11 @@ var _get = _interopRequireDefault(require("lodash/get"));
|
|
|
25
31
|
|
|
26
32
|
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
var _excluded = ["partA", "partB"];
|
|
29
35
|
|
|
30
|
-
function
|
|
36
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
37
|
+
|
|
38
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31
39
|
|
|
32
40
|
var prepareChoice = function prepareChoice(model, env, defaultFeedback) {
|
|
33
41
|
return function (choice) {
|
|
@@ -78,27 +86,36 @@ var parsePart = function parsePart(part, key, session, env) {
|
|
|
78
86
|
});
|
|
79
87
|
};
|
|
80
88
|
|
|
81
|
-
var normalize = function normalize(
|
|
89
|
+
var normalize = function normalize(_ref) {
|
|
90
|
+
var _ref$partA = _ref.partA,
|
|
91
|
+
partA = _ref$partA === void 0 ? {} : _ref$partA,
|
|
92
|
+
_ref$partB = _ref.partB,
|
|
93
|
+
partB = _ref$partB === void 0 ? {} : _ref$partB,
|
|
94
|
+
question = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
82
95
|
return _objectSpread(_objectSpread({
|
|
83
96
|
partLabels: true,
|
|
84
97
|
partLabelType: 'Letters'
|
|
85
98
|
}, question), {}, {
|
|
86
|
-
partA: _objectSpread(_objectSpread({}, _defaults["default"].partA), {}, {
|
|
99
|
+
partA: _objectSpread(_objectSpread(_objectSpread({}, _defaults["default"].partA), {}, {
|
|
87
100
|
rationaleEnabled: true,
|
|
88
101
|
feedbackEnabled: true,
|
|
89
102
|
promptEnabled: true,
|
|
90
103
|
teacherInstructionsEnabled: true,
|
|
91
104
|
studentInstructionsEnabled: true,
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
|
|
105
|
+
gridColumns: '2'
|
|
106
|
+
}, partA), {}, {
|
|
107
|
+
choicesLayout: partA.choicesLayout || partA.verticalMode === false && 'horizontal' || 'vertical'
|
|
108
|
+
}),
|
|
109
|
+
partB: _objectSpread(_objectSpread(_objectSpread({}, _defaults["default"].partB), {}, {
|
|
95
110
|
rationaleEnabled: true,
|
|
96
111
|
promptEnabled: true,
|
|
97
112
|
feedbackEnabled: true,
|
|
98
113
|
teacherInstructionsEnabled: true,
|
|
99
114
|
studentInstructionsEnabled: true,
|
|
100
|
-
|
|
101
|
-
},
|
|
115
|
+
gridColumns: '2'
|
|
116
|
+
}, partB), {}, {
|
|
117
|
+
choicesLayout: partB.choicesLayout || partB.verticalMode === false && 'horizontal' || 'vertical'
|
|
118
|
+
})
|
|
102
119
|
});
|
|
103
120
|
};
|
|
104
121
|
/**
|
|
@@ -118,7 +135,7 @@ function model(_x, _x2, _x3, _x4) {
|
|
|
118
135
|
|
|
119
136
|
function _model() {
|
|
120
137
|
_model = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(question, session, env, updateSession) {
|
|
121
|
-
var normalizedQuestion, partA, partB, shuffledValues, us, partASession, partALockChoiceOrder,
|
|
138
|
+
var normalizedQuestion, partA, partB, shuffledValues, us, partASession, partALockChoiceOrder, _ref8, partAChoices, _ref9, partBChoices, partBSession, partBLockChoiceOrder;
|
|
122
139
|
|
|
123
140
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
124
141
|
while (1) {
|
|
@@ -140,8 +157,8 @@ function _model() {
|
|
|
140
157
|
|
|
141
158
|
partASession = (0, _get["default"])(session, 'value.partA');
|
|
142
159
|
partALockChoiceOrder = (0, _controllerUtils.lockChoices)(normalizedQuestion.partA, partASession, env);
|
|
143
|
-
|
|
144
|
-
|
|
160
|
+
_ref8 = partA || {}, partAChoices = _ref8.choices;
|
|
161
|
+
_ref9 = partB || {}, partBChoices = _ref9.choices;
|
|
145
162
|
|
|
146
163
|
if (!(!partALockChoiceOrder && partAChoices && partAChoices.length)) {
|
|
147
164
|
_context.next = 13;
|
|
@@ -235,14 +252,14 @@ var isCorrect = function isCorrect(c) {
|
|
|
235
252
|
};
|
|
236
253
|
|
|
237
254
|
var getScore = function getScore(config, sessionPart, key) {
|
|
238
|
-
var
|
|
239
|
-
|
|
240
|
-
choices =
|
|
255
|
+
var _ref2 = config && config[key] || {},
|
|
256
|
+
_ref2$choices = _ref2.choices,
|
|
257
|
+
choices = _ref2$choices === void 0 ? [] : _ref2$choices;
|
|
241
258
|
|
|
242
259
|
var maxScore = choices.length;
|
|
243
260
|
|
|
244
|
-
var
|
|
245
|
-
sessionPartValue =
|
|
261
|
+
var _ref3 = sessionPart || {},
|
|
262
|
+
sessionPartValue = _ref3.value;
|
|
246
263
|
|
|
247
264
|
var chosen = function chosen(c) {
|
|
248
265
|
return !!(sessionPartValue || []).find(function (v) {
|
|
@@ -275,8 +292,8 @@ var getScore = function getScore(config, sessionPart, key) {
|
|
|
275
292
|
|
|
276
293
|
function outcome(config, session) {
|
|
277
294
|
return new Promise(function (resolve) {
|
|
278
|
-
var
|
|
279
|
-
value =
|
|
295
|
+
var _ref4 = session || {},
|
|
296
|
+
value = _ref4.value;
|
|
280
297
|
|
|
281
298
|
if (!session || !value) {
|
|
282
299
|
resolve({
|
|
@@ -288,9 +305,9 @@ function outcome(config, session) {
|
|
|
288
305
|
}
|
|
289
306
|
|
|
290
307
|
if (value) {
|
|
291
|
-
var
|
|
292
|
-
partA =
|
|
293
|
-
partB =
|
|
308
|
+
var _ref5 = value || {},
|
|
309
|
+
partA = _ref5.partA,
|
|
310
|
+
partB = _ref5.partB;
|
|
294
311
|
|
|
295
312
|
var scoreA = getScore(config, partA, 'partA');
|
|
296
313
|
var scoreB = getScore(config, partB, 'partB');
|
|
@@ -378,4 +395,77 @@ var createCorrectResponseSession = function createCorrectResponseSession(questio
|
|
|
378
395
|
};
|
|
379
396
|
|
|
380
397
|
exports.createCorrectResponseSession = createCorrectResponseSession;
|
|
398
|
+
|
|
399
|
+
var validatePart = function validatePart() {
|
|
400
|
+
var model = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
401
|
+
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
402
|
+
var choices = model.choices;
|
|
403
|
+
var _config$minAnswerChoi = config.minAnswerChoices,
|
|
404
|
+
minAnswerChoices = _config$minAnswerChoi === void 0 ? 2 : _config$minAnswerChoi,
|
|
405
|
+
maxAnswerChoices = config.maxAnswerChoices;
|
|
406
|
+
var reversedChoices = (0, _toConsumableArray2["default"])(choices || []).reverse();
|
|
407
|
+
var choicesErrors = {};
|
|
408
|
+
var hasCorrectResponse = false;
|
|
409
|
+
reversedChoices.forEach(function (choice, index) {
|
|
410
|
+
var correct = choice.correct,
|
|
411
|
+
value = choice.value,
|
|
412
|
+
label = choice.label;
|
|
413
|
+
|
|
414
|
+
if (correct) {
|
|
415
|
+
hasCorrectResponse = true;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
if (label === '' || label === '<div></div>') {
|
|
419
|
+
choicesErrors[value] = 'Content should not be empty.';
|
|
420
|
+
} else {
|
|
421
|
+
var identicalAnswer = reversedChoices.slice(index + 1).some(function (c) {
|
|
422
|
+
return c.label === label;
|
|
423
|
+
});
|
|
424
|
+
|
|
425
|
+
if (identicalAnswer) {
|
|
426
|
+
choicesErrors[value] = 'Content should be unique.';
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
});
|
|
430
|
+
var errors = {};
|
|
431
|
+
var nbOfChoices = (choices || []).length;
|
|
432
|
+
|
|
433
|
+
if (nbOfChoices < minAnswerChoices) {
|
|
434
|
+
errors.answerChoicesError = "There should be at least ".concat(minAnswerChoices, " choices defined.");
|
|
435
|
+
} else if (nbOfChoices > maxAnswerChoices) {
|
|
436
|
+
errors.answerChoicesError = "No more than ".concat(maxAnswerChoices, " choices should be defined.");
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
if (!hasCorrectResponse) {
|
|
440
|
+
errors.correctResponseError = 'No correct response defined.';
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
if (!(0, _isEmpty["default"])(choicesErrors)) {
|
|
444
|
+
errors.choicesErrors = choicesErrors;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
return errors;
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
var validate = function validate() {
|
|
451
|
+
var model = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
452
|
+
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
453
|
+
|
|
454
|
+
var _ref6 = model || {},
|
|
455
|
+
partA = _ref6.partA,
|
|
456
|
+
partB = _ref6.partB;
|
|
457
|
+
|
|
458
|
+
var _ref7 = config || {},
|
|
459
|
+
partAConfig = _ref7.partA,
|
|
460
|
+
partBConfig = _ref7.partB;
|
|
461
|
+
|
|
462
|
+
var partAErrors = validatePart(partA, partAConfig);
|
|
463
|
+
var partBErrors = validatePart(partB, partBConfig);
|
|
464
|
+
return {
|
|
465
|
+
partA: partAErrors,
|
|
466
|
+
partB: partBErrors
|
|
467
|
+
};
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
exports.validate = validate;
|
|
381
471
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":["prepareChoice","model","env","defaultFeedback","choice","out","label","value","role","mode","rationale","rationaleEnabled","correct","feedbackEnabled","feedbackType","feedback","type","parsePart","part","key","session","Object","assign","incorrect","choices","map","disabled","complete","min","filter","c","length","responseCorrect","undefined","normalize","question","partLabels","partLabelType","partA","defaults","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","verticalMode","partB","updateSession","normalizedQuestion","shuffledValues","us","id","element","update","Promise","resolve","partASession","partALockChoiceOrder","partAChoices","partBChoices","partBSession","partBLockChoiceOrder","e","console","error","partLabel","teacherInstructions","prompt","createDefaultModel","isCorrect","getScore","config","sessionPart","maxScore","sessionPartValue","chosen","find","v","correctAndNotChosen","incorrectAndChosen","correctChoices","reduce","total","partialScoring","parseFloat","toFixed","outcome","score","scoreA","scoreB","empty","max","returnPartCorrect","answers","forEach","i","push","createCorrectResponseSession","partACorrect","partBCorrect"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAAQC,GAAR,EAAaC,eAAb;AAAA,SAAiC,UAAAC,MAAM,EAAI;AAC/D,QAAMC,GAAG,GAAG;AACVC,MAAAA,KAAK,EAAEF,MAAM,CAACE,KADJ;AAEVC,MAAAA,KAAK,EAAEH,MAAM,CAACG;AAFJ,KAAZ;;AAKA,QACEL,GAAG,CAACM,IAAJ,KAAa,YAAb,KACCN,GAAG,CAACO,IAAJ,KAAa,MAAb,IAAuBP,GAAG,CAACO,IAAJ,KAAa,UADr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tF,KADE;;AAEnB,QAAIK,OAAJ,EAAa;AACX+E,MAAAA,OAAO,CAACG,IAAR,CAAavF,KAAb;AACD;AACF,GALD;AAMA,SAAOoF,OAAP;AACD,CAVD;;AAYO,IAAMI,4BAA4B,GAAG,SAA/BA,4BAA+B,CAAC5D,QAAD,EAAWjC,GAAX,EAAmB;AAC7D,SAAO,IAAIkD,OAAJ,CAAY,UAAAC,OAAO,EAAI;AAC5B,QAAInD,GAAG,CAACO,IAAJ,KAAa,UAAb,IAA2BP,GAAG,CAACM,IAAJ,KAAa,YAA5C,EAA0D;AAAA,UAChD8B,KADgD,GAC/BH,QAD+B,CAChDG,KADgD;AAAA,UACzCM,KADyC,GAC/BT,QAD+B,CACzCS,KADyC;AAGxD,UAAMoD,YAAY,GAAGN,iBAAiB,CAACpD,KAAK,CAACd,OAAP,CAAtC;AACA,UAAMyE,YAAY,GAAGP,iBAAiB,CAAC9C,KAAK,CAACpB,OAAP,CAAtC;AAEA6B,MAAAA,OAAO,CAAC;AACN9C,QAAAA,KAAK,EAAE;AACL+B,UAAAA,KAAK,EAAE;AACLW,YAAAA,EAAE,EAAE,OADC;AAEL1C,YAAAA,KAAK,EAAEyF;AAFF,WADF;AAKLpD,UAAAA,KAAK,EAAE;AACLK,YAAAA,EAAE,EAAE,OADC;AAEL1C,YAAAA,KAAK,EAAE0F;AAFF;AALF,SADD;AAWNhD,QAAAA,EAAE,EAAE;AAXE,OAAD,CAAP;AAaD,KAnBD,MAmBO;AACLI,MAAAA,OAAO,CAAC,IAAD,CAAP;AACD;AACF,GAvBM,CAAP;AAwBD,CAzBM","sourcesContent":["import defaults from './defaults';\nimport { lockChoices, getShuffledChoices } from '@pie-lib/controller-utils';\nimport { isResponseCorrect } from './utils';\nimport get from 'lodash/get';\nimport isEmpty from 'lodash/isEmpty';\n\nconst prepareChoice = (model, env, defaultFeedback) => choice => {\n const out = {\n label: choice.label,\n value: choice.value\n };\n\n if (\n env.role === 'instructor' &&\n (env.mode === 'view' || env.mode === 'evaluate')\n ) {\n out.rationale = model.rationaleEnabled ? choice.rationale : null;\n } else {\n out.rationale = null;\n }\n\n if (env.mode === 'evaluate') {\n out.correct = !!choice.correct;\n\n if (model.feedbackEnabled) {\n const feedbackType = (choice.feedback && choice.feedback.type) || 'none';\n\n if (feedbackType === 'default') {\n out.feedback = defaultFeedback[choice.correct ? 'correct' : 'incorrect'];\n } else if (feedbackType === 'custom') {\n out.feedback = choice.feedback.value;\n }\n }\n }\n\n return out;\n};\n\nconst parsePart = (part, key, session, env) => {\n const defaultFeedback = Object.assign(\n { correct: 'Correct', incorrect: 'Incorrect' },\n part.defaultFeedback\n );\n\n let choices = part.choices\n ? part.choices.map(prepareChoice(part, env, defaultFeedback))\n : [];\n\n return {\n ...part,\n choices,\n disabled: env.mode !== 'gather',\n complete: {\n min: part.choices.filter(c => c.correct).length\n },\n responseCorrect:\n env.mode === 'evaluate'\n ? isResponseCorrect(part, key, session)\n : undefined\n };\n};\n\nexport const normalize = question => ({\n partLabels: true,\n partLabelType: 'Letters',\n ...question,\n partA: {\n ...defaults.partA,\n rationaleEnabled: true,\n feedbackEnabled: true,\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n verticalMode: true,\n ...question.partA\n },\n partB: {\n ...defaults.partB,\n rationaleEnabled: true,\n promptEnabled: true,\n feedbackEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n verticalMode: true,\n ...question.partB\n }\n});\n\n/**\n *\n * @param {*} question\n * @param {*} session\n * @param {*} env\n * @param {*} updateSession - optional - a function that will set the properties passed into it on the session.\n */\nexport async function model(question, session, env, updateSession) {\n const normalizedQuestion = normalize(question);\n const partA = parsePart(normalizedQuestion.partA, 'partA', session, env);\n const partB = parsePart(normalizedQuestion.partB, 'partB', session, env);\n\n const shuffledValues = {};\n\n const us = part => (id, element, update) =>\n new Promise(resolve => {\n shuffledValues[part] = update.shuffledValues;\n resolve();\n });\n\n const partASession = get(session, 'value.partA');\n const partALockChoiceOrder = lockChoices(normalizedQuestion.partA, partASession, env);\n\n const { choices: partAChoices } = partA || {};\n const { choices: partBChoices } = partB || {};\n\n if (!partALockChoiceOrder && partAChoices && partAChoices.length) {\n partA.choices = await getShuffledChoices(\n partAChoices,\n { shuffledValues: (session.shuffledValues || {}).partA },\n us('partA'),\n 'value'\n );\n }\n\n const partBSession = get(session, 'value.partB');\n const partBLockChoiceOrder = lockChoices(normalizedQuestion.partB, partBSession, env);\n\n if (!partBLockChoiceOrder && partBChoices && partBChoices.length) {\n partB.choices = await getShuffledChoices(\n partBChoices,\n { shuffledValues: (session.shuffledValues || {}).partB },\n us('partB'),\n 'value'\n );\n }\n\n if (!isEmpty(shuffledValues)) {\n if (updateSession && typeof updateSession === 'function') {\n updateSession(session.id, session.element, {\n shuffledValues\n }).catch(e => {\n console.error('update session failed', e);\n });\n }\n }\n\n if (normalizedQuestion.partLabels) {\n partA.partLabel =\n normalizedQuestion.partLabelType === 'Letters' ? 'Part A' : 'Part 1';\n partB.partLabel =\n normalizedQuestion.partLabelType === 'Letters' ? 'Part B' : 'Part 2';\n } else {\n partA.partLabel = undefined;\n partB.partLabel = undefined;\n }\n\n if (\n env.role === 'instructor' &&\n (env.mode === 'view' || env.mode === 'evaluate')\n ) {\n partA.teacherInstructions = normalizedQuestion.partA\n .teacherInstructionsEnabled\n ? normalizedQuestion.partA.teacherInstructions\n : null;\n partB.teacherInstructions = normalizedQuestion.partB\n .teacherInstructionsEnabled\n ? normalizedQuestion.partB.teacherInstructions\n : null;\n } else {\n partA.teacherInstructions = null;\n partB.teacherInstructions = null;\n }\n\n partA.prompt = normalizedQuestion.partA.promptEnabled\n ? normalizedQuestion.partA.prompt\n : null;\n partB.prompt = normalizedQuestion.partB.promptEnabled\n ? normalizedQuestion.partB.prompt\n : null;\n\n return new Promise(resolve => {\n resolve({\n disabled: env.mode !== 'gather',\n mode: env.mode,\n partA,\n partB\n });\n });\n}\n\nexport const createDefaultModel = (model = {}) =>\n new Promise(resolve => {\n resolve({\n ...defaults,\n ...model\n });\n });\n\nconst isCorrect = c => c.correct === true;\n\nconst getScore = (config, sessionPart, key) => {\n const { choices = [] } = (config && config[key]) || {};\n const maxScore = choices.length;\n const { value: sessionPartValue } = sessionPart || {};\n\n const chosen = c => !!(sessionPartValue || []).find(v => v === c.value);\n const correctAndNotChosen = c => isCorrect(c) && !chosen(c);\n const incorrectAndChosen = c => !isCorrect(c) && chosen(c);\n const correctChoices = choices.reduce((total, choice) => {\n if (correctAndNotChosen(choice) || incorrectAndChosen(choice)) {\n return total - 1;\n } else {\n return total;\n }\n }, choices.length);\n\n // determine score for a part\n if (!config.partialScoring && correctChoices < maxScore) {\n return 0;\n }\n\n return parseFloat(maxScore ? (correctChoices / maxScore).toFixed(2) : 0);\n};\n\nexport function outcome(config, session) {\n return new Promise(resolve => {\n const { value } = session || {};\n\n if (!session || !value) {\n resolve({ score: 0, scoreA: 0, scoreB: 0, empty: true });\n }\n\n if (value) {\n const { partA, partB } = value || {};\n\n const scoreA = getScore(config, partA, 'partA');\n const scoreB = getScore(config, partB, 'partB');\n\n if (!config.partialScoring) {\n // The EBSR item is worth 1 point\n // That point is awarded if and only if both parts are fully correct, otherwise no points are awarded\n resolve({ score: (scoreA === 1 && scoreB === 1) ? 1 : 0, scoreA, scoreB, max: 1 });\n } else {\n // The EBSR item is worth 2 points\n if (scoreA === 1) {\n if (scoreB === 1) {\n // If Part A and Part B are both correct, 2 points are awarded\n resolve({ score: 2, scoreA, scoreB, max: 2 });\n } else {\n // If Part A is correct and part B is incorrect, 1 point is awarded\n resolve({ score: 1, scoreA, scoreB, max: 2 });\n }\n } else {\n // For all other combinations, no points are awarded\n resolve({ score: 0, scoreA, scoreB, max: 2 });\n }\n }\n }\n });\n}\n\nconst returnPartCorrect = choices => {\n let answers = [];\n\n choices.forEach(i => {\n const { correct, value } = i;\n if (correct) {\n answers.push(value);\n }\n });\n return answers;\n};\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise(resolve => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { partA, partB } = question;\n\n const partACorrect = returnPartCorrect(partA.choices);\n const partBCorrect = returnPartCorrect(partB.choices);\n\n resolve({\n value: {\n partA: {\n id: 'partA',\n value: partACorrect\n },\n partB: {\n id: 'partB',\n value: partBCorrect\n }\n },\n id: '1'\n });\n } else {\n resolve(null);\n }\n });\n};\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":["prepareChoice","model","env","defaultFeedback","choice","out","label","value","role","mode","rationale","rationaleEnabled","correct","feedbackEnabled","feedbackType","feedback","type","parsePart","part","key","session","Object","assign","incorrect","choices","map","disabled","complete","min","filter","c","length","responseCorrect","undefined","normalize","partA","partB","question","partLabels","partLabelType","defaults","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","gridColumns","choicesLayout","verticalMode","updateSession","normalizedQuestion","shuffledValues","us","id","element","update","Promise","resolve","partASession","partALockChoiceOrder","partAChoices","partBChoices","partBSession","partBLockChoiceOrder","e","console","error","partLabel","teacherInstructions","prompt","createDefaultModel","isCorrect","getScore","config","sessionPart","maxScore","sessionPartValue","chosen","find","v","correctAndNotChosen","incorrectAndChosen","correctChoices","reduce","total","partialScoring","parseFloat","toFixed","outcome","score","scoreA","scoreB","empty","max","returnPartCorrect","answers","forEach","i","push","createCorrectResponseSession","partACorrect","partBCorrect","validatePart","minAnswerChoices","maxAnswerChoices","reversedChoices","reverse","choicesErrors","hasCorrectResponse","index","identicalAnswer","slice","some","errors","nbOfChoices","answerChoicesError","correctResponseError","validate","partAConfig","partBConfig","partAErrors","partBErrors"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAAQC,GAAR,EAAaC,eAAb;AAAA,SAAiC,UAAAC,MAAM,EAAI;AAC/D,QAAMC,GAAG,GAAG;AACVC,MAAAA,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nB,YAAY,CAAChE,KAAD,EAAQiF,WAAR,CAAhC;AAEA,SAAO;AAAElF,IAAAA,KAAK,EAAEmF,WAAT;AAAsBlF,IAAAA,KAAK,EAAEmF;AAA7B,GAAP;AACD,CARM","sourcesContent":["import defaults from './defaults';\nimport { lockChoices, getShuffledChoices } from '@pie-lib/controller-utils';\nimport { isResponseCorrect } from './utils';\nimport get from 'lodash/get';\nimport isEmpty from 'lodash/isEmpty';\n\nconst prepareChoice = (model, env, defaultFeedback) => choice => {\n const out = {\n label: choice.label,\n value: choice.value\n };\n\n if (\n env.role === 'instructor' &&\n (env.mode === 'view' || env.mode === 'evaluate')\n ) {\n out.rationale = model.rationaleEnabled ? choice.rationale : null;\n } else {\n out.rationale = null;\n }\n\n if (env.mode === 'evaluate') {\n out.correct = !!choice.correct;\n\n if (model.feedbackEnabled) {\n const feedbackType = (choice.feedback && choice.feedback.type) || 'none';\n\n if (feedbackType === 'default') {\n out.feedback = defaultFeedback[choice.correct ? 'correct' : 'incorrect'];\n } else if (feedbackType === 'custom') {\n out.feedback = choice.feedback.value;\n }\n }\n }\n\n return out;\n};\n\nconst parsePart = (part, key, session, env) => {\n const defaultFeedback = Object.assign(\n { correct: 'Correct', incorrect: 'Incorrect' },\n part.defaultFeedback\n );\n\n let choices = part.choices\n ? part.choices.map(prepareChoice(part, env, defaultFeedback))\n : [];\n\n return {\n ...part,\n choices,\n disabled: env.mode !== 'gather',\n complete: {\n min: part.choices.filter(c => c.correct).length\n },\n responseCorrect:\n env.mode === 'evaluate'\n ? isResponseCorrect(part, key, session)\n : undefined\n };\n};\n\nexport const normalize = ({ partA = {}, partB = {}, ...question }) => ({\n partLabels: true,\n partLabelType: 'Letters',\n ...question,\n partA: {\n ...defaults.partA,\n rationaleEnabled: true,\n feedbackEnabled: true,\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n gridColumns: '2',\n ...partA,\n choicesLayout: partA.choicesLayout || (partA.verticalMode === false && 'horizontal') || 'vertical'\n },\n partB: {\n ...defaults.partB,\n rationaleEnabled: true,\n promptEnabled: true,\n feedbackEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n gridColumns: '2',\n ...partB,\n choicesLayout: partB.choicesLayout || (partB.verticalMode === false && 'horizontal') || 'vertical'\n }\n});\n\n/**\n *\n * @param {*} question\n * @param {*} session\n * @param {*} env\n * @param {*} updateSession - optional - a function that will set the properties passed into it on the session.\n */\nexport async function model(question, session, env, updateSession) {\n const normalizedQuestion = normalize(question);\n const partA = parsePart(normalizedQuestion.partA, 'partA', session, env);\n const partB = parsePart(normalizedQuestion.partB, 'partB', session, env);\n\n const shuffledValues = {};\n\n const us = part => (id, element, update) =>\n new Promise(resolve => {\n shuffledValues[part] = update.shuffledValues;\n resolve();\n });\n\n const partASession = get(session, 'value.partA');\n const partALockChoiceOrder = lockChoices(normalizedQuestion.partA, partASession, env);\n\n const { choices: partAChoices } = partA || {};\n const { choices: partBChoices } = partB || {};\n\n if (!partALockChoiceOrder && partAChoices && partAChoices.length) {\n partA.choices = await getShuffledChoices(\n partAChoices,\n { shuffledValues: (session.shuffledValues || {}).partA },\n us('partA'),\n 'value'\n );\n }\n\n const partBSession = get(session, 'value.partB');\n const partBLockChoiceOrder = lockChoices(normalizedQuestion.partB, partBSession, env);\n\n if (!partBLockChoiceOrder && partBChoices && partBChoices.length) {\n partB.choices = await getShuffledChoices(\n partBChoices,\n { shuffledValues: (session.shuffledValues || {}).partB },\n us('partB'),\n 'value'\n );\n }\n\n if (!isEmpty(shuffledValues)) {\n if (updateSession && typeof updateSession === 'function') {\n updateSession(session.id, session.element, {\n shuffledValues\n }).catch(e => {\n console.error('update session failed', e);\n });\n }\n }\n\n if (normalizedQuestion.partLabels) {\n partA.partLabel =\n normalizedQuestion.partLabelType === 'Letters' ? 'Part A' : 'Part 1';\n partB.partLabel =\n normalizedQuestion.partLabelType === 'Letters' ? 'Part B' : 'Part 2';\n } else {\n partA.partLabel = undefined;\n partB.partLabel = undefined;\n }\n\n if (\n env.role === 'instructor' &&\n (env.mode === 'view' || env.mode === 'evaluate')\n ) {\n partA.teacherInstructions = normalizedQuestion.partA\n .teacherInstructionsEnabled\n ? normalizedQuestion.partA.teacherInstructions\n : null;\n partB.teacherInstructions = normalizedQuestion.partB\n .teacherInstructionsEnabled\n ? normalizedQuestion.partB.teacherInstructions\n : null;\n } else {\n partA.teacherInstructions = null;\n partB.teacherInstructions = null;\n }\n\n partA.prompt = normalizedQuestion.partA.promptEnabled\n ? normalizedQuestion.partA.prompt\n : null;\n partB.prompt = normalizedQuestion.partB.promptEnabled\n ? normalizedQuestion.partB.prompt\n : null;\n\n return new Promise(resolve => {\n resolve({\n disabled: env.mode !== 'gather',\n mode: env.mode,\n partA,\n partB\n });\n });\n}\n\nexport const createDefaultModel = (model = {}) =>\n new Promise(resolve => {\n resolve({\n ...defaults,\n ...model\n });\n });\n\nconst isCorrect = c => c.correct === true;\n\nconst getScore = (config, sessionPart, key) => {\n const { choices = [] } = (config && config[key]) || {};\n const maxScore = choices.length;\n const { value: sessionPartValue } = sessionPart || {};\n\n const chosen = c => !!(sessionPartValue || []).find(v => v === c.value);\n const correctAndNotChosen = c => isCorrect(c) && !chosen(c);\n const incorrectAndChosen = c => !isCorrect(c) && chosen(c);\n const correctChoices = choices.reduce((total, choice) => {\n if (correctAndNotChosen(choice) || incorrectAndChosen(choice)) {\n return total - 1;\n } else {\n return total;\n }\n }, choices.length);\n\n // determine score for a part\n if (!config.partialScoring && correctChoices < maxScore) {\n return 0;\n }\n\n return parseFloat(maxScore ? (correctChoices / maxScore).toFixed(2) : 0);\n};\n\nexport function outcome(config, session) {\n return new Promise(resolve => {\n const { value } = session || {};\n\n if (!session || !value) {\n resolve({ score: 0, scoreA: 0, scoreB: 0, empty: true });\n }\n\n if (value) {\n const { partA, partB } = value || {};\n\n const scoreA = getScore(config, partA, 'partA');\n const scoreB = getScore(config, partB, 'partB');\n\n if (!config.partialScoring) {\n // The EBSR item is worth 1 point\n // That point is awarded if and only if both parts are fully correct, otherwise no points are awarded\n resolve({ score: (scoreA === 1 && scoreB === 1) ? 1 : 0, scoreA, scoreB, max: 1 });\n } else {\n // The EBSR item is worth 2 points\n if (scoreA === 1) {\n if (scoreB === 1) {\n // If Part A and Part B are both correct, 2 points are awarded\n resolve({ score: 2, scoreA, scoreB, max: 2 });\n } else {\n // If Part A is correct and part B is incorrect, 1 point is awarded\n resolve({ score: 1, scoreA, scoreB, max: 2 });\n }\n } else {\n // For all other combinations, no points are awarded\n resolve({ score: 0, scoreA, scoreB, max: 2 });\n }\n }\n }\n });\n}\n\nconst returnPartCorrect = choices => {\n let answers = [];\n\n choices.forEach(i => {\n const { correct, value } = i;\n if (correct) {\n answers.push(value);\n }\n });\n return answers;\n};\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise(resolve => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { partA, partB } = question;\n\n const partACorrect = returnPartCorrect(partA.choices);\n const partBCorrect = returnPartCorrect(partB.choices);\n\n resolve({\n value: {\n partA: {\n id: 'partA',\n value: partACorrect\n },\n partB: {\n id: 'partB',\n value: partBCorrect\n }\n },\n id: '1'\n });\n } else {\n resolve(null);\n }\n });\n};\n\nconst validatePart = (model = {}, config = {}) => {\n const { choices } = model;\n const { minAnswerChoices = 2, maxAnswerChoices } = config;\n const reversedChoices = [...choices || []].reverse();\n const choicesErrors = {};\n let hasCorrectResponse = false;\n\n reversedChoices.forEach((choice, index) => {\n const { correct, value, label } = choice;\n\n if (correct) {\n hasCorrectResponse = true;\n }\n\n if (label === '' || label === '<div></div>') {\n choicesErrors[value] = 'Content should not be empty.';\n } else {\n const identicalAnswer = reversedChoices.slice(index + 1).some(c => c.label === label);\n\n if (identicalAnswer) {\n choicesErrors[value] = 'Content should be unique.';\n }\n }\n });\n\n const errors = {};\n const nbOfChoices = (choices || []).length;\n\n if (nbOfChoices < minAnswerChoices) {\n errors.answerChoicesError = `There should be at least ${minAnswerChoices} choices defined.`;\n } else if (nbOfChoices > maxAnswerChoices) {\n errors.answerChoicesError = `No more than ${maxAnswerChoices} choices should be defined.`;\n }\n\n if (!hasCorrectResponse) {\n errors.correctResponseError = 'No correct response defined.';\n }\n\n if (!isEmpty(choicesErrors)) {\n errors.choicesErrors = choicesErrors;\n }\n\n return errors;\n};\n\nexport const validate = (model = {}, config = {}) => {\n const { partA, partB } = model || {};\n const { partA: partAConfig, partB: partBConfig } = config || {};\n\n const partAErrors = validatePart(partA, partAConfig);\n const partBErrors = validatePart(partB, partBConfig);\n\n return { partA: partAErrors, partB: partBErrors };\n};\n"],"file":"index.js"}
|