@citolab/qti-components 3.0.36
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/index.cjs +341 -0
- package/index.css +16965 -0
- package/index.d.ts +47 -0
- package/index.js +341 -0
- package/lab/qti-api/qti-api.stories.d.ts +7 -0
- package/lab/qti-custom/qti-custom-operator/qti-custom-operator-levenshtein.d.ts +11 -0
- package/lab/qti-custom/qti-custom-operator/qti-custom-operator-numeric-parse-nl.d.ts +11 -0
- package/lab/qti-custom/qti-custom-operator/qti-custom-operator-numeric.d.ts +6 -0
- package/lab/qti-custom/qti-custom-operator/qti-custom-operator-remove-spaces.d.ts +6 -0
- package/lab/qti-custom/qti-custom-operator/qti-custom-operator-trim.d.ts +6 -0
- package/lab/qti-custom/qti-custom-operator/qti-custom-operator.stories.d.ts +12 -0
- package/lab/qti-dashboard/qti-item-dashboard.stories.d.ts +8 -0
- package/lab/qti-item/qti-item.d.ts +30 -0
- package/lab/qti-item/qti-item.stories.d.ts +8 -0
- package/lab/qti-test/qti-test-buttons.d.ts +1 -0
- package/lab/qti-test/qti-test.d.ts +40 -0
- package/lab/qti-test/qti-test.stories.d.ts +9 -0
- package/lib/qti-base/qti-assessment-item/qti-assessment-item.d.ts +43 -0
- package/lib/qti-base/qti-choice/qti-choice.d.ts +34 -0
- package/lib/qti-base/qti-choice/qti-hottext/qti-hottext.d.ts +9 -0
- package/lib/qti-base/qti-choice/qti-simple-choice/qti-simple-choice.d.ts +9 -0
- package/lib/qti-base/qti-feedback/qti-feedback-inline/qti-feedback-inline.d.ts +5 -0
- package/lib/qti-base/qti-feedback/qti-feedback.d.ts +30 -0
- package/lib/qti-base/qti-feedback/qti-feedback.stories.d.ts +8 -0
- package/lib/qti-base/qti-feedback/qti-modal-feedback/qti-modal-feedback.d.ts +5 -0
- package/lib/qti-base/qti-interaction/qti-choice-interaction/qti-choice-interaction.d.ts +11 -0
- package/lib/qti-base/qti-interaction/qti-choice-interaction/qti-choice-interaction.stories.d.ts +45 -0
- package/lib/qti-base/qti-interaction/qti-extended-text-interaction/qti-extended-text-interaction.d.ts +41 -0
- package/lib/qti-base/qti-interaction/qti-extended-text-interaction/qti-extended-text-interaction.stories.d.ts +9 -0
- package/lib/qti-base/qti-interaction/qti-hottext-interaction/qti-hottext-interaction.d.ts +6 -0
- package/lib/qti-base/qti-interaction/qti-hottext-interaction/qti-hottext-interaction.stories.d.ts +20 -0
- package/lib/qti-base/qti-interaction/qti-inline-choice-interaction/qti-inline-choice-interaction.d.ts +27 -0
- package/lib/qti-base/qti-interaction/qti-inline-choice-interaction/qti-inline-choice-interaction.stories.d.ts +43 -0
- package/lib/qti-base/qti-interaction/qti-text-entry-interaction/qti-text-entry-interaction.d.ts +34 -0
- package/lib/qti-base/qti-interaction/qti-text-entry-interaction/qti-text-entry-interaction.stories.d.ts +31 -0
- package/lib/qti-base/qti-item-body/qti-item-body.d.ts +4 -0
- package/lib/qti-base/qti-preview/qti-associable-hotspot.d.ts +6 -0
- package/lib/qti-base/qti-preview/qti-associate-interaction/qti-associate-interaction.d.ts +11 -0
- package/lib/qti-base/qti-preview/qti-associate-interaction/qti-associate-interaction.stories.d.ts +7 -0
- package/lib/qti-base/qti-preview/qti-associate-interaction/qti-simple-associable-choice.d.ts +4 -0
- package/lib/qti-base/qti-preview/qti-custom-interaction/qti-portable-custom-interaction.d.ts +34 -0
- package/lib/qti-base/qti-preview/qti-custom-interaction/qti-portable-custom-interaction.stories.d.ts +7 -0
- package/lib/qti-base/qti-preview/qti-gap-match-interaction/qti-gap-match-interaction.d.ts +8 -0
- package/lib/qti-base/qti-preview/qti-gap-match-interaction/qti-gap-match-interaction.stories.d.ts +31 -0
- package/lib/qti-base/qti-preview/qti-gap-match-interaction/qti-gap-text.d.ts +2 -0
- package/lib/qti-base/qti-preview/qti-gap-match-interaction/qti-gap.d.ts +2 -0
- package/lib/qti-base/qti-preview/qti-graphic-associate-interaction/qti-graphic-associate-interaction.d.ts +10 -0
- package/lib/qti-base/qti-preview/qti-graphic-associate-interaction/qti-graphic-associate-interaction.stories.d.ts +7 -0
- package/lib/qti-base/qti-preview/qti-graphic-gap-match-interaction/qti-gap-img.d.ts +3 -0
- package/lib/qti-base/qti-preview/qti-graphic-gap-match-interaction/qti-graphic-gap-match-interaction.d.ts +11 -0
- package/lib/qti-base/qti-preview/qti-graphic-gap-match-interaction/qti-graphic-gap-match-interaction.stories.d.ts +26 -0
- package/lib/qti-base/qti-preview/qti-graphic-order-interaction/qti-graphic-order-interaction.d.ts +11 -0
- package/lib/qti-base/qti-preview/qti-graphic-order-interaction/qti-graphic-order-interaction.stories.d.ts +7 -0
- package/lib/qti-base/qti-preview/qti-hotspot-choice.d.ts +5 -0
- package/lib/qti-base/qti-preview/qti-hotspot-interaction/qti-hotspot-interaction.d.ts +9 -0
- package/lib/qti-base/qti-preview/qti-hotspot-interaction/qti-hotspot-interaction.stories.d.ts +9 -0
- package/lib/qti-base/qti-preview/qti-match-interaction/qti-match-interaction.d.ts +8 -0
- package/lib/qti-base/qti-preview/qti-match-interaction/qti-match-interaction.stories.d.ts +8 -0
- package/lib/qti-base/qti-preview/qti-media-interaction/qti-media-interaction.d.ts +19 -0
- package/lib/qti-base/qti-preview/qti-media-interaction/qti-media-interaction.stories.d.ts +25 -0
- package/lib/qti-base/qti-preview/qti-order-interaction/qti-order-interaction.d.ts +23 -0
- package/lib/qti-base/qti-preview/qti-order-interaction/qti-order-interaction.stories.d.ts +21 -0
- package/lib/qti-base/qti-preview/qti-preview-badge.d.ts +1 -0
- package/lib/qti-base/qti-preview/qti-select-point-interaction/qti-select-point-interaction.d.ts +10 -0
- package/lib/qti-base/qti-preview/qti-select-point-interaction/qti-select-point-interaction.stories.d.ts +7 -0
- package/lib/qti-base/qti-preview/qti-slider-interaction/qti-slider-interaction.d.ts +26 -0
- package/lib/qti-base/qti-preview/qti-slider-interaction/qti-slider-interaction.stories.d.ts +48 -0
- package/lib/qti-base/qti-prompt/qti-prompt.d.ts +6 -0
- package/lib/qti-base/qti-responseprocessing/index.d.ts +18 -0
- package/lib/qti-base/qti-responseprocessing/qti-expression/qti-and/qti-and.d.ts +7 -0
- package/lib/qti-base/qti-responseprocessing/qti-expression/qti-basevalue/qti-basevalue.d.ts +6 -0
- package/lib/qti-base/qti-responseprocessing/qti-expression/qti-contains/qti-contains.d.ts +6 -0
- package/lib/qti-base/qti-responseprocessing/qti-expression/qti-correct/qti-correct.d.ts +6 -0
- package/lib/qti-base/qti-responseprocessing/qti-expression/qti-expression.d.ts +6 -0
- package/lib/qti-base/qti-responseprocessing/qti-expression/qti-gte/qti-gte.d.ts +6 -0
- package/lib/qti-base/qti-responseprocessing/qti-expression/qti-is-null/qti-is-null.d.ts +6 -0
- package/lib/qti-base/qti-responseprocessing/qti-expression/qti-mapresponse/qti-mapresponse.d.ts +4 -0
- package/lib/qti-base/qti-responseprocessing/qti-expression/qti-match/qti-match.d.ts +4 -0
- package/lib/qti-base/qti-responseprocessing/qti-expression/qti-multiple/qti-multiple.d.ts +4 -0
- package/lib/qti-base/qti-responseprocessing/qti-expression/qti-or/qti-or.d.ts +7 -0
- package/lib/qti-base/qti-responseprocessing/qti-expression/qti-variable/qti-variable.d.ts +6 -0
- package/lib/qti-base/qti-responseprocessing/qti-responseelse/qti-responseelse.d.ts +15 -0
- package/lib/qti-base/qti-responseprocessing/qti-responseelse/qti-responseif/qti-responseelseif/qti-responseelseif.d.ts +4 -0
- package/lib/qti-base/qti-responseprocessing/qti-responseelse/qti-responseif/qti-responseif.d.ts +7 -0
- package/lib/qti-base/qti-responseprocessing/qti-responseprocessing/qti-responseprocessing.d.ts +7 -0
- package/lib/qti-base/qti-responseprocessing/qti-rule/qti-responsecondition/qti-responsecondition.d.ts +5 -0
- package/lib/qti-base/qti-responseprocessing/qti-rule/qti-rule.d.ts +5 -0
- package/lib/qti-base/qti-responseprocessing/qti-rule/qti-setoutcomevalue/qti-setoutcomevalue.d.ts +4 -0
- package/lib/qti-base/qti-stylesheet/qti-stylesheet.d.ts +7 -0
- package/lib/qti-base/qti-variabledeclaration/qti-outcomedeclaration/qti-outcomedeclaration.d.ts +5 -0
- package/lib/qti-base/qti-variabledeclaration/qti-responsedeclaration/qti-responsedeclaration.d.ts +24 -0
- package/lib/qti-base/qti-variabledeclaration/qti-variabledeclaration.d.ts +4 -0
- package/lib/qti-utilities/EventStrings.d.ts +18 -0
- package/lib/qti-utilities/EventTypes.d.ts +7 -0
- package/lib/qti-utilities/ExpressionResult.d.ts +43 -0
- package/lib/qti-utilities/OutcomeVariable.d.ts +8 -0
- package/lib/qti-utilities/ResponseVariable.d.ts +28 -0
- package/lib/qti-utilities/TemplateStrings.d.ts +3 -0
- package/lib/qti-utilities/VariableDeclaration.d.ts +7 -0
- package/lib/utilities/choice/choices.d.ts +23 -0
- package/lib/utilities/drag-drop/drag-drop-interaction-mixin.d.ts +5 -0
- package/lib/utilities/drag-drop/draggables-mixin.d.ts +6 -0
- package/lib/utilities/drag-drop/droppables-mixin.d.ts +6 -0
- package/lib/utilities/drag-drop/flippables-mixin.d.ts +8 -0
- package/lib/utilities/element/qti-element.d.ts +6 -0
- package/lib/utilities/hotspots/hotspot.d.ts +2 -0
- package/lib/utilities/interaction/interaction.d.ts +14 -0
- package/lib/utilities/interaction/interaction.interface.d.ts +8 -0
- package/lib/utilities/reset-styles/reset-shadowroot-styles.d.ts +1 -0
- package/lib/utilities/scale-to-fit/scale-to-fit.mixin.d.ts +6 -0
- package/lib/utilities/watch/watch.d.ts +14 -0
- package/package.json +20 -0
- package/styles/qti-classes.stories.d.ts +5 -0
- package/styles/qti-layout-styles.stories.d.ts +6 -0
- package/styles/qti-styles.stories.d.ts +5 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ResponseType } from '../../qti-utilities/ExpressionResult';
|
|
2
|
+
import { QtiChoice } from '../../qti-base/qti-choice/qti-choice';
|
|
3
|
+
import { Interaction } from '../interaction/interaction';
|
|
4
|
+
export declare class Choices extends Interaction {
|
|
5
|
+
protected _choiceElements: QtiChoice[];
|
|
6
|
+
private _minChoices;
|
|
7
|
+
private _maxChoices;
|
|
8
|
+
_handleDisabledChange: (old: any, disabled: any) => void;
|
|
9
|
+
_handleReadonlyChange: (old: any, readonly: any) => void;
|
|
10
|
+
_handleMaxChoicesChange: () => void;
|
|
11
|
+
constructor();
|
|
12
|
+
reset(): void;
|
|
13
|
+
validate(): boolean;
|
|
14
|
+
set response(myResponse: ResponseType);
|
|
15
|
+
connectedCallback(): void;
|
|
16
|
+
disconnectedCallback(): void;
|
|
17
|
+
private _registerChoiceElement;
|
|
18
|
+
private _looseChoiceElement;
|
|
19
|
+
private _determineInputType;
|
|
20
|
+
private _setInputType;
|
|
21
|
+
private _choiceElementSelectedHandler;
|
|
22
|
+
private _choiceElementSelected;
|
|
23
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { IInteraction } from '../interaction/interaction.interface';
|
|
3
|
+
declare type Constructor<T> = new (...args: any[]) => T;
|
|
4
|
+
export declare const DragDropInteractionMixin: <T extends Constructor<LitElement>>(superClass: T, draggablesSelector: string, droppablesSelector: string) => Constructor<IInteraction> & T;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
declare type Constructor<T> = new (...args: any[]) => T;
|
|
3
|
+
declare class DraggablesInterface {
|
|
4
|
+
}
|
|
5
|
+
export declare const DraggablesMixin: <T extends Constructor<LitElement>>(superClass: T, draggablesSelector: string) => Constructor<DraggablesInterface> & T;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
declare type Constructor<T> = new (...args: any[]) => T;
|
|
3
|
+
declare class DroppablesInterface {
|
|
4
|
+
}
|
|
5
|
+
export declare const DroppablesMixin: <T extends Constructor<LitElement>>(superClass: T, droppablesSelector: string) => Constructor<DroppablesInterface> & T;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
declare type Constructor<T> = new (...args: any[]) => T;
|
|
3
|
+
export declare class FlippablesInterface {
|
|
4
|
+
connectedCallback(): void;
|
|
5
|
+
disconnectedCallback(): void;
|
|
6
|
+
}
|
|
7
|
+
export declare const FlippablesMixin: <T extends Constructor<LitElement>>(superClass: T, droppablesSel: string, draggablesSel: string) => Constructor<FlippablesInterface> & T;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import QtiElement from '../element/qti-element';
|
|
2
|
+
import { QtiVariableJSON } from '../../qti-utilities/ExpressionResult';
|
|
3
|
+
export declare abstract class Interaction extends QtiElement {
|
|
4
|
+
responseIdentifier: string;
|
|
5
|
+
/** disabled should be exposed to the attributes and accessible as property */
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
/** readonly should be exposed to the attributes and accessible as property */
|
|
8
|
+
readonly: boolean;
|
|
9
|
+
abstract reset(): any;
|
|
10
|
+
abstract validate(): boolean;
|
|
11
|
+
abstract set response(val: any);
|
|
12
|
+
connectedCallback(): void;
|
|
13
|
+
saveResponse(value: QtiVariableJSON): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const resetCss: import("lit").CSSResult;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
declare type Constructor<T> = new (...args: any[]) => T;
|
|
3
|
+
export declare class ScaleToFitInterface {
|
|
4
|
+
}
|
|
5
|
+
export declare const ScaleToFitMixin: <T extends Constructor<LitElement>>(superClass: T, scaleSelector: string) => Constructor<ScaleToFitInterface> & T;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { LitElement } from 'lit';
|
|
2
|
+
declare type UpdateHandler = (prev?: unknown, next?: unknown) => void;
|
|
3
|
+
declare type NonUndefined<A> = A extends undefined ? never : A;
|
|
4
|
+
declare type UpdateHandlerFunctionKeys<T extends object> = {
|
|
5
|
+
[K in keyof T]-?: NonUndefined<T[K]> extends UpdateHandler ? K : never;
|
|
6
|
+
}[keyof T];
|
|
7
|
+
interface WatchOptions {
|
|
8
|
+
/**
|
|
9
|
+
* If true, will only start watching after the initial update/render
|
|
10
|
+
*/
|
|
11
|
+
waitUntilFirstUpdate?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function watch(propName: string, options?: WatchOptions): <ElemClass extends LitElement>(proto: ElemClass, decoratedFnName: UpdateHandlerFunctionKeys<ElemClass>) => void;
|
|
14
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@citolab/qti-components",
|
|
3
|
+
"version": "3.0.36",
|
|
4
|
+
"repository": "@citolab/qti-components",
|
|
5
|
+
"author": "Patrick de Klein",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"description": "QTI webcomponents",
|
|
8
|
+
"module": "./index.js",
|
|
9
|
+
"main": "./index.cjs",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"types": "./index.d.ts",
|
|
12
|
+
"dependencies": {},
|
|
13
|
+
"peerDependencies": {
|
|
14
|
+
"lit": "2.4.1",
|
|
15
|
+
"@storybook/addon-actions": "6.5.13",
|
|
16
|
+
"lit-html": "2.4.0",
|
|
17
|
+
"@citolab/qti-transform": "0.0.1",
|
|
18
|
+
"haunted": "5.0.0"
|
|
19
|
+
}
|
|
20
|
+
}
|