@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.
@@ -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;
@@ -50,6 +50,7 @@ export declare class QtiTest extends LitElement {
50
50
  private _onScoreItem;
51
51
  private _onPrevItem;
52
52
  private _onNextItem;
53
+ private _onShowCorrect;
53
54
  private _onRequestItem;
54
55
  private _handleSlotchange;
55
56
  render(): import("lit-html").TemplateResult<1>;
@@ -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
- childrenMap: Element[];
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 {};
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
2
  export declare class qtiSimpleAssociableChoice extends LitElement {
3
+ connectedCallback(): void;
3
4
  render(): import("lit-html").TemplateResult<1>;
4
5
  }
@@ -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,2 +1,5 @@
1
- export declare class QtiGapText extends HTMLElement {
1
+ import { LitElement } from 'lit';
2
+ export declare class QtiGapText extends LitElement {
3
+ connectedCallback(): void;
4
+ render(): import("lit-html").TemplateResult<1>;
2
5
  }
@@ -1,2 +1,4 @@
1
- export declare class QtiGap extends HTMLElement {
1
+ import { LitElement } from 'lit';
2
+ export declare class QtiGap extends LitElement {
3
+ render(): import("lit-html").TemplateResult<1>;
2
4
  }
@@ -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
- value: number;
5
- reset(): void;
6
- validate(): boolean;
7
- set response(val: any);
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
- get RAIL_WIDTH(): number;
23
- _onKeyDown(event: any): void;
24
- _onMouseDown(e: any): void;
25
- _moveSliderTo(value: any): void;
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.51",
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.6"
17
+ "@citolab/qti-transform": "0.0.7"
18
18
  },
19
19
  "peerDependencies": {}
20
20
  }