@pie-element/ebsr 10.7.3-next.12 → 10.7.3-next.14
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/module/index.html +1 -1
- package/module/manifest.json +1 -1
- package/module/print.html +1 -1
- package/package.json +3 -3
- package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.json +0 -1972
- package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.md +0 -4144
- package/configure/node_modules/@pie-element/multiple-choice/LICENSE.md +0 -5
- package/configure/node_modules/@pie-element/multiple-choice/PRINT.md +0 -35
- package/configure/node_modules/@pie-element/multiple-choice/README.md +0 -56
- package/configure/node_modules/@pie-element/multiple-choice/choice.png +0 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.json +0 -1387
- package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.md +0 -3316
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js +0 -202
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js +0 -248
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js +0 -597
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js +0 -18
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/configure/package.json +0 -18
- package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.json +0 -527
- package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.md +0 -2281
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js +0 -34
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js +0 -346
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js +0 -28
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/controller/package.json +0 -15
- package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json +0 -2993
- package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json.md +0 -2217
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/config.js +0 -8
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/generate.js +0 -61
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/index.html +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/session.js +0 -7
- package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json +0 -1332
- package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json.md +0 -1015
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js +0 -427
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js +0 -252
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js +0 -174
- package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/index.js +0 -388
- package/configure/node_modules/@pie-element/multiple-choice/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/main.js +0 -108
- package/configure/node_modules/@pie-element/multiple-choice/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js +0 -469
- package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/print.js +0 -129
- package/configure/node_modules/@pie-element/multiple-choice/lib/print.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js +0 -48
- package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/module/configure.js +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/module/controller.js +0 -3611
- package/configure/node_modules/@pie-element/multiple-choice/module/demo.js +0 -86
- package/configure/node_modules/@pie-element/multiple-choice/module/element.js +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/module/index.html +0 -21
- package/configure/node_modules/@pie-element/multiple-choice/module/manifest.json +0 -10
- package/configure/node_modules/@pie-element/multiple-choice/module/print-demo.js +0 -124
- package/configure/node_modules/@pie-element/multiple-choice/module/print.html +0 -18
- package/configure/node_modules/@pie-element/multiple-choice/module/print.js +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/package.json +0 -32
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/print.js"],"names":["log","preparePrintModel","model","opts","instr","role","prompt","promptEnabled","undefined","teacherInstructions","teacherInstructionsEnabled","showTeacherInstructions","alwaysShowCorrect","mode","disabled","animationsDisabled","lockChoiceOrder","choicesLayout","choices","map","c","rationale","rationaleEnabled","hideTick","feedback","keyMode","choicePrefix","MultipleChoicePrint","_options","_model","_session","_rerender","printModel","element","React","createElement","Main","session","ReactDOM","render","leading","trailing","o","s","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,mCAAN,CAAZ;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,KAAD,EAAQC,IAAR,EAAiB;AACzC,MAAMC,KAAK,GAAGD,IAAI,CAACE,IAAL,KAAc,YAA5B;AAEAH,EAAAA,KAAK,CAACI,MAAN,GAAeJ,KAAK,CAACK,aAAN,KAAwB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AAhB;AACA,UAAKC,SAAL,GAAiB,0BACf,YAAM;AACJ,UAAI,MAAKF,MAAL,IAAe,MAAKC,QAAxB,EAAkC;AAChC,YAAME,UAAU,GAAG/B,iBAAiB,CAAC,MAAK4B,MAAN,EAAc,MAAKD,QAAnB,CAApC;;AAEA,YAAMK,OAAO,GACX,MAAKL,QAAL,iBACAM,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACxBlC,UAAAA,KAAK,EAAE8B,UADiB;AAExBK,UAAAA,OAAO,EAAE;AAFe,SAA1B,CAFF;;AAOAC,6BAASC,MAAT,CAAgBN,OAAhB,kDAA+B,YAAM;AACnCjC,UAAAA,GAAG,CAAC,+BAAD,CAAH;AACA;AACD,SAHD;AAID,OAdD,MAcO;AACLA,QAAAA,GAAG,CAAC,MAAD,CAAH;AACD;AACF,KAnBc,EAoBf,EApBe,EAqBf;AAAEwC,MAAAA,OAAO,EAAE,KAAX;AAAkBC,MAAAA,QAAQ,EAAE;AAA5B,KArBe,CAAjB;AALY;AA4Bb;;;;SACD,aAAYC,CAAZ,EAAe;AACb,WAAKd,QAAL,GAAgBc,CAAhB;AACD;;;SAED,aAAUC,CAAV,EAAa;AACX,WAAKd,MAAL,GAAcc,CAAd;;AACA,WAAKZ,SAAL;AACD;;;WAED,6BAAoB,CAAE;;;kDAvCyBa,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport debounce from 'lodash/debounce';\nimport cloneDeep from 'lodash/cloneDeep';\nimport Main from './main';\nimport { renderMath } from '@pie-lib/pie-toolbox/math-rendering';\nimport debug from 'debug';\n\nconst log = debug('pie-element:multiple-choice:print');\n\n/**\n * Live in same package as main element - so we can access some of the shared comps!\n *\n * - update pslb to build print if src/print.js is there\n * - update demo el\n * - get configure/controller building\n */\n\nconst preparePrintModel = (model, opts) => {\n const instr = opts.role === 'instructor';\n\n model.prompt = model.promptEnabled !== false ? model.prompt : undefined;\n model.teacherInstructions =\n instr && model.teacherInstructionsEnabled !== false ? model.teacherInstructions : undefined;\n model.showTeacherInstructions = instr;\n model.alwaysShowCorrect = instr;\n model.mode = instr ? 'evaluate' : model.mode;\n\n model.disabled = true;\n model.animationsDisabled = true;\n model.lockChoiceOrder = true;\n model.choicesLayout = model.choicesLayout || 'vertical';\n\n const choices = cloneDeep(model.choices);\n\n model.choices = choices.map((c) => {\n c.rationale = instr && model.rationaleEnabled !== false ? c.rationale : undefined;\n c.hideTick = instr;\n c.feedback = undefined;\n return c;\n });\n\n model.keyMode = model.choicePrefix || 'letters';\n\n return model;\n};\n\nexport default class MultipleChoicePrint extends HTMLElement {\n constructor() {\n super();\n this._options = null;\n this._model = null;\n this._session = [];\n this._rerender = debounce(\n () => {\n if (this._model && this._session) {\n const printModel = preparePrintModel(this._model, this._options);\n\n const element =\n this._options &&\n React.createElement(Main, {\n model: printModel,\n session: {},\n });\n\n ReactDOM.render(element, this, () => {\n log('render complete - render math');\n renderMath(this);\n });\n } else {\n log('skip');\n }\n },\n 50,\n { leading: false, trailing: true },\n );\n }\n set options(o) {\n this._options = o;\n }\n\n set model(s) {\n this._model = s;\n this._rerender();\n }\n\n connectedCallback() {}\n}\n"],"file":"print.js"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.updateSessionMetadata = updateSessionMetadata;
|
|
9
|
-
exports.updateSessionValue = updateSessionValue;
|
|
10
|
-
|
|
11
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
12
|
-
|
|
13
|
-
function updateSessionValue(session, choiceMode, data) {
|
|
14
|
-
session.value = session.value || [];
|
|
15
|
-
|
|
16
|
-
if (choiceMode === 'checkbox') {
|
|
17
|
-
if (data.selected) {
|
|
18
|
-
session.value = Array.from(new Set([].concat((0, _toConsumableArray2["default"])(session.value), [data.value])));
|
|
19
|
-
} else {
|
|
20
|
-
session.value = session.value.filter(function (v) {
|
|
21
|
-
return v !== data.value;
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (choiceMode === 'radio') {
|
|
27
|
-
if (data.selected) {
|
|
28
|
-
session.value = [data.value];
|
|
29
|
-
} else {
|
|
30
|
-
session.value = [];
|
|
31
|
-
}
|
|
32
|
-
} //update session value metadata
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
session.selector = data.selector; //the input method used to select the choice (e.g. mouse, keyboard)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function updateSessionMetadata(session, metadata) {
|
|
39
|
-
session.audioStartTime = session.audioStartTime || metadata.audioStartTime; //timestamp when auto-played audio started playing
|
|
40
|
-
|
|
41
|
-
session.audioEndTime = session.audioEndTime || metadata.audioEndTime; //timestamp when auto-played audio completed playing
|
|
42
|
-
|
|
43
|
-
if (!session.waitTime && session.audioStartTime && session.audioEndTime) {
|
|
44
|
-
// waitTime is elapsed time the user waited for auto-played audio to finish
|
|
45
|
-
session.waitTime = session.audioEndTime - session.audioStartTime;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=session-updater.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/session-updater.js"],"names":["updateSessionValue","session","choiceMode","data","value","selected","Array","from","Set","filter","v","selector","updateSessionMetadata","metadata","audioStartTime","audioEndTime","waitTime"],"mappings":";;;;;;;;;;;;AAAO,SAASA,kBAAT,CAA4BC,OAA5B,EAAqCC,UAArC,EAAiDC,IAAjD,EAAuD;AAC5DF,EAAAA,OAAO,CAACG,KAAR,GAAgBH,OAAO,CAACG,KAAR,IAAiB,EAAjC;;AACA,MAAIF,UAAU,KAAK,UAAnB,EAA+B;AAC7B,QAAIC,IAAI,CAACE,QAAT,EAAmB;AACjBJ,MAAAA,OAAO,CAACG,KAAR,GAAgBE,KAAK,CAACC,IAAN,CAAW,IAAIC,GAAJ,+CAAYP,OAAO,CAACG,KAApB,IAA2BD,IAAI,CAACC,KAAhC,GAAX,CAAhB;AACD,KAFD,MAEO;AACLH,MAAAA,OAAO,CAACG,KAAR,GAAgBH,OAAO,CAACG,KAAR,CAAcK,MAAd,CAAqB,UAAAC,CAAC;AAAA,eAAIA,CAAC,KAAKP,IAAI,CAACC,KAAf;AAAA,OAAtB,CAAhB;AACD;AACF;;AAED,MAAIF,UAAU,KAAK,OAAnB,EAA4B;AAC1B,QAAIC,IAAI,CAACE,QAAT,EAAmB;AACjBJ,MAAAA,OAAO,CAACG,KAAR,GAAgB,CAACD,IAAI,CAACC,KAAN,CAAhB;AACD,KAFD,MAEO;AACLH,MAAAA,OAAO,CAACG,KAAR,GAAgB,EAAhB;AACD;AACF,GAhB2D,CAkB5D;;;AACAH,EAAAA,OAAO,CAACU,QAAR,GAAmBR,IAAI,CAACQ,QAAxB,CAnB4D,CAmB1B;AACnC;;AAEM,SAASC,qBAAT,CAA+BX,OAA/B,EAAwCY,QAAxC,EAAkD;AACvDZ,EAAAA,OAAO,CAACa,cAAR,GAAyBb,OAAO,CAACa,cAAR,IAA0BD,QAAQ,CAACC,cAA5D,CADuD,CACqB;;AAC5Eb,EAAAA,OAAO,CAACc,YAAR,GAAuBd,OAAO,CAACc,YAAR,IAAwBF,QAAQ,CAACE,YAAxD,CAFuD,CAEe;;AAEtE,MAAG,CAACd,OAAO,CAACe,QAAT,IAAqBf,OAAO,CAACa,cAA7B,IAA+Cb,OAAO,CAACc,YAA1D,EAAwE;AACtE;AACAd,IAAAA,OAAO,CAACe,QAAR,GAAoBf,OAAO,CAACc,YAAR,GAAuBd,OAAO,CAACa,cAAnD;AACD;AACF","sourcesContent":["export function updateSessionValue(session, choiceMode, data) {\n session.value = session.value || [];\n if (choiceMode === 'checkbox') {\n if (data.selected) {\n session.value = Array.from(new Set([...session.value, data.value]));\n } else {\n session.value = session.value.filter(v => v !== data.value);\n }\n }\n\n if (choiceMode === 'radio') {\n if (data.selected) {\n session.value = [data.value];\n } else {\n session.value = [];\n }\n }\n \n //update session value metadata\n session.selector = data.selector; //the input method used to select the choice (e.g. mouse, keyboard)\n}\n\nexport function updateSessionMetadata(session, metadata) {\n session.audioStartTime = session.audioStartTime || metadata.audioStartTime; //timestamp when auto-played audio started playing\n session.audioEndTime = session.audioEndTime || metadata.audioEndTime; //timestamp when auto-played audio completed playing\n \n if(!session.waitTime && session.audioStartTime && session.audioEndTime) {\n // waitTime is elapsed time the user waited for auto-played audio to finish\n session.waitTime = (session.audioEndTime - session.audioStartTime);\n }\n}\n"],"file":"session-updater.js"}
|