@citolab/qti-components 7.0.6-beta.1 → 7.0.6-beta.2
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/cdn/chunks/{chunk-FTKONGII.js → chunk-7XYBFL7U.js} +28 -28
- package/cdn/chunks/chunk-N5OHGRGG.js +8 -0
- package/cdn/chunks/chunk-NDHSIO2G.js +8 -0
- package/cdn/chunks/chunk-QV6I5NVQ.js +8 -0
- package/cdn/index.global.js +1 -1
- package/cdn/index.js +1 -1
- package/cdn/qti-components/index.js +1 -1
- package/dist/chunks/{chunk-DU37U6PW.js → chunk-K6ATVWMP.js} +21 -27
- package/dist/chunks/chunk-K6ATVWMP.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/qti-components/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/chunk-2V6LQV2K.js +0 -50
- package/dist/chunks/chunk-2V6LQV2K.js.map +0 -1
- package/dist/chunks/chunk-4WVLWWYJ.js +0 -50
- package/dist/chunks/chunk-4WVLWWYJ.js.map +0 -1
- package/dist/chunks/chunk-DU37U6PW.js.map +0 -1
- package/dist/chunks/chunk-O6WEZVEM.js +0 -43
- package/dist/chunks/chunk-O6WEZVEM.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
QtiVariable,
|
|
84
84
|
qtiAndMixin,
|
|
85
85
|
qtiSubtractMixin
|
|
86
|
-
} from "../chunks/chunk-
|
|
86
|
+
} from "../chunks/chunk-K6ATVWMP.js";
|
|
87
87
|
import "../chunks/chunk-XDMSEAYC.js";
|
|
88
88
|
import "../chunks/chunk-D3RGDWKP.js";
|
|
89
89
|
import "../chunks/chunk-ELDMXTUQ.js";
|
package/package.json
CHANGED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TestComponent
|
|
3
|
-
} from "./chunk-3EU75IUF.js";
|
|
4
|
-
import {
|
|
5
|
-
btn,
|
|
6
|
-
dis
|
|
7
|
-
} from "./chunk-4O5F7WV7.js";
|
|
8
|
-
import {
|
|
9
|
-
__decorateClass
|
|
10
|
-
} from "./chunk-H2JE6IVU.js";
|
|
11
|
-
|
|
12
|
-
// src/lib/qti-test/components/test-next.ts
|
|
13
|
-
import { css, html } from "lit";
|
|
14
|
-
import { customElement } from "lit/decorators.js";
|
|
15
|
-
var TestNext = class extends TestComponent {
|
|
16
|
-
constructor() {
|
|
17
|
-
super();
|
|
18
|
-
this._internals.role = "button";
|
|
19
|
-
this._internals.ariaLabel = "Next item";
|
|
20
|
-
this.addEventListener("click", (e) => {
|
|
21
|
-
e.preventDefault();
|
|
22
|
-
if (!this.disabled) this._requestItem(this.items[this.itemIndex + 1].identifier);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
willUpdate(changedProperties) {
|
|
26
|
-
super.willUpdate(changedProperties);
|
|
27
|
-
if (changedProperties.has("_testContext")) {
|
|
28
|
-
this.disabled = !this._testElement?.el || this.itemIndex < 0 || this.itemIndex >= this.items.length - 1;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
render() {
|
|
32
|
-
return html`<slot></slot>`;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
TestNext.styles = css`
|
|
36
|
-
:host {
|
|
37
|
-
${btn};
|
|
38
|
-
}
|
|
39
|
-
:host([disabled]) {
|
|
40
|
-
${dis};
|
|
41
|
-
}
|
|
42
|
-
`;
|
|
43
|
-
TestNext = __decorateClass([
|
|
44
|
-
customElement("test-next")
|
|
45
|
-
], TestNext);
|
|
46
|
-
|
|
47
|
-
export {
|
|
48
|
-
TestNext
|
|
49
|
-
};
|
|
50
|
-
//# sourceMappingURL=chunk-2V6LQV2K.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/qti-test/components/test-next.ts"],"sourcesContent":["import { css, html } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport * as styles from './styles';\nimport { TestComponent } from './test-component.abstract';\n\n/**\n * Represents a custom element for navigating to the next test item.\n *\n * @remarks\n * This element provides functionality for navigating to the next test item.\n *\n * @example\n * ```html\n * <test-next></test-next>\n * ```\n */\n@customElement('test-next')\nexport class TestNext extends TestComponent {\n static styles = css`\n :host {\n ${styles.btn};\n }\n :host([disabled]) {\n ${styles.dis};\n }\n `;\n\n constructor() {\n super();\n this._internals.role = 'button';\n this._internals.ariaLabel = 'Next item';\n\n this.addEventListener('click', e => {\n e.preventDefault();\n if (!this.disabled) this._requestItem(this.items[this.itemIndex + 1].identifier);\n });\n }\n\n willUpdate(changedProperties: Map<string | number | symbol, unknown>) {\n super.willUpdate(changedProperties);\n if (changedProperties.has('_testContext')) {\n this.disabled = !this._testElement?.el || this.itemIndex < 0 || this.itemIndex >= this.items.length - 1;\n }\n }\n\n render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-next': TestNext;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,KAAK,YAAY;AAC1B,SAAS,qBAAqB;AAgBvB,IAAM,WAAN,cAAuB,cAAc;AAAA,EAU1C,cAAc;AACZ,UAAM;AACN,SAAK,WAAW,OAAO;AACvB,SAAK,WAAW,YAAY;AAE5B,SAAK,iBAAiB,SAAS,OAAK;AAClC,QAAE,eAAe;AACjB,UAAI,CAAC,KAAK,SAAU,MAAK,aAAa,KAAK,MAAM,KAAK,YAAY,CAAC,EAAE,UAAU;AAAA,IACjF,CAAC;AAAA,EACH;AAAA,EAEA,WAAW,mBAA2D;AACpE,UAAM,WAAW,iBAAiB;AAClC,QAAI,kBAAkB,IAAI,cAAc,GAAG;AACzC,WAAK,WAAW,CAAC,KAAK,cAAc,MAAM,KAAK,YAAY,KAAK,KAAK,aAAa,KAAK,MAAM,SAAS;AAAA,IACxG;AAAA,EACF;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,EACT;AACF;AA/Ba,SACJ,SAAS;AAAA;AAAA,QAEH,GAAG;AAAA;AAAA;AAAA,QAGH,GAAG;AAAA;AAAA;AANL,WAAN;AAAA,EADN,cAAc,WAAW;AAAA,GACb;","names":[]}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TestComponent
|
|
3
|
-
} from "./chunk-3EU75IUF.js";
|
|
4
|
-
import {
|
|
5
|
-
btn,
|
|
6
|
-
dis
|
|
7
|
-
} from "./chunk-4O5F7WV7.js";
|
|
8
|
-
import {
|
|
9
|
-
__decorateClass
|
|
10
|
-
} from "./chunk-H2JE6IVU.js";
|
|
11
|
-
|
|
12
|
-
// src/lib/qti-test/components/test-prev.ts
|
|
13
|
-
import { css, html } from "lit";
|
|
14
|
-
import { customElement } from "lit/decorators.js";
|
|
15
|
-
var TestPrev = class extends TestComponent {
|
|
16
|
-
constructor() {
|
|
17
|
-
super();
|
|
18
|
-
this._internals.role = "button";
|
|
19
|
-
this._internals.ariaLabel = "Next item";
|
|
20
|
-
this.addEventListener("click", (e) => {
|
|
21
|
-
e.preventDefault();
|
|
22
|
-
if (!this.disabled) this._requestItem(this.items[this.itemIndex - 1].identifier);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
willUpdate(changedProperties) {
|
|
26
|
-
super.willUpdate(changedProperties);
|
|
27
|
-
if (changedProperties.has("_testContext")) {
|
|
28
|
-
this.disabled = !this._testElement?.el || this.itemIndex === 0 || this.itemIndex === -1;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
render() {
|
|
32
|
-
return html`<slot></slot>`;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
TestPrev.styles = css`
|
|
36
|
-
:host {
|
|
37
|
-
${btn};
|
|
38
|
-
}
|
|
39
|
-
:host([disabled]) {
|
|
40
|
-
${dis};
|
|
41
|
-
}
|
|
42
|
-
`;
|
|
43
|
-
TestPrev = __decorateClass([
|
|
44
|
-
customElement("test-prev")
|
|
45
|
-
], TestPrev);
|
|
46
|
-
|
|
47
|
-
export {
|
|
48
|
-
TestPrev
|
|
49
|
-
};
|
|
50
|
-
//# sourceMappingURL=chunk-4WVLWWYJ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/qti-test/components/test-prev.ts"],"sourcesContent":["import { css, html } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { TestComponent } from './test-component.abstract';\nimport * as styles from './styles';\n\n/**\n * Represents a custom element for navigating to the previous test item.\n *\n * @remarks\n * This element provides functionality for navigating to the previous test item.\n *\n * @example\n * ```html\n * <test-prev></test-prev>\n * ```\n */\n@customElement('test-prev')\nexport class TestPrev extends TestComponent {\n static styles = css`\n :host {\n ${styles.btn};\n }\n :host([disabled]) {\n ${styles.dis};\n }\n `;\n\n constructor() {\n super();\n this._internals.role = 'button';\n this._internals.ariaLabel = 'Next item';\n\n this.addEventListener('click', e => {\n e.preventDefault();\n if (!this.disabled) this._requestItem(this.items[this.itemIndex - 1].identifier);\n });\n }\n\n willUpdate(changedProperties: Map<string | number | symbol, unknown>) {\n super.willUpdate(changedProperties);\n if (changedProperties.has('_testContext')) {\n this.disabled = !this._testElement?.el || this.itemIndex === 0 || this.itemIndex === -1;\n }\n }\n\n render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-previous': TestPrev;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,KAAK,YAAY;AAC1B,SAAS,qBAAqB;AAgBvB,IAAM,WAAN,cAAuB,cAAc;AAAA,EAU1C,cAAc;AACZ,UAAM;AACN,SAAK,WAAW,OAAO;AACvB,SAAK,WAAW,YAAY;AAE5B,SAAK,iBAAiB,SAAS,OAAK;AAClC,QAAE,eAAe;AACjB,UAAI,CAAC,KAAK,SAAU,MAAK,aAAa,KAAK,MAAM,KAAK,YAAY,CAAC,EAAE,UAAU;AAAA,IACjF,CAAC;AAAA,EACH;AAAA,EAEA,WAAW,mBAA2D;AACpE,UAAM,WAAW,iBAAiB;AAClC,QAAI,kBAAkB,IAAI,cAAc,GAAG;AACzC,WAAK,WAAW,CAAC,KAAK,cAAc,MAAM,KAAK,cAAc,KAAK,KAAK,cAAc;AAAA,IACvF;AAAA,EACF;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,EACT;AACF;AA/Ba,SACJ,SAAS;AAAA;AAAA,QAEH,GAAG;AAAA;AAAA;AAAA,QAGH,GAAG;AAAA;AAAA;AANL,WAAN;AAAA,EADN,cAAc,WAAW;AAAA,GACb;","names":[]}
|