@citolab/qti-components 7.5.1 → 7.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.global.js +1 -1
- package/cdn/index.js +101 -101
- package/custom-elements.json +327 -150
- package/dist/chunks/{chunk-K47QFOQX.js → chunk-2WTHXWS3.js} +38 -1
- package/dist/chunks/chunk-2WTHXWS3.js.map +1 -0
- package/dist/chunks/{chunk-UVKOJQ52.js → chunk-FQWMCONA.js} +4 -4
- package/dist/chunks/{chunk-7RW7LCEJ.js → chunk-G7ZPPP7O.js} +6 -37
- package/dist/chunks/chunk-G7ZPPP7O.js.map +1 -0
- package/dist/chunks/{chunk-4BDOB6KY.js → chunk-GG4NR5OR.js} +1 -1
- package/dist/index.js +10 -10
- package/dist/qti-components/index.js +2 -2
- package/dist/qti-item/index.js +1 -1
- package/dist/qti-test/index.js +2 -2
- package/package.json +12 -21
- package/dist/chunks/chunk-7RW7LCEJ.js.map +0 -1
- package/dist/chunks/chunk-K47QFOQX.js.map +0 -1
- package/dist/custom-elements.json +0 -29837
- /package/dist/chunks/{chunk-UVKOJQ52.js.map → chunk-FQWMCONA.js.map} +0 -0
- /package/dist/chunks/{chunk-4BDOB6KY.js.map → chunk-GG4NR5OR.js.map} +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
QtiFeedback,
|
|
3
3
|
convertNumberToUniversalFormat,
|
|
4
|
+
liveQuery,
|
|
4
5
|
removeDoubleSlashes
|
|
5
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2WTHXWS3.js";
|
|
6
7
|
import {
|
|
7
8
|
watch
|
|
8
9
|
} from "./chunk-ELDMXTUQ.js";
|
|
@@ -38,41 +39,6 @@ import {
|
|
|
38
39
|
import { provide } from "@lit/context";
|
|
39
40
|
import { LitElement, html } from "lit";
|
|
40
41
|
import { customElement, property } from "lit/decorators.js";
|
|
41
|
-
|
|
42
|
-
// src/lib/decorators/live-query.ts
|
|
43
|
-
function liveQuery(querySelector, _options) {
|
|
44
|
-
let observer;
|
|
45
|
-
return (proto, decoratedFnName) => {
|
|
46
|
-
const { connectedCallback, disconnectedCallback } = proto;
|
|
47
|
-
proto.connectedCallback = function() {
|
|
48
|
-
connectedCallback.call(this);
|
|
49
|
-
const callback = (mutationList) => {
|
|
50
|
-
const elementsToWatch = Array.from(this.querySelectorAll(querySelector)).concat(
|
|
51
|
-
Array.from(this.shadowRoot?.querySelectorAll(querySelector) || [])
|
|
52
|
-
);
|
|
53
|
-
for (const mutation of mutationList) {
|
|
54
|
-
const addedNodes = Array.from(mutation.addedNodes).map((e) => e);
|
|
55
|
-
const removedNodes = Array.from(mutation.addedNodes).map((e) => e);
|
|
56
|
-
if (mutation.type === "childList" && addedNodes.find((n) => elementsToWatch.includes(n))) {
|
|
57
|
-
this[decoratedFnName](addedNodes, removedNodes);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
observer = new MutationObserver(callback);
|
|
62
|
-
observer.observe(this, { childList: true, subtree: true });
|
|
63
|
-
const elementsAdded = Array.from(this.querySelectorAll(querySelector)).concat(
|
|
64
|
-
Array.from(this.shadowRoot?.querySelectorAll(querySelector) || [])
|
|
65
|
-
);
|
|
66
|
-
this[decoratedFnName](Array.from(elementsAdded), []);
|
|
67
|
-
};
|
|
68
|
-
proto.disconnectedCallback = function() {
|
|
69
|
-
disconnectedCallback.call(this);
|
|
70
|
-
observer.disconnect();
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// src/lib/qti-components/qti-assessment-item/qti-assessment-item.ts
|
|
76
42
|
var QtiAssessmentItem = class extends LitElement {
|
|
77
43
|
constructor() {
|
|
78
44
|
super(...arguments);
|
|
@@ -8104,6 +8070,9 @@ function qtiSubtractMixin(Base) {
|
|
|
8104
8070
|
};
|
|
8105
8071
|
}
|
|
8106
8072
|
|
|
8073
|
+
// src/lib/qti-components/qti-response-processing/qti-expression/qti-subtract/index.ts
|
|
8074
|
+
customElements.define("qti-subtract", QtiSubtract);
|
|
8075
|
+
|
|
8107
8076
|
// src/lib/qti-components/qti-response-processing/qti-expression/qti-string-match/qti-string-match.ts
|
|
8108
8077
|
import { property as property36 } from "lit/decorators.js";
|
|
8109
8078
|
var QtiStringMatch = class extends QtiExpression {
|
|
@@ -8792,4 +8761,4 @@ export {
|
|
|
8792
8761
|
QtiOutcomeDeclaration,
|
|
8793
8762
|
QtiResponseDeclaration
|
|
8794
8763
|
};
|
|
8795
|
-
//# sourceMappingURL=chunk-
|
|
8764
|
+
//# sourceMappingURL=chunk-G7ZPPP7O.js.map
|