@citolab/qti-components 6.0.3-9 → 6.0.3
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/LICENSE +674 -21
- package/dist/ExpressionResult-b1ac7b27.d.ts +23 -0
- package/dist/chunk-7KH3TY23.js +18 -0
- package/dist/chunk-7LF4QM4D.js +17 -0
- package/dist/chunk-M3YT56HW.js +1437 -0
- package/dist/{chunk-XN7FAHIO.js → chunk-MYPYIYN5.js} +28 -344
- package/dist/custom-elements.json +2083 -1292
- package/dist/index.css +1 -0
- package/dist/index.js +191 -2360
- package/dist/{qti-assessment-item-a65f152b.d.ts → qti-assessment-item-219cef9e.d.ts} +2 -19
- package/dist/qti-components/index.d.ts +156 -72
- package/dist/qti-components/index.js +77 -142
- package/dist/qti-components.js +13502 -0
- package/dist/qti-item/index.css +1 -0
- package/dist/qti-item/index.d.ts +9 -10
- package/dist/qti-item/index.js +1 -1
- package/dist/qti-item-react/index.css +1 -0
- package/dist/qti-item-react/index.d.ts +4 -6
- package/dist/qti-item-react/index.js +1 -1
- package/dist/{qti-simple-choice-4df32b16.d.ts → qti-rule-5fe4f91e.d.ts} +25 -74
- package/dist/{qti-simple-choice-24c4c8e9.d.ts → qti-rule-e2aee685.d.ts} +31 -31
- package/dist/qti-transform/index.d.ts +2 -1
- package/dist/qti-transform/index.js +87 -2
- package/dist/themes/qti.css +261 -737
- package/dist/vite.svg +1 -0
- package/package.json +10 -4
- package/readme.md +88 -66
- package/dist/chunk-CTF6QUBO.js +0 -2211
- package/dist/chunk-N4ENDK7Q.js +0 -2211
- package/dist/chunk-NG425SE2.js +0 -2178
- package/dist/qti-assessment-item-f1fcf393.d.ts +0 -120
- package/dist/qti-simple-choice-988808a2.d.ts +0 -352
- package/dist/vscode.html-custom-data.json +0 -775
|
@@ -1,23 +1,6 @@
|
|
|
1
1
|
import * as lit_html from 'lit-html';
|
|
2
2
|
import { LitElement } from 'lit';
|
|
3
|
-
|
|
4
|
-
interface directedPair {
|
|
5
|
-
destination: string;
|
|
6
|
-
source: string;
|
|
7
|
-
}
|
|
8
|
-
interface ResponseInteraction {
|
|
9
|
-
responseIdentifier: string;
|
|
10
|
-
response: string | string[];
|
|
11
|
-
}
|
|
12
|
-
interface Calculate {
|
|
13
|
-
calculate: () => string | string[];
|
|
14
|
-
}
|
|
15
|
-
type float = number;
|
|
16
|
-
type integer = number;
|
|
17
|
-
type BaseType = 'boolean' | 'directedPair' | 'float' | 'integer' | 'string' | 'identifier' | 'pair';
|
|
18
|
-
type Multiple = string | string[][];
|
|
19
|
-
type Ordered = string | string[][];
|
|
20
|
-
type Cardinality = 'multiple' | 'ordered' | 'single';
|
|
3
|
+
import { C as Cardinality, B as BaseType, R as ResponseInteraction } from './ExpressionResult-b1ac7b27.js';
|
|
21
4
|
|
|
22
5
|
interface VariableDeclaration<T> {
|
|
23
6
|
identifier: string;
|
|
@@ -116,4 +99,4 @@ declare global {
|
|
|
116
99
|
}
|
|
117
100
|
}
|
|
118
101
|
|
|
119
|
-
export {
|
|
102
|
+
export { OutcomeVariable as O, QtiAssessmentItem as Q, ResponseVariable as R, VariableDeclaration as V, QtiMapping as a };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { B as BaseType, C as Cardinality,
|
|
2
|
-
export {
|
|
3
|
-
import { C as Choices, I as Interaction, Q as QtiRule, a as QtiChoice } from '../qti-
|
|
4
|
-
export { b as InteractionChangedDetails, O as OutcomeChangedDetails, j as QtiChoiceElementSelected, l as QtiExtendedTextInteraction,
|
|
1
|
+
import { B as BaseType, C as Cardinality, a as Calculate } from '../ExpressionResult-d0123389.js';
|
|
2
|
+
export { M as Multiple, O as Ordered, R as ResponseInteraction, d as directedPair, f as float, i as integer } from '../ExpressionResult-d0123389.js';
|
|
3
|
+
import { C as Choices, I as Interaction, Q as QtiRule, a as QtiChoice } from '../qti-rule-e2aee685.js';
|
|
4
|
+
export { b as InteractionChangedDetails, O as OutcomeChangedDetails, j as QtiChoiceElementSelected, l as QtiExtendedTextInteraction, m as QtiHottext, c as QtiInteractionChanged, i as QtiInteractionResponse, h as QtiLooseChoice, q as QtiOutcomeChanged, f as QtiRegisterChoice, g as QtiRegisterHotspot, e as QtiRegisterInteraction, d as QtiRegisterVariable, n as QtiResponseProcessing, k as QtiTextEntryInteraction } from '../qti-rule-e2aee685.js';
|
|
5
|
+
import { Q as QtiAssessmentItem, R as ResponseVariable } from '../qti-assessment-item-d2af2995.js';
|
|
6
|
+
export { O as OutcomeVariable, a as QtiMapping } from '../qti-assessment-item-d2af2995.js';
|
|
5
7
|
import * as lit from 'lit';
|
|
6
8
|
import { LitElement } from 'lit';
|
|
7
9
|
import * as lit_html from 'lit-html';
|
|
@@ -292,37 +294,37 @@ declare class QtiAssociateInteraction extends QtiAssociateInteraction_base {
|
|
|
292
294
|
connectedCallback(): void;
|
|
293
295
|
}
|
|
294
296
|
|
|
297
|
+
declare class QtiSimpleAssociableChoice extends LitElement {
|
|
298
|
+
connectedCallback(): void;
|
|
299
|
+
render(): lit_html.TemplateResult<1>;
|
|
300
|
+
}
|
|
301
|
+
|
|
295
302
|
declare const QtiGapMatchInteraction_base: (new (...args: any[]) => IInteraction) & typeof LitElement;
|
|
296
303
|
declare class QtiGapMatchInteraction extends QtiGapMatchInteraction_base {
|
|
297
304
|
static styles: lit.CSSResult[];
|
|
298
305
|
render(): lit_html.TemplateResult<1>;
|
|
299
306
|
}
|
|
300
307
|
|
|
301
|
-
declare class
|
|
308
|
+
declare class QtiGapText extends LitElement {
|
|
309
|
+
tabindex: number | undefined;
|
|
310
|
+
connectedCallback(): void;
|
|
311
|
+
render(): lit_html.TemplateResult<1>;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
declare class QtiGap extends LitElement {
|
|
315
|
+
tabindex: number | undefined;
|
|
316
|
+
render(): lit_html.TemplateResult<1>;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
declare class QtiInlineChoice extends LitElement {
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
declare class QtiGraphicAssociateInteraction extends Choices {
|
|
302
323
|
choiceOrdering: boolean;
|
|
303
|
-
hotspots: any;
|
|
304
|
-
startPoint: any;
|
|
305
|
-
endPoint: any;
|
|
306
|
-
_lines: any[];
|
|
307
|
-
startCoord: {
|
|
308
|
-
x: any;
|
|
309
|
-
y: any;
|
|
310
|
-
};
|
|
311
|
-
mouseCoord: {
|
|
312
|
-
x: number;
|
|
313
|
-
y: number;
|
|
314
|
-
};
|
|
315
|
-
svgContainer: any;
|
|
316
|
-
grImage: any;
|
|
317
324
|
static styles: lit.CSSResult[];
|
|
318
|
-
svg: SVGSVGElement;
|
|
319
|
-
constructor();
|
|
320
|
-
reset(): void;
|
|
321
|
-
validate(): boolean;
|
|
322
|
-
set response(val: string | string[]);
|
|
323
325
|
render(): lit_html.TemplateResult<1>;
|
|
324
326
|
private positionHotspotOnRegister;
|
|
325
|
-
|
|
327
|
+
connectedCallback(): void;
|
|
326
328
|
disconnectedCallback(): void;
|
|
327
329
|
}
|
|
328
330
|
|
|
@@ -353,17 +355,14 @@ declare class QtiHotspotInteraction extends Choices {
|
|
|
353
355
|
disconnectedCallback(): void;
|
|
354
356
|
}
|
|
355
357
|
|
|
356
|
-
declare class
|
|
357
|
-
|
|
358
|
-
|
|
358
|
+
declare class QtiHotspotChoice extends QtiChoice {
|
|
359
|
+
order: number;
|
|
360
|
+
static styles: lit.CSSResult;
|
|
359
361
|
}
|
|
360
362
|
|
|
361
363
|
declare const QtiMatchInteraction_base: (new (...args: any[]) => IInteraction) & typeof LitElement;
|
|
362
364
|
declare class QtiMatchInteraction extends QtiMatchInteraction_base {
|
|
363
365
|
static styles: any[];
|
|
364
|
-
rows: Element[];
|
|
365
|
-
cols: Element[];
|
|
366
|
-
connectedCallback(): void;
|
|
367
366
|
render(): lit_html.TemplateResult<1>;
|
|
368
367
|
}
|
|
369
368
|
|
|
@@ -398,34 +397,11 @@ declare class QtiOrderInteraction extends QtiOrderInteraction_base {
|
|
|
398
397
|
connectedCallback(): void;
|
|
399
398
|
}
|
|
400
399
|
|
|
401
|
-
declare class
|
|
402
|
-
|
|
403
|
-
static styles: lit.CSSResult[];
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
declare class QtiPositionObjectStage extends LitElement {
|
|
400
|
+
declare class QtiSelectPointInteraction extends Choices {
|
|
401
|
+
static styles: any[];
|
|
407
402
|
choiceOrdering: boolean;
|
|
408
|
-
startX: any;
|
|
409
|
-
startY: any;
|
|
410
|
-
dragElement: any;
|
|
411
403
|
render(): lit_html.TemplateResult<1>;
|
|
412
|
-
static styles: lit.CSSResult[];
|
|
413
404
|
constructor();
|
|
414
|
-
dragElementHandler(event: any): void;
|
|
415
|
-
connectedCallback(): void;
|
|
416
|
-
removeMoveListener(event: any): void;
|
|
417
|
-
disconnectedCallback(): void;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
declare class QtiSelectPointInteraction extends Interaction {
|
|
421
|
-
maxChoices: number;
|
|
422
|
-
minChoices: number;
|
|
423
|
-
private _points;
|
|
424
|
-
render(): lit_html.TemplateResult<1>;
|
|
425
|
-
static styles: lit.CSSResult[];
|
|
426
|
-
reset(): void;
|
|
427
|
-
validate(): boolean;
|
|
428
|
-
set response(val: string | string[]);
|
|
429
405
|
connectedCallback(): void;
|
|
430
406
|
disconnectedCallback(): void;
|
|
431
407
|
}
|
|
@@ -460,34 +436,142 @@ declare class QtiSliderInteraction extends Interaction {
|
|
|
460
436
|
private getPositionFromEvent;
|
|
461
437
|
}
|
|
462
438
|
|
|
463
|
-
declare class
|
|
439
|
+
declare class TouchDragAndDrop {
|
|
440
|
+
private _touchBegin;
|
|
441
|
+
private _touchDown;
|
|
442
|
+
private _lastClick;
|
|
443
|
+
private _canDrag;
|
|
444
|
+
private _dragSrc;
|
|
445
|
+
private _dragCopy;
|
|
446
|
+
private _touchEndCalled;
|
|
447
|
+
private _dragRunning;
|
|
448
|
+
private _dataTransfer;
|
|
449
|
+
private _copyOffset;
|
|
450
|
+
private _lastTarget;
|
|
451
|
+
private _currentDropContainer;
|
|
452
|
+
private _handleClick;
|
|
453
|
+
private _DBLCLICKDELAY;
|
|
454
|
+
private _CONTEXTMENUDELAY;
|
|
455
|
+
private _DRAGDELTA;
|
|
456
|
+
private _COPYOPACITY;
|
|
457
|
+
private static _instance;
|
|
458
|
+
copyStylesDragClone: boolean;
|
|
459
|
+
dragOnClick: boolean;
|
|
460
|
+
constructor();
|
|
461
|
+
addDraggables(draggables: Element[]): void;
|
|
462
|
+
/**
|
|
463
|
+
* Callback for touchstart event listener.
|
|
464
|
+
* @param {TouchEvent} e
|
|
465
|
+
*/
|
|
466
|
+
private _touchStart;
|
|
467
|
+
/**
|
|
468
|
+
* Callback for touchmove event listener.
|
|
469
|
+
* @param {TouchEvent} e
|
|
470
|
+
*/
|
|
471
|
+
private _touchMove;
|
|
472
|
+
private _createDragCopy;
|
|
473
|
+
/**
|
|
474
|
+
* Callback for touchend event listener.
|
|
475
|
+
* @param {TouchEvent} e
|
|
476
|
+
*/
|
|
477
|
+
private _touchEnd;
|
|
478
|
+
/**
|
|
479
|
+
* Callback for touchcancel event listener, in case browser supports this.
|
|
480
|
+
* @param {TouchEvent} e
|
|
481
|
+
*/
|
|
482
|
+
private _touchCancel;
|
|
483
|
+
/**
|
|
484
|
+
* Determines the next droppable element at current point.
|
|
485
|
+
* @param {Object} pt
|
|
486
|
+
*/
|
|
487
|
+
private _findDroppable;
|
|
488
|
+
private _getPoint;
|
|
489
|
+
/**
|
|
490
|
+
* Calculates the offset for displaying the drag copy to have a seamless dragging.
|
|
491
|
+
* @param {Touch} touch The current touch.
|
|
492
|
+
*/
|
|
493
|
+
private _calculateDragCopyPosition;
|
|
494
|
+
/**
|
|
495
|
+
* Calculates the pixel delta between first touch and the current touch position.
|
|
496
|
+
* @param {Object} touch
|
|
497
|
+
*/
|
|
498
|
+
private _getDelta;
|
|
499
|
+
/**
|
|
500
|
+
*
|
|
501
|
+
* @param {Element} e The event's target element.
|
|
502
|
+
* @param {string} eventType The type of the event.
|
|
503
|
+
* @param {bool} bubble Sets whether the event should bubble.
|
|
504
|
+
*/
|
|
505
|
+
private _dispatchEvent;
|
|
506
|
+
/**
|
|
507
|
+
* Resets all variables and prepares for new Drag and Drop.
|
|
508
|
+
*/
|
|
509
|
+
private _reset;
|
|
510
|
+
private _getPositionFromEvent;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
type Constructor$2<T> = new (...args: any[]) => T;
|
|
514
|
+
declare const DragDropInteractionMixin: <T extends Constructor$2<LitElement>>(superClass: T, draggablesSelector: string, droppablesInShadowRoot: boolean, droppablesSelector: string) => Constructor$2<IInteraction> & T;
|
|
515
|
+
|
|
516
|
+
type Constructor$1<T> = new (...args: any[]) => T;
|
|
517
|
+
declare class DroppablesInterface {
|
|
518
|
+
}
|
|
519
|
+
declare const DroppablesMixin: <T extends Constructor$1<LitElement>>(superClass: T, droppablesInShadowRoot: boolean, droppablesSelector: string) => Constructor$1<DroppablesInterface> & T;
|
|
520
|
+
|
|
521
|
+
type Constructor<T> = new (...args: any[]) => T;
|
|
522
|
+
declare class FlippablesInterface {
|
|
464
523
|
connectedCallback(): void;
|
|
465
|
-
|
|
466
|
-
render(): lit_html.TemplateResult<1>;
|
|
524
|
+
disconnectedCallback(): void;
|
|
467
525
|
}
|
|
526
|
+
declare const FlippablesMixin: <T extends Constructor<LitElement>>(superClass: T, droppablesSel: string, draggablesSel: string) => Constructor<FlippablesInterface> & T;
|
|
468
527
|
|
|
469
|
-
declare class
|
|
470
|
-
|
|
471
|
-
|
|
528
|
+
declare class QtiCustomOperatorLevenshtein extends QtiExpression<number> {
|
|
529
|
+
value: number;
|
|
530
|
+
static properties: {
|
|
531
|
+
value: {};
|
|
532
|
+
};
|
|
533
|
+
render: () => lit_html.TemplateResult<1>;
|
|
534
|
+
private levenshtein;
|
|
535
|
+
calculate(): number;
|
|
472
536
|
}
|
|
473
537
|
|
|
474
|
-
declare class
|
|
475
|
-
tabindex: number | undefined;
|
|
476
|
-
connectedCallback(): void;
|
|
538
|
+
declare class QtiCustomOperatorNumericOnly extends LitElement implements Calculate {
|
|
477
539
|
render(): lit_html.TemplateResult<1>;
|
|
540
|
+
calculate(): string;
|
|
478
541
|
}
|
|
479
542
|
|
|
480
|
-
declare class
|
|
481
|
-
|
|
543
|
+
declare class QtiCustomOperatorParseNumberLocalNl extends LitElement implements Calculate {
|
|
544
|
+
value: any;
|
|
545
|
+
static properties: {
|
|
546
|
+
value: {};
|
|
547
|
+
};
|
|
548
|
+
render: () => lit_html.TemplateResult<1>;
|
|
549
|
+
calculate(): any;
|
|
550
|
+
private parseNumber;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
declare class QtiCustomOperatorRemoveAllSpaces extends LitElement implements Calculate {
|
|
482
554
|
render(): lit_html.TemplateResult<1>;
|
|
555
|
+
calculate(): string;
|
|
483
556
|
}
|
|
484
557
|
|
|
485
|
-
declare class
|
|
486
|
-
|
|
487
|
-
|
|
558
|
+
declare class QtiCustomOperatorTrim extends LitElement implements Calculate {
|
|
559
|
+
render(): lit_html.TemplateResult<1>;
|
|
560
|
+
calculate(): string;
|
|
488
561
|
}
|
|
489
562
|
|
|
490
|
-
declare class
|
|
563
|
+
declare class QtiManualScoring extends LitElement {
|
|
564
|
+
static styles: lit.CSSResult;
|
|
565
|
+
disabled: boolean;
|
|
566
|
+
readonly: boolean;
|
|
567
|
+
value: string;
|
|
568
|
+
min: number;
|
|
569
|
+
max: number;
|
|
570
|
+
protected textChanged(event: Event): void;
|
|
571
|
+
logger: ContextConsumer<{
|
|
572
|
+
__context__: Logger;
|
|
573
|
+
}, this>;
|
|
574
|
+
render(): lit_html.TemplateResult<1>;
|
|
491
575
|
}
|
|
492
576
|
|
|
493
|
-
export { BaseType, Cardinality, Events, QtiAnd, QtiAssessmentItem,
|
|
577
|
+
export { BaseType, Calculate, Cardinality, Choices, DragDropInteractionMixin, DroppablesMixin, Events, FlippablesInterface, FlippablesMixin, QtiAnd, QtiAssessmentItem, QtiAssociateInteraction, QtiBaseValue, QtiChoice, QtiCompanionMaterialsInfo, QtiContains, QtiCorrect, QtiCustomOperatorLevenshtein, QtiCustomOperatorNumericOnly, QtiCustomOperatorParseNumberLocalNl, QtiCustomOperatorRemoveAllSpaces, QtiCustomOperatorTrim, QtiEqual, QtiEqualRounded, QtiExpression, QtiFeedbackInline, QtiGap, QtiGapMatchInteraction, QtiGapText, QtiGraphicAssociateInteraction, QtiGraphicGapMatchInteraction, QtiGraphicOrderInteraction, QtiGt, QtiGte, QtiHotspotChoice, QtiHotspotInteraction, QtiHottextInteraction, QtiInlineChoice, QtiInlineChoiceInteraction, QtiIsNull, QtiManualScoring, QtiMapResponse, QtiMatch, QtiMatchInteraction, QtiMediaInteraction, QtiModalFeedback, QtiMultiple, QtiOr, QtiOrderInteraction, QtiOrdered, QtiOutcomeDeclaration, QtiPortableCustomInteraction, QtiPrompt, QtiResponseCondition, QtiResponseDeclaration, QtiResponseElse, QtiResponseElseIf, QtiResponseIf, QtiRule, QtiSelectPointInteraction, QtiSetOutcomeValue, QtiSimpleAssociableChoice, QtiSliderInteraction, QtiStylesheet, QtiVariable, ResponseVariable, TouchDragAndDrop, qtiContentBody, qtiRubricBlock };
|