@citolab/qti-components 6.0.5 → 6.0.7
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/dist/{chunk-OIQME3LC.js → chunk-YDZUFMBB.js} +15 -23
- package/dist/custom-elements.json +423 -500
- package/dist/index.css +11 -7
- package/dist/index.d.ts +2 -6
- package/dist/index.js +40 -48
- package/dist/qti-item/index.d.ts +4 -34
- package/dist/qti-item/index.js +1 -1
- package/dist/qti-item-8c26fa9e.d.ts +30 -0
- package/dist/qti-item-react/index.d.ts +3 -4
- package/dist/qti-item-react/index.js +1 -1
- package/package.json +5 -4
- package/readme.md +29 -25
- package/dist/chunk-67UY4OJW.js +0 -2121
- package/dist/chunk-7RTSAPMF.js +0 -2135
- package/dist/chunk-E7DMNXUW.js +0 -2127
- package/dist/chunk-K2XJ4SA2.js +0 -2211
- package/dist/chunk-MGEP4U4L.js +0 -2139
- package/dist/chunk-QH4IMEWP.js +0 -2175
- package/dist/chunk-TI6G3PT6.js +0 -2172
- package/dist/qti-simple-choice-4df32b16.d.ts +0 -352
package/dist/qti-item/index.d.ts
CHANGED
|
@@ -1,34 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
declare class ScaleToFitInterface {
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
declare const QtiItem_base: (new (...args: any[]) => ScaleToFitInterface) & typeof LitElement;
|
|
10
|
-
declare class QtiItem extends QtiItem_base {
|
|
11
|
-
disabled: boolean;
|
|
12
|
-
handleDisabledChange(old: any, disabled: boolean): void;
|
|
13
|
-
readonly: boolean;
|
|
14
|
-
handleReadonlyChange(old: any, readonly: boolean): void;
|
|
15
|
-
responses: ResponseInteraction[];
|
|
16
|
-
handleResponsesChange(old: any, responses: ResponseInteraction[]): void;
|
|
17
|
-
set qtiContext(context: {
|
|
18
|
-
view: 'author' | 'candidate' | 'proctor' | 'scorer' | 'testConstructor' | 'tutor';
|
|
19
|
-
});
|
|
20
|
-
private provider;
|
|
21
|
-
private _xml;
|
|
22
|
-
get _item(): QtiAssessmentItem;
|
|
23
|
-
set xml(val: string);
|
|
24
|
-
get xml(): string;
|
|
25
|
-
static styles: lit.CSSResult;
|
|
26
|
-
processResponse: () => boolean;
|
|
27
|
-
showCorrectResponse: () => void;
|
|
28
|
-
validateResponses: () => boolean;
|
|
29
|
-
resetInteractions: () => void;
|
|
30
|
-
connectedCallback(): void;
|
|
31
|
-
render: () => lit_html.TemplateResult<1>;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export { QtiItem };
|
|
1
|
+
export { Q as QtiItem } from '../qti-item-8c26fa9e.js';
|
|
2
|
+
import 'lit-html';
|
|
3
|
+
import 'lit';
|
|
4
|
+
import '../qti-assessment-item-f1fcf393.js';
|
package/dist/qti-item/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"../chunk-
|
|
1
|
+
import{a as o}from"../chunk-YDZUFMBB.js";import"../chunk-DLLHO3W2.js";import"../chunk-NMCIOGD2.js";export{o as QtiItem};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as lit_html from 'lit-html';
|
|
2
|
+
import * as lit from 'lit';
|
|
3
|
+
import { LitElement } from 'lit';
|
|
4
|
+
import { a as ResponseInteraction, Q as QtiAssessmentItem } from './qti-assessment-item-f1fcf393.js';
|
|
5
|
+
|
|
6
|
+
declare class QtiItem extends LitElement {
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
handleDisabledChange(old: any, disabled: boolean): void;
|
|
9
|
+
readonly: boolean;
|
|
10
|
+
handleReadonlyChange(old: any, readonly: boolean): void;
|
|
11
|
+
responses: ResponseInteraction[];
|
|
12
|
+
handleResponsesChange(old: any, responses: ResponseInteraction[]): void;
|
|
13
|
+
set qtiContext(context: {
|
|
14
|
+
view: 'author' | 'candidate' | 'proctor' | 'scorer' | 'testConstructor' | 'tutor';
|
|
15
|
+
});
|
|
16
|
+
private provider;
|
|
17
|
+
get _item(): QtiAssessmentItem;
|
|
18
|
+
private _xml;
|
|
19
|
+
set xml(val: string);
|
|
20
|
+
get xml(): string;
|
|
21
|
+
static styles: lit.CSSResult;
|
|
22
|
+
processResponse: () => boolean;
|
|
23
|
+
showCorrectResponse: () => void;
|
|
24
|
+
validateResponses: () => boolean;
|
|
25
|
+
resetInteractions: () => void;
|
|
26
|
+
connectedCallback(): void;
|
|
27
|
+
render: () => lit_html.TemplateResult<1>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { QtiItem as Q };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { Ref } from 'react';
|
|
2
|
+
import { Q as QtiItem$1 } from '../qti-item-8c26fa9e.js';
|
|
2
3
|
import { a as ResponseInteraction } from '../qti-assessment-item-f1fcf393.js';
|
|
3
4
|
import { O as OutcomeChangedDetails, b as InteractionChangedDetails } from '../qti-simple-choice-e1c352e0.js';
|
|
4
5
|
import 'lit-html';
|
|
@@ -6,13 +7,11 @@ import 'lit';
|
|
|
6
7
|
import 'lit-html/directives/ref';
|
|
7
8
|
|
|
8
9
|
interface QtiItemProps {
|
|
9
|
-
ref?:
|
|
10
|
+
ref?: Ref<QtiItem$1>;
|
|
10
11
|
className?: string;
|
|
11
|
-
scales?: boolean;
|
|
12
12
|
responses?: ResponseInteraction[];
|
|
13
13
|
xml: string;
|
|
14
14
|
disabled?: boolean;
|
|
15
|
-
readonly?: boolean;
|
|
16
15
|
qtiContext?: {
|
|
17
16
|
view: 'author' | 'candidate' | 'proctor' | 'scorer' | 'testConstructor' | 'tutor';
|
|
18
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"../chunk-
|
|
1
|
+
import{a as e}from"../chunk-YDZUFMBB.js";import"../chunk-DLLHO3W2.js";import"../chunk-NMCIOGD2.js";import t from"react";import{createComponent as o}from"@lit-labs/react";var c=o({tagName:"qti-item",react:t,elementClass:e,events:{qtioutcomechanged:"qti-outcome-changed",qtiinteractionchanged:"qti-interaction-changed",qtiitemconnected:"qti-item-connected"}});export{c as QtiItem};
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"engines": {
|
|
13
13
|
"node": ">=16.0.0"
|
|
14
14
|
},
|
|
15
|
-
"version": "6.0.
|
|
15
|
+
"version": "6.0.7",
|
|
16
16
|
"type": "module",
|
|
17
17
|
"main": "dist/qti-components/index.js",
|
|
18
18
|
"exports": {
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"storybook": "storybook dev -p 6006",
|
|
72
72
|
"deploy": "firebase deploy --only hosting:qti-components",
|
|
73
73
|
"build-storybook": "storybook build",
|
|
74
|
-
"
|
|
75
|
-
"publish
|
|
74
|
+
"prepare": "npm run build-lib",
|
|
75
|
+
"publish": "np",
|
|
76
76
|
"test-storybook": "test-storybook",
|
|
77
77
|
"cem": "cem analyze --watch",
|
|
78
78
|
"lint": "eslint src/lib/**",
|
|
@@ -140,7 +140,8 @@
|
|
|
140
140
|
"ts-node": "^10.9.1",
|
|
141
141
|
"tsup": "^6.7.0",
|
|
142
142
|
"typescript": "^4.9.5",
|
|
143
|
-
"vite": "^4.2.0"
|
|
143
|
+
"vite": "^4.2.0",
|
|
144
|
+
"np": "^8.0.4"
|
|
144
145
|
},
|
|
145
146
|
"customElements": "custom-elements.json"
|
|
146
147
|
}
|
package/readme.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @citolab/qti-components
|
|
2
2
|
|
|
3
|
+
<a href="https://www.repostatus.org/#wip"><img src="https://www.repostatus.org/badges/latest/wip.svg" alt="Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public." /></a>
|
|
4
|
+
|
|
3
5
|
[](https://badge.fury.io/js/%40citolab%2Fqti-components)
|
|
4
6
|
[](https://opensource.org/license/gpl-2-0/)
|
|
5
7
|
|
|
@@ -30,34 +32,33 @@ import * as QTI from 'https://unpkg.com/@citolab/qti-components@next/dist/index.
|
|
|
30
32
|
|
|
31
33
|
```html
|
|
32
34
|
<qti-assessment-item identifier="choice" title="Unattended Luggage" adaptive="false" time-dependent="false">
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
35
|
+
<qti-response-declaration identifier="RESPONSE" cardinality="single" base-type="identifier">
|
|
36
|
+
<qti-correct-response>
|
|
37
|
+
<qti-value>ChoiceA</qti-value>
|
|
38
|
+
</qti-correct-response>
|
|
39
|
+
</qti-response-declaration>
|
|
40
|
+
<qti-outcome-declaration identifier="SCORE" cardinality="single" base-type="float">
|
|
41
|
+
<qti-default-value>
|
|
42
|
+
<qti-value>0</qti-value>
|
|
43
|
+
</qti-default-value>
|
|
44
|
+
</qti-outcome-declaration>
|
|
45
|
+
<qti-item-body>
|
|
46
|
+
<p>Look at the text in the picture.</p>
|
|
47
|
+
<p>
|
|
48
|
+
<img src="images/sign.png" alt="NEVER LEAVE LUGGAGE UNATTENDED" />
|
|
49
|
+
</p>
|
|
50
|
+
<qti-choice-interaction response-identifier="RESPONSE" shuffle="false" max-choices="1">
|
|
51
|
+
<qti-prompt>What does it say?</qti-prompt>
|
|
52
|
+
<qti-simple-choice identifier="ChoiceA">You must stay with your luggage at all times.</qti-simple-choice>
|
|
53
|
+
<qti-simple-choice identifier="ChoiceB">Do not let someone else look after your luggage.</qti-simple-choice>
|
|
54
|
+
<qti-simple-choice identifier="ChoiceC">Remember your luggage when you leave.</qti-simple-choice>
|
|
55
|
+
</qti-choice-interaction>
|
|
56
|
+
</qti-item-body>
|
|
57
|
+
<qti-response-processing template="https://purl.imsglobal.org/spec/qti/v3p0/rptemplates/match_correct.xml" />
|
|
56
58
|
</qti-assessment-item>
|
|
57
|
-
|
|
58
59
|
```
|
|
59
60
|
|
|
60
|
-
You can see a working example here [JSFiddle](https://jsfiddle.net/mrklein/s97Ld0gn).
|
|
61
|
+
You can see a working example here [JSFiddle](https://jsfiddle.net/mrklein/s97Ld0gn).
|
|
61
62
|
|
|
62
63
|
For a bit more advanced example using React and the QTIItem React wrapper from the package, you can check out this [StackBlitz](https://stackblitz.com/edit/qti-player). The item is integrated into a React component like this:
|
|
63
64
|
|
|
@@ -98,4 +99,7 @@ Contributions are welcome! Please follow these guidelines when contributing:
|
|
|
98
99
|
This project is licensed under the [GPLv3 License](LICENSE).
|
|
99
100
|
|
|
100
101
|
Please note that the licensing is GPLv3 if you want to use it in another way, feel free to ask!
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
|
|
101
105
|
```
|