@qti-components/test 2.0.0-next.14 → 2.0.0-next.15

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.
Files changed (58) hide show
  1. package/dist/components/index.d.ts +0 -2
  2. package/dist/components/index.js +0 -2
  3. package/dist/components/index.js.map +1 -1
  4. package/dist/elements.d.ts +1 -63
  5. package/dist/elements.js +1 -5
  6. package/dist/elements.js.map +1 -1
  7. package/dist/plugin-api.d.ts +10 -0
  8. package/dist/plugin-api.js +9 -0
  9. package/dist/plugin-api.js.map +1 -0
  10. package/dist/plugins/elements.d.ts +5 -72
  11. package/dist/plugins/elements.js +6 -33
  12. package/dist/plugins/elements.js.map +1 -1
  13. package/dist/plugins/index.d.ts +1 -1
  14. package/dist/plugins/index.js +1 -1
  15. package/dist/plugins/index.js.map +1 -1
  16. package/package.json +5 -1
  17. package/dist/components/test-bookmark/test-bookmark.d.ts +0 -48
  18. package/dist/components/test-bookmark/test-bookmark.js +0 -132
  19. package/dist/components/test-bookmark/test-bookmark.js.map +0 -1
  20. package/dist/components/test-check-item/test-check-item.d.ts +0 -20
  21. package/dist/components/test-check-item/test-check-item.js +0 -35
  22. package/dist/components/test-check-item/test-check-item.js.map +0 -1
  23. package/dist/components/test-item-link/test-item-link.d.ts +0 -13
  24. package/dist/components/test-item-link/test-item-link.js +0 -28
  25. package/dist/components/test-item-link/test-item-link.js.map +0 -1
  26. package/dist/components/test-print-context/test-print-context.d.ts +0 -11
  27. package/dist/components/test-print-context/test-print-context.js +0 -20
  28. package/dist/components/test-print-context/test-print-context.js.map +0 -1
  29. package/dist/components/test-print-item-variables/test-print-item-variables.d.ts +0 -17
  30. package/dist/components/test-print-item-variables/test-print-item-variables.js +0 -95
  31. package/dist/components/test-print-item-variables/test-print-item-variables.js.map +0 -1
  32. package/dist/components/test-print-state/test-print-state.d.ts +0 -27
  33. package/dist/components/test-print-state/test-print-state.js +0 -87
  34. package/dist/components/test-print-state/test-print-state.js.map +0 -1
  35. package/dist/components/test-scoring-buttons/test-scoring-buttons.d.ts +0 -19
  36. package/dist/components/test-scoring-buttons/test-scoring-buttons.js +0 -95
  37. package/dist/components/test-scoring-buttons/test-scoring-buttons.js.map +0 -1
  38. package/dist/components/test-scoring-feedback/test-scoring-feedback.d.ts +0 -13
  39. package/dist/components/test-scoring-feedback/test-scoring-feedback.js +0 -54
  40. package/dist/components/test-scoring-feedback/test-scoring-feedback.js.map +0 -1
  41. package/dist/components/test-section-link/test-section-link.d.ts +0 -13
  42. package/dist/components/test-section-link/test-section-link.js +0 -28
  43. package/dist/components/test-section-link/test-section-link.js.map +0 -1
  44. package/dist/components/test-stamp/test-stamp.d.ts +0 -29
  45. package/dist/components/test-stamp/test-stamp.js +0 -105
  46. package/dist/components/test-stamp/test-stamp.js.map +0 -1
  47. package/dist/components/test-view-toggle/test-view-toggle.d.ts +0 -16
  48. package/dist/components/test-view-toggle/test-view-toggle.js +0 -49
  49. package/dist/components/test-view-toggle/test-view-toggle.js.map +0 -1
  50. package/dist/components/test-view-toggle/test-view.d.ts +0 -20
  51. package/dist/components/test-view-toggle/test-view.js +0 -73
  52. package/dist/components/test-view-toggle/test-view.js.map +0 -1
  53. package/dist/tts/elements.d.ts +0 -28
  54. package/dist/tts/elements.js +0 -14
  55. package/dist/tts/elements.js.map +0 -1
  56. package/dist/tts/test-item-to-speech.d.ts +0 -260
  57. package/dist/tts/test-item-to-speech.js +0 -1079
  58. package/dist/tts/test-item-to-speech.js.map +0 -1
@@ -14,7 +14,5 @@ export * from '../components/qti-item-session-control/qti-item-session-control';
14
14
  export * from './test-navigation/test-navigation';
15
15
  export * from './test-next/test-next';
16
16
  export * from './test-prev/test-prev';
17
- export * from './test-item-link/test-item-link';
18
17
  export * from './test-end-attempt/test-end-attempt';
19
18
  export * from './test-container/test-container';
20
- export * from './test-section-link/test-section-link';
@@ -15,8 +15,6 @@ export * from '../components/qti-item-session-control/qti-item-session-control';
15
15
  export * from './test-navigation/test-navigation';
16
16
  export * from './test-next/test-next';
17
17
  export * from './test-prev/test-prev';
18
- export * from './test-item-link/test-item-link';
19
18
  export * from './test-end-attempt/test-end-attempt';
20
19
  export * from './test-container/test-container';
