@citolab/qti-components 7.3.2 → 7.3.3
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-2FHBMRTL.js +10 -0
- package/cdn/chunks/chunk-2IPVI6JS.js +8 -0
- package/cdn/chunks/chunk-2MMQH3OR.js +8 -0
- package/cdn/chunks/chunk-3OIAVUFK.js +8 -0
- package/cdn/chunks/chunk-5DVOEPIP.js +8 -0
- package/cdn/chunks/chunk-7JO3EE5V.js +5 -0
- package/cdn/chunks/chunk-AMH674XL.js +1450 -0
- package/cdn/chunks/chunk-C55DPNSW.js +8 -0
- package/cdn/chunks/chunk-E7FZUPJ2.js +8 -0
- package/cdn/chunks/chunk-LGSTDI7O.js +8 -0
- package/cdn/chunks/chunk-N7K6VO7F.js +1 -0
- package/cdn/chunks/chunk-NPYS4GGN.js +5 -0
- package/cdn/chunks/chunk-OGZEE7T7.js +8 -0
- package/cdn/chunks/chunk-QA3FBQSF.js +5 -0
- package/cdn/chunks/chunk-QT25DBDO.js +8 -0
- package/cdn/chunks/chunk-SSBR2KEX.js +8 -0
- package/cdn/chunks/chunk-TB7NCJUL.js +8 -0
- package/cdn/chunks/chunk-V6LLE3H4.js +8 -0
- package/cdn/chunks/chunk-X5K7LBUM.js +8 -0
- package/cdn/chunks/chunk-Z6WP2K4O.js +1450 -0
- package/cdn/chunks/chunk-ZKETWB2E.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/cdn/qti-test/components/index.js +1 -1
- package/cdn/qti-test/components/test-next.js +1 -1
- package/cdn/qti-test/components/test-prev.js +1 -1
- package/cdn/qti-test/components/test-scoring-feedback.js +1 -1
- package/cdn/qti-test/core/index.js +1 -1
- package/dist/chunks/chunk-4PL7XU3H.js +82 -0
- package/dist/chunks/chunk-4PL7XU3H.js.map +1 -0
- package/dist/chunks/chunk-4YWF7QTH.js +92 -0
- package/dist/chunks/chunk-4YWF7QTH.js.map +1 -0
- package/dist/chunks/chunk-7RFWGVJR.js +109 -0
- package/dist/chunks/chunk-7RFWGVJR.js.map +1 -0
- package/dist/chunks/chunk-BAG5H6N2.js +7970 -0
- package/dist/chunks/chunk-BAG5H6N2.js.map +1 -0
- package/dist/chunks/chunk-CWT66FG4.js +95 -0
- package/dist/chunks/chunk-CWT66FG4.js.map +1 -0
- package/dist/chunks/chunk-F2JDNMKV.js +100 -0
- package/dist/chunks/chunk-F2JDNMKV.js.map +1 -0
- package/dist/chunks/chunk-FZHYC3TU.js +92 -0
- package/dist/chunks/chunk-FZHYC3TU.js.map +1 -0
- package/dist/chunks/chunk-GDNPYP37.js +85 -0
- package/dist/chunks/chunk-GDNPYP37.js.map +1 -0
- package/dist/chunks/chunk-KXDEFGCK.js +887 -0
- package/dist/chunks/chunk-KXDEFGCK.js.map +1 -0
- package/dist/chunks/chunk-KZAEUKGI.js +100 -0
- package/dist/chunks/chunk-KZAEUKGI.js.map +1 -0
- package/dist/chunks/chunk-LJ4KYDFF.js +56 -0
- package/dist/chunks/chunk-LJ4KYDFF.js.map +1 -0
- package/dist/chunks/chunk-LMMYXE6U.js +85 -0
- package/dist/chunks/chunk-LMMYXE6U.js.map +1 -0
- package/dist/chunks/chunk-OD6DYLAO.js +7940 -0
- package/dist/chunks/chunk-OD6DYLAO.js.map +1 -0
- package/dist/chunks/chunk-OLZSWYQO.js +100 -0
- package/dist/chunks/chunk-OLZSWYQO.js.map +1 -0
- package/dist/chunks/chunk-PI2VZUCF.js +91 -0
- package/dist/chunks/chunk-PI2VZUCF.js.map +1 -0
- package/dist/chunks/chunk-RZK54XLD.js +100 -0
- package/dist/chunks/chunk-RZK54XLD.js.map +1 -0
- package/dist/chunks/chunk-SBY26ONA.js +99 -0
- package/dist/chunks/chunk-SBY26ONA.js.map +1 -0
- package/dist/chunks/chunk-WH6TRM5K.js +82 -0
- package/dist/chunks/chunk-WH6TRM5K.js.map +1 -0
- package/dist/chunks/chunk-WLDX63OS.js +92 -0
- package/dist/chunks/chunk-WLDX63OS.js.map +1 -0
- package/dist/chunks/chunk-X5L7SQQN.js +887 -0
- package/dist/chunks/chunk-X5L7SQQN.js.map +1 -0
- package/dist/chunks/chunk-X5RBTIXP.js +86 -0
- package/dist/chunks/chunk-X5RBTIXP.js.map +1 -0
- package/dist/exports/computed-item.context.d.ts +1 -1
- package/dist/exports/computed.context.d.ts +2 -2
- package/dist/exports/interaction.d.ts +1 -1
- package/dist/exports/item.context.d.ts +1 -1
- package/dist/exports/qti-assessment-item.context.d.ts +1 -1
- package/dist/exports/qti-condition-expression.d.ts +1 -1
- package/dist/exports/qti-expression.d.ts +1 -1
- package/dist/exports/session.context.d.ts +2 -2
- package/dist/exports/test.context.d.ts +1 -1
- package/dist/exports/variables.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -6
- package/dist/qti-components/index.d.ts +2 -2
- package/dist/qti-components/index.js +1 -2
- package/dist/qti-components-jsx.d.ts +73 -12
- package/dist/qti-item/components/item-show-correct-response.d.ts +1 -1
- package/dist/qti-item/components/print-item-variables.d.ts +1 -1
- package/dist/qti-item/core/index.d.ts +1 -1
- package/dist/qti-loader/index.d.ts +1 -1
- package/dist/qti-response-declaration-pCFZA_aW.d.ts +1356 -0
- package/dist/qti-test/components/index.d.ts +2 -2
- package/dist/qti-test/components/index.js +3 -4
- package/dist/qti-test/components/test-navigation.d.ts +2 -2
- package/dist/qti-test/components/test-next.d.ts +14 -16
- package/dist/qti-test/components/test-next.js +1 -1
- package/dist/qti-test/components/test-prev.d.ts +16 -18
- package/dist/qti-test/components/test-prev.js +1 -3
- package/dist/qti-test/components/test-print-context.d.ts +2 -2
- package/dist/qti-test/components/test-print-item-variables.d.ts +2 -2
- package/dist/qti-test/components/test-scoring-buttons.d.ts +2 -2
- package/dist/qti-test/components/test-scoring-feedback.d.ts +2 -2
- package/dist/qti-test/components/test-scoring-feedback.js +1 -1
- package/dist/qti-test/components/test-show-correct-response.d.ts +2 -2
- package/dist/qti-test/core/index.d.ts +3 -3
- package/dist/qti-test/core/index.js +2 -3
- package/dist/qti-test-feedback-2xjKezsY.d.ts +85 -0
- package/dist/vscode.html-custom-data.json +39 -15
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/core/qti-test.ts","../../src/lib/qti-test/core/mixins/test-navigation.mixin.ts","../../src/lib/qti-test/core/mixins/test-view.mixin.ts","../../src/lib/qti-test/core/test-base.ts","../../src/lib/qti-test/core/mixins/test-processing.mixin.ts","../../src/lib/qti-test/core/qti-assessment-test/qti-assessment-item-ref.ts","../../src/lib/qti-test/core/qti-assessment-test/qti-assessment-section.ts","../../src/lib/qti-test/core/qti-assessment-test/qti-assessment-test.ts","../../src/lib/qti-test/core/qti-assessment-test/qti-test-part.ts","../../src/lib/qti-test/core/qti-assessment-test/qti-test-feedback.ts"],"sourcesContent":["import { html } from 'lit';\nimport { customElement } from 'lit/decorators.js';\n\nimport { TestNavigationMixin, TestViewMixin } from './mixins';\nimport { TestBase } from './test-base';\nimport { TestProcessingMixin } from './mixins/test-processing.mixin';\n\n/**\n * `<qti-test>` is a custom element designed for rendering and interacting with QTI (Question and Test Interoperability) tests.\n *\n * This component leverages several mixins to provide functionality for loading, navigating, processing, and displaying QTI test assessments.\n *\n * ### Example Usage\n *\n * Minimal example including navigation:\n *\n * ```html\n * <qti-test>\n * <test-navigation>\n * <test-container test-url=\"./path/to/assessment.xml\"></test-container>\n * <nav class=\"flex\">\n * <test-prev></test-prev>\n * <test-next></test-next>\n * </nav>\n * </test-navigation>\n * </qti-test>\n * ```\n *\n * Use the following file structure\n * A qti-test loads a QTI3.0 assessmenttest.xml file from a package folder.\n *\n * ```plaintext\n * Root/\n * ├── index.html\n * └── /assets/api/examples/\n * ├── assessmenttest.xml\n * └── imsmanifest.xml\n *\n * ```\n *\n * ### Test components\n *\n * Use test components inside the qti-test component for added functionality.\n * ### Test next\n * `<test-next> | TestNext`\n *\n * ### Test prev\n *\n * `<test-prev> | TestPrev`\n * ### Test components\n *\n * You can use normal class names to style the elements.\n * And you can use the `test-prev` and `test-next` elements to navigate through the test.\n *\n */\n@customElement('qti-test')\nexport class QtiTest extends TestNavigationMixin(TestViewMixin(TestProcessingMixin(TestBase))) {\n // export class QtiTest extends TestLoaderMixin(TestNavigationMixin(TestViewMixin(TestBase))) {\n /**\n * Renders the component's template.\n * Provides a default `<slot>` for content projection.\n */\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n await this.updateComplete;\n this.dispatchEvent(new CustomEvent('qti-test-connected', { detail: this }));\n }\n render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-test': QtiTest;\n }\n}\n","import { property } from 'lit/decorators.js';\n\nimport { qtiTransformItem } from '../../../qti-transformers';\n\nimport type { QtiAssessmentItemRef, QtiAssessmentSection, QtiAssessmentTest } from '../qti-assessment-test';\nimport type { TestBase } from '../test-base';\n\ntype Constructor<T = {}> = abstract new (...args: any[]) => T;\n\n// Define error types for better error handling\nenum NavigationErrorType {\n ITEM_NOT_FOUND = 'item-not-found',\n SECTION_NOT_FOUND = 'section-not-found',\n LOAD_ERROR = 'load-error',\n NETWORK_ERROR = 'network-error',\n TIMEOUT_ERROR = 'timeout-error'\n}\n\ninterface NavigationError {\n type: NavigationErrorType;\n message: string;\n details?: any;\n itemId?: string;\n sectionId?: string;\n}\n\ndeclare class TestNavigationInterface {}\nexport const TestNavigationMixin = <T extends Constructor<TestBase>>(superClass: T) => {\n abstract class TestNavigationClass extends superClass {\n @property({ type: String }) navigate: 'item' | 'section' | null = null;\n @property({ type: Boolean, attribute: 'cache-transform' }) cacheTransform: boolean = false;\n @property({ type: Number }) requestTimeout: number = 30000; // Default timeout of 30 seconds\n @property({ type: Boolean }) showLoadingIndicators: boolean = true;\n\n protected _testElement: QtiAssessmentTest;\n private _activeRequests: XMLHttpRequest[] = [];\n private _navigationInProgress: boolean = false;\n private _lastError: NavigationError | null = null;\n private _lastNavigationRequestId: string | null = null;\n private _targetNavigation: { type: 'item' | 'section'; id: string } | null = null;\n\n constructor(...args: any[]) {\n super(...args);\n\n // Handle navigation requests\n this.addEventListener(\n 'qti-request-navigation',\n async ({ detail }: CustomEvent<{ type: 'item' | 'section'; id: string }>) => {\n if (!detail?.id) return;\n\n // Track this navigation request's unique identifier\n // Using timestamp and a counter for uniqueness\n const navigationRequestId = `nav_${Date.now()}_${Math.random()}`;\n this._lastNavigationRequestId = navigationRequestId;\n\n try {\n // Set navigation in progress and clear errors\n this._navigationInProgress = true;\n this._lastError = null;\n this._dispatchStatusEvent({ loading: true, type: detail.type, id: detail.id });\n\n // Cancel any pending requests before starting new ones\n this._cancelActiveRequests();\n\n // Store the navigation target for quick navigation\n this._targetNavigation = { type: detail.type, id: detail.id };\n\n if (detail.type === 'item') {\n await this._navigateToItem(detail.id);\n } else if (detail.type === 'section') {\n await this._navigateToSection(detail.id);\n }\n\n // Verify this is still the most recent navigation request\n // If not, we don't need to do anything more as a newer request superseded this one\n if (this._lastNavigationRequestId !== navigationRequestId) {\n console.log('Navigation was superseded by a newer request');\n return;\n }\n } catch (error) {\n // Only process error if this is still the most recent navigation\n if (this._lastNavigationRequestId === navigationRequestId) {\n // Convert error to NavigationError if it's not already\n const navError = this._normalizeError(error, detail.type, detail.id);\n this._lastError = navError;\n\n // Dispatch the error event\n this._dispatchErrorEvent(navError);\n\n console.error(`Navigation error (${navError.type}):`, navError.message, navError.details);\n }\n } finally {\n // Only update navigation status if this is still the active request\n if (this._lastNavigationRequestId === navigationRequestId) {\n // Always mark navigation as completed\n this._navigationInProgress = false;\n this._dispatchStatusEvent({ loading: false, type: detail.type, id: detail.id });\n }\n }\n }\n );\n\n // Handle test connection\n this.addEventListener('qti-assessment-test-connected', (e: CustomEvent<QtiAssessmentTest>) => {\n this._testElement = e.detail;\n this._initializeNavigation();\n });\n }\n\n /**\n * Initialize navigation when test is first connected\n */\n private _initializeNavigation(): void {\n let id: string | undefined;\n\n if (this.navigate === 'section') {\n id = this._testElement.querySelector<QtiAssessmentSection>('qti-assessment-section')?.identifier;\n }\n if (this.navigate === 'item') {\n id =\n this.sessionContext.navItemRefId ??\n this._testElement.querySelector<QtiAssessmentItemRef>('qti-assessment-item-ref')?.identifier;\n }\n if (id) {\n this.dispatchEvent(\n new CustomEvent('qti-request-navigation', {\n detail: { type: this.navigate === 'section' ? 'section' : 'item', id },\n bubbles: true,\n composed: true\n })\n );\n }\n }\n\n public navigateTo(type: 'item' | 'section', id?: string): void {\n // if no id, take the first qti-assessment-item-ref\n if (!id) {\n if (type === 'section') {\n id = this._testElement?.querySelector<QtiAssessmentSection>('qti-assessment-section')?.identifier;\n }\n if (type === 'item') {\n id = this._testElement?.querySelector<QtiAssessmentItemRef>('qti-assessment-item-ref')?.identifier;\n }\n }\n this.dispatchEvent(\n new CustomEvent('qti-request-navigation', {\n detail: { type, id },\n bubbles: true,\n composed: true\n })\n );\n }\n /**\n * Navigates to a specific item\n */\n private async _navigateToItem(itemId: string): Promise<void> {\n const itemRefEl = this._testElement?.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${itemId}\"]`\n );\n\n if (!itemRefEl) {\n throw {\n type: NavigationErrorType.ITEM_NOT_FOUND,\n message: `Item with identifier \"${itemId}\" not found.`,\n itemId\n };\n }\n\n // Update the session context immediately to record navigation intent\n // This ensures we remember the target item even if loading is interrupted\n const navPartId = itemRefEl.closest('qti-test-part')?.identifier;\n const navSectionId = itemRefEl.closest('qti-assessment-section')?.identifier;\n\n // Set loading state and update navigation context first\n this.sessionContext = {\n ...this.sessionContext,\n navPartId,\n navSectionId,\n navItemRefId: itemId,\n navItemLoading: true\n };\n\n // console.log('Navigating to item:', itemId);\n\n // Then attempt to load the item content\n try {\n await this._loadItems([itemId]);\n } finally {\n // Even if loading fails or is interrupted, update loading state\n // This ensures we don't get stuck in a loading state\n this.sessionContext = {\n ...this.sessionContext,\n navItemLoading: false\n };\n }\n }\n\n /**\n * Navigates to a specific section\n */\n private async _navigateToSection(sectionId: string): Promise<void> {\n const sectionRefEl = this._testElement?.querySelector<QtiAssessmentSection>(\n `qti-assessment-section[identifier=\"${sectionId}\"]`\n );\n\n if (!sectionRefEl) {\n throw {\n type: NavigationErrorType.SECTION_NOT_FOUND,\n message: `Section with identifier \"${sectionId}\" not found.`,\n sectionId\n };\n }\n\n // Get navigation context first\n const navPartId = sectionRefEl.closest('qti-test-part')?.identifier;\n\n // Update navigation state before loading items\n this.sessionContext = {\n ...this.sessionContext,\n navPartId,\n navSectionId: sectionId,\n navItemRefId: null,\n navItemLoading: true\n };\n\n // Then attempt to load the section's items\n try {\n const itemIds = this._getSectionItemIds(sectionId);\n await this._loadItems(itemIds);\n } finally {\n // Update loading state even if loading fails or is interrupted\n this.sessionContext = {\n ...this.sessionContext,\n navItemLoading: false\n };\n }\n }\n\n /**\n * Normalize different error types into a consistent NavigationError format\n */\n private _normalizeError(error: any, navigationType: string, id: string): NavigationError {\n // If it's already a NavigationError, return it\n if (error && error.type && Object.values(NavigationErrorType).includes(error.type)) {\n return error as NavigationError;\n }\n\n // For XMLHttpRequest related errors\n if (error instanceof DOMException && error.name === 'AbortError') {\n return {\n type: NavigationErrorType.NETWORK_ERROR,\n message: 'Navigation was cancelled because a new navigation was requested.',\n details: error\n };\n }\n\n // For timeout errors\n if (error.name === 'TimeoutError' || (error.message && error.message.includes('timeout'))) {\n return {\n type: NavigationErrorType.TIMEOUT_ERROR,\n message: 'Request timed out. Please check your network connection.',\n details: error\n };\n }\n\n // For network errors\n if (error instanceof TypeError && error.message.includes('network')) {\n return {\n type: NavigationErrorType.NETWORK_ERROR,\n message: 'A network error occurred. Please check your connection.',\n details: error\n };\n }\n\n // Default to load error for anything else\n return {\n type: NavigationErrorType.LOAD_ERROR,\n message: `Failed to load ${navigationType}: ${id}`,\n details: error,\n itemId: navigationType === 'item' ? id : undefined,\n sectionId: navigationType === 'section' ? id : undefined\n };\n }\n\n /**\n * Dispatch error event to notify the UI\n */\n private _dispatchErrorEvent(error: NavigationError): void {\n this.dispatchEvent(\n new CustomEvent('qti-navigation-error', {\n detail: error,\n bubbles: true,\n composed: true\n })\n );\n }\n\n /**\n * Dispatch status event to indicate loading state\n */\n private _dispatchStatusEvent(status: { loading: boolean; type: string; id: string }): void {\n if (this.showLoadingIndicators) {\n this.dispatchEvent(\n new CustomEvent('qti-navigation-status', {\n detail: status,\n bubbles: true,\n composed: true\n })\n );\n }\n }\n\n /**\n * Cancels all active HTTP requests\n */\n private _cancelActiveRequests(): void {\n if (this._activeRequests.length > 0) {\n console.info(`Cancelling ${this._activeRequests.length} pending requests`);\n this._activeRequests.forEach(request => {\n if (request && request.readyState !== 4) {\n // 4 is DONE\n request.abort();\n }\n });\n this._activeRequests = [];\n }\n }\n\n /**\n * Load items with improved error handling and timeout\n */\n private async _loadItems(\n itemIds: string[]\n ): Promise<{ itemRef: QtiAssessmentItemRef; doc: any; request: XMLHttpRequest }[]> {\n if (!this._testElement || itemIds.length === 0) return;\n\n const itemRefEls = itemIds.map(id =>\n this._testElement!.querySelector<QtiAssessmentItemRef>(`qti-assessment-item-ref[identifier=\"${id}\"]`)\n );\n\n // Check for missing items\n const missingItems = itemRefEls.reduce((missing, el, index) => {\n if (!el) missing.push(itemIds[index]);\n return missing;\n }, [] as string[]);\n\n if (missingItems.length > 0) {\n const error: NavigationError = {\n type: NavigationErrorType.ITEM_NOT_FOUND,\n message: `One or more items not found: ${missingItems.join(', ')}`,\n details: { missingItems }\n };\n throw error;\n }\n\n this._clearLoadedItems();\n // Note: We no longer update navItemLoading here since it's handled in the navigation methods\n\n const itemLoadPromises = itemRefEls.map(async itemRef => {\n if (!itemRef) return null;\n\n // Create a timeout promise\n const timeoutPromise = new Promise((_, reject) => {\n setTimeout(() => {\n reject({\n name: 'TimeoutError',\n message: `Request for item ${itemRef.identifier} timed out after ${this.requestTimeout}ms`\n });\n }, this.requestTimeout);\n });\n\n try {\n const { promise, request } = qtiTransformItem(this.cacheTransform).load(itemRef.href);\n\n // Track the request so it can be cancelled if needed\n if (request instanceof XMLHttpRequest) {\n this._activeRequests.push(request);\n }\n\n // Race the item loading against the timeout\n const apiResult = await Promise.race([promise, timeoutPromise]);\n return {\n itemRef,\n doc: (apiResult as any).htmlDoc(),\n request\n };\n } catch (error) {\n // If this is a cancellation or timeout, don't rethrow\n if (\n (error instanceof DOMException && error.name === 'AbortError') ||\n (error && error.name === 'TimeoutError')\n ) {\n console.log(\n `Request for item ${itemRef.identifier} was ${error.name === 'TimeoutError' ? 'timed out' : 'aborted'}`\n );\n return null;\n }\n\n // For other errors, add item context and rethrow\n error.itemId = itemRef.identifier;\n throw error;\n }\n });\n\n try {\n const results = await Promise.all(itemLoadPromises);\n\n // Filter out any null results (from aborted or timed out requests)\n const validResults = results.filter(result => result !== null);\n\n // Apply loaded docs to item refs\n validResults.forEach(({ itemRef, doc }) => {\n if (itemRef && doc) itemRef.xmlDoc = doc;\n });\n\n // Clear the active requests list after all are complete\n this._activeRequests = [];\n\n // Dispatch test loaded event\n requestAnimationFrame(() => {\n this.dispatchEvent(\n new CustomEvent('qti-test-loaded', {\n detail: validResults.map(({ itemRef }) => ({\n identifier: itemRef?.identifier,\n element: itemRef\n })),\n bubbles: true,\n composed: true\n })\n );\n });\n\n // If no valid results but we had items to load, this is an error\n if (validResults.length === 0 && itemIds.length > 0) {\n throw {\n type: NavigationErrorType.LOAD_ERROR,\n message: 'All item requests failed to load',\n details: { itemIds }\n };\n }\n\n return validResults;\n } catch (error) {\n console.error('Error loading items:', error);\n throw error;\n }\n }\n\n /**\n * Gets all item IDs in a section\n */\n private _getSectionItemIds(navSectionId: string): string[] {\n const sectionRefEl = this._testElement?.querySelector<QtiAssessmentSection>(\n `qti-assessment-section[identifier=\"${navSectionId}\"]`\n );\n\n if (!sectionRefEl) {\n throw {\n type: NavigationErrorType.SECTION_NOT_FOUND,\n message: `Section with identifier \"${navSectionId}\" not found.`,\n sectionId: navSectionId\n };\n }\n\n return Array.from(\n this._testElement!.querySelectorAll<QtiAssessmentItemRef>(\n `qti-assessment-section[identifier=\"${navSectionId}\"] > qti-assessment-item-ref`\n )\n ).map(itemRef => itemRef.identifier);\n }\n\n /**\n * Clears all loaded items\n */\n private _clearLoadedItems(): void {\n const itemRefEls = this._testElement?.querySelectorAll<QtiAssessmentItemRef>(\n `qti-assessment-test qti-assessment-item-ref`\n );\n Array.from(itemRefEls || []).forEach(itemElement => {\n itemElement.xmlDoc = null;\n });\n }\n\n /**\n * Retry the last failed navigation\n */\n public retryNavigation(): void {\n if (this._lastError) {\n const type = this._lastError.itemId ? 'item' : 'section';\n const id = this._lastError.itemId || this._lastError.sectionId;\n\n if (id) {\n this.dispatchEvent(\n new CustomEvent('qti-request-navigation', {\n detail: { type, id },\n bubbles: true,\n composed: true\n })\n );\n }\n } else if (this._targetNavigation) {\n // If we have a target navigation but no error, we can retry that\n this.dispatchEvent(\n new CustomEvent('qti-request-navigation', {\n detail: this._targetNavigation,\n bubbles: true,\n composed: true\n })\n );\n }\n }\n }\n\n return TestNavigationClass as Constructor<TestNavigationInterface> & T;\n};\n","import type { QtiAssessmentItemRef } from '../qti-assessment-test';\nimport type { QtiAssessmentItem } from '../../../qti-components';\nimport type { TestBase } from '../test-base';\n\nexport type View = 'author' | 'candidate' | 'proctor' | 'scorer' | 'testConstructor' | 'tutor' | '';\n\ntype Constructor<T = {}> = abstract new (...args: any[]) => T;\n\ndeclare class TestViewInterface {}\n\nexport const TestViewMixin = <T extends Constructor<TestBase>>(superClass: T) => {\n abstract class TestViewClass extends superClass {\n constructor(...args: any[]) {\n super(...args);\n this.sessionContext = { ...this.sessionContext, view: 'candidate' };\n\n this.addEventListener('on-test-switch-view', (e: CustomEvent<View>) => {\n this.sessionContext = { ...this.sessionContext, view: e.detail };\n this._updateElementView();\n });\n this.addEventListener('qti-assessment-test-connected', () => {\n this._updateElementView();\n });\n this.addEventListener('qti-assessment-item-connected', (e: CustomEvent) => {\n this._updateElementView();\n this._setCorrectResponseVisibility(e.detail);\n });\n }\n\n willUpdate(changedProperties: Map<string | number | symbol, unknown>) {\n super.willUpdate(changedProperties);\n if (changedProperties.has('sessionContext')) {\n this._updateElementView();\n }\n }\n\n // Method to handle view updates for elements based on the current context view\n private _updateElementView() {\n if (this._testElement) {\n const viewElements = Array.from(this._testElement.querySelectorAll('[view]'));\n\n viewElements.forEach((element: HTMLElement) => {\n element.classList.toggle('show', element.getAttribute('view') === this.sessionContext.view);\n });\n\n const assessmentItemRef = this._testElement.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${this.sessionContext.navItemRefId}\"]`\n );\n const assessmentItem = assessmentItemRef?.assessmentItem;\n\n if (assessmentItem) {\n assessmentItem.showCorrectResponse(this.sessionContext.view === 'scorer');\n }\n }\n }\n\n // Event handler for connected QTI assessment items\n private _setCorrectResponseVisibility(assessmentItem: QtiAssessmentItem): void {\n assessmentItem.showCorrectResponse(this.sessionContext.view === 'scorer');\n }\n }\n\n return TestViewClass as Constructor<TestViewInterface> & T;\n};\n","import { provide } from '@lit/context';\nimport { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nimport { INITIAL_TEST_CONTEXT, testContext } from '../../exports/test.context';\nimport { INITIAL_SESSION_CONTEXT, type SessionContext, sessionContext } from '../../exports/session.context';\n\nimport type { ItemContext } from '../../exports/item.context';\nimport type { TestContext } from '../../exports/test.context';\nimport type { QtiAssessmentItemRef, QtiAssessmentTest } from './qti-assessment-test';\nimport type { QtiAssessmentItem } from '../../qti-components/';\nimport type { OutcomeVariable, VariableDeclaration, VariableValue } from '../../exports/variables';\n\nexport abstract class TestBase extends LitElement {\n @property({ attribute: false, type: Object })\n @provide({ context: testContext })\n public testContext: Readonly<TestContext> = INITIAL_TEST_CONTEXT;\n\n @property({ attribute: false, type: Object })\n @provide({ context: sessionContext })\n public sessionContext: Readonly<SessionContext> = INITIAL_SESSION_CONTEXT;\n\n protected _testElement: QtiAssessmentTest;\n\n updateItemVariables(itemRefID: string, variables: VariableValue<string | string[] | null>[]): void {\n // Update variables in the testContext for the specified itemRefID\n const itemContext = this.testContext.items.find(item => item.identifier === itemRefID);\n if (itemContext) {\n itemContext.variables = itemContext.variables.map(variable => {\n const updatedVariable = variables.find(v => v.identifier === variable.identifier);\n return updatedVariable ? { ...variable, ...updatedVariable } : variable;\n });\n }\n // if the qti-assessment-item-ref has a qti-assessment-item, then update this item as well\n const itemRef = this._testElement.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${itemRefID}\"]`\n );\n if (itemRef && itemRef.assessmentItem) {\n if (itemRef.assessmentItem) {\n itemRef.assessmentItem.variables = variables;\n }\n }\n }\n\n constructor() {\n super();\n\n /**\n * When the test is connected, the items are updated in the test context.\n * An existing context item is updated with the itemRef properties if nessesary.\n */\n this.addEventListener('qti-assessment-test-connected', (e: CustomEvent<QtiAssessmentTest>) => {\n this.testContext = INITIAL_TEST_CONTEXT; // new test, new test context!\n this.sessionContext = INITIAL_SESSION_CONTEXT; // new test, new session context!\n if (this.testContext && this.testContext.items.length > 0) return;\n\n this._testElement = e.detail;\n const items = Array.from(this._testElement.querySelectorAll('qti-assessment-item-ref')).map(itemRef => {\n return {\n href: itemRef.href,\n identifier: itemRef.identifier,\n category: itemRef.category,\n variables: [\n {\n identifier: 'completionStatus',\n value: 'not_attempted',\n type: 'outcome'\n } as OutcomeVariable\n ]\n };\n });\n this.testContext = { ...this.testContext, items };\n });\n\n this.addEventListener('qti-assessment-item-connected', (e: CustomEvent<QtiAssessmentItem>) => {\n const assessmentItem = e.detail as QtiAssessmentItem;\n const assessmentRefId = assessmentItem.closest('qti-assessment-item-ref')?.identifier;\n if (assessmentRefId) {\n assessmentItem.assessmentItemRefId = assessmentRefId;\n }\n this._updateItemInTestContext(e.detail);\n });\n\n this.addEventListener('qti-item-context-updated', (e: CustomEvent<{ itemContext: ItemContext }>) => {\n // const assessmentitem = e.composedPath()[0] as QtiAssessmentItem;\n this._updateItemVariablesInTestContext(e.detail.itemContext.identifier, e.detail.itemContext.variables);\n });\n }\n\n private _updateItemVariablesInTestContext(\n identifier: string,\n variables: readonly VariableDeclaration<string | string[] | null>[]\n ): void {\n // Update the test context with modified variables for the specified item\n this.testContext = {\n ...this.testContext, // Spread existing test context properties\n items: this.testContext.items.map(itemContext => {\n // If the item identifier doesn't match, keep it unchanged\n if (itemContext.identifier !== identifier) {\n return itemContext;\n }\n\n // Update the matching item with new variables\n return {\n ...itemContext, // Keep other properties of the item context\n variables: variables.map(variable => {\n // Find a matching variable in the current item context\n const matchingVariable = itemContext.variables.find(v => v.identifier === variable.identifier);\n\n // Merge matching variable with the new one, or use the new variable if no match\n return matchingVariable ? { ...matchingVariable, ...variable } : variable;\n })\n };\n })\n };\n this.dispatchEvent(\n new CustomEvent('qti-test-context-updated', { detail: this.testContext, bubbles: false, composed: false })\n );\n }\n\n /**\n * Updates the variables of an assessment item in the test context.\n * - Matches the assessment item with the corresponding test context item.\n * - If the item is not found, logs a warning.\n * - Updates variables in the test context if exactly one variable exists.\n * - Otherwise, syncs the assessment item's variables with the test context.\n *\n * @param assessmentItem - The assessment item to update.\n */\n private _updateItemInTestContext = (assessmentItem: QtiAssessmentItem): void => {\n const context = (assessmentItem as any)._context;\n const identifier = context.identifier;\n const fullVariables = context.variables;\n\n // console.log(this._testContext);\n // Find the corresponding item in the test context by identifier\n const itemContext = this.testContext.items.find(i => i?.identifier === identifier);\n\n if (!itemContext) {\n console.warn(`Item IDs between assessment.xml and item.xml should match: ${identifier} is not found!`);\n return;\n }\n\n // Update variables in the test context or sync them to the assessment item\n if (itemContext.variables?.length === 1) {\n // The loaded qti-assessment-item itself has variables which are not in test context yet.\n this._updateItemVariablesInTestContext(identifier, fullVariables);\n } else {\n // Sync the assessment item's variables with the test context\n assessmentItem.variables = [...(itemContext.variables || [])];\n }\n };\n}\n","import type { OutcomeVariable, VariableDeclaration } from '../../../exports/variables';\nimport type { QtiOutcomeProcessing } from '../../../qti-components';\nimport type { TestBase } from '../test-base';\n\ntype Constructor<T = {}> = abstract new (...args: any[]) => T;\n\ndeclare class TestProcessingInterface {\n updateOutcomeVariable(identifier: string, value: string | string[] | undefined): void;\n getOutcome(identifier: string): Readonly<OutcomeVariable>;\n getVariable(identifier: string): Readonly<VariableDeclaration<string | string[] | null>>;\n outcomeProcessing(): boolean;\n}\nexport const TestProcessingMixin = <T extends Constructor<TestBase>>(superClass: T) => {\n abstract class TestProcessingElement extends superClass {\n constructor(...args: any[]) {\n super(...args);\n this.addEventListener('qti-register-variable', (e: CustomEvent<{ variable: any }>) => {\n this.testContext = {\n ...this.testContext,\n testOutcomeVariables: [...(this.testContext.testOutcomeVariables || []), e.detail.variable]\n };\n e.stopPropagation();\n });\n // wordt aangeroepen vanuit de processingtemplate\n this.addEventListener(\n 'qti-set-outcome-value',\n (e: CustomEvent<{ outcomeIdentifier: string; value: string | string[] }>) => {\n const { outcomeIdentifier, value } = e.detail;\n this.updateOutcomeVariable(outcomeIdentifier, value);\n e.stopPropagation();\n }\n );\n }\n\n outcomeProcessing(): boolean {\n const outcomeProcessor = this.querySelector('qti-outcome-processing') as unknown as QtiOutcomeProcessing;\n if (!outcomeProcessor) return false;\n outcomeProcessor?.process();\n return true;\n }\n\n /* --------------------------- ENABLED WHEN UNIT TESTING OUTCOME PROCESSING ------------------------------------ */\n\n public updateOutcomeVariable(identifier: string, value: string | string[] | undefined) {\n const outcomeVariable = this.getOutcome(identifier);\n if (!outcomeVariable) {\n console.warn(`Can not set qti-outcome-identifier: ${identifier}, it is not available`);\n return;\n }\n this.testContext = {\n ...this.testContext,\n testOutcomeVariables: this.testContext.testOutcomeVariables?.map(v => {\n if (v.identifier !== identifier) {\n return v;\n }\n return {\n ...v,\n value: outcomeVariable.cardinality === 'single' ? value : [...v.value, value as string]\n };\n })\n };\n }\n\n public getOutcome(identifier: string): Readonly<OutcomeVariable> {\n return this.getVariable(identifier) as OutcomeVariable;\n }\n public getVariable(identifier: string): Readonly<VariableDeclaration<string | string[] | null>> {\n return this.testContext.testOutcomeVariables?.find(v => v.identifier === identifier) || null;\n }\n /* --------------------------- ENABLED WHEN UNIT TESTING OUTCOME PROCESSING ------------------------------------ */\n }\n\n return TestProcessingElement as Constructor<TestProcessingInterface> & T;\n};\n","import { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { prepareTemplate } from 'stampino';\n\nimport type { TemplateFunction } from 'stampino';\nimport type { QtiAssessmentItem } from '../../../qti-components';\n\n// Converter function to interpret \"true\" and \"false\" as booleans\nconst stringToBooleanConverter = {\n fromAttribute(value: string): boolean {\n return value === 'true';\n },\n toAttribute(value: boolean): string {\n return value ? 'true' : 'false';\n }\n};\n\n// @customElement('qti-assessment-item-ref')\nexport class QtiAssessmentItemRef extends LitElement {\n @property({ type: String }) category?: string;\n @property({ type: String }) identifier?: string;\n @property({ type: Boolean, converter: stringToBooleanConverter }) required?: boolean;\n @property({ type: Boolean, converter: stringToBooleanConverter }) fixed?: boolean;\n @property({ type: String }) href?: string;\n\n // @consume({ context: computedContext, subscribe: true })\n // private computedContext: ComputedContext;\n\n weigths: Map<string, number> = new Map();\n\n @property({ type: Object, attribute: false })\n xmlDoc!: DocumentFragment; // the XMLDocument\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n get assessmentItem(): QtiAssessmentItem | null {\n return this.renderRoot?.querySelector('qti-assessment-item');\n }\n\n myTemplate: TemplateFunction;\n\n async connectedCallback(): Promise<void> {\n // debugger;\n super.connectedCallback();\n\n /*\n searches for the template element to use in the qti-test component\n can be used to render extra things for an item, like a bookmark, index nummer\n put this in your test-container component\n <template item-ref>\n <div>Extra content</div>\n </template>\n */\n const templateElement = ((this.getRootNode() as any).host as HTMLElement)\n .closest('qti-test')\n .querySelector<HTMLTemplateElement>('template[item-ref]');\n\n if (templateElement) this.myTemplate = prepareTemplate(templateElement);\n\n await this.updateComplete;\n\n this.dispatchEvent(\n new CustomEvent('qti-assessment-item-ref-connected', {\n bubbles: true,\n composed: true,\n detail: { identifier: this.identifier, href: this.href, category: this.category }\n })\n );\n }\n\n render() {\n return this.myTemplate ? this.myTemplate({ xmlDoc: this.xmlDoc }) : this.xmlDoc;\n }\n}\n\nif (!customElements.get('qti-assessment-item-ref')) {\n customElements.define('qti-assessment-item-ref', QtiAssessmentItemRef);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-assessment-item-ref': QtiAssessmentItemRef;\n }\n}\n","import { consume } from '@lit/context';\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nimport { testContext } from '../../../exports/test.context';\n\nimport type { TestContext } from '../../../exports/test.context';\n\n// https://www.imsglobal.org/sites/default/files/spec/qti/v3/info/index.html#Root_AssessmentSection\n\nconst stringToBooleanConverter = {\n fromAttribute(value: string): boolean {\n return value === 'true';\n },\n toAttribute(value: boolean): string {\n return value ? 'true' : 'false';\n }\n};\n\nexport class QtiAssessmentSection extends LitElement {\n @property({ type: String }) identifier: string;\n @property({ type: String }) required: string;\n @property({ type: Boolean, converter: stringToBooleanConverter }) fixed: boolean;\n @property({ type: String }) title: string;\n @property({ type: Boolean, converter: stringToBooleanConverter }) visible: boolean;\n @property({ type: Boolean, converter: stringToBooleanConverter, attribute: 'keep-together' }) keepTogether: boolean;\n\n @consume({ context: testContext, subscribe: true })\n public _testContext?: TestContext;\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n await this.updateComplete;\n this.dispatchEvent(\n new Event('qti-assessment-section-connected', {\n bubbles: true,\n composed: true\n })\n );\n }\n\n render() {\n return html`<slot name=\"qti-rubric-block\"></slot><slot></slot>`;\n }\n}\n\nif (!customElements.get('qti-assessment-section')) {\n customElements.define('qti-assessment-section', QtiAssessmentSection);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-assessment-section': QtiAssessmentSection;\n }\n}\n","import { consume } from '@lit/context';\nimport { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { testContext } from '../../../exports/test.context';\n\nimport type { TestContext } from '../../../exports/test.context';\n\n@customElement('qti-assessment-test')\nexport class QtiAssessmentTest extends LitElement {\n @property({ type: String }) identifier: string;\n @property({ type: String }) title: string;\n\n @consume({ context: testContext, subscribe: true })\n public _testContext?: TestContext;\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n await this.updateComplete;\n this.dispatchEvent(\n new CustomEvent('qti-assessment-test-connected', {\n detail: this,\n bubbles: true,\n composed: true\n })\n );\n }\n\n render() {\n return html` <slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-assessment-test': QtiAssessmentTest;\n }\n}\n","import { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n@customElement('qti-test-part')\nexport class QtiTestPart extends LitElement {\n @property({ type: String }) identifier: string = '';\n @property({ type: String }) title: string = '';\n @property({ type: String }) class: string = '';\n\n @property({ type: String, attribute: 'navigation-mode' })\n navigationMode: 'linear' | 'nonlinear' = 'nonlinear';\n\n @property({ type: String, attribute: 'submission-mode' })\n submissionMode: 'individual' | 'simultaneous' = 'individual';\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n await this.updateComplete;\n this.dispatchEvent(\n new Event('qti-test-part-connected', {\n bubbles: true,\n composed: true\n })\n );\n }\n\n render() {\n return html` <slot></slot>`;\n }\n}\n\nif (!customElements.get('qti-test-part')) {\n customElements.define('qti-test-part', QtiTestPart);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-test-part': QtiTestPart;\n }\n}\n","import { customElement } from 'lit/decorators.js';\nimport { css, html } from 'lit';\n\nimport { QtiModalFeedback } from '../../../qti-components';\n\n@customElement('qti-test-feedback')\nexport class QtiTestFeedback extends QtiModalFeedback {\n static styles = css`\n :host {\n color: gray;\n }\n `;\n override render() {\n return html``;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-test-feedback': QtiTestFeedback;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;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AAA,QACT,UAAU;AAAA,MACZ,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,SAAS;AACP,WAAOC;AAAA,EACT;AACF;AAxB8B;AAAA,EAA3BC,UAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GADf,YACiB;AACA;AAAA,EAA3BA,UAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAFf,YAEiB;AACA;AAAA,EAA3BA,UAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAHf,YAGiB;AAG5B;AAAA,EADCA,UAAS,EAAE,MAAM,QAAQ,WAAW,kBAAkB,CAAC;AAAA,GAL7C,YAMX;AAGA;AAAA,EADCA,UAAS,EAAE,MAAM,QAAQ,WAAW,kBAAkB,CAAC;AAAA,GAR7C,YASX;AATW,cAAN;AAAA,EADNC,eAAc,eAAe;AAAA,GACjB;AA2Bb,IAAI,CAAC,eAAe,IAAI,eAAe,GAAG;AACxC,iBAAe,OAAO,iBAAiB,WAAW;AACpD;;;AChCA,SAAS,iBAAAC,sBAAqB;AAC9B,SAAS,KAAK,QAAAC,aAAY;AAKnB,IAAM,kBAAN,cAA8B,iBAAiB;AAAA,EAM3C,SAAS;AAChB,WAAOC;AAAA,EACT;AACF;AATa,gBACJ,SAAS;AAAA;AAAA;AAAA;AAAA;AADL,kBAAN;AAAA,EADNC,eAAc,mBAAmB;AAAA,GACrB;","names":["NavigationErrorType","property","property","LitElement","property","LitElement","property","html","LitElement","property","stringToBooleanConverter","LitElement","html","property","consume","html","LitElement","customElement","property","LitElement","html","property","consume","customElement","html","LitElement","customElement","property","LitElement","html","property","customElement","customElement","html","html","customElement"]}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import {
|
|
2
|
+
btn,
|
|
3
|
+
dis
|
|
4
|
+
} from "./chunk-5ZHHNEDA.js";
|
|
5
|
+
import {
|
|
6
|
+
computedContext
|
|
7
|
+
} from "./chunk-AZIKAG7K.js";
|
|
8
|
+
import {
|
|
9
|
+
__decorateClass
|
|
10
|
+
} from "./chunk-H2JE6IVU.js";
|
|
11
|
+
|
|
12
|
+
// src/lib/qti-test/components/test-next.ts
|
|
13
|
+
import { css, html, LitElement } from "lit";
|
|
14
|
+
import { customElement, property } from "lit/decorators.js";
|
|
15
|
+
import { consume } from "@lit/context";
|
|
16
|
+
var TestNext = class extends LitElement {
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this.disabled = false;
|
|
20
|
+
this._internals = this.attachInternals();
|
|
21
|
+
this._internals.role = "button";
|
|
22
|
+
this._internals.ariaLabel = "Next item";
|
|
23
|
+
this.addEventListener("click", (e) => {
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
if (!this.disabled) this._requestItem(this.sectionItems[this.itemIndex + 1].identifier);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
connectedCallback() {
|
|
29
|
+
super.connectedCallback();
|
|
30
|
+
}
|
|
31
|
+
willUpdate(_changedProperties) {
|
|
32
|
+
if (!this.computedContext) return;
|
|
33
|
+
const testPart = this.computedContext?.testParts.find((testPart2) => testPart2.active);
|
|
34
|
+
if (!testPart) return;
|
|
35
|
+
this.sectionItems = testPart.sections.flatMap((section) => section.items);
|
|
36
|
+
this.itemIndex = this.sectionItems.findIndex((item) => item.active);
|
|
37
|
+
this.checkDisabled();
|
|
38
|
+
}
|
|
39
|
+
checkDisabled() {
|
|
40
|
+
const shouldBeDisabled = !this.computedContext || this.itemIndex < 0 || this.itemIndex >= this.sectionItems?.length - 1;
|
|
41
|
+
this.disabled = shouldBeDisabled;
|
|
42
|
+
}
|
|
43
|
+
_requestItem(identifier) {
|
|
44
|
+
this.dispatchEvent(
|
|
45
|
+
new CustomEvent("qti-request-navigation", {
|
|
46
|
+
composed: true,
|
|
47
|
+
bubbles: true,
|
|
48
|
+
detail: {
|
|
49
|
+
type: "item",
|
|
50
|
+
id: identifier
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
return html`<slot></slot>`;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
// @watch('computedContext')
|
|
60
|
+
// _handleTestElementChange(_oldValue: ComputedContext, newValue: ComputedContext) {
|
|
61
|
+
// if (newValue) {
|
|
62
|
+
// this.disabled = false;
|
|
63
|
+
// }
|
|
64
|
+
// }
|
|
65
|
+
TestNext.styles = css`
|
|
66
|
+
:host {
|
|
67
|
+
${btn};
|
|
68
|
+
}
|
|
69
|
+
:host([disabled]) {
|
|
70
|
+
${dis};
|
|
71
|
+
}
|
|
72
|
+
`;
|
|
73
|
+
__decorateClass([
|
|
74
|
+
property({ type: Boolean, reflect: true })
|
|
75
|
+
], TestNext.prototype, "disabled", 2);
|
|
76
|
+
__decorateClass([
|
|
77
|
+
consume({ context: computedContext, subscribe: true })
|
|
78
|
+
], TestNext.prototype, "computedContext", 2);
|
|
79
|
+
TestNext = __decorateClass([
|
|
80
|
+
customElement("test-next")
|
|
81
|
+
], TestNext);
|
|
82
|
+
|
|
83
|
+
export {
|
|
84
|
+
TestNext
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=chunk-X5RBTIXP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-next.ts"],"sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { consume } from '@lit/context';\n\nimport * as styles from './styles';\n// import { watch } from '../../decorators';\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedContext, ComputedItem } from '../../exports/computed.context';\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 LitElement {\n @property({ type: Boolean, reflect: true })\n public disabled = false;\n\n @consume({ context: computedContext, subscribe: true })\n protected computedContext: ComputedContext;\n\n sectionItems: ComputedItem[];\n itemIndex: number;\n\n // @watch('computedContext')\n // _handleTestElementChange(_oldValue: ComputedContext, newValue: ComputedContext) {\n // if (newValue) {\n // this.disabled = false;\n // }\n // }\n\n static styles = css`\n :host {\n ${styles.btn};\n }\n :host([disabled]) {\n ${styles.dis};\n }\n `;\n private _internals: ElementInternals;\n\n constructor() {\n super();\n\n this._internals = this.attachInternals();\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.sectionItems[this.itemIndex + 1].identifier);\n });\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n }\n\n willUpdate(_changedProperties: Map<string | number | symbol, unknown>) {\n if (!this.computedContext) return;\n const testPart = this.computedContext?.testParts.find(testPart => testPart.active);\n if (!testPart) return;\n this.sectionItems = testPart.sections.flatMap(section => section.items);\n this.itemIndex = this.sectionItems.findIndex(item => item.active);\n this.checkDisabled();\n }\n\n checkDisabled() {\n const shouldBeDisabled =\n !this.computedContext || this.itemIndex < 0 || this.itemIndex >= this.sectionItems?.length - 1;\n this.disabled = shouldBeDisabled;\n }\n\n protected _requestItem(identifier: string): void {\n this.dispatchEvent(\n new CustomEvent('qti-request-navigation', {\n composed: true,\n bubbles: true,\n detail: {\n type: 'item',\n id: identifier\n }\n })\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,MAAM,kBAAkB;AACtC,SAAS,eAAe,gBAAgB;AACxC,SAAS,eAAe;AAoBjB,IAAM,WAAN,cAAuB,WAAW;AAAA,EA2BvC,cAAc;AACZ,UAAM;AA1BR,SAAO,WAAW;AA4BhB,SAAK,aAAa,KAAK,gBAAgB;AACvC,SAAK,WAAW,OAAO;AACvB,SAAK,WAAW,YAAY;AAE5B,SAAK,iBAAiB,SAAS,OAAK;AAClC,QAAE,eAAe;AACjB,UAAI,CAAC,KA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feedback-
|
|
1
|
+
import { V as View } from '../qti-test-feedback-2xjKezsY.js';
|
|
2
2
|
import { ComputedItemContext } from './computed-item.context.js';
|
|
3
|
-
import '../qti-response-declaration-
|
|
3
|
+
import '../qti-response-declaration-pCFZA_aW.js';
|
|
4
4
|
import 'lit-html';
|
|
5
5
|
import 'lit';
|
|
6
6
|
import './expression-result.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a4 as ItemContext, ac as itemContextVariables } from '../qti-response-declaration-
|
|
1
|
+
export { a4 as ItemContext, ac as itemContextVariables } from '../qti-response-declaration-pCFZA_aW.js';
|
|
2
2
|
import 'lit-html';
|
|
3
3
|
import 'lit';
|
|
4
4
|
import './expression-result.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'lit-html';
|
|
2
2
|
import 'lit';
|
|
3
|
-
export { a5 as QtiExpression, a7 as QtiExpressionBase } from '../qti-response-declaration-
|
|
3
|
+
export { a5 as QtiExpression, a7 as QtiExpressionBase } from '../qti-response-declaration-pCFZA_aW.js';
|
|
4
4
|
import './expression-result.js';
|
|
5
5
|
import './interaction.interface.js';
|
|
6
6
|
import 'lit-html/directives/ref.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as View } from '../qti-test-feedback-
|
|
2
|
-
import '../qti-response-declaration-
|
|
1
|
+
import { V as View } from '../qti-test-feedback-2xjKezsY.js';
|
|
2
|
+
import '../qti-response-declaration-pCFZA_aW.js';
|
|
3
3
|
import 'lit-html';
|
|
4
4
|
import 'lit';
|
|
5
5
|
import './expression-result.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a4 as ItemContext, a6 as VariableDeclaration } from '../qti-response-declaration-
|
|
1
|
+
import { a4 as ItemContext, a6 as VariableDeclaration } from '../qti-response-declaration-pCFZA_aW.js';
|
|
2
2
|
import 'lit-html';
|
|
3
3
|
import 'lit';
|
|
4
4
|
import './expression-result.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aa as OutcomeVariable, a8 as ResponseVariable, a6 as VariableDeclaration, a9 as VariableValue } from '../qti-response-declaration-
|
|
1
|
+
export { aa as OutcomeVariable, a8 as ResponseVariable, a6 as VariableDeclaration, a9 as VariableValue } from '../qti-response-declaration-pCFZA_aW.js';
|
|
2
2
|
import './expression-result.js';
|
|
3
3
|
import 'lit-html';
|
|
4
4
|
import 'lit';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { O as Orientation, V as QtiAreaMapEntry, U as QtiAreaMapping, Q as QtiAssessmentItem, a as QtiAssessmentStimulusRef, g as QtiAssociableHotspot, h as QtiAssociateInteraction, i as QtiChoiceInteraction, b as QtiCompanionMaterialsInfo, $ as QtiContentBody, j as QtiCustomInteraction, c as QtiCustomOperator, k as QtiEndAttemptInteraction, l as QtiExtendedTextInteraction, d as QtiFeedbackBlock, e as QtiFeedbackInline, p as QtiGap, m as QtiGapImg, n as QtiGapMatchInteraction, o as QtiGapText, q as QtiGraphicAssociateInteraction, r as QtiGraphicGapMatchInteraction, s as QtiGraphicOrderInteraction, t as QtiHotspotChoice, u as QtiHotspotInteraction, w as QtiHottext, v as QtiHottextInteraction, y as QtiInlineChoice, x as QtiInlineChoiceInteraction, K as QtiItemBody, R as QtiLookupOutcomeValue, T as QtiMapEntry, S as QtiMapping, z as QtiMatchInteraction, A as QtiMediaInteraction, f as QtiModalFeedback, B as QtiOrderInteraction, a2 as QtiOutcomeDeclaration, L as QtiOutcomeProcessing, M as QtiOutcomeProcessingProcessor, C as QtiPortableCustomInteraction, D as QtiPositionObjectStage, N as QtiPrompt, a3 as QtiResponseDeclaration, P as QtiResponseProcessing, a0 as QtiRubricBlock, Z as QtiRule, _ as QtiRuleBase, E as QtiSelectPointInteraction, F as QtiSimpleAssociableChoice, G as QtiSimpleChoice, H as QtiSliderInteraction, a1 as QtiStylesheet, X as QtiSubtract, I as QtiTextEntryInteraction, J as QtiUploadInteraction, W as areaShape, Y as qtiSubtractMixin } from './qti-response-declaration-
|
|
1
|
+
export { O as Orientation, V as QtiAreaMapEntry, U as QtiAreaMapping, Q as QtiAssessmentItem, a as QtiAssessmentStimulusRef, g as QtiAssociableHotspot, h as QtiAssociateInteraction, i as QtiChoiceInteraction, b as QtiCompanionMaterialsInfo, $ as QtiContentBody, j as QtiCustomInteraction, c as QtiCustomOperator, k as QtiEndAttemptInteraction, l as QtiExtendedTextInteraction, d as QtiFeedbackBlock, e as QtiFeedbackInline, p as QtiGap, m as QtiGapImg, n as QtiGapMatchInteraction, o as QtiGapText, q as QtiGraphicAssociateInteraction, r as QtiGraphicGapMatchInteraction, s as QtiGraphicOrderInteraction, t as QtiHotspotChoice, u as QtiHotspotInteraction, w as QtiHottext, v as QtiHottextInteraction, y as QtiInlineChoice, x as QtiInlineChoiceInteraction, K as QtiItemBody, R as QtiLookupOutcomeValue, T as QtiMapEntry, S as QtiMapping, z as QtiMatchInteraction, A as QtiMediaInteraction, f as QtiModalFeedback, B as QtiOrderInteraction, a2 as QtiOutcomeDeclaration, L as QtiOutcomeProcessing, M as QtiOutcomeProcessingProcessor, C as QtiPortableCustomInteraction, D as QtiPositionObjectStage, N as QtiPrompt, a3 as QtiResponseDeclaration, P as QtiResponseProcessing, a0 as QtiRubricBlock, Z as QtiRule, _ as QtiRuleBase, E as QtiSelectPointInteraction, F as QtiSimpleAssociableChoice, G as QtiSimpleChoice, H as QtiSliderInteraction, a1 as QtiStylesheet, X as QtiSubtract, I as QtiTextEntryInteraction, J as QtiUploadInteraction, W as areaShape, Y as qtiSubtractMixin } from './qti-response-declaration-pCFZA_aW.js';
|
|
2
2
|
export { QtiAnd, QtiBaseValue, QtiContains, QtiCorrect, QtiDelete, QtiEqual, QtiEqualRounded, QtiGt, QtiGte, QtiIsNull, QtiLt, QtiLte, QtiMapResponse, QtiMapResponsePoint, QtiMatch, QtiMember, QtiMultiple, QtiNot, QtiOr, QtiOrdered, QtiPositionObjectInteraction, QtiPrintedVariable, QtiProduct, QtiRandom, QtiResponseCondition, QtiResponseElse, QtiResponseElseIf, QtiResponseIf, QtiSetOutcomeValue, QtiSetOutcomeValueRule, QtiStringMatch, QtiSum, QtiSumExpression, QtiVariable, qtiAndMixin } from './qti-components/index.js';
|
|
3
3
|
export { QtiTest } from './qti-test/core/index.js';
|
|
4
|
-
export { Q as QtiAssessmentItemRef, a as QtiAssessmentSection, b as QtiAssessmentTest, d as QtiTestFeedback, c as QtiTestPart } from './qti-test-feedback-
|
|
4
|
+
export { Q as QtiAssessmentItemRef, a as QtiAssessmentSection, b as QtiAssessmentTest, d as QtiTestFeedback, c as QtiTestPart } from './qti-test-feedback-2xjKezsY.js';
|
|
5
5
|
export { INITIAL_TEST_CONTEXT, TestContext, testContext } from './exports/test.context.js';
|
|
6
6
|
export { TestNavigation } from './qti-test/components/test-navigation.js';
|
|
7
7
|
export { TestNext } from './qti-test/components/test-next.js';
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
QtiTest,
|
|
19
19
|
QtiTestFeedback,
|
|
20
20
|
QtiTestPart
|
|
21
|
-
} from "./chunks/chunk-
|
|
21
|
+
} from "./chunks/chunk-X5L7SQQN.js";
|
|
22
22
|
import "./chunks/chunk-ZGSNDSK3.js";
|
|
23
23
|
import {
|
|
24
24
|
TestStamp
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
} from "./chunks/chunk-YS4T2ORC.js";
|
|
32
32
|
import {
|
|
33
33
|
TestPrev
|
|
34
|
-
} from "./chunks/chunk-
|
|
34
|
+
} from "./chunks/chunk-KZAEUKGI.js";
|
|
35
35
|
import {
|
|
36
36
|
TestPrintContext
|
|
37
37
|
} from "./chunks/chunk-WFFIUFJJ.js";
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
} from "./chunks/chunk-K5F4CT37.js";
|
|
44
44
|
import {
|
|
45
45
|
TestScoringFeedback
|
|
46
|
-
} from "./chunks/chunk-
|
|
46
|
+
} from "./chunks/chunk-LJ4KYDFF.js";
|
|
47
47
|
import {
|
|
48
48
|
TestSectionButtonsStamp
|
|
49
49
|
} from "./chunks/chunk-IWQR5TSB.js";
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
} from "./chunks/chunk-ZLULX3V3.js";
|
|
71
71
|
import {
|
|
72
72
|
TestNext
|
|
73
|
-
} from "./chunks/chunk-
|
|
73
|
+
} from "./chunks/chunk-OLZSWYQO.js";
|
|
74
74
|
import "./chunks/chunk-5ZHHNEDA.js";
|
|
75
75
|
import {
|
|
76
76
|
TestPagingButtonsStamp
|
|
@@ -168,8 +168,7 @@ import {
|
|
|
168
168
|
QtiVariable,
|
|
169
169
|
qtiAndMixin,
|
|
170
170
|
qtiSubtractMixin
|
|
171
|
-
} from "./chunks/chunk-
|
|
172
|
-
import "./chunks/chunk-D3RGDWKP.js";
|
|
171
|
+
} from "./chunks/chunk-BAG5H6N2.js";
|
|
173
172
|
import "./chunks/chunk-ELDMXTUQ.js";
|
|
174
173
|
import "./chunks/chunk-OOQLWOYU.js";
|
|
175
174
|
import "./chunks/chunk-I7HVKMDI.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Z as QtiRule, _ as QtiRuleBase, a7 as QtiExpressionBase$1, a5 as QtiExpression$1, a4 as ItemContext, a6 as VariableDeclaration, a8 as ResponseVariable } from '../qti-response-declaration-
|
|
2
|
-
export { O as Orientation, V as QtiAreaMapEntry, U as QtiAreaMapping, Q as QtiAssessmentItem, a as QtiAssessmentStimulusRef, g as QtiAssociableHotspot, h as QtiAssociateInteraction, i as QtiChoiceInteraction, b as QtiCompanionMaterialsInfo, $ as QtiContentBody, j as QtiCustomInteraction, c as QtiCustomOperator, k as QtiEndAttemptInteraction, l as QtiExtendedTextInteraction, d as QtiFeedbackBlock, e as QtiFeedbackInline, p as QtiGap, m as QtiGapImg, n as QtiGapMatchInteraction, o as QtiGapText, q as QtiGraphicAssociateInteraction, r as QtiGraphicGapMatchInteraction, s as QtiGraphicOrderInteraction, t as QtiHotspotChoice, u as QtiHotspotInteraction, w as QtiHottext, v as QtiHottextInteraction, y as QtiInlineChoice, x as QtiInlineChoiceInteraction, K as QtiItemBody, R as QtiLookupOutcomeValue, T as QtiMapEntry, S as QtiMapping, z as QtiMatchInteraction, A as QtiMediaInteraction, f as QtiModalFeedback, B as QtiOrderInteraction, a2 as QtiOutcomeDeclaration, L as QtiOutcomeProcessing, M as QtiOutcomeProcessingProcessor, C as QtiPortableCustomInteraction, D as QtiPositionObjectStage, N as QtiPrompt, a3 as QtiResponseDeclaration, P as QtiResponseProcessing, a0 as QtiRubricBlock, E as QtiSelectPointInteraction, F as QtiSimpleAssociableChoice, G as QtiSimpleChoice, H as QtiSliderInteraction, a1 as QtiStylesheet, X as QtiSubtract, I as QtiTextEntryInteraction, J as QtiUploadInteraction, W as areaShape, Y as qtiSubtractMixin } from '../qti-response-declaration-
|
|
1
|
+
import { Z as QtiRule, _ as QtiRuleBase, a7 as QtiExpressionBase$1, a5 as QtiExpression$1, a4 as ItemContext, a6 as VariableDeclaration, a8 as ResponseVariable } from '../qti-response-declaration-pCFZA_aW.js';
|
|
2
|
+
export { O as Orientation, V as QtiAreaMapEntry, U as QtiAreaMapping, Q as QtiAssessmentItem, a as QtiAssessmentStimulusRef, g as QtiAssociableHotspot, h as QtiAssociateInteraction, i as QtiChoiceInteraction, b as QtiCompanionMaterialsInfo, $ as QtiContentBody, j as QtiCustomInteraction, c as QtiCustomOperator, k as QtiEndAttemptInteraction, l as QtiExtendedTextInteraction, d as QtiFeedbackBlock, e as QtiFeedbackInline, p as QtiGap, m as QtiGapImg, n as QtiGapMatchInteraction, o as QtiGapText, q as QtiGraphicAssociateInteraction, r as QtiGraphicGapMatchInteraction, s as QtiGraphicOrderInteraction, t as QtiHotspotChoice, u as QtiHotspotInteraction, w as QtiHottext, v as QtiHottextInteraction, y as QtiInlineChoice, x as QtiInlineChoiceInteraction, K as QtiItemBody, R as QtiLookupOutcomeValue, T as QtiMapEntry, S as QtiMapping, z as QtiMatchInteraction, A as QtiMediaInteraction, f as QtiModalFeedback, B as QtiOrderInteraction, a2 as QtiOutcomeDeclaration, L as QtiOutcomeProcessing, M as QtiOutcomeProcessingProcessor, C as QtiPortableCustomInteraction, D as QtiPositionObjectStage, N as QtiPrompt, a3 as QtiResponseDeclaration, P as QtiResponseProcessing, a0 as QtiRubricBlock, E as QtiSelectPointInteraction, F as QtiSimpleAssociableChoice, G as QtiSimpleChoice, H as QtiSliderInteraction, a1 as QtiStylesheet, X as QtiSubtract, I as QtiTextEntryInteraction, J as QtiUploadInteraction, W as areaShape, Y as qtiSubtractMixin } from '../qti-response-declaration-pCFZA_aW.js';
|
|
3
3
|
import * as lit from 'lit';
|
|
4
4
|
import { LitElement, nothing } from 'lit';
|
|
5
5
|
import * as lit_html from 'lit-html';
|
|
@@ -85,8 +85,7 @@ import {
|
|
|
85
85
|
QtiVariable,
|
|
86
86
|
qtiAndMixin,
|
|
87
87
|
qtiSubtractMixin
|
|
88
|
-
} from "../chunks/chunk-
|
|
89
|
-
import "../chunks/chunk-D3RGDWKP.js";
|
|
88
|
+
} from "../chunks/chunk-BAG5H6N2.js";
|
|
90
89
|
import "../chunks/chunk-ELDMXTUQ.js";
|
|
91
90
|
import "../chunks/chunk-OOQLWOYU.js";
|
|
92
91
|
import "../chunks/chunk-I7HVKMDI.js";
|
|
@@ -609,11 +609,31 @@ export type QtiPortableCustomInteractionProps = {
|
|
|
609
609
|
/** */
|
|
610
610
|
"custom-interaction-type-identifier"?: string;
|
|
611
611
|
/** */
|
|
612
|
+
"data-require-paths"?: string;
|
|
613
|
+
/** */
|
|
614
|
+
"data-require-shim"?: string;
|
|
615
|
+
/** */
|
|
616
|
+
"data-require-js-url"?: string;
|
|
617
|
+
/** */
|
|
612
618
|
"data-base-url"?: string;
|
|
613
619
|
/** */
|
|
620
|
+
"data-use-iframe"?: boolean;
|
|
621
|
+
/** */
|
|
622
|
+
"data-use-default-shims"?: boolean;
|
|
623
|
+
/** */
|
|
624
|
+
"data-use-default-paths"?: boolean;
|
|
625
|
+
/** */
|
|
614
626
|
response?: string | string[];
|
|
615
627
|
/** */
|
|
616
628
|
value?: string | null;
|
|
629
|
+
/** */
|
|
630
|
+
boundTo?: Record<string, QtiVariableJSON>;
|
|
631
|
+
/** DIRECT MODE: Load config from URL */
|
|
632
|
+
loadConfig?: string;
|
|
633
|
+
/** DIRECT MODE: Helper method to get resolvable path string */
|
|
634
|
+
getResolvablePathString?: string;
|
|
635
|
+
/** DIRECT MODE: Helper method to get resolvable path */
|
|
636
|
+
getResolvablePath?: string;
|
|
617
637
|
};
|
|
618
638
|
|
|
619
639
|
export type QtiPositionObjectInteractionProps = {};
|
|
@@ -734,11 +754,31 @@ export type QtiPortableCustomInteractionTestProps = {
|
|
|
734
754
|
/** */
|
|
735
755
|
"custom-interaction-type-identifier"?: string;
|
|
736
756
|
/** */
|
|
757
|
+
"data-require-paths"?: string;
|
|
758
|
+
/** */
|
|
759
|
+
"data-require-shim"?: string;
|
|
760
|
+
/** */
|
|
761
|
+
"data-require-js-url"?: string;
|
|
762
|
+
/** */
|
|
737
763
|
"data-base-url"?: string;
|
|
738
764
|
/** */
|
|
765
|
+
"data-use-iframe"?: boolean;
|
|
766
|
+
/** */
|
|
767
|
+
"data-use-default-shims"?: boolean;
|
|
768
|
+
/** */
|
|
769
|
+
"data-use-default-paths"?: boolean;
|
|
770
|
+
/** */
|
|
739
771
|
response?: string | string[];
|
|
740
772
|
/** */
|
|
741
773
|
value?: string | null;
|
|
774
|
+
/** */
|
|
775
|
+
boundTo?: Record<string, QtiVariableJSON>;
|
|
776
|
+
/** DIRECT MODE: Load config from URL */
|
|
777
|
+
loadConfig?: string;
|
|
778
|
+
/** DIRECT MODE: Helper method to get resolvable path string */
|
|
779
|
+
getResolvablePathString?: string;
|
|
780
|
+
/** DIRECT MODE: Helper method to get resolvable path */
|
|
781
|
+
getResolvablePath?: string;
|
|
742
782
|
};
|
|
743
783
|
|
|
744
784
|
export type TestElementProps = {
|
|
@@ -764,6 +804,8 @@ export type ItemContainerProps = {
|
|
|
764
804
|
itemXML?: string;
|
|
765
805
|
};
|
|
766
806
|
|
|
807
|
+
export type PrintItemVariablesProps = {};
|
|
808
|
+
|
|
767
809
|
export type ItemShowCorrectResponseProps = {
|
|
768
810
|
/** */
|
|
769
811
|
shown?: boolean;
|
|
@@ -781,8 +823,6 @@ export type ItemShowCorrectResponseProps = {
|
|
|
781
823
|
"onitem-show-correct-response"?: (e: CustomEvent<CustomEvent>) => void;
|
|
782
824
|
};
|
|
783
825
|
|
|
784
|
-
export type PrintItemVariablesProps = {};
|
|
785
|
-
|
|
786
826
|
export type QtiItemProps = {
|
|
787
827
|
/** */
|
|
788
828
|
computedContext?: ComputedItemContext;
|
|
@@ -911,7 +951,7 @@ export type TestNavigationProps = {
|
|
|
911
951
|
};
|
|
912
952
|
|
|
913
953
|
export type TestNextProps = {
|
|
914
|
-
/**
|
|
954
|
+
/** Internal logic + external flag = effective disabled state (reflected) */
|
|
915
955
|
disabled?: boolean;
|
|
916
956
|
/** */
|
|
917
957
|
sectionItems?: ComputedItem[];
|
|
@@ -926,7 +966,7 @@ export type TestNextProps = {
|
|
|
926
966
|
};
|
|
927
967
|
|
|
928
968
|
export type TestPrevProps = {
|
|
929
|
-
/**
|
|
969
|
+
/** Internal logic + external flag = effective disabled state (reflected) */
|
|
930
970
|
disabled?: boolean;
|
|
931
971
|
/** */
|
|
932
972
|
sectionItems?: ComputedItem[];
|
|
@@ -1327,7 +1367,7 @@ export type CustomElements = {
|
|
|
1327
1367
|
* - **qti-outcome-changed**
|
|
1328
1368
|
*
|
|
1329
1369
|
* ### **Methods:**
|
|
1330
|
-
* - **showCorrectResponse(show: _boolean_): _void_** - Toggles the display of correct responses for interactions.
|
|
1370
|
+
* - **showCorrectResponse(show: _boolean_): _void_** - Toggles the display of correct responses for all interactions.
|
|
1331
1371
|
*
|
|
1332
1372
|
*
|
|
1333
1373
|
*/
|
|
@@ -1624,6 +1664,18 @@ export type CustomElements = {
|
|
|
1624
1664
|
*
|
|
1625
1665
|
* ---
|
|
1626
1666
|
*
|
|
1667
|
+
*
|
|
1668
|
+
* ### **Methods:**
|
|
1669
|
+
*
|
|
1670
|
+
* - **register(pci: _IMSpci<ConfigProperties<unknown>>_)** - DIRECT MODE: Register PCI instance
|
|
1671
|
+
*
|
|
1672
|
+
*
|
|
1673
|
+
* - **buildRequireConfig()** - DIRECT MODE: Build RequireJS configuration
|
|
1674
|
+
*
|
|
1675
|
+
* - **toggleCorrectResponse(responseVariable: _ResponseVariable_, show: _boolean_)** - Toggle the display of the correct response
|
|
1676
|
+
* - **disable()** - Method to disable the PCI for review mode
|
|
1677
|
+
* This can be used when showing the correct response
|
|
1678
|
+
* - **enable()** - Method to enable the PCI for interactive mode
|
|
1627
1679
|
*/
|
|
1628
1680
|
"qti-portable-custom-interaction": Partial<QtiPortableCustomInteractionProps & BaseProps & BaseEvents>;
|
|
1629
1681
|
|
|
@@ -1767,6 +1819,15 @@ export type CustomElements = {
|
|
|
1767
1819
|
* - **iFrameSetValueElementByText(text: _string_, value: _string_): __** - Sets the value of an input element containing the specified text
|
|
1768
1820
|
* - **iFrameMousedownOnElement(selector: _string_): __** - Performs a mousedown event on an element identified by a CSS selector
|
|
1769
1821
|
*
|
|
1822
|
+
*
|
|
1823
|
+
* - **register(pci: _IMSpci<ConfigProperties<unknown>>_)** - DIRECT MODE: Register PCI instance
|
|
1824
|
+
*
|
|
1825
|
+
*
|
|
1826
|
+
* - **buildRequireConfig()** - DIRECT MODE: Build RequireJS configuration
|
|
1827
|
+
* - **toggleCorrectResponse(responseVariable: _ResponseVariable_, show: _boolean_)** - Toggle the display of the correct response
|
|
1828
|
+
* - **disable()** - Method to disable the PCI for review mode
|
|
1829
|
+
* This can be used when showing the correct response
|
|
1830
|
+
* - **enable()** - Method to enable the PCI for interactive mode
|
|
1770
1831
|
*/
|
|
1771
1832
|
"qti-portable-custom-interaction-test": Partial<QtiPortableCustomInteractionTestProps & BaseProps & BaseEvents>;
|
|
1772
1833
|
|
|
@@ -1806,18 +1867,18 @@ export type CustomElements = {
|
|
|
1806
1867
|
*
|
|
1807
1868
|
* ---
|
|
1808
1869
|
*
|
|
1809
|
-
*
|
|
1810
|
-
* ### **Events:**
|
|
1811
|
-
* - **item-show-correct-response**
|
|
1812
1870
|
*/
|
|
1813
|
-
"item-
|
|
1871
|
+
"print-item-variables": Partial<PrintItemVariablesProps & BaseProps & BaseEvents>;
|
|
1814
1872
|
|
|
1815
1873
|
/**
|
|
1816
1874
|
*
|
|
1817
1875
|
* ---
|
|
1818
1876
|
*
|
|
1877
|
+
*
|
|
1878
|
+
* ### **Events:**
|
|
1879
|
+
* - **item-show-correct-response**
|
|
1819
1880
|
*/
|
|
1820
|
-
"
|
|
1881
|
+
"item-show-correct-response": Partial<ItemShowCorrectResponseProps & BaseProps & BaseEvents>;
|
|
1821
1882
|
|
|
1822
1883
|
/**
|
|
1823
1884
|
* `<qti-item>` is a custom element designed for rendering a single `qti-assessment-item`.
|
|
@@ -1958,7 +2019,7 @@ export type CustomElements = {
|
|
|
1958
2019
|
"test-navigation": Partial<TestNavigationProps & BaseProps & BaseEvents>;
|
|
1959
2020
|
|
|
1960
2021
|
/**
|
|
1961
|
-
*
|
|
2022
|
+
*
|
|
1962
2023
|
* ---
|
|
1963
2024
|
*
|
|
1964
2025
|
*
|
|
@@ -1968,7 +2029,7 @@ export type CustomElements = {
|
|
|
1968
2029
|
"test-next": Partial<TestNextProps & BaseProps & BaseEvents>;
|
|
1969
2030
|
|
|
1970
2031
|
/**
|
|
1971
|
-
*
|
|
2032
|
+
*
|
|
1972
2033
|
* ---
|
|
1973
2034
|
*
|
|
1974
2035
|
*
|
|
@@ -2,7 +2,7 @@ import * as lit_html from 'lit-html';
|
|
|
2
2
|
import * as lit from 'lit';
|
|
3
3
|
import { LitElement } from 'lit';
|
|
4
4
|
import { ComputedItemContext } from '../../exports/computed-item.context.js';
|
|
5
|
-
import '../../qti-response-declaration-
|
|
5
|
+
import '../../qti-response-declaration-pCFZA_aW.js';
|
|
6
6
|
import '../../exports/expression-result.js';
|
|
7
7
|
import '../../exports/interaction.interface.js';
|
|
8
8
|
import 'lit-html/directives/ref.js';
|
|
@@ -2,7 +2,7 @@ import * as lit_html from 'lit-html';
|
|
|
2
2
|
import * as lit from 'lit';
|
|
3
3
|
import { LitElement } from 'lit';
|
|
4
4
|
import { ComputedItemContext } from '../../exports/computed-item.context.js';
|
|
5
|
-
import '../../qti-response-declaration-
|
|
5
|
+
import '../../qti-response-declaration-pCFZA_aW.js';
|
|
6
6
|
import '../../exports/expression-result.js';
|
|
7
7
|
import '../../exports/interaction.interface.js';
|
|
8
8
|
import 'lit-html/directives/ref.js';
|
|
@@ -4,7 +4,7 @@ export { ItemShowCorrectResponse } from '../components/item-show-correct-respons
|
|
|
4
4
|
import * as lit_html from 'lit-html';
|
|
5
5
|
import { LitElement } from 'lit';
|
|
6
6
|
import { ComputedItemContext } from '../../exports/computed-item.context.js';
|
|
7
|
-
import '../../qti-response-declaration-
|
|
7
|
+
import '../../qti-response-declaration-pCFZA_aW.js';
|
|
8
8
|
import '../../exports/expression-result.js';
|
|
9
9
|
import '../../exports/interaction.interface.js';
|
|
10
10
|
import 'lit-html/directives/ref.js';
|