@citolab/qti-components 10.0.0-next.14 → 10.0.0-next.15
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 +347 -244
- package/dist/base.d.ts +3 -3
- package/dist/base.js +1 -1
- package/dist/{chunk-NYNL5HSR.js → chunk-32PI7KWX.js} +2 -2
- package/dist/{chunk-TU34FFWF.js → chunk-5AJZGRWI.js} +2 -2
- package/dist/{chunk-LFVPS7KB.js → chunk-DAOLVUTR.js} +2 -2
- package/dist/{chunk-LEF7AAYZ.js → chunk-F553IZPL.js} +2 -2
- package/dist/{chunk-MP2SUN7J.js → chunk-G2EIC7H2.js} +30 -23
- package/dist/chunk-G2EIC7H2.js.map +1 -0
- package/dist/{chunk-S5GLISQA.js → chunk-HT3LSWXL.js} +2 -2
- package/dist/{chunk-O2ENNGKV.js → chunk-IM5AKPIJ.js} +32 -5
- package/dist/chunk-IM5AKPIJ.js.map +1 -0
- package/dist/{chunk-HGKLF7SP.js → chunk-IWNRQVNW.js} +2 -2
- package/dist/{chunk-TLAVOBEM.js → chunk-LORYM4U2.js} +120 -1
- package/dist/chunk-LORYM4U2.js.map +1 -0
- package/dist/{chunk-6XRNX574.js → chunk-MIQZBDTB.js} +5 -5
- package/dist/{chunk-C7SYDLMG.js → chunk-QT7WQXCS.js} +42 -4
- package/dist/chunk-QT7WQXCS.js.map +1 -0
- package/dist/chunk-RNLSNH4N.js +7 -0
- package/dist/chunk-RNLSNH4N.js.map +1 -0
- package/dist/{chunk-CCI3QMQA.js → chunk-URYYGVTA.js} +6 -6
- package/dist/{chunk-BZPMN57E.js → chunk-WIUPAUJV.js} +2 -2
- package/dist/{chunk-SWNFCQ4G.js → chunk-XY5DHYIH.js} +4 -4
- package/dist/{config.context.d-BniMHSBB.d.ts → config.context.d-CCqlJXpE.d.ts} +2 -1
- package/dist/corrections.d.ts +7 -7
- package/dist/corrections.js +9 -9
- package/dist/elements.d.ts +30 -2
- package/dist/elements.js +4 -4
- package/dist/index.d.ts +8 -8
- package/dist/index.js +15 -15
- package/dist/interactions.d.ts +4 -4
- package/dist/interactions.js +3 -3
- package/dist/item.css +99 -10
- package/dist/item.d.ts +3 -3
- package/dist/item.js +5 -5
- package/dist/loader.d.ts +1 -1
- package/dist/loader.js +2 -2
- package/dist/processing.js +3 -3
- package/dist/qti-components-jsx.d.ts +46 -18
- package/dist/{qti-feedback.d-DbzPSJuK.d.ts → qti-feedback.d-GAqMqAt6.d.ts} +7 -0
- package/dist/{qti-item.d-BqWYBdV2.d.ts → qti-item.d-pFcNk0th.d.ts} +1 -1
- package/dist/{qti-test.d-C0I1BIdH.d.ts → qti-test.d-BjhVQnQy.d.ts} +2 -2
- package/dist/{qti-text-entry-interaction.d-V4sWE9TO.d.ts → qti-text-entry-interaction.d-DECzpIzi.d.ts} +19 -9
- package/dist/{qti-transform-test.d-BL7GGFJj.d.ts → qti-transform-test.d-Bb9vnLzP.d.ts} +1 -0
- package/dist/{record.d-C6m0Y4xr.d.ts → record.d-CljDLwRz.d.ts} +1 -1
- package/dist/test.d.ts +5 -5
- package/dist/test.js +6 -6
- package/dist/transformers.d.ts +1 -1
- package/dist/transformers.js +1 -1
- package/package.json +10 -10
- package/dist/chunk-C7SYDLMG.js.map +0 -1
- package/dist/chunk-MP2SUN7J.js.map +0 -1
- package/dist/chunk-O2ENNGKV.js.map +0 -1
- package/dist/chunk-Q4MJCEDE.js +0 -7
- package/dist/chunk-Q4MJCEDE.js.map +0 -1
- package/dist/chunk-TLAVOBEM.js.map +0 -1
- /package/dist/{chunk-NYNL5HSR.js.map → chunk-32PI7KWX.js.map} +0 -0
- /package/dist/{chunk-TU34FFWF.js.map → chunk-5AJZGRWI.js.map} +0 -0
- /package/dist/{chunk-LFVPS7KB.js.map → chunk-DAOLVUTR.js.map} +0 -0
- /package/dist/{chunk-LEF7AAYZ.js.map → chunk-F553IZPL.js.map} +0 -0
- /package/dist/{chunk-S5GLISQA.js.map → chunk-HT3LSWXL.js.map} +0 -0
- /package/dist/{chunk-HGKLF7SP.js.map → chunk-IWNRQVNW.js.map} +0 -0
- /package/dist/{chunk-6XRNX574.js.map → chunk-MIQZBDTB.js.map} +0 -0
- /package/dist/{chunk-CCI3QMQA.js.map → chunk-URYYGVTA.js.map} +0 -0
- /package/dist/{chunk-BZPMN57E.js.map → chunk-WIUPAUJV.js.map} +0 -0
- /package/dist/{chunk-SWNFCQ4G.js.map → chunk-XY5DHYIH.js.map} +0 -0
package/dist/base.d.ts
CHANGED
|
@@ -2,14 +2,14 @@ import { C as ComputedItemContext } from './session.context.d-DW09Lrie.js';
|
|
|
2
2
|
export { I as INITIAL_SESSION_CONTEXT, S as SessionContext, V as View, s as sessionContext } from './session.context.d-DW09Lrie.js';
|
|
3
3
|
import { C as ComputedContext } from './computed.types.d-IXACuBr7.js';
|
|
4
4
|
export { a as ComputedItem } from './computed.types.d-IXACuBr7.js';
|
|
5
|
-
export { C as ConfigContext, V as ValidationDisplayMode, c as configContext } from './config.context.d-
|
|
6
|
-
export { C as ChoiceRole, I as Interaction, a as InteractionContext, R as RecordFieldValues, b as RecordValue, i as inferRecordFieldBaseType, c as interactionContext, d as isRecordValue, r as readRecordFieldValues } from './record.d-
|
|
5
|
+
export { C as ConfigContext, V as ValidationDisplayMode, c as configContext } from './config.context.d-CCqlJXpE.js';
|
|
6
|
+
export { C as ChoiceRole, I as Interaction, a as InteractionContext, R as RecordFieldValues, b as RecordValue, i as inferRecordFieldBaseType, c as interactionContext, d as isRecordValue, r as readRecordFieldValues } from './record.d-CljDLwRz.js';
|
|
7
7
|
import { b as ItemContext, B as BaseType } from './item.types.d-DuVR0ZVK.js';
|
|
8
8
|
export { C as Calculate, a as Cardinality, I as InterpolationTableEntry, M as Multiple, O as Ordered, c as OutcomeVariable, Q as QtiAreaMapEntry, d as QtiAreaMapping, e as QtiMapEntry, f as QtiMapping, R as ResponseInteraction, g as ResponseVariable, T as TemplateVariable, V as VariableDeclaration, h as VariableValue, i as areaShape, j as directedPair, k as float, l as integer, m as itemContextVariables } from './item.types.d-DuVR0ZVK.js';
|
|
9
9
|
export { Q as QtiContext, a as QtiContextType, S as Seed, b as asSeed, i as isSeed, q as qtiContext } from './qti.context.d-CejJMlfZ.js';
|
|
10
10
|
export { I as INITIAL_TEST_CONTEXT, Q as QtiExpression, a as QtiExpressionBase, T as TestContext, t as testContext } from './qti-expression.d-B-Cfbqlb.js';
|
|
11
11
|
import * as lit from 'lit';
|
|
12
|
-
export { Q as QtiFeedback, a as QtiVariableDeclaration } from './qti-feedback.d-
|
|
12
|
+
export { Q as QtiFeedback, a as QtiVariableDeclaration } from './qti-feedback.d-GAqMqAt6.js';
|
|
13
13
|
export { Q as QtiConditionExpression } from './qti-condition-expression.d-B-T1NNl0.js';
|
|
14
14
|
export { D as DirectedPair, I as Identifier, P as Point, R as ResponseValue, i as iterResponseValues, p as parsePair, a as parsePoint, b as parseResponseAttribute, r as responseAttributeConverter, s as serializePair, c as serializePoint, d as serializeResponseAttribute } from './response.d-_8y4kjGP.js';
|
|
15
15
|
export { F as FormAssociatedInteraction, I as IInteraction, R as ReadonlyInteraction, a as RegisteredInteraction, b as ResettableInteraction, c as ResponseIdentifiedInteraction, d as ResponseInteractionElement, V as ValidatableInteraction } from './interaction.interface.d-CvjHM2bi.js';
|
package/dist/base.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
qtiProcessingElements
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5AJZGRWI.js";
|
|
4
4
|
|
|
5
5
|
// ../qti-processing/dist/register.js
|
|
6
6
|
for (const { tag, ctor } of qtiProcessingElements) {
|
|
@@ -8,4 +8,4 @@ for (const { tag, ctor } of qtiProcessingElements) {
|
|
|
8
8
|
customElements.define(tag, ctor);
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-32PI7KWX.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
isRecordValue,
|
|
10
10
|
itemContext,
|
|
11
11
|
testContext
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IM5AKPIJ.js";
|
|
13
13
|
|
|
14
14
|
// ../qti-processing/dist/components/qti-and/qti-and.js
|
|
15
15
|
var QtiAnd = class extends qtiAndMixin(QtiConditionExpression) {
|
|
@@ -3385,4 +3385,4 @@ export {
|
|
|
3385
3385
|
QtiVariable,
|
|
3386
3386
|
qtiProcessingElements
|
|
3387
3387
|
};
|
|
3388
|
-
//# sourceMappingURL=chunk-
|
|
3388
|
+
//# sourceMappingURL=chunk-5AJZGRWI.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
qtiTransformItem,
|
|
3
3
|
qtiTransformManifest,
|
|
4
4
|
qtiTransformTest
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-LORYM4U2.js";
|
|
6
6
|
|
|
7
7
|
// ../qti-loader/dist/qti-loader.js
|
|
8
8
|
var getManifestInfo = async (manifestURL) => {
|
|
@@ -28,4 +28,4 @@ export {
|
|
|
28
28
|
getManifestInfo,
|
|
29
29
|
getItemByUri
|
|
30
30
|
};
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
//# sourceMappingURL=chunk-DAOLVUTR.js.map
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
elements8,
|
|
22
22
|
elements9,
|
|
23
23
|
qtiInteractionElements
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-G2EIC7H2.js";
|
|
25
25
|
|
|
26
26
|
// ../qti-interactions/dist/register-all.js
|
|
27
27
|
for (const { tag, ctor } of qtiInteractionElements) {
|
|
@@ -176,4 +176,4 @@ for (const { tag, ctor } of elements21) {
|
|
|
176
176
|
customElements.define(tag, ctor);
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
//# sourceMappingURL=chunk-
|
|
179
|
+
//# sourceMappingURL=chunk-F553IZPL.js.map
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
responseAttributeConverter,
|
|
18
18
|
serializeResponseAttribute,
|
|
19
19
|
validationMessage
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-IM5AKPIJ.js";
|
|
21
21
|
|
|
22
22
|
// ../interactions/core/dist/elements/qti-associable-hotspot/qti-associable-hotspot.js
|
|
23
23
|
import { LitElement, html } from "lit";
|
|
@@ -3704,8 +3704,7 @@ var DragDropSlottedMixin = (superClass, draggablesSelector, droppablesSelector,
|
|
|
3704
3704
|
constructor() {
|
|
3705
3705
|
super(...arguments);
|
|
3706
3706
|
this.minAssociations = 1;
|
|
3707
|
-
this.
|
|
3708
|
-
this._maxAssociationsDefaultApplied = false;
|
|
3707
|
+
this.maxAssociations = 0;
|
|
3709
3708
|
this._response = [];
|
|
3710
3709
|
this._dragDrop = { dragsByTarget: {}, countByTarget: {}, nodesByTarget: {} };
|
|
3711
3710
|
this.#placement = /* @__PURE__ */ new WeakMap();
|
|
@@ -3719,22 +3718,6 @@ var DragDropSlottedMixin = (superClass, draggablesSelector, droppablesSelector,
|
|
|
3719
3718
|
this._enableFlipAnimations = true;
|
|
3720
3719
|
this._pendingResponse = void 0;
|
|
3721
3720
|
}
|
|
3722
|
-
get maxAssociations() {
|
|
3723
|
-
if (!this._maxAssociationsDefaultApplied) {
|
|
3724
|
-
this._maxAssociationsDefaultApplied = true;
|
|
3725
|
-
const tagName = this.tagName?.toLowerCase() || "";
|
|
3726
|
-
const isGapMatchInteraction = tagName === "qti-graphic-gap-match-interaction" || tagName === "qti-gap-match-interaction";
|
|
3727
|
-
if (isGapMatchInteraction && !this.hasAttribute("max-associations") && this._maxAssociations === 0) {
|
|
3728
|
-
this._maxAssociations = 1;
|
|
3729
|
-
}
|
|
3730
|
-
}
|
|
3731
|
-
return this._maxAssociations;
|
|
3732
|
-
}
|
|
3733
|
-
set maxAssociations(value) {
|
|
3734
|
-
const oldValue = this._maxAssociations;
|
|
3735
|
-
this._maxAssociations = value;
|
|
3736
|
-
this.requestUpdate("maxAssociations", oldValue);
|
|
3737
|
-
}
|
|
3738
3721
|
/**
|
|
3739
3722
|
* The one place that reads placement out of the DOM.
|
|
3740
3723
|
*
|
|
@@ -4210,7 +4193,7 @@ var DragDropSlottedMixin = (superClass, draggablesSelector, droppablesSelector,
|
|
|
4210
4193
|
}
|
|
4211
4194
|
checkAllMaxAssociations() {
|
|
4212
4195
|
const totalAssociations = this.totalAssociationsFromState();
|
|
4213
|
-
const disableAtMax = this.resolveDisableAfterMaxReached({ defaultWhenUnset:
|
|
4196
|
+
const disableAtMax = this.resolveDisableAfterMaxReached({ defaultWhenUnset: false });
|
|
4214
4197
|
const maxReached = this.maxAssociations > 0 && totalAssociations >= this.maxAssociations;
|
|
4215
4198
|
this.trackedDroppables.forEach((droppable) => {
|
|
4216
4199
|
const isDragSource = droppable.hasAttribute("data-drag-source");
|
|
@@ -4292,7 +4275,7 @@ var DragDropSlottedMixin = (superClass, draggablesSelector, droppablesSelector,
|
|
|
4292
4275
|
], DragDropSlottedElement.prototype, "minAssociations", void 0);
|
|
4293
4276
|
__decorate11([
|
|
4294
4277
|
property11({ type: Number, reflect: true, attribute: "max-associations" })
|
|
4295
|
-
], DragDropSlottedElement.prototype, "maxAssociations",
|
|
4278
|
+
], DragDropSlottedElement.prototype, "maxAssociations", void 0);
|
|
4296
4279
|
__decorate11([
|
|
4297
4280
|
provide({ context: dragDropContext })
|
|
4298
4281
|
], DragDropSlottedElement.prototype, "_dragDrop", void 0);
|
|
@@ -6124,6 +6107,10 @@ var qti_gap_match_interaction_styles_default = [
|
|
|
6124
6107
|
|
|
6125
6108
|
// ../interactions/gap-match-interaction/dist/qti-gap-match-interaction.js
|
|
6126
6109
|
var QtiGapMatchInteraction = class extends DragDropSlottedSortableMixin(DragDropSlottedMixin(Interaction, "qti-gap-text", "qti-gap", `slot[part~='drags']`), '[qti-draggable="true"]') {
|
|
6110
|
+
constructor() {
|
|
6111
|
+
super(...arguments);
|
|
6112
|
+
this.maxAssociations = 1;
|
|
6113
|
+
}
|
|
6127
6114
|
static {
|
|
6128
6115
|
this.styles = qti_gap_match_interaction_styles_default;
|
|
6129
6116
|
}
|
|
@@ -6636,6 +6623,7 @@ var SlottedBase2 = DragDropSlottedMixin(Interaction, "qti-gap-img, qti-gap-text"
|
|
|
6636
6623
|
var QtiGraphicGapMatchInteraction = class extends DragDropSlottedSortableMixin(SlottedBase2, '[qti-draggable="true"]') {
|
|
6637
6624
|
constructor() {
|
|
6638
6625
|
super(...arguments);
|
|
6626
|
+
this.maxAssociations = 1;
|
|
6639
6627
|
this.autoSizeDropzones = false;
|
|
6640
6628
|
this._graphicScale = 1;
|
|
6641
6629
|
this.#graphicObserver = null;
|
|
@@ -8123,6 +8111,20 @@ var qti_match_interaction_tabular_styles_default = [
|
|
|
8123
8111
|
display: contents;
|
|
8124
8112
|
}
|
|
8125
8113
|
|
|
8114
|
+
/*
|
|
8115
|
+
* qti-header-hidden (vocabulary §1.2.8.2): "Do not display the top row of the table where the
|
|
8116
|
+
* column headers are displayed." The whole row goes, the top-left cell with it.
|
|
8117
|
+
*/
|
|
8118
|
+
:host(.qti-match-tabular.qti-header-hidden) [part='grid'] {
|
|
8119
|
+
grid-template-rows: repeat(var(--qti-match-rows, 1), auto);
|
|
8120
|
+
}
|
|
8121
|
+
:host(.qti-match-tabular.qti-header-hidden) :is([part='corner'], [part='cols-wrap']) {
|
|
8122
|
+
display: none;
|
|
8123
|
+
}
|
|
8124
|
+
:host(.qti-match-tabular.qti-header-hidden) :is([part='rows-wrap'], [part='checkbox-grid']) {
|
|
8125
|
+
grid-row: 1 / -1;
|
|
8126
|
+
}
|
|
8127
|
+
|
|
8126
8128
|
/*
|
|
8127
8129
|
* The radio/checkbox box centres its own mark. qti-simple-choice.styles.ts does the same for
|
|
8128
8130
|
* the non-tabular control; here the cells are plain spans in this shadow root, so the rule
|
|
@@ -8152,6 +8154,8 @@ var QtiMatchInteraction = class extends DragDropSlottedSortableMixin(DragDropSlo
|
|
|
8152
8154
|
constructor() {
|
|
8153
8155
|
super(...arguments);
|
|
8154
8156
|
this.autoSizeDropzones = false;
|
|
8157
|
+
this.maxAssociations = 1;
|
|
8158
|
+
this.minAssociations = 0;
|
|
8155
8159
|
this.lastCheckedRadio = null;
|
|
8156
8160
|
this.class = "";
|
|
8157
8161
|
this._response = [];
|
|
@@ -8303,7 +8307,7 @@ var QtiMatchInteraction = class extends DragDropSlottedSortableMixin(DragDropSlo
|
|
|
8303
8307
|
role="grid"
|
|
8304
8308
|
style="--qti-match-rows: ${this.sourceChoices.length}; --qti-match-cols: ${this.targetChoices.length};"
|
|
8305
8309
|
>
|
|
8306
|
-
<div part="corner"
|
|
8310
|
+
<div part="corner">${this.dataFirstColumnHeader ?? nothing3}</div>
|
|
8307
8311
|
<div part="cols-wrap" role="row"><slot name="match-cols" part="c-header"></slot></div>
|
|
8308
8312
|
<div part="rows-wrap"><slot name="match-rows" part="r-header"></slot></div>
|
|
8309
8313
|
<div part="checkbox-grid">
|
|
@@ -8355,6 +8359,9 @@ var QtiMatchInteraction = class extends DragDropSlottedSortableMixin(DragDropSlo
|
|
|
8355
8359
|
__decorate23([
|
|
8356
8360
|
property21({ type: String })
|
|
8357
8361
|
], QtiMatchInteraction.prototype, "class", void 0);
|
|
8362
|
+
__decorate23([
|
|
8363
|
+
property21({ type: String, attribute: "data-first-column-header" })
|
|
8364
|
+
], QtiMatchInteraction.prototype, "dataFirstColumnHeader", void 0);
|
|
8358
8365
|
__decorate23([
|
|
8359
8366
|
state12()
|
|
8360
8367
|
], QtiMatchInteraction.prototype, "_response", void 0);
|
|
@@ -12168,4 +12175,4 @@ export {
|
|
|
12168
12175
|
elements31 as elements21,
|
|
12169
12176
|
qtiInteractionElements
|
|
12170
12177
|
};
|
|
12171
|
-
//# sourceMappingURL=chunk-
|
|
12178
|
+
//# sourceMappingURL=chunk-G2EIC7H2.js.map
|