21
- export * from './test-section-link/test-section-link';
22
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,cAAc,iCAAiC,CAAC;AAChD,cAAc,+DAA+D,CAAC;AAC9E,cAAc,6DAA6D,CAAC;AAC5E,cAAc,uDAAuD,CAAC;AACtE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mDAAmD,CAAC;AAClE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,qDAAqD,CAAC;AACpE,cAAc,uDAAuD,CAAC;AACtE,cAAc,yDAAyD,CAAC;AACxE,cAAc,mDAAmD,CAAC;AAClE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iEAAiE,CAAC;AAEhF,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC","sourcesContent":["/* test functionality webcomponents which are tested and can be used in your project */\nexport * from '../components/qti-test/qti-test';\nexport * from '../components/qti-assessment-item-ref/qti-assessment-item-ref';\nexport * from '../components/qti-assessment-section/qti-assessment-section';\nexport * from '../components/qti-assessment-test/qti-assessment-test';\nexport * from '../components/qti-test-part/qti-test-part';\nexport * from '../components/qti-test-feedback/qti-test-feedback';\nexport * from '../components/qti-outcome-processing/qti-outcome-processing';\nexport * from '../components/qti-test-variables/qti-test-variables';\nexport * from '../components/qti-number-selected/qti-number-selected';\nexport * from '../components/qti-number-presented/qti-number-presented';\nexport * from '../components/qti-pre-condition/qti-pre-condition';\nexport * from '../components/qti-branch-rule/qti-branch-rule';\nexport * from '../components/qti-item-session-control/qti-item-session-control';\n\nexport * from './test-navigation/test-navigation';\nexport * from './test-next/test-next';\nexport * from './test-prev/test-prev';\nexport * from './test-item-link/test-item-link';\nexport * from './test-end-attempt/test-end-attempt';\nexport * from './test-container/test-container';\nexport * from './test-section-link/test-section-link';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,cAAc,iCAAiC,CAAC;AAChD,cAAc,+DAA+D,CAAC;AAC9E,cAAc,6DAA6D,CAAC;AAC5E,cAAc,uDAAuD,CAAC;AACtE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mDAAmD,CAAC;AAClE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,qDAAqD,CAAC;AACpE,cAAc,uDAAuD,CAAC;AACtE,cAAc,yDAAyD,CAAC;AACxE,cAAc,mDAAmD,CAAC;AAClE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iEAAiE,CAAC;AAEhF,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC","sourcesContent":["/* test functionality webcomponents which are tested and can be used in your project */\nexport * from '../components/qti-test/qti-test';\nexport * from '../components/qti-assessment-item-ref/qti-assessment-item-ref';\nexport * from '../components/qti-assessment-section/qti-assessment-section';\nexport * from '../components/qti-assessment-test/qti-assessment-test';\nexport * from '../components/qti-test-part/qti-test-part';\nexport * from '../components/qti-test-feedback/qti-test-feedback';\nexport * from '../components/qti-outcome-processing/qti-outcome-processing';\nexport * from '../components/qti-test-variables/qti-test-variables';\nexport * from '../components/qti-number-selected/qti-number-selected';\nexport * from '../components/qti-number-presented/qti-number-presented';\nexport * from '../components/qti-pre-condition/qti-pre-condition';\nexport * from '../components/qti-branch-rule/qti-branch-rule';\nexport * from '../components/qti-item-session-control/qti-item-session-control';\n\nexport * from './test-navigation/test-navigation';\nexport * from './test-next/test-next';\nexport * from './test-prev/test-prev';\nexport * from './test-end-attempt/test-end-attempt';\nexport * from './test-container/test-container';\n"]}
@@ -13,13 +13,11 @@ import { QtiTestVariables } from './components/qti-test-variables/qti-test-varia
13
13
  import { QtiTest } from './components/qti-test/qti-test';
14
14
  import { TestContainer } from './components/test-container/test-container';
15
15
  import { TestEndAttempt } from './components/test-end-attempt/test-end-attempt';
16
- import { TestItemLink } from './components/test-item-link/test-item-link';
17
16
  import { TestNavigation } from './components/test-navigation/test-navigation';
18
17
  import { TestNext } from './components/test-next/test-next';
19
18
  import { TestPrev } from './components/test-prev/test-prev';
20
- import { TestSectionLink } from './components/test-section-link/test-section-link';
21
19
  export * from './plugins/elements';
