@citolab/qti-components 3.0.51 → 3.0.53
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.css +215 -1094
- package/index.js +97 -80
- package/index.umd.css +215 -1094
- package/index.umd.js +117 -99
- package/lab/qti-manual-scoring/qti-manual-scoring.d.ts +2 -0
- package/lab/qti-test/qti-test.d.ts +1 -0
- package/lib/qti-base/qti-preview/qti-associate-interaction/qti-associate-interaction.d.ts +2 -3
- package/lib/qti-base/qti-preview/qti-associate-interaction/qti-simple-associable-choice.d.ts +1 -0
- package/lib/qti-base/qti-preview/qti-gap-match-interaction/qti-gap-match-interaction.d.ts +1 -1
- package/lib/qti-base/qti-preview/qti-gap-match-interaction/qti-gap-text.d.ts +4 -1
- package/lib/qti-base/qti-preview/qti-gap-match-interaction/qti-gap.d.ts +3 -1
- package/lib/qti-base/qti-preview/qti-slider-interaction/qti-slider-interaction.d.ts +17 -10
- package/lib/utilities/{watch → decorators}/watch.d.ts +0 -0
- package/lib/utilities/drag-drop/drag-drop-api.d.ts +83 -0
- package/lib/utilities/drag-drop/drag-drop-interaction-mixin.d.ts +1 -1
- package/lib/utilities/drag-drop/droppables-mixin.d.ts +1 -1
- package/package.json +2 -2
|
@@ -5,6 +5,8 @@ export declare class QtiManualScoring extends QtiElement {
|
|
|
5
5
|
disabled: boolean;
|
|
6
6
|
readonly: boolean;
|
|
7
7
|
value: string;
|
|
8
|
+
min: number;
|
|
9
|
+
max: number;
|
|
8
10
|
protected textChanged(event: Event): void;
|
|
9
11
|
logger: ContextConsumer<{
|
|
10
12
|
__context__: import("../qti-context/qti-context").Logger;
|
|
@@ -2,10 +2,9 @@ import QtiElement from '../../../utilities/element/qti-element';
|
|
|
2
2
|
import './qti-associate-interaction.scss';
|
|
3
3
|
declare const QtiAssociateInteraction_base: (new (...args: any[]) => import("../../../utilities/interaction/interaction.interface").IInteraction) & typeof QtiElement;
|
|
4
4
|
export declare class QtiAssociateInteraction extends QtiAssociateInteraction_base {
|
|
5
|
-
|
|
5
|
+
private _childrenMap;
|
|
6
|
+
static styles: import("lit").CSSResult;
|
|
6
7
|
render(): import("lit-html").TemplateResult<1>;
|
|
7
|
-
static styles: import("lit").CSSResult[];
|
|
8
|
-
firstUpdated(changedProps: any): void;
|
|
9
8
|
connectedCallback(): void;
|
|
10
9
|
}
|
|
11
10
|
export {};
|
|
@@ -2,7 +2,7 @@ import { LitElement } from 'lit';
|
|
|
2
2
|
import './qti-gap-match-interaction.scss';
|
|
3
3
|
declare const QtiGapMatchInteraction_base: (new (...args: any[]) => import("../../../utilities/interaction/interaction.interface").IInteraction) & typeof LitElement;
|
|
4
4
|
export declare class QtiGapMatchInteraction extends QtiGapMatchInteraction_base {
|
|
5
|
-
static styles: import("lit").CSSResult
|
|
5
|
+
static styles: import("lit").CSSResult;
|
|
6
6
|
render(): import("lit-html").TemplateResult<1>;
|
|
7
7
|
}
|
|
8
8
|
export {};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Interaction } from '../../../utilities/interaction/interaction';
|
|
2
|
+
import { ResponseType } from '../../../qti-utilities/ExpressionResult';
|
|
2
3
|
import './qti-slider-interaction.scss';
|
|
3
4
|
export declare class QtiSliderInteraction extends Interaction {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
private _knob;
|
|
6
|
+
private _rail;
|
|
7
|
+
private _leftValue;
|
|
8
|
+
private _sliderValue;
|
|
9
|
+
stepLabel: boolean;
|
|
10
|
+
reverse: boolean;
|
|
8
11
|
private _min;
|
|
9
12
|
set min(value: number);
|
|
10
13
|
get min(): number;
|
|
@@ -14,13 +17,17 @@ export declare class QtiSliderInteraction extends Interaction {
|
|
|
14
17
|
private _step;
|
|
15
18
|
set step(value: number);
|
|
16
19
|
get step(): number;
|
|
20
|
+
_handleDisabledChange: (old: any, disabled: any) => void;
|
|
21
|
+
_handleReadonlyChange: (old: any, readonly: any) => void;
|
|
22
|
+
reset(): void;
|
|
23
|
+
validate(): boolean;
|
|
24
|
+
set response(myResponse: ResponseType);
|
|
17
25
|
static styles: import("lit").CSSResult[];
|
|
18
26
|
render(): import("lit-html").TemplateResult<1>;
|
|
19
|
-
constructor();
|
|
20
|
-
firstUpdated(): void;
|
|
21
27
|
connectedCallback(): void;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
private _onMouseDown;
|
|
29
|
+
/** moveSlidieeeeeee gets x position and compares this with the total width in pixels */
|
|
30
|
+
private moveSlidieeeeeee;
|
|
31
|
+
/** moveSliderTo gets the real slider value, and brings it back te percentages */
|
|
32
|
+
private _moveSliderTo;
|
|
26
33
|
}
|
|
File without changes
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 Jonas Jelonek <jonas.jelonek@protonmail.ch>
|
|
3
|
+
* https://github.com/jonasjelonek/TouchDragAndDrop
|
|
4
|
+
*/
|
|
5
|
+
export declare class TouchDragAndDrop {
|
|
6
|
+
_touchBegin: number;
|
|
7
|
+
_touchDown: any;
|
|
8
|
+
_lastClick: number;
|
|
9
|
+
_canDrag: boolean;
|
|
10
|
+
_dragSrc: any;
|
|
11
|
+
_dragCopy: any;
|
|
12
|
+
_touchEndCalled: boolean;
|
|
13
|
+
_dragRunning: boolean;
|
|
14
|
+
_dataTransfer: {
|
|
15
|
+
data: {};
|
|
16
|
+
setData: (type: any, val: any) => void;
|
|
17
|
+
getData: (type: any) => any;
|
|
18
|
+
effectAllowed: string;
|
|
19
|
+
};
|
|
20
|
+
_copyOffset: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
};
|
|
24
|
+
_lastTarget: any;
|
|
25
|
+
_currentDropContainer: any;
|
|
26
|
+
_handleClick: boolean;
|
|
27
|
+
_DBLCLICKDELAY: number;
|
|
28
|
+
_CONTEXTMENUDELAY: number;
|
|
29
|
+
_DRAGDELTA: number;
|
|
30
|
+
_COPYOPACITY: number;
|
|
31
|
+
constructor(draggableEls: Element[]);
|
|
32
|
+
/**
|
|
33
|
+
* Callback for touchstart event listener.
|
|
34
|
+
* @param {TouchEvent} e
|
|
35
|
+
*/
|
|
36
|
+
_touchStart(e: any): void;
|
|
37
|
+
/**
|
|
38
|
+
* Callback for touchmove event listener.
|
|
39
|
+
* @param {TouchEvent} e
|
|
40
|
+
*/
|
|
41
|
+
_touchMove(e: any): void;
|
|
42
|
+
/**
|
|
43
|
+
* Callback for touchend event listener.
|
|
44
|
+
* @param {TouchEvent} e
|
|
45
|
+
*/
|
|
46
|
+
_touchEnd(e: any): void;
|
|
47
|
+
/**
|
|
48
|
+
* Callback for touchcancel event listener, in case browser supports this.
|
|
49
|
+
* @param {TouchEvent} e
|
|
50
|
+
*/
|
|
51
|
+
_touchCancel(e: any): void;
|
|
52
|
+
/**
|
|
53
|
+
* Determines the next droppable element at current point.
|
|
54
|
+
* @param {Object} pt
|
|
55
|
+
*/
|
|
56
|
+
_findDroppable(event: any): any;
|
|
57
|
+
_getPoint(event: any, page?: any): {
|
|
58
|
+
x: any;
|
|
59
|
+
y: any;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Calculates the offset for displaying the drag copy to have a seamless dragging.
|
|
63
|
+
* @param {Touch} touch The current touch.
|
|
64
|
+
*/
|
|
65
|
+
_calculateDragCopyPosition(touch: any): void;
|
|
66
|
+
/**
|
|
67
|
+
* Calculates the pixel delta between first touch and the current touch position.
|
|
68
|
+
* @param {Object} touch
|
|
69
|
+
*/
|
|
70
|
+
_getDelta(touch: any): number;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @param {Element} e The event's target element.
|
|
74
|
+
* @param {string} eventType The type of the event.
|
|
75
|
+
* @param {bool} bubble Sets whether the event should bubble.
|
|
76
|
+
*/
|
|
77
|
+
_dispatchEvent(e: any, eventType: any, bubble?: boolean): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Resets all variables and prepares for new Drag and Drop.
|
|
80
|
+
*/
|
|
81
|
+
_reset(): void;
|
|
82
|
+
private getPositionFromEvent;
|
|
83
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
import { IInteraction } from '../interaction/interaction.interface';
|
|
3
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;
|
|
4
|
+
export declare const DragDropInteractionMixin: <T extends Constructor<LitElement>>(superClass: T, draggablesSelector: string, droppablesInShadowRoot: boolean, droppablesSelector: string) => Constructor<IInteraction> & T;
|
|
5
5
|
export {};
|
|
@@ -2,5 +2,5 @@ import { LitElement } from 'lit';
|
|
|
2
2
|
declare type Constructor<T> = new (...args: any[]) => T;
|
|
3
3
|
declare class DroppablesInterface {
|
|
4
4
|
}
|
|
5
|
-
export declare const DroppablesMixin: <T extends Constructor<LitElement>>(superClass: T, droppablesSelector: string) => Constructor<DroppablesInterface> & T;
|
|
5
|
+
export declare const DroppablesMixin: <T extends Constructor<LitElement>>(superClass: T, droppablesInShadowRoot: boolean, droppablesSelector: string) => Constructor<DroppablesInterface> & T;
|
|
6
6
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citolab/qti-components",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.53",
|
|
4
4
|
"repository": "@citolab/qti-components",
|
|
5
5
|
"author": "Patrick de Klein",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"lit": "2.4.1",
|
|
15
15
|
"@storybook/addon-actions": "6.5.13",
|
|
16
16
|
"lit-html": "2.4.0",
|
|
17
|
-
"@citolab/qti-transform": "0.0.
|
|
17
|
+
"@citolab/qti-transform": "0.0.7"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {}
|
|
20
20
|
}
|