@pie-players/pie-assessment-player 0.3.75 → 1.0.0-beta.0
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/README.md +446 -219
- package/custom-elements.json +521 -0
- package/dist/components/AssessmentPlayerDefaultElement.d.ts +25 -0
- package/dist/components/AssessmentPlayerShellElement.d.ts +11 -0
- package/dist/components/assessment-section-player-runtime.d.ts +0 -1
- package/dist/controller/AssessmentController.d.ts +5 -0
- package/dist/{nl-NL-CfezB59b.js → nl-NL-DqnT-1mq.js} +34 -6
- package/dist/pie-assessment-player.js +451 -368
- package/dist/types.d.ts +3 -8
- package/package.json +9 -18
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "2.1.0",
|
|
3
|
+
"modules": [
|
|
4
|
+
{
|
|
5
|
+
"kind": "javascript-module",
|
|
6
|
+
"path": "dist/pie-assessment-player.js",
|
|
7
|
+
"declarations": [
|
|
8
|
+
{
|
|
9
|
+
"kind": "class",
|
|
10
|
+
"description": "Reference multi-section assessment player. A host gives it an `assessment` definition and `assessment-id`, optionally with `attempt-id`, `session` and `hooks`; it creates an `AssessmentController` for the attempt, mounts the current section in a split-pane or vertical section player, and renders the section position with Back and Next controls.",
|
|
11
|
+
"name": "AssessmentPlayerDefaultElement",
|
|
12
|
+
"tagName": "pie-assessment-player-default",
|
|
13
|
+
"customElement": true,
|
|
14
|
+
"superclass": {
|
|
15
|
+
"name": "HTMLElement"
|
|
16
|
+
},
|
|
17
|
+
"members": [
|
|
18
|
+
{
|
|
19
|
+
"kind": "field",
|
|
20
|
+
"name": "assessmentId",
|
|
21
|
+
"type": {
|
|
22
|
+
"text": "string"
|
|
23
|
+
},
|
|
24
|
+
"attribute": "assessment-id"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"kind": "field",
|
|
28
|
+
"name": "attemptId",
|
|
29
|
+
"type": {
|
|
30
|
+
"text": "string"
|
|
31
|
+
},
|
|
32
|
+
"attribute": "attempt-id"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"kind": "field",
|
|
36
|
+
"name": "assessment",
|
|
37
|
+
"type": {
|
|
38
|
+
"text": "AssessmentDefinition | null"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"kind": "field",
|
|
43
|
+
"name": "hooks",
|
|
44
|
+
"type": {
|
|
45
|
+
"text": "AssessmentPlayerHooks | null"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"kind": "field",
|
|
50
|
+
"name": "session",
|
|
51
|
+
"type": {
|
|
52
|
+
"text": "AssessmentSession | null"
|
|
53
|
+
},
|
|
54
|
+
"description": "Before a controller is ready, the assigned session; after, a copy of the controller's."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"kind": "field",
|
|
58
|
+
"name": "locale",
|
|
59
|
+
"type": {
|
|
60
|
+
"text": "string"
|
|
61
|
+
},
|
|
62
|
+
"attribute": "locale"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"kind": "field",
|
|
66
|
+
"name": "env",
|
|
67
|
+
"type": {
|
|
68
|
+
"text": "Env | null"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"kind": "field",
|
|
73
|
+
"name": "coordinator",
|
|
74
|
+
"type": {
|
|
75
|
+
"text": "unknown"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"kind": "field",
|
|
80
|
+
"name": "showNavigation",
|
|
81
|
+
"type": {
|
|
82
|
+
"text": "boolean | string | null | undefined"
|
|
83
|
+
},
|
|
84
|
+
"attribute": "show-navigation"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"kind": "field",
|
|
88
|
+
"name": "sectionPlayerLayout",
|
|
89
|
+
"type": {
|
|
90
|
+
"text": "\"splitpane\" | \"vertical\""
|
|
91
|
+
},
|
|
92
|
+
"attribute": "section-player-layout"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"kind": "field",
|
|
96
|
+
"name": "playerType",
|
|
97
|
+
"type": {
|
|
98
|
+
"text": "\"iife\" | \"esm\" | \"preloaded\""
|
|
99
|
+
},
|
|
100
|
+
"attribute": "player-type"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"kind": "field",
|
|
104
|
+
"name": "debug",
|
|
105
|
+
"type": {
|
|
106
|
+
"text": "boolean | string | null | undefined"
|
|
107
|
+
},
|
|
108
|
+
"attribute": "debug"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"kind": "field",
|
|
112
|
+
"name": "sectionPlayerRuntime",
|
|
113
|
+
"type": {
|
|
114
|
+
"text": "AssessmentPlayerRuntimeConfig[\"sectionPlayerRuntime\"]"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"kind": "method",
|
|
119
|
+
"name": "getSnapshot",
|
|
120
|
+
"return": {
|
|
121
|
+
"type": {
|
|
122
|
+
"text": "AssessmentPlayerSnapshot"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"kind": "method",
|
|
128
|
+
"name": "selectNavigation"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"kind": "method",
|
|
132
|
+
"name": "selectReadiness"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"kind": "method",
|
|
136
|
+
"name": "selectProgress",
|
|
137
|
+
"return": {
|
|
138
|
+
"type": {
|
|
139
|
+
"text": "AssessmentPlayerProgressSnapshot"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"kind": "method",
|
|
145
|
+
"name": "navigateTo",
|
|
146
|
+
"parameters": [
|
|
147
|
+
{
|
|
148
|
+
"name": "indexOrIdentifier",
|
|
149
|
+
"type": {
|
|
150
|
+
"text": "number | string"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"return": {
|
|
155
|
+
"type": {
|
|
156
|
+
"text": "boolean"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"kind": "method",
|
|
162
|
+
"name": "navigateNext",
|
|
163
|
+
"return": {
|
|
164
|
+
"type": {
|
|
165
|
+
"text": "boolean"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"kind": "method",
|
|
171
|
+
"name": "navigatePrevious",
|
|
172
|
+
"return": {
|
|
173
|
+
"type": {
|
|
174
|
+
"text": "boolean"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"kind": "method",
|
|
180
|
+
"name": "getAssessmentController",
|
|
181
|
+
"return": {
|
|
182
|
+
"type": {
|
|
183
|
+
"text": "AssessmentControllerHandle | null"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"kind": "method",
|
|
189
|
+
"name": "waitForAssessmentController",
|
|
190
|
+
"parameters": [
|
|
191
|
+
{
|
|
192
|
+
"name": "timeoutMs",
|
|
193
|
+
"type": {
|
|
194
|
+
"text": "number"
|
|
195
|
+
},
|
|
196
|
+
"optional": true,
|
|
197
|
+
"default": "5000"
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
],
|
|
202
|
+
"attributes": [
|
|
203
|
+
{
|
|
204
|
+
"name": "assessment-id",
|
|
205
|
+
"type": {
|
|
206
|
+
"text": "string"
|
|
207
|
+
},
|
|
208
|
+
"fieldName": "assessmentId"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"name": "attempt-id",
|
|
212
|
+
"type": {
|
|
213
|
+
"text": "string"
|
|
214
|
+
},
|
|
215
|
+
"fieldName": "attemptId"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"name": "show-navigation",
|
|
219
|
+
"type": {
|
|
220
|
+
"text": "boolean | string | null | undefined"
|
|
221
|
+
},
|
|
222
|
+
"fieldName": "showNavigation"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"name": "section-player-layout",
|
|
226
|
+
"type": {
|
|
227
|
+
"text": "\"splitpane\" | \"vertical\""
|
|
228
|
+
},
|
|
229
|
+
"fieldName": "sectionPlayerLayout"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"name": "player-type",
|
|
233
|
+
"type": {
|
|
234
|
+
"text": "\"iife\" | \"esm\" | \"preloaded\""
|
|
235
|
+
},
|
|
236
|
+
"fieldName": "playerType"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"name": "debug",
|
|
240
|
+
"type": {
|
|
241
|
+
"text": "boolean | string | null | undefined"
|
|
242
|
+
},
|
|
243
|
+
"fieldName": "debug"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"name": "locale",
|
|
247
|
+
"type": {
|
|
248
|
+
"text": "string"
|
|
249
|
+
},
|
|
250
|
+
"fieldName": "locale"
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"events": [
|
|
254
|
+
{
|
|
255
|
+
"name": "assessment-controller-ready",
|
|
256
|
+
"type": {
|
|
257
|
+
"text": "CustomEvent<{ controller: AssessmentControllerHandle }>"
|
|
258
|
+
},
|
|
259
|
+
"description": "When the controller has initialized and hydrated the attempt."
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"name": "assessment-navigation-requested",
|
|
263
|
+
"type": {
|
|
264
|
+
"text": "CustomEvent<AssessmentNavigationRequestedDetail>"
|
|
265
|
+
},
|
|
266
|
+
"description": "Before Back, Next or a navigate method moves to another section, cancelable to stay."
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"name": "assessment-route-changed",
|
|
270
|
+
"type": {
|
|
271
|
+
"text": "CustomEvent<AssessmentRouteChangedDetail>"
|
|
272
|
+
},
|
|
273
|
+
"description": "When the current section changes."
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"name": "assessment-session-applied",
|
|
277
|
+
"type": {
|
|
278
|
+
"text": "CustomEvent<{ type: \"assessment-session-applied\"; timestamp: number }>"
|
|
279
|
+
},
|
|
280
|
+
"description": "When hydration applies a persisted or assigned session."
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"name": "assessment-session-changed",
|
|
284
|
+
"type": {
|
|
285
|
+
"text": "CustomEvent<{ type: \"assessment-session-changed\"; timestamp: number }>"
|
|
286
|
+
},
|
|
287
|
+
"description": "When navigation or a section snapshot changes the assessment session."
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"name": "assessment-progress-changed",
|
|
291
|
+
"type": {
|
|
292
|
+
"text": "CustomEvent<AssessmentProgressChangedDetail>"
|
|
293
|
+
},
|
|
294
|
+
"description": "When the visited-section count changes."
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"name": "assessment-submission-state-changed",
|
|
298
|
+
"type": {
|
|
299
|
+
"text": "CustomEvent<AssessmentSubmissionStateChangedDetail>"
|
|
300
|
+
},
|
|
301
|
+
"description": "When `submit()` records the submission state."
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"name": "assessment-error",
|
|
305
|
+
"type": {
|
|
306
|
+
"text": "CustomEvent<{ error: unknown }>"
|
|
307
|
+
},
|
|
308
|
+
"description": "When the attempt fails to load, a ready hook rejects, or a section fails to load or restore."
|
|
309
|
+
}
|
|
310
|
+
],
|
|
311
|
+
"x-pie": {
|
|
312
|
+
"shadow": "none"
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"kind": "class",
|
|
317
|
+
"description": "Layout scaffold for a host-composed assessment: host navigation above a body that fills the remaining height. The scaffold renders in an open shadow root and the host's children stay in its light DOM, where document styles reach them, projecting into the slots.",
|
|
318
|
+
"name": "AssessmentPlayerShellElement",
|
|
319
|
+
"tagName": "pie-assessment-player-shell",
|
|
320
|
+
"customElement": true,
|
|
321
|
+
"superclass": {
|
|
322
|
+
"name": "HTMLElement"
|
|
323
|
+
},
|
|
324
|
+
"members": [
|
|
325
|
+
{
|
|
326
|
+
"kind": "field",
|
|
327
|
+
"name": "showNavigation",
|
|
328
|
+
"type": {
|
|
329
|
+
"text": "boolean | string | null | undefined"
|
|
330
|
+
},
|
|
331
|
+
"default": "true",
|
|
332
|
+
"attribute": "show-navigation"
|
|
333
|
+
}
|
|
334
|
+
],
|
|
335
|
+
"attributes": [
|
|
336
|
+
{
|
|
337
|
+
"name": "show-navigation",
|
|
338
|
+
"type": {
|
|
339
|
+
"text": "boolean | string | null | undefined"
|
|
340
|
+
},
|
|
341
|
+
"fieldName": "showNavigation"
|
|
342
|
+
}
|
|
343
|
+
],
|
|
344
|
+
"slots": [
|
|
345
|
+
{
|
|
346
|
+
"name": "",
|
|
347
|
+
"description": "The body: the host's section player and any other assessment UI."
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"name": "navigation",
|
|
351
|
+
"description": "Assessment navigation above the body; not rendered while `show-navigation` is false."
|
|
352
|
+
}
|
|
353
|
+
],
|
|
354
|
+
"x-pie": {
|
|
355
|
+
"shadow": "open"
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
],
|
|
359
|
+
"exports": [
|
|
360
|
+
{
|
|
361
|
+
"kind": "custom-element-definition",
|
|
362
|
+
"name": "pie-assessment-player-default",
|
|
363
|
+
"declaration": {
|
|
364
|
+
"name": "AssessmentPlayerDefaultElement"
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"kind": "custom-element-definition",
|
|
369
|
+
"name": "pie-assessment-player-shell",
|
|
370
|
+
"declaration": {
|
|
371
|
+
"name": "AssessmentPlayerShellElement"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"kind": "custom-element-definition",
|
|
376
|
+
"name": "pie-assessment-toolkit",
|
|
377
|
+
"declaration": {
|
|
378
|
+
"name": "PieAssessmentToolkit",
|
|
379
|
+
"module": "dist/components/pie-assessment-toolkit-element.js",
|
|
380
|
+
"package": "@pie-players/pie-assessment-toolkit"
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"kind": "custom-element-definition",
|
|
385
|
+
"name": "pie-item-player",
|
|
386
|
+
"declaration": {
|
|
387
|
+
"name": "PieItemPlayer",
|
|
388
|
+
"module": "dist/pie-item-player.js",
|
|
389
|
+
"package": "@pie-players/pie-item-player"
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"kind": "custom-element-definition",
|
|
394
|
+
"name": "pie-item-scope",
|
|
395
|
+
"declaration": {
|
|
396
|
+
"name": "ItemScope",
|
|
397
|
+
"module": "dist/components/item-scope-element.js",
|
|
398
|
+
"package": "@pie-players/pie-assessment-toolkit"
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"kind": "custom-element-definition",
|
|
403
|
+
"name": "pie-item-toolbar",
|
|
404
|
+
"declaration": {
|
|
405
|
+
"name": "ItemToolBar",
|
|
406
|
+
"module": "dist/components/item-toolbar-element.js",
|
|
407
|
+
"package": "@pie-players/pie-assessment-toolkit"
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"kind": "custom-element-definition",
|
|
412
|
+
"name": "pie-passage-shell",
|
|
413
|
+
"declaration": {
|
|
414
|
+
"name": "PassageShellElement",
|
|
415
|
+
"module": "dist/pie-section-player.js",
|
|
416
|
+
"package": "@pie-players/pie-section-player"
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"kind": "custom-element-definition",
|
|
421
|
+
"name": "pie-section-player-base",
|
|
422
|
+
"declaration": {
|
|
423
|
+
"name": "PieSectionPlayerBaseElement",
|
|
424
|
+
"module": "dist/pie-section-player.js",
|
|
425
|
+
"package": "@pie-players/pie-section-player"
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"kind": "custom-element-definition",
|
|
430
|
+
"name": "pie-section-player-item-card",
|
|
431
|
+
"declaration": {
|
|
432
|
+
"name": "SectionItemCard",
|
|
433
|
+
"module": "dist/pie-section-player.js",
|
|
434
|
+
"package": "@pie-players/pie-section-player"
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"kind": "custom-element-definition",
|
|
439
|
+
"name": "pie-section-player-items-pane",
|
|
440
|
+
"declaration": {
|
|
441
|
+
"name": "SectionItemsPane",
|
|
442
|
+
"module": "dist/pie-section-player.js",
|
|
443
|
+
"package": "@pie-players/pie-section-player"
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"kind": "custom-element-definition",
|
|
448
|
+
"name": "pie-section-player-kernel-host",
|
|
449
|
+
"declaration": {
|
|
450
|
+
"name": "PieSectionPlayerKernelHostElement",
|
|
451
|
+
"module": "dist/pie-section-player.js",
|
|
452
|
+
"package": "@pie-players/pie-section-player"
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"kind": "custom-element-definition",
|
|
457
|
+
"name": "pie-section-player-passage-card",
|
|
458
|
+
"declaration": {
|
|
459
|
+
"name": "SectionPassageCard",
|
|
460
|
+
"module": "dist/pie-section-player.js",
|
|
461
|
+
"package": "@pie-players/pie-section-player"
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"kind": "custom-element-definition",
|
|
466
|
+
"name": "pie-section-player-passages-pane",
|
|
467
|
+
"declaration": {
|
|
468
|
+
"name": "SectionPassagesPane",
|
|
469
|
+
"module": "dist/pie-section-player.js",
|
|
470
|
+
"package": "@pie-players/pie-section-player"
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"kind": "custom-element-definition",
|
|
475
|
+
"name": "pie-section-player-shell",
|
|
476
|
+
"declaration": {
|
|
477
|
+
"name": "SectionPlayerShell",
|
|
478
|
+
"module": "dist/pie-section-player.js",
|
|
479
|
+
"package": "@pie-players/pie-section-player"
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"kind": "custom-element-definition",
|
|
484
|
+
"name": "pie-section-player-splitpane",
|
|
485
|
+
"declaration": {
|
|
486
|
+
"name": "PieSectionPlayerSplitPaneElement",
|
|
487
|
+
"module": "dist/pie-section-player.js",
|
|
488
|
+
"package": "@pie-players/pie-section-player"
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"kind": "custom-element-definition",
|
|
493
|
+
"name": "pie-section-player-tabbed",
|
|
494
|
+
"declaration": {
|
|
495
|
+
"name": "PieSectionPlayerTabbedElement",
|
|
496
|
+
"module": "dist/pie-section-player.js",
|
|
497
|
+
"package": "@pie-players/pie-section-player"
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
"kind": "custom-element-definition",
|
|
502
|
+
"name": "pie-section-player-vertical",
|
|
503
|
+
"declaration": {
|
|
504
|
+
"name": "PieSectionPlayerVerticalElement",
|
|
505
|
+
"module": "dist/pie-section-player.js",
|
|
506
|
+
"package": "@pie-players/pie-section-player"
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"kind": "custom-element-definition",
|
|
511
|
+
"name": "pie-section-toolbar",
|
|
512
|
+
"declaration": {
|
|
513
|
+
"name": "SectionToolBar",
|
|
514
|
+
"module": "dist/components/section-toolbar-element.js",
|
|
515
|
+
"package": "@pie-players/pie-assessment-toolkit"
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
]
|
|
519
|
+
}
|
|
520
|
+
]
|
|
521
|
+
}
|
|
@@ -2,6 +2,31 @@ import { Env } from '@pie-players/pie-players-shared/types';
|
|
|
2
2
|
import { AssessmentControllerHandle } from '../controller/AssessmentController.js';
|
|
3
3
|
import { AssessmentPlayerProgressSnapshot, AssessmentPlayerRuntimeHostContract, AssessmentPlayerSnapshot } from '../contracts/runtime-host-contract.js';
|
|
4
4
|
import { AssessmentDefinition, AssessmentPlayerHooks, AssessmentPlayerRuntimeConfig, AssessmentSession } from '../types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Reference multi-section assessment player. A host gives it an `assessment`
|
|
7
|
+
* definition and `assessment-id`, optionally with `attempt-id`, `session` and
|
|
8
|
+
* `hooks`; it creates an `AssessmentController` for the attempt, mounts the
|
|
9
|
+
* current section in a split-pane or vertical section player, and renders the
|
|
10
|
+
* section position with Back and Next controls.
|
|
11
|
+
*
|
|
12
|
+
* @fires {CustomEvent<{ controller: AssessmentControllerHandle }>} assessment-controller-ready -
|
|
13
|
+
* When the controller has initialized and hydrated the attempt.
|
|
14
|
+
* @fires {CustomEvent<AssessmentNavigationRequestedDetail>} assessment-navigation-requested -
|
|
15
|
+
* Before Back, Next or a navigate method moves to another section, cancelable
|
|
16
|
+
* to stay.
|
|
17
|
+
* @fires {CustomEvent<AssessmentRouteChangedDetail>} assessment-route-changed -
|
|
18
|
+
* When the current section changes.
|
|
19
|
+
* @fires {CustomEvent<{ type: "assessment-session-applied"; timestamp: number }>} assessment-session-applied -
|
|
20
|
+
* When hydration applies a persisted or assigned session.
|
|
21
|
+
* @fires {CustomEvent<{ type: "assessment-session-changed"; timestamp: number }>} assessment-session-changed -
|
|
22
|
+
* When navigation or a section snapshot changes the assessment session.
|
|
23
|
+
* @fires {CustomEvent<AssessmentProgressChangedDetail>} assessment-progress-changed -
|
|
24
|
+
* When the visited-section count changes.
|
|
25
|
+
* @fires {CustomEvent<AssessmentSubmissionStateChangedDetail>} assessment-submission-state-changed -
|
|
26
|
+
* When `submit()` records the submission state.
|
|
27
|
+
* @fires {CustomEvent<{ error: unknown }>} assessment-error - When the attempt
|
|
28
|
+
* fails to load, a ready hook rejects, or a section fails to load or restore.
|
|
29
|
+
*/
|
|
5
30
|
export declare class AssessmentPlayerDefaultElement extends HTMLElement implements AssessmentPlayerRuntimeHostContract {
|
|
6
31
|
static get observedAttributes(): string[];
|
|
7
32
|
private _assessmentId;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Layout scaffold for a host-composed assessment: host navigation above a body
|
|
3
|
+
* that fills the remaining height. The scaffold renders in an open shadow root
|
|
4
|
+
* and the host's children stay in its light DOM, where document styles reach
|
|
5
|
+
* them, projecting into the slots.
|
|
6
|
+
*
|
|
7
|
+
* @slot navigation - Assessment navigation above the body; not rendered while
|
|
8
|
+
* `show-navigation` is false.
|
|
9
|
+
* @slot - The body: the host's section player and any other assessment UI.
|
|
10
|
+
*/
|
|
1
11
|
export declare class AssessmentPlayerShellElement extends HTMLElement {
|
|
2
12
|
static get observedAttributes(): string[];
|
|
3
13
|
showNavigation: boolean | string | null | undefined;
|
|
14
|
+
constructor();
|
|
4
15
|
connectedCallback(): void;
|
|
5
16
|
attributeChangedCallback(name: string, _oldValue: string | null, value: string | null): void;
|
|
6
17
|
private render;
|
|
@@ -4,7 +4,6 @@ export type ResolveAssessmentSectionPlayerRuntimeArgs = {
|
|
|
4
4
|
sectionPlayerRuntime?: AssessmentPlayerRuntimeConfig["sectionPlayerRuntime"];
|
|
5
5
|
playerType: "iife" | "esm" | "preloaded";
|
|
6
6
|
assessmentId?: string;
|
|
7
|
-
attemptId?: string;
|
|
8
7
|
env?: Record<string, unknown> | null;
|
|
9
8
|
coordinator?: unknown;
|
|
10
9
|
};
|
|
@@ -197,6 +197,11 @@ export declare class AssessmentController implements AssessmentControllerHandle
|
|
|
197
197
|
private emit;
|
|
198
198
|
private assertActive;
|
|
199
199
|
private handleError;
|
|
200
|
+
/**
|
|
201
|
+
* Marks a live controller failed and reports through `onError` when a phase is
|
|
202
|
+
* given. A throwing hook is logged so the caller still rethrows the original.
|
|
203
|
+
*/
|
|
204
|
+
private reportFailure;
|
|
200
205
|
private getPersistenceStrategy;
|
|
201
206
|
private createDeliveryPlan;
|
|
202
207
|
private ensureSession;
|
|
@@ -306,20 +306,20 @@ var e = {
|
|
|
306
306
|
textToSpeech: {
|
|
307
307
|
name: "Voorlezen",
|
|
308
308
|
description: "Inhoud laten voorlezen",
|
|
309
|
+
initFailed: "Voorlezen kon niet worden gestart. Probeer het opnieuw.",
|
|
309
310
|
inline: {
|
|
310
311
|
controlsA11y: "Voorleesknoppen",
|
|
311
312
|
playbackSpeedA11y: "Voorleessnelheid",
|
|
312
313
|
rewindA11y: "Terugspoelen",
|
|
313
314
|
fastForwardA11y: "Vooruitspoelen",
|
|
314
315
|
stopA11y: "Voorlezen stoppen",
|
|
315
|
-
initializing: "Voorlezen wordt gestart",
|
|
316
|
-
initFailed: "Voorlezen kon niet worden gestart. Probeer het opnieuw.",
|
|
317
316
|
starting: "Voorlezen wordt gestart",
|
|
318
317
|
started: "Voorlezen gestart",
|
|
319
318
|
resumed: "Voorlezen hervat",
|
|
320
319
|
pausedAnnouncement: "Voorlezen gepauzeerd",
|
|
321
320
|
stopped: "Voorlezen gestopt",
|
|
322
321
|
switchedSection: "Het voorlezen is naar een ander onderdeel gegaan",
|
|
322
|
+
nothingToRead: "Hier is niets om voor te lezen",
|
|
323
323
|
startFailed: "Voorlezen kon niet worden gestart",
|
|
324
324
|
skippedForward: "Vooruitgespoeld",
|
|
325
325
|
skipForwardFailed: "Vooruitspoelen is niet gelukt",
|
|
@@ -399,6 +399,7 @@ var e = {
|
|
|
399
399
|
pnp: {
|
|
400
400
|
title: "PNP-profiel",
|
|
401
401
|
noAssessmentBound: "Geen toets gekoppeld",
|
|
402
|
+
noAssessmentBoundBody: "Profiel-, district- en afnamebeleid hebben niets om te lezen, dus alleen de requiredTools van een item kunnen een voorziening toekennen. Geef de toets door aan de assessment-eigenschap van de toolkit, of roep updateAssessment(...) aan op de toolkit-coordinator.",
|
|
402
403
|
determinationReadOnly: "Vaststelling (alleen lezen)",
|
|
403
404
|
toolsEditor: "Hulpmiddelen bewerken",
|
|
404
405
|
enforcement: "PNP-handhaving",
|
|
@@ -474,12 +475,39 @@ var e = {
|
|
|
474
475
|
previewEnterText: "Voer eerst voorbeeldtekst in.",
|
|
475
476
|
previewUnavailable: "Een voorbeeld is niet mogelijk zolang deze dienst niet beschikbaar is.",
|
|
476
477
|
browserSynthesisUnavailable: "Spraaksynthese van de browser is niet beschikbaar.",
|
|
477
|
-
browserSynthesisEndedEarly: "De spraaksynthese van de browser stopte voordat de audio begon. Start de browser opnieuw en probeer het nog eens.",
|
|
478
|
-
browserSynthesisQueueFailed: "De spraaksynthese van de browser kon het voorbeeldfragment niet in de wachtrij zetten.",
|
|
479
|
-
browserPreviewFailed: "Het voorbeeld van de browserstem kon niet worden afgespeeld.",
|
|
480
478
|
ssmlWordTrackingDisabled: "Bij een Google SSML-voorbeeld blijft de SSML uit de bron intact, waardoor woordmarkering is uitgeschakeld.",
|
|
481
479
|
applyUnavailable: "Instellingen toepassen is niet mogelijk zolang deze dienst niet beschikbaar is.",
|
|
482
|
-
coordinatorUnavailable: "De toolkitcoördinator is niet beschikbaar voor voorleesinstellingen."
|
|
480
|
+
coordinatorUnavailable: "De toolkitcoördinator is niet beschikbaar voor voorleesinstellingen.",
|
|
481
|
+
customProviderNotRegistered: "Aangepaste provider '{id}' is niet geregistreerd.",
|
|
482
|
+
customProviderNoConfig: "Aangepaste provider '{id}' gaf geen configuratie om toe te passen.",
|
|
483
|
+
httpError: "HTTP {status}: {message}",
|
|
484
|
+
unknownError: "Onbekende fout",
|
|
485
|
+
previewRequestFailed: "Het voorbeeldverzoek is mislukt ({status}).",
|
|
486
|
+
notAvailable: "n.v.t.",
|
|
487
|
+
voiceLocal: "lokaal",
|
|
488
|
+
voiceRemote: "extern",
|
|
489
|
+
voiceBrowserDefault: "browserstandaard",
|
|
490
|
+
browserAvailable: {
|
|
491
|
+
one: "Browserspraak beschikbaar ({count} stem gevonden).",
|
|
492
|
+
other: "Browserspraak beschikbaar ({count} stemmen gevonden)."
|
|
493
|
+
},
|
|
494
|
+
pollyAvailable: {
|
|
495
|
+
one: "AWS Polly beschikbaar ({count} passende stem, engine {engine}).",
|
|
496
|
+
other: "AWS Polly beschikbaar ({count} passende stemmen, engine {engine})."
|
|
497
|
+
},
|
|
498
|
+
googleAvailable: {
|
|
499
|
+
one: "Google Cloud TTS beschikbaar ({count} passende stem).",
|
|
500
|
+
other: "Google Cloud TTS beschikbaar ({count} passende stemmen)."
|
|
501
|
+
},
|
|
502
|
+
headerRowReservation: "Rij in de itemkop gereserveerd: {state}",
|
|
503
|
+
speedOptionsHelp: "Vermenigvuldigers, gescheiden door komma's of puntkomma's. Neem 1 op voor Normaal; laat leeg om de snelheidsknoppen te verbergen.",
|
|
504
|
+
usingSelectedVoice: "Gekozen stem: {voice}",
|
|
505
|
+
autoVoice: "Beste beschikbare stem (automatisch): {voice}",
|
|
506
|
+
autoVoiceWaiting: "Beste beschikbare stem (automatisch): wachten op de stemmen van de browser.",
|
|
507
|
+
previewHintBrowserSsml: "SSML wordt niet ondersteund in het browservoorbeeld.",
|
|
508
|
+
previewHintGoogleSsml: "SSML blijft intact. Markering uitgeschakeld.",
|
|
509
|
+
previewHintCustom: "Markering actief wanneer de provider spraakmarkeringen teruggeeft.",
|
|
510
|
+
previewHintTracking: "Markering actief tijdens het afspelen van het voorbeeld."
|
|
483
511
|
}
|
|
484
512
|
}
|
|
485
513
|
};
|