22
- export { QtiAssessmentItemRef, QtiAssessmentSection, QtiAssessmentTest, QtiBranchRule, QtiItemSessionControl, QtiNumberPresented, QtiNumberSelected, QtiOutcomeProcessing, QtiPreCondition, QtiTest, QtiTestFeedback, QtiTestPart, QtiTestVariables, TestContainer, TestEndAttempt, TestItemLink, TestNavigation, TestNext, TestPrev, TestSectionLink };
20
+ export { QtiAssessmentItemRef, QtiAssessmentSection, QtiAssessmentTest, QtiBranchRule, QtiItemSessionControl, QtiNumberPresented, QtiNumberSelected, QtiOutcomeProcessing, QtiPreCondition, QtiTest, QtiTestFeedback, QtiTestPart, QtiTestVariables, TestContainer, TestEndAttempt, TestNavigation, TestNext, TestPrev };
23
21
  export declare const qtiTestElements: readonly [{
24
22
  readonly tag: "qti-assessment-item-ref";
25
23
  readonly ctor: typeof QtiAssessmentItemRef;
@@ -65,9 +63,6 @@ export declare const qtiTestElements: readonly [{
65
63
  }, {
66
64
  readonly tag: "test-end-attempt";
67
65
  readonly ctor: typeof TestEndAttempt;
68
- }, {
69
- readonly tag: "test-item-link";
70
- readonly ctor: typeof TestItemLink;
71
66
  }, {
72
67
  readonly tag: "test-navigation";
73
68
  readonly ctor: typeof TestNavigation;
@@ -77,64 +72,7 @@ export declare const qtiTestElements: readonly [{
77
72
  }, {
78
73
  readonly tag: "test-prev";
79
74
  readonly ctor: typeof TestPrev;
80
- }, {
81
- readonly tag: "test-section-link";
82
- readonly ctor: typeof TestSectionLink;
83
- }, {
84
- readonly tag: "test-check-item";
85
- readonly ctor: typeof import("./elements").TestCheckItem;
86
- }, {
87
- readonly tag: "test-bookmark";
88
- readonly ctor: typeof import("./elements").TestBookmark;
89
- }, {
90
- readonly tag: "test-print-context";
91
- readonly ctor: typeof import("./elements").TestPrintContext;
92
- }, {
93
- readonly tag: "test-print-item-variables";
94
- readonly ctor: typeof import("./elements").TestPrintVariables;
95
- }, {
96
- readonly tag: "test-print-state";
97
- readonly ctor: typeof import("./elements").TestPrintState;
98
- }, {
99
- readonly tag: "test-scoring-buttons";
100
- readonly ctor: typeof import("./elements").TestScoringButtons;
101
- }, {
102
- readonly tag: "test-scoring-feedback";
103
- readonly ctor: typeof import("./elements").TestScoringFeedback;
104
- }, {
105
- readonly tag: "test-stamp";
106
- readonly ctor: typeof import("./elements").TestStamp;
107
75
  }, {
108
76
  readonly tag: "test-submit";
109
77
  readonly ctor: typeof import("./elements").TestSubmit;
110
- }, {
111
- readonly tag: "test-view";
112
- readonly ctor: typeof import("./elements").TestView;
113
- }, {
114
- readonly tag: "test-view-toggle";
115
- readonly ctor: typeof import("./elements").TestViewToggle;
116
- }, {
117
- readonly tag: "test-item-to-speech";
118
- readonly ctor: typeof import("./elements").TestItemToSpeech;
119
- }, {
120
- readonly tag: "test-tts-next";
121
- readonly ctor: typeof import("./elements").TestTtsNext;
122
- }, {
123
- readonly tag: "test-tts-pause";
124
- readonly ctor: typeof import("./elements").TestTtsPause;
125
- }, {
126
- readonly tag: "test-tts-pick";
127
- readonly ctor: typeof import("./elements").TestTtsPick;
128
- }, {
129
- readonly tag: "test-tts-play";
130
- readonly ctor: typeof import("./elements").TestTtsPlay;
131
- }, {
132
- readonly tag: "test-tts-prev";
133
- readonly ctor: typeof import("./elements").TestTtsPrev;
134
- }, {
135
- readonly tag: "test-tts-resume";
136
- readonly ctor: typeof import("./elements").TestTtsResume;
137
- }, {
138
- readonly tag: "test-tts-stop";
139
- readonly ctor: typeof import("./elements").TestTtsStop;
140
78
  }];
package/dist/elements.js CHANGED
@@ -13,14 +13,12 @@ import { QtiTestVariables } from './components/qti-test-variables/qti-test-varia
13
13
  import { QtiTest } from './components/qti-test/qti-test';
14
14
  import { TestContainer } from './components/test-container/test-container';
15
15
  import { TestEndAttempt } from './components/test-end-attempt/test-end-attempt';
16
- import { TestItemLink } from './components/test-item-link/test-item-link';
17
16
  import { TestNavigation } from './components/test-navigation/test-navigation';
18
17
  import { TestNext } from './components/test-next/test-next';
19
18
  import { TestPrev } from './components/test-prev/test-prev';
20
- import { TestSectionLink } from './components/test-section-link/test-section-link';
21
19
  import { pluginElements } from './plugins/elements';
22
20
  export * from './plugins/elements';
23
- export { QtiAssessmentItemRef, QtiAssessmentSection, QtiAssessmentTest, QtiBranchRule, QtiItemSessionControl, QtiNumberPresented, QtiNumberSelected, QtiOutcomeProcessing, QtiPreCondition, QtiTest, QtiTestFeedback, QtiTestPart, QtiTestVariables, TestContainer, TestEndAttempt, TestItemLink, TestNavigation, TestNext, TestPrev, TestSectionLink };
21
+ export { QtiAssessmentItemRef, QtiAssessmentSection, QtiAssessmentTest, QtiBranchRule, QtiItemSessionControl, QtiNumberPresented, QtiNumberSelected, QtiOutcomeProcessing, QtiPreCondition, QtiTest, QtiTestFeedback, QtiTestPart, QtiTestVariables, TestContainer, TestEndAttempt, TestNavigation, TestNext, TestPrev };
24
22
  export const qtiTestElements = [
25
23
  { tag: 'qti-assessment-item-ref', ctor: QtiAssessmentItemRef },
26
24
  { tag: 'qti-assessment-section', ctor: QtiAssessmentSection },
@@ -37,11 +35,9 @@ export const qtiTestElements = [
37
35
  { tag: 'qti-test-variables', ctor: QtiTestVariables },
38
36
  { tag: 'test-container', ctor: TestContainer },
39
37
  { tag: 'test-end-attempt', ctor: TestEndAttempt },
40
- { tag: 'test-item-link', ctor: TestItemLink },
41
38
  { tag: 'test-navigation', ctor: TestNavigation },
42
39
  { tag: 'test-next', ctor: TestNext },
43
40
  { tag: 'test-prev', ctor: TestPrev },
44
- { tag: 'test-section-link', ctor: TestSectionLink },
45
41
  ...pluginElements
46
42
  ];
47
43
  //# sourceMappingURL=elements.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"elements.js","sourceRoot":"","sources":["../src/elements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAC;AACpG,OAAO,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sDAAsD,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,gEAAgE,CAAC;AACvG,OAAO,EAAE,kBAAkB,EAAE,MAAM,wDAAwD,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,sDAAsD,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;AAClG,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAA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,WAAW,EAAE;IAC3C,EAAE,GAAG,EAAE,oBAAoB,EAAE,IAAI,EAAE,gBAAgB,EAAE;IACrD,EAAE,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,EAAE;IAC9C,EAAE,GAAG,EAAE,kBAAkB,EAAE,IAAI,EAAE,cAAc,EAAE;IACjD,EAAE,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,YAAY,EAAE;IAC7C,EAAE,GAAG,EAAE,iBAAiB,EAAE,IAAI,EAAE,cAAc,EAAE;IAChD,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE;IACpC,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE;IACpC,EAAE,GAAG,EAAE,mBAAmB,EAAE,IAAI,EAAE,eAAe,EAAE;IACnD,GAAG,cAAc;CACT,CAAC","sourcesContent":["import { QtiAssessmentItemRef } from './components/qti-assessment-item-ref/qti-assessment-item-ref';\nimport { QtiAssessmentSection } from './components/qti-assessment-section/qti-assessment-section';\nimport { QtiAssessmentTest } from './components/qti-assessment-test/qti-assessment-test';\nimport { QtiBranchRule } from './components/qti-branch-rule/qti-branch-rule';\nimport { QtiItemSessionControl } from './components/qti-item-session-control/qti-item-session-control';\nimport { QtiNumberPresented } from './components/qti-number-presented/qti-number-presented';\nimport { QtiNumberSelected } from './components/qti-number-selected/qti-number-selected';\nimport { QtiPreCondition } from './components/qti-pre-condition/qti-pre-condition';\nimport { QtiOutcomeProcessing } from './components/qti-outcome-processing/qti-outcome-processing';\nimport { QtiTestFeedback } from './components/qti-test-feedback/qti-test-feedback';\nimport { QtiTestPart } from './components/qti-test-part/qti-test-part';\nimport { QtiTestVariables } from './components/qti-test-variables/qti-test-variables';\nimport { QtiTest } from './components/qti-test/qti-test';\nimport { TestContainer } from './components/test-container/test-container';\nimport { TestEndAttempt } from './components/test-end-attempt/test-end-attempt';\nimport { TestItemLink } from './components/test-item-link/test-item-link';\nimport { TestNavigation } from './components/test-navigation/test-navigation';\nimport { TestNext } from './components/test-next/test-next';\nimport { TestPrev } from './components/test-prev/test-prev';\nimport { TestSectionLink } from './components/test-section-link/test-section-link';\nimport { pluginElements } from './plugins/elements';\n\nexport * from './plugins/elements';\n\nexport {\n QtiAssessmentItemRef,\n QtiAssessmentSection,\n QtiAssessmentTest,\n QtiBranchRule,\n QtiItemSessionControl,\n QtiNumberPresented,\n QtiNumberSelected,\n QtiOutcomeProcessing,\n QtiPreCondition,\n QtiTest,\n QtiTestFeedback,\n QtiTestPart,\n QtiTestVariables,\n TestContainer,\n TestEndAttempt,\n TestItemLink,\n TestNavigation,\n TestNext,\n TestPrev,\n TestSectionLink\n};\n\nexport const qtiTestElements = [\n { tag: 'qti-assessment-item-ref', ctor: QtiAssessmentItemRef },\n { tag: 'qti-assessment-section', ctor: QtiAssessmentSection },\n { tag: 'qti-assessment-test', ctor: QtiAssessmentTest },\n { tag: 'qti-branch-rule', ctor: QtiBranchRule },\n { tag: 'qti-item-session-control', ctor: QtiItemSessionControl },\n { tag: 'qti-number-presented', ctor: QtiNumberPresented },\n { tag: 'qti-number-selected', ctor: QtiNumberSelected },\n { tag: 'qti-outcome-processing', ctor: QtiOutcomeProcessing },\n { tag: 'qti-pre-condition', ctor: QtiPreCondition },\n { tag: 'qti-test', ctor: QtiTest },\n { tag: 'qti-test-feedback', ctor: QtiTestFeedback },\n { tag: 'qti-test-part', ctor: QtiTestPart },\n { tag: 'qti-test-variables', ctor: QtiTestVariables },\n { tag: 'test-container', ctor: TestContainer },\n { tag: 'test-end-attempt', ctor: TestEndAttempt },\n { tag: 'test-item-link', ctor: TestItemLink },\n { tag: 'test-navigation', ctor: TestNavigation },\n { tag: 'test-next', ctor: TestNext },\n { tag: 'test-prev', ctor: TestPrev },\n { tag: 'test-section-link', ctor: TestSectionLink },\n ...pluginElements\n] as const;\n"]}
1
+ {"version":3,"file":"elements.js","sourceRoot":"","sources":["../src/elements.ts"],"names":[],"mappings":"AAAA,OA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CAAC","sourcesContent":["import { QtiAssessmentItemRef } from './components/qti-assessment-item-ref/qti-assessment-item-ref';\nimport { QtiAssessmentSection } from './components/qti-assessment-section/qti-assessment-section';\nimport { QtiAssessmentTest } from './components/qti-assessment-test/qti-assessment-test';\nimport { QtiBranchRule } from './components/qti-branch-rule/qti-branch-rule';\nimport { QtiItemSessionControl } from './components/qti-item-session-control/qti-item-session-control';\nimport { QtiNumberPresented } from './components/qti-number-presented/qti-number-presented';\nimport { QtiNumberSelected } from './components/qti-number-selected/qti-number-selected';\nimport { QtiPreCondition } from './components/qti-pre-condition/qti-pre-condition';\nimport { QtiOutcomeProcessing } from './components/qti-outcome-processing/qti-outcome-processing';\nimport { QtiTestFeedback } from './components/qti-test-feedback/qti-test-feedback';\nimport { QtiTestPart } from './components/qti-test-part/qti-test-part';\nimport { QtiTestVariables } from './components/qti-test-variables/qti-test-variables';\nimport { QtiTest } from './components/qti-test/qti-test';\nimport { TestContainer } from './components/test-container/test-container';\nimport { TestEndAttempt } from './components/test-end-attempt/test-end-attempt';\nimport { TestNavigation } from './components/test-navigation/test-navigation';\nimport { TestNext } from './components/test-next/test-next';\nimport { TestPrev } from './components/test-prev/test-prev';\nimport { pluginElements } from './plugins/elements';\n\nexport * from './plugins/elements';\n\nexport {\n QtiAssessmentItemRef,\n QtiAssessmentSection,\n QtiAssessmentTest,\n QtiBranchRule,\n QtiItemSessionControl,\n QtiNumberPresented,\n QtiNumberSelected,\n QtiOutcomeProcessing,\n QtiPreCondition,\n QtiTest,\n QtiTestFeedback,\n QtiTestPart,\n QtiTestVariables,\n TestContainer,\n TestEndAttempt,\n TestNavigation,\n TestNext,\n TestPrev\n};\n\nexport const qtiTestElements = [\n { tag: 'qti-assessment-item-ref', ctor: QtiAssessmentItemRef },\n { tag: 'qti-assessment-section', ctor: QtiAssessmentSection },\n { tag: 'qti-assessment-test', ctor: QtiAssessmentTest },\n { tag: 'qti-branch-rule', ctor: QtiBranchRule },\n { tag: 'qti-item-session-control', ctor: QtiItemSessionControl },\n { tag: 'qti-number-presented', ctor: QtiNumberPresented },\n { tag: 'qti-number-selected', ctor: QtiNumberSelected },\n { tag: 'qti-outcome-processing', ctor: QtiOutcomeProcessing },\n { tag: 'qti-pre-condition', ctor: QtiPreCondition },\n { tag: 'qti-test', ctor: QtiTest },\n { tag: 'qti-test-feedback', ctor: QtiTestFeedback },\n { tag: 'qti-test-part', ctor: QtiTestPart },\n { tag: 'qti-test-variables', ctor: QtiTestVariables },\n { tag: 'test-container', ctor: TestContainer },\n { tag: 'test-end-attempt', ctor: TestEndAttempt },\n { tag: 'test-navigation', ctor: TestNavigation },\n { tag: 'test-next', ctor: TestNext },\n { tag: 'test-prev', ctor: TestPrev },\n ...pluginElements\n] as const;\n"]}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * What a plugin in another package builds on, with no registration side effect: the public events
3
+ * and their helpers, the typed read of plugin state, the state types, and the look of the test
4
+ * controls. `@qti-components/extended` is the consumer; a plugin of your own may use it too.
5
+ */
6
+ export { dispatchPublic, listenPublic, PUBLIC_EVENTS } from './public-events.js';
7
+ export type { NavigationFailure, NavigationTarget, PublicEventMap, PublicEventName } from './public-events.js';
8
+ export { pluginState } from './plugin-state.js';
9
+ export type { QtiTestPluginState, QtiTestState } from './types/qti-test-state.js';
10
+ export * as controlStyles from './components/styles.js';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * What a plugin in another package builds on, with no registration side effect: the public events
3
+ * and their helpers, the typed read of plugin state, the state types, and the look of the test
4
+ * controls. `@qti-components/extended` is the consumer; a plugin of your own may use it too.
5
+ */
6
+ export { dispatchPublic, listenPublic, PUBLIC_EVENTS } from './public-events.js';
7
+ export { pluginState } from './plugin-state.js';
8
+ export * as controlStyles from './components/styles.js';
9
+ //# sourceMappingURL=plugin-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-api.js","sourceRoot":"","sources":["../src/plugin-api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEjF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,aAAa,MAAM,wBAAwB,CAAC","sourcesContent":["/**\n * What a plugin in another package builds on, with no registration side effect: the public events\n * and their helpers, the typed read of plugin state, the state types, and the look of the test\n * controls. `@qti-components/extended` is the consumer; a plugin of your own may use it too.\n */\nexport { dispatchPublic, listenPublic, PUBLIC_EVENTS } from './public-events.js';\nexport type { NavigationFailure, NavigationTarget, PublicEventMap, PublicEventName } from './public-events.js';\nexport { pluginState } from './plugin-state.js';\nexport type { QtiTestPluginState, QtiTestState } from './types/qti-test-state.js';\nexport * as controlStyles from './components/styles.js';\n"]}
@@ -1,79 +1,12 @@
1
- import { TestBookmark } from '../components/test-bookmark/test-bookmark';
2
- import { TestCheckItem } from '../components/test-check-item/test-check-item';
3
- import { TestPrintContext } from '../components/test-print-context/test-print-context';
4
- import { TestPrintVariables } from '../components/test-print-item-variables/test-print-item-variables';
5
- import { TestPrintState } from '../components/test-print-state/test-print-state';
6
- import { TestScoringButtons } from '../components/test-scoring-buttons/test-scoring-buttons';
7
- import { TestScoringFeedback } from '../components/test-scoring-feedback/test-scoring-feedback';
8
- import { TestStamp } from '../components/test-stamp/test-stamp';
9
1
  import { TestSubmit } from '../components/test-submit/test-submit';
10
- import { TestView } from '../components/test-view-toggle/test-view';
11
- import { TestViewToggle } from '../components/test-view-toggle/test-view-toggle';
12
- export * from '../tts/elements';
13
- export { bookmarkedItems } from '../components/test-bookmark/test-bookmark';
14
- export { TestCheckItem, TestBookmark, TestPrintContext, TestPrintVariables, TestPrintState, TestScoringButtons, TestScoringFeedback, TestStamp, TestSubmit, TestView, TestViewToggle };
2
+ export { TestSubmit };
15
3
  /**
16
- * Every test plugin's elements in one list. `qti-test` registers them with the rest of its
17
- * elements, and a scoped registry can use the list directly. Defines nothing.
18
- *
19
- * A plugin is the set of files listed for it in `plugin-boundary.spec.ts` (`PLUGINS`); this file is
20
- * the one place that names them all.
4
+ * The plugins' `{ tag, ctor }` pairs, so a scoped registry (an item-ref template is stamped into
5
+ * `test-container`'s shadow root) can define them with the rest. `elements.ts` spreads these into
6
+ * `qtiTestElements`; this is the one place that composes the plugins. The other plugins are in
7
+ * `@qti-components/extended`.
21
8
  */
22
9
  export declare const pluginElements: readonly [{
23
- readonly tag: "test-check-item";
24
- readonly ctor: typeof TestCheckItem;
25
- }, {
26
- readonly tag: "test-bookmark";
27
- readonly ctor: typeof TestBookmark;
28
- }, {
29
- readonly tag: "test-print-context";
30
- readonly ctor: typeof TestPrintContext;
31
- }, {
32
- readonly tag: "test-print-item-variables";
33
- readonly ctor: typeof TestPrintVariables;
34
- }, {
35
- readonly tag: "test-print-state";
36
- readonly ctor: typeof TestPrintState;
37
- }, {
38
- readonly tag: "test-scoring-buttons";
39
- readonly ctor: typeof TestScoringButtons;
40
- }, {
41
- readonly tag: "test-scoring-feedback";
42
- readonly ctor: typeof TestScoringFeedback;
43
- }, {
44
- readonly tag: "test-stamp";
45
- readonly ctor: typeof TestStamp;
46
- }, {
47
10
  readonly tag: "test-submit";
48
11
  readonly ctor: typeof TestSubmit;
49
- }, {
50
- readonly tag: "test-view";
51
- readonly ctor: typeof TestView;
52
- }, {
53
- readonly tag: "test-view-toggle";
54
- readonly ctor: typeof TestViewToggle;
55
- }, {
56
- readonly tag: "test-item-to-speech";
57
- readonly ctor: typeof import("./elements").TestItemToSpeech;
58
- }, {
59
- readonly tag: "test-tts-next";
60
- readonly ctor: typeof import("./elements").TestTtsNext;
61
- }, {
62
- readonly tag: "test-tts-pause";
63
- readonly ctor: typeof import("./elements").TestTtsPause;
64
- }, {
65
- readonly tag: "test-tts-pick";
66
- readonly ctor: typeof import("./elements").TestTtsPick;
67
- }, {
68
- readonly tag: "test-tts-play";
69
- readonly ctor: typeof import("./elements").TestTtsPlay;
70
- }, {
71
- readonly tag: "test-tts-prev";
72
- readonly ctor: typeof import("./elements").TestTtsPrev;
73
- }, {
74
- readonly tag: "test-tts-resume";
75
- readonly ctor: typeof import("./elements").TestTtsResume;
76
- }, {
77
- readonly tag: "test-tts-stop";
78
- readonly ctor: typeof import("./elements").TestTtsStop;
79
12
  }];
@@ -1,37 +1,10 @@
1
- import { TestBookmark } from '../components/test-bookmark/test-bookmark';
2
- import { TestCheckItem } from '../components/test-check-item/test-check-item';
3
- import { TestPrintContext } from '../components/test-print-context/test-print-context';
4
- import { TestPrintVariables } from '../components/test-print-item-variables/test-print-item-variables';
5
- import { TestPrintState } from '../components/test-print-state/test-print-state';
6
- import { TestScoringButtons } from '../components/test-scoring-buttons/test-scoring-buttons';
7
- import { TestScoringFeedback } from '../components/test-scoring-feedback/test-scoring-feedback';
8
- import { TestStamp } from '../components/test-stamp/test-stamp';
9
1
  import { TestSubmit } from '../components/test-submit/test-submit';
10
- import { TestView } from '../components/test-view-toggle/test-view';
11
- import { TestViewToggle } from '../components/test-view-toggle/test-view-toggle';
12
- import { ttsElements } from '../tts/elements';
13
- export * from '../tts/elements';
14
- export { bookmarkedItems } from '../components/test-bookmark/test-bookmark';
15
- export { TestCheckItem, TestBookmark, TestPrintContext, TestPrintVariables, TestPrintState, TestScoringButtons, TestScoringFeedback, TestStamp, TestSubmit, TestView, TestViewToggle };
2
+ export { TestSubmit };
16
3
  /**
17
- * Every test plugin's elements in one list. `qti-test` registers them with the rest of its
18
- * elements, and a scoped registry can use the list directly. Defines nothing.
19
- *
20
- * A plugin is the set of files listed for it in `plugin-boundary.spec.ts` (`PLUGINS`); this file is
21
- * the one place that names them all.
4
+ * The plugins' `{ tag, ctor }` pairs, so a scoped registry (an item-ref template is stamped into
5
+ * `test-container`'s shadow root) can define them with the rest. `elements.ts` spreads these into
6
+ * `qtiTestElements`; this is the one place that composes the plugins. The other plugins are in
7
+ * `@qti-components/extended`.
22
8
  */
23
- export const pluginElements = [
24
- { tag: 'test-check-item', ctor: TestCheckItem },
25
- { tag: 'test-bookmark', ctor: TestBookmark },
26
- { tag: 'test-print-context', ctor: TestPrintContext },
27
- { tag: 'test-print-item-variables', ctor: TestPrintVariables },
28
- { tag: 'test-print-state', ctor: TestPrintState },
29
- { tag: 'test-scoring-buttons', ctor: TestScoringButtons },
30
- { tag: 'test-scoring-feedback', ctor: TestScoringFeedback },
31
- { tag: 'test-stamp', ctor: TestStamp },
32
- { tag: 'test-submit', ctor: TestSubmit },
33
- { tag: 'test-view', ctor: TestView },
34
- { tag: 'test-view-toggle', ctor: TestViewToggle },
35
- ...ttsElements
36
- ];
9
+ export const pluginElements = [{ tag: 'test-submit', ctor: TestSubmit }];
37
10
  //# sourceMappingURL=elements.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"elements.js","sourceRoot":"","sources":["../../src/plugins/elements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,mEAAmE,CAAC;AACvG,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yDAAyD,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAE5E,OAAO,EACL,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,SAAS,EACT,UAAU,EACV,QAAQ,EACR,cAAc,EACf,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,EAAE,GAAG,EAAE,iBAAiB,EAAE,IAAI,EAAE,aAAa,EAAE;IAC/C,EAAE,GAAG,EAAE,eAAe,EAAE,IAAI,EAAE,YAAY,EAAE;IAC5C,EAAE,GAAG,EAAE,oBAAoB,EAAE,IAAI,EAAE,gBAAgB,EAAE;IACrD,EAAE,GAAG,EAAE,2BAA2B,EAAE,IAAI,EAAE,kBAAkB,EAAE;IAC9D,EAAE,GAAG,EAAE,kBAAkB,EAAE,IAAI,EAAE,cAAc,EAAE;IACjD,EAAE,GAAG,EAAE,sBAAsB,EAAE,IAAI,EAAE,kBAAkB,EAAE;IACzD,EAAE,GAAG,EAAE,uBAAuB,EAAE,IAAI,EAAE,mBAAmB,EAAE;IAC3D,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE;IACtC,EAAE,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,EAAE;IACxC,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE;IACpC,EAAE,GAAG,EAAE,kBAAkB,EAAE,IAAI,EAAE,cAAc,EAAE;IACjD,GAAG,WAAW;CACN,CAAC","sourcesContent":["import { TestBookmark } from '../components/test-bookmark/test-bookmark';\nimport { TestCheckItem } from '../components/test-check-item/test-check-item';\nimport { TestPrintContext } from '../components/test-print-context/test-print-context';\nimport { TestPrintVariables } from '../components/test-print-item-variables/test-print-item-variables';\nimport { TestPrintState } from '../components/test-print-state/test-print-state';\nimport { TestScoringButtons } from '../components/test-scoring-buttons/test-scoring-buttons';\nimport { TestScoringFeedback } from '../components/test-scoring-feedback/test-scoring-feedback';\nimport { TestStamp } from '../components/test-stamp/test-stamp';\nimport { TestSubmit } from '../components/test-submit/test-submit';\nimport { TestView } from '../components/test-view-toggle/test-view';\nimport { TestViewToggle } from '../components/test-view-toggle/test-view-toggle';\nimport { ttsElements } from '../tts/elements';\n\nexport * from '../tts/elements';\n\nexport { bookmarkedItems } from '../components/test-bookmark/test-bookmark';\n\nexport {\n TestCheckItem,\n TestBookmark,\n TestPrintContext,\n TestPrintVariables,\n TestPrintState,\n TestScoringButtons,\n TestScoringFeedback,\n TestStamp,\n TestSubmit,\n TestView,\n TestViewToggle\n};\n\n/**\n * Every test plugin's elements in one list. `qti-test` registers them with the rest of its\n * elements, and a scoped registry can use the list directly. Defines nothing.\n *\n * A plugin is the set of files listed for it in `plugin-boundary.spec.ts` (`PLUGINS`); this file is\n * the one place that names them all.\n */\nexport const pluginElements = [\n { tag: 'test-check-item', ctor: TestCheckItem },\n { tag: 'test-bookmark', ctor: TestBookmark },\n { tag: 'test-print-context', ctor: TestPrintContext },\n { tag: 'test-print-item-variables', ctor: TestPrintVariables },\n { tag: 'test-print-state', ctor: TestPrintState },\n { tag: 'test-scoring-buttons', ctor: TestScoringButtons },\n { tag: 'test-scoring-feedback', ctor: TestScoringFeedback },\n { tag: 'test-stamp', ctor: TestStamp },\n { tag: 'test-submit', ctor: TestSubmit },\n { tag: 'test-view', ctor: TestView },\n { tag: 'test-view-toggle', ctor: TestViewToggle },\n ...ttsElements\n] as const;\n"]}
1
+ {"version":3,"file":"elements.js","sourceRoot":"","sources":["../../src/plugins/elements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,EAAE,CAAU,CAAC","sourcesContent":["import { TestSubmit } from '../components/test-submit/test-submit';\n\nexport { TestSubmit };\n\n/**\n * The plugins' `{ tag, ctor }` pairs, so a scoped registry (an item-ref template is stamped into\n * `test-container`'s shadow root) can define them with the rest. `elements.ts` spreads these into\n * `qtiTestElements`; this is the one place that composes the plugins. The other plugins are in\n * `@qti-components/extended`.\n */\nexport const pluginElements = [{ tag: 'test-submit', ctor: TestSubmit }] as const;\n"]}
@@ -1,2 +1,2 @@
1
- /** The test plugins: print, scoring, stamp, text-to-speech and view. The core composes them here and nowhere else. */
1
+ /** The test plugins: submit. The core composes them here and nowhere else. */
2
2
  export * from './elements.js';
@@ -1,3 +1,3 @@
1
- /** The test plugins: print, scoring, stamp, text-to-speech and view. The core composes them here and nowhere else. */
1
+ /** The test plugins: submit. The core composes them here and nowhere else. */
2
2
  export * from './elements.js';
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,cAAc,eAAe,CAAC","sourcesContent":["/** The test plugins: print, scoring, stamp, text-to-speech and view. The core composes them here and nowhere else. */\nexport * from './elements.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,cAAc,eAAe,CAAC","sourcesContent":["/** The test plugins: submit. The core composes them here and nowhere else. */\nexport * from './elements.js';\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qti-components/test",
3
3
  "description": "QTI test utilities",
4
- "version": "2.0.0-next.14",
4
+ "version": "2.0.0-next.15",
5
5
  "author": "",
6
6
  "dependencies": {
7
7
  "@heximal/templates": "^0.1.5",
@@ -40,6 +40,10 @@
40
40
  "./plugins/elements": {
41
41
  "types": "./dist/plugins/elements.d.ts",
42
42
  "import": "./dist/plugins/elements.js"
43
+ },
44
+ "./plugin-api": {
45
+ "types": "./dist/plugin-api.d.ts",
46
+ "import": "./dist/plugin-api.js"
43
47
  }
44
48
  },
45
49
  "peerDependencies": {
@@ -1,48 +0,0 @@
1
- import { LitElement } from 'lit';
2
- import type { ComputedContext } from '@qti-components/base';
3
- declare module '../../types/qti-test-state' {
4
- interface QtiTestPluginState {
5
- /** Item-ref identifiers the candidate marked to come back to, in the order they were marked. */
6
- bookmarks: string[];
7
- }
8
- }
9
- /** The item-ref identifiers bookmarked so far. For a host's own navigation: mark these. */
10
- export declare const bookmarkedItems: (context: Pick<ComputedContext, "plugins"> | undefined) => string[];
11
- /**
12
- * A toggle that marks the item on screen to come back to. The marks live in the test's state under
13
- * `bookmarks` (`session.plugins.bookmarks`), so a host that stores `state` stores them, and a
14
- * reloaded test shows them again.
15
- *
16
- * Put it inside `<test-navigation>`, either in the toolbar, where it marks the item on screen, or in
17
- * the `<template item-ref>`, where each item gets its own and it marks that item. It is a button
18
- * (`role="button"`, `aria-pressed`) and reflects `bookmarked` on the host for styling; its content is
19
- * the label. In the toolbar it is `disabled` while no item is on screen. A host's own navigation reads
20
- * the marks with `bookmarkedItems(computedContext)`.
21
- *
22
- * Give it an `item` (an item-ref identifier) to mark that item instead, wherever the button sits: in a
23
- * stamp template that lists the items of a section, `<test-bookmark item="{{ item.identifier }}">`
24
- * puts a button next to each one.
25
- *
26
- * @slot - The label.
27
- * @attr item - The item-ref identifier this button marks; without it, the item it is stamped into, or else the one on screen.
28
- * @attr bookmarked - Reflected: the item on screen is bookmarked.
29
- * @attr disabled - Reflected: there is no item on screen.
30
- */
31
- export declare class TestBookmark extends LitElement {
32
- #private;
33
- protected computedContext?: ComputedContext;
34
- item?: string;
35
- bookmarked: boolean;
36
- disabled: boolean;
37
- static styles: import("lit").CSSResult[];
38
- constructor();
39
- connectedCallback(): void;
40
- protected willUpdate(): void;
41
- protected updated(): void;
42
- render(): import("lit").TemplateResult<1>;
43
- }
44
- declare global {
45
- interface HTMLElementTagNameMap {
46
- 'test-bookmark': TestBookmark;
47
- }
48
- }
@@ -1,132 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { css, html, LitElement } from 'lit';
8
- import { consume } from '@lit/context';
9
- import { property } from 'lit/decorators.js';
10
- import { computedContext } from '@qti-components/base';
11
- import * as styles from '../styles';
12
- import { dispatchPublic } from '../../public-events';
13
- import { pluginState } from '../../plugin-state';
14
- /** The item-ref identifiers bookmarked so far. For a host's own navigation: mark these. */
15
- export const bookmarkedItems = (context) => pluginState(context, 'bookmarks') ?? [];
16
- /** The identifier of the item-ref an element is stamped into (`<template item-ref>`), looking out through shadow roots. */
17
- const itemRefOf = (element) => {
18
- const itemRef = element.closest('qti-assessment-item-ref');
19
- if (itemRef)
20
- return itemRef.getAttribute('identifier') ?? undefined;
21
- const root = element.getRootNode();
22
- return root instanceof ShadowRoot ? itemRefOf(root.host) : undefined;
23
- };
24
- /**
25
- * A toggle that marks the item on screen to come back to. The marks live in the test's state under
26
- * `bookmarks` (`session.plugins.bookmarks`), so a host that stores `state` stores them, and a
27
- * reloaded test shows them again.
28
- *
29
- * Put it inside `<test-navigation>`, either in the toolbar, where it marks the item on screen, or in
30
- * the `<template item-ref>`, where each item gets its own and it marks that item. It is a button
31
- * (`role="button"`, `aria-pressed`) and reflects `bookmarked` on the host for styling; its content is
32
- * the label. In the toolbar it is `disabled` while no item is on screen. A host's own navigation reads
33
- * the marks with `bookmarkedItems(computedContext)`.
34
- *
35
- * Give it an `item` (an item-ref identifier) to mark that item instead, wherever the button sits: in a
36
- * stamp template that lists the items of a section, `<test-bookmark item="{{ item.identifier }}">`
37
- * puts a button next to each one.
38
- *
39
- * @slot - The label.
40
- * @attr item - The item-ref identifier this button marks; without it, the item it is stamped into, or else the one on screen.
41
- * @attr bookmarked - Reflected: the item on screen is bookmarked.
42
- * @attr disabled - Reflected: there is no item on screen.
43
- */
44
- export class TestBookmark extends LitElement {
45
- static { this.styles = [
46
- styles.button,
47
- css `
48
- svg {
49
- width: 1.1em;
50
- height: 1.1em;
51
- flex: none;
52
- fill: none;
53
- stroke: currentColor;
54
- stroke-width: 2;
55
- stroke-linejoin: round;
56
- }
57
- :host([bookmarked]) {
58
- color: var(--qti-bookmark-color, #b45309);
59
- }
60
- :host([bookmarked]) svg {
61
- fill: currentColor;
62
- }
63
- `
64
- ]; }
65
- constructor() {
66
- super();
67
- this.bookmarked = false;
68
- this.disabled = false;
69
- this.addEventListener('click', () => this.#toggle());
70
- this.addEventListener('keydown', event => {
71
- if (event.key !== 'Enter' && event.key !== ' ')
72
- return;
73
- event.preventDefault();
74
- this.#toggle();
75
- });
76
- }
77
- connectedCallback() {
78
- super.connectedCallback();
79
- if (!this.hasAttribute('role'))
80
- this.setAttribute('role', 'button');
81
- if (!this.hasAttribute('tabindex'))
82
- this.setAttribute('tabindex', '0');
83
- }
84
- /** The item this button marks: its own, or else the one on screen. */
85
- get #activeItem() {
86
- return (this.item ||
87
- (itemRefOf(this) ??
88
- this.computedContext?.testParts
89
- ?.flatMap(part => part.sections.flatMap(section => section.items))
90
- .find(item => item.active)?.identifier));
91
- }
92
- willUpdate() {
93
- const active = this.#activeItem;
94
- this.disabled = !active;
95
- this.bookmarked = !!active && bookmarkedItems(this.computedContext).includes(active);
96
- }
97
- updated() {
98
- this.setAttribute('aria-pressed', String(this.bookmarked));
99
- this.setAttribute('aria-disabled', String(this.disabled));
100
- }
101
- #toggle() {
102
- const active = this.#activeItem;
103
- if (!active)
104
- return;
105
- const marked = bookmarkedItems(this.computedContext);
106
- const next = marked.includes(active) ? marked.filter(id => id !== active) : [...marked, active];
107
- // An empty list removes the entry, so a test nobody bookmarked keeps no trace in the state.
108
- dispatchPublic(this, 'qc-test-update-plugin-state', {
109
- plugin: 'bookmarks',
110
- value: next.length > 0 ? next : null
111
- });
112
- }
113
- render() {
114
- return html `<span class="control" part="button"
115
- ><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 3h12v18l-6-4.5L6 21z" /></svg><slot></slot
116
- ></span>`;
117
- }
118
- }
119
- __decorate([
120
- consume({ context: computedContext, subscribe: true }),
121
- property({ attribute: false })
122
- ], TestBookmark.prototype, "computedContext", void 0);
123
- __decorate([
124
- property({ reflect: true })
125
- ], TestBookmark.prototype, "item", void 0);
126
- __decorate([
127
- property({ type: Boolean, reflect: true })
128
- ], TestBookmark.prototype, "bookmarked", void 0);
129
- __decorate([
130
- property({ type: Boolean, reflect: true })
131
- ], TestBookmark.prototype, "disabled", void 0);
132
- //# sourceMappingURL=test-bookmark.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-bookmark.js","sourceRoot":"","sources":["../../../src/components/test-bookmark/test-bookmark.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAWjD,2FAA2F;AAC3F,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAqD,EAAY,EAAE,CACjG,WAAW,CAAC,OAAO,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC;AAE1C,2HAA2H;AAC3H,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAsB,EAAE;IACzD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,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;QAC5F,cAAc,CAAC,IAAI,EAAE,6BAA6B,EAAE;YAClD,MAAM,EAAE,WAAW;YACnB,KAAK,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;SACrC,CAAC,CAAC;IACL,CAAC;IAEQ,MAAM;QACb,OAAO,IAAI,CAAA;;aAEF,CAAC;IACZ,CAAC;;AAnFS;IAFT,OAAO,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;IACtD,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;qDACa;AAEf;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAe;AAEC;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAAoB;AAEnB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAkB","sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { consume } from '@lit/context';\nimport { property } from 'lit/decorators.js';\n\nimport { computedContext } from '@qti-components/base';\n\nimport * as styles from '../styles';\nimport { dispatchPublic } from '../../public-events';\nimport { pluginState } from '../../plugin-state';\n\nimport type { ComputedContext } from '@qti-components/base';\n\ndeclare module '../../types/qti-test-state' {\n interface QtiTestPluginState {\n /** Item-ref identifiers the candidate marked to come back to, in the order they were marked. */\n bookmarks: string[];\n }\n}\n\n/** The item-ref identifiers bookmarked so far. For a host's own navigation: mark these. */\nexport const bookmarkedItems = (context: Pick<ComputedContext, 'plugins'> | undefined): string[] =>\n pluginState(context, 'bookmarks') ?? [];\n\n/** The identifier of the item-ref an element is stamped into (`<template item-ref>`), looking out through shadow roots. */\nconst itemRefOf = (element: Element): string | undefined => {\n const itemRef = element.closest('qti-assessment-item-ref');\n if (itemRef) return itemRef.getAttribute('identifier') ?? undefined;\n const root = element.getRootNode();\n return root instanceof ShadowRoot ? itemRefOf(root.host) : undefined;\n};\n\n/**\n * A toggle that marks the item on screen to come back to. The marks live in the test's state under\n * `bookmarks` (`session.plugins.bookmarks`), so a host that stores `state` stores them, and a\n * reloaded test shows them again.\n *\n * Put it inside `<test-navigation>`, either in the toolbar, where it marks the item on screen, or in\n * the `<template item-ref>`, where each item gets its own and it marks that item. It is a button\n * (`role=\"button\"`, `aria-pressed`) and reflects `bookmarked` on the host for styling; its content is\n * the label. In the toolbar it is `disabled` while no item is on screen. A host's own navigation reads\n * the marks with `bookmarkedItems(computedContext)`.\n *\n * Give it an `item` (an item-ref identifier) to mark that item instead, wherever the button sits: in a\n * stamp template that lists the items of a section, `<test-bookmark item=\"{{ item.identifier }}\">`\n * puts a button next to each one.\n *\n * @slot - The label.\n * @attr item - The item-ref identifier this button marks; without it, the item it is stamped into, or else the one on screen.\n * @attr bookmarked - Reflected: the item on screen is bookmarked.\n * @attr disabled - Reflected: there is no item on screen.\n */\nexport class TestBookmark extends LitElement {\n @consume({ context: computedContext, subscribe: true })\n @property({ attribute: false })\n protected computedContext?: ComputedContext;\n\n @property({ reflect: true }) item?: string;\n\n @property({ type: Boolean, reflect: true }) bookmarked = false;\n\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n static override styles = [\n styles.button,\n css`\n svg {\n width: 1.1em;\n height: 1.1em;\n flex: none;\n fill: none;\n stroke: currentColor;\n stroke-width: 2;\n stroke-linejoin: round;\n }\n :host([bookmarked]) {\n color: var(--qti-bookmark-color, #b45309);\n }\n :host([bookmarked]) svg {\n fill: currentColor;\n }\n `\n ];\n\n constructor() {\n super();\n this.addEventListener('click', () => this.#toggle());\n this.addEventListener('keydown', event => {\n if (event.key !== 'Enter' && event.key !== ' ') return;\n event.preventDefault();\n this.#toggle();\n });\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n if (!this.hasAttribute('role')) this.setAttribute('role', 'button');\n if (!this.hasAttribute('tabindex')) this.setAttribute('tabindex', '0');\n }\n\n /** The item this button marks: its own, or else the one on screen. */\n get #activeItem(): string | undefined {\n return (\n this.item ||\n (itemRefOf(this) ??\n this.computedContext?.testParts\n ?.flatMap(part => part.sections.flatMap(section => section.items))\n .find(item => item.active)?.identifier)\n );\n }\n\n protected override willUpdate(): void {\n const active = this.#activeItem;\n this.disabled = !active;\n this.bookmarked = !!active && bookmarkedItems(this.computedContext).includes(active);\n }\n\n protected override updated(): void {\n this.setAttribute('aria-pressed', String(this.bookmarked));\n this.setAttribute('aria-disabled', String(this.disabled));\n }\n\n #toggle(): void {\n const active = this.#activeItem;\n if (!active) return;\n const marked = bookmarkedItems(this.computedContext);\n const next = marked.includes(active) ? marked.filter(id => id !== active) : [...marked, active];\n // An empty list removes the entry, so a test nobody bookmarked keeps no trace in the state.\n dispatchPublic(this, 'qc-test-update-plugin-state', {\n plugin: 'bookmarks',\n value: next.length > 0 ? next : null\n });\n }\n\n override render() {\n return html`<span class=\"control\" part=\"button\"\n ><svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M6 3h12v18l-6-4.5L6 21z\" /></svg><slot></slot\n ></span>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-bookmark': TestBookmark;\n }\n}\n"]}
@@ -1,20 +0,0 @@
1
- import { LitElement } from 'lit';
2
- import type { View } from '@qti-components/base';
3
- /**
4
- * Ends the attempt on the current item and switches the test to `view` (default `scorer`), which
5
- * reveals the `[view]` content for that view, such as a scorer's rubric. The view stays until
6
- * something switches it back (`test-view-toggle`).
7
- *
8
- * @attr view - The view to switch to after the attempt ended.
9
- */
10
- export declare class TestCheckItem extends LitElement {
11
- view: View;
12
- static styles: import("lit").CSSResult;
13
- constructor();
14
- render(): import("lit").TemplateResult<1>;
15
- }
16
- declare global {
17
- interface HTMLElementTagNameMap {
18
- 'test-check-item': TestCheckItem;
19
- }
20
- }