@citolab/qti-components 6.0.14 → 6.0.16
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/dist/chunk-2EOV63WT.js +2204 -0
- package/dist/chunk-L6436D6O.js +1 -0
- package/dist/chunk-RPGALUIV.js +1 -0
- package/dist/chunk-WFLR5TH7.js +1 -0
- package/dist/custom-elements.json +155 -132
- package/dist/decorators/index.d.ts +37 -0
- package/dist/decorators/index.js +1 -0
- package/dist/qti-components/index.js +50 -50
- package/dist/qti-item/index.js +1 -1
- package/dist/qti-item-react/index.js +1 -1
- package/package.json +9 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext as e}from"@lit-labs/context";var g=e("logger");export{g as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as l}from"./chunk-NMCIOGD2.js";function b(d,r){let n,h=l({},r);return(t,o)=>{let{connectedCallback:c,disconnectedCallback:u}=t;t.connectedCallback=function(){var i;c.call(this);let m=p=>{let y=Array.from(this.querySelectorAll(d));for(let s of p){let a=Array.from(s.addedNodes).map(e=>e),v=Array.from(s.addedNodes).map(e=>e);s.type==="childList"&&a.find(e=>y.includes(e))&&this[o](a,v)}};n=new MutationObserver(m),n.observe(this,{childList:!0,subtree:!0});let f=(i=this.querySelectorAll(d))!=null?i:[];this[o](Array.from(f),[])},t.disconnectedCallback=function(){u.call(this),n.disconnect()}}}export{b as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as l}from"./chunk-NMCIOGD2.js";function u(e,d){let o=l({waitUntilFirstUpdate:!1},d);return(s,r)=>{let{update:c}=s,f=Array.isArray(e)?e:[e];s.update=function(t){f.forEach(p=>{let n=p;if(t.has(n)){let a=t.get(n),i=this[n];a!==i&&(!o.waitUntilFirstUpdate||this.hasUpdated)&&this[r](a,i)}}),c.call(this,t)}}}export{u as a};
|
|
@@ -2,6 +2,100 @@
|
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
3
|
"readme": "",
|
|
4
4
|
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/lib/decorators/index.ts",
|
|
8
|
+
"declarations": [],
|
|
9
|
+
"exports": [
|
|
10
|
+
{
|
|
11
|
+
"kind": "js",
|
|
12
|
+
"name": "*",
|
|
13
|
+
"declaration": {
|
|
14
|
+
"name": "*",
|
|
15
|
+
"package": "./live-query"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"kind": "js",
|
|
20
|
+
"name": "*",
|
|
21
|
+
"declaration": {
|
|
22
|
+
"name": "*",
|
|
23
|
+
"package": "./watch"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"kind": "javascript-module",
|
|
30
|
+
"path": "src/lib/decorators/live-query.ts",
|
|
31
|
+
"declarations": [
|
|
32
|
+
{
|
|
33
|
+
"kind": "function",
|
|
34
|
+
"name": "liveQuery",
|
|
35
|
+
"parameters": [
|
|
36
|
+
{
|
|
37
|
+
"name": "querySelector",
|
|
38
|
+
"type": {
|
|
39
|
+
"text": "string"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "options",
|
|
44
|
+
"optional": true,
|
|
45
|
+
"type": {
|
|
46
|
+
"text": "LiveQueryOptions"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"exports": [
|
|
53
|
+
{
|
|
54
|
+
"kind": "js",
|
|
55
|
+
"name": "liveQuery",
|
|
56
|
+
"declaration": {
|
|
57
|
+
"name": "liveQuery",
|
|
58
|
+
"module": "src/lib/decorators/live-query.ts"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"kind": "javascript-module",
|
|
65
|
+
"path": "src/lib/decorators/watch.ts",
|
|
66
|
+
"declarations": [
|
|
67
|
+
{
|
|
68
|
+
"kind": "function",
|
|
69
|
+
"name": "watch",
|
|
70
|
+
"parameters": [
|
|
71
|
+
{
|
|
72
|
+
"name": "propertyName",
|
|
73
|
+
"type": {
|
|
74
|
+
"text": "string | string[]"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "options",
|
|
79
|
+
"optional": true,
|
|
80
|
+
"type": {
|
|
81
|
+
"text": "WatchOptions"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"description": "Runs when observed properties change, e.g. @property or @state, but before the component updates. To wait for an\nupdate to complete after a change occurs, use `await this.updateComplete` in the handler. To start watching after the\ninitial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n\nUsage:"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"exports": [
|
|
89
|
+
{
|
|
90
|
+
"kind": "js",
|
|
91
|
+
"name": "watch",
|
|
92
|
+
"declaration": {
|
|
93
|
+
"name": "watch",
|
|
94
|
+
"module": "src/lib/decorators/watch.ts"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
5
99
|
{
|
|
6
100
|
"kind": "javascript-module",
|
|
7
101
|
"path": "src/lib/qti-components/index.ts",
|
|
@@ -452,7 +546,7 @@
|
|
|
452
546
|
},
|
|
453
547
|
{
|
|
454
548
|
"kind": "javascript-module",
|
|
455
|
-
"path": "src/lib/qti-
|
|
549
|
+
"path": "src/lib/qti-transform/index.ts",
|
|
456
550
|
"declarations": [],
|
|
457
551
|
"exports": [
|
|
458
552
|
{
|
|
@@ -460,35 +554,42 @@
|
|
|
460
554
|
"name": "*",
|
|
461
555
|
"declaration": {
|
|
462
556
|
"name": "*",
|
|
463
|
-
"package": "./qti-
|
|
557
|
+
"package": "./qti-transform"
|
|
464
558
|
}
|
|
465
559
|
}
|
|
466
560
|
]
|
|
467
561
|
},
|
|
468
562
|
{
|
|
469
563
|
"kind": "javascript-module",
|
|
470
|
-
"path": "src/lib/qti-
|
|
564
|
+
"path": "src/lib/qti-transform/qti-transform.ts",
|
|
471
565
|
"declarations": [
|
|
472
566
|
{
|
|
473
|
-
"kind": "
|
|
474
|
-
"name": "
|
|
475
|
-
"
|
|
567
|
+
"kind": "function",
|
|
568
|
+
"name": "qtiTransform",
|
|
569
|
+
"parameters": [
|
|
570
|
+
{
|
|
571
|
+
"name": "xmlValue",
|
|
572
|
+
"type": {
|
|
573
|
+
"text": "string"
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
]
|
|
476
577
|
}
|
|
477
578
|
],
|
|
478
579
|
"exports": [
|
|
479
580
|
{
|
|
480
581
|
"kind": "js",
|
|
481
|
-
"name": "
|
|
582
|
+
"name": "qtiTransform",
|
|
482
583
|
"declaration": {
|
|
483
|
-
"name": "
|
|
484
|
-
"module": "src/lib/qti-
|
|
584
|
+
"name": "qtiTransform",
|
|
585
|
+
"module": "src/lib/qti-transform/qti-transform.ts"
|
|
485
586
|
}
|
|
486
587
|
}
|
|
487
588
|
]
|
|
488
589
|
},
|
|
489
590
|
{
|
|
490
591
|
"kind": "javascript-module",
|
|
491
|
-
"path": "src/lib/qti-
|
|
592
|
+
"path": "src/lib/qti-item-react/index.ts",
|
|
492
593
|
"declarations": [],
|
|
493
594
|
"exports": [
|
|
494
595
|
{
|
|
@@ -496,35 +597,28 @@
|
|
|
496
597
|
"name": "*",
|
|
497
598
|
"declaration": {
|
|
498
599
|
"name": "*",
|
|
499
|
-
"package": "./qti-
|
|
600
|
+
"package": "./qti-item.react"
|
|
500
601
|
}
|
|
501
602
|
}
|
|
502
603
|
]
|
|
503
604
|
},
|
|
504
605
|
{
|
|
505
606
|
"kind": "javascript-module",
|
|
506
|
-
"path": "src/lib/qti-
|
|
607
|
+
"path": "src/lib/qti-item-react/qti-item.react.ts",
|
|
507
608
|
"declarations": [
|
|
508
609
|
{
|
|
509
|
-
"kind": "
|
|
510
|
-
"name": "
|
|
511
|
-
"
|
|
512
|
-
{
|
|
513
|
-
"name": "xmlValue",
|
|
514
|
-
"type": {
|
|
515
|
-
"text": "string"
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
]
|
|
610
|
+
"kind": "variable",
|
|
611
|
+
"name": "QtiItem",
|
|
612
|
+
"default": "createComponent({\n tagName: 'qti-item',\n react: React,\n elementClass: QtiItemComponent,\n events: {\n qtioutcomechanged: 'qti-outcome-changed', // as EventName<Event>\n qtiinteractionchanged: 'qti-interaction-changed',\n qtiitemconnected: 'qti-item-connected'\n }\n})"
|
|
519
613
|
}
|
|
520
614
|
],
|
|
521
615
|
"exports": [
|
|
522
616
|
{
|
|
523
617
|
"kind": "js",
|
|
524
|
-
"name": "
|
|
618
|
+
"name": "QtiItem",
|
|
525
619
|
"declaration": {
|
|
526
|
-
"name": "
|
|
527
|
-
"module": "src/lib/qti-
|
|
620
|
+
"name": "QtiItem",
|
|
621
|
+
"module": "src/lib/qti-item-react/qti-item.react.ts"
|
|
528
622
|
}
|
|
529
623
|
}
|
|
530
624
|
]
|
|
@@ -4847,77 +4941,6 @@
|
|
|
4847
4941
|
}
|
|
4848
4942
|
]
|
|
4849
4943
|
},
|
|
4850
|
-
{
|
|
4851
|
-
"kind": "javascript-module",
|
|
4852
|
-
"path": "src/lib/qti-components/utilities/decorators/liveQuery.ts",
|
|
4853
|
-
"declarations": [
|
|
4854
|
-
{
|
|
4855
|
-
"kind": "function",
|
|
4856
|
-
"name": "liveQuery",
|
|
4857
|
-
"parameters": [
|
|
4858
|
-
{
|
|
4859
|
-
"name": "querySelector",
|
|
4860
|
-
"type": {
|
|
4861
|
-
"text": "string"
|
|
4862
|
-
}
|
|
4863
|
-
},
|
|
4864
|
-
{
|
|
4865
|
-
"name": "options",
|
|
4866
|
-
"optional": true,
|
|
4867
|
-
"type": {
|
|
4868
|
-
"text": "LiveQueryOptions"
|
|
4869
|
-
}
|
|
4870
|
-
}
|
|
4871
|
-
]
|
|
4872
|
-
}
|
|
4873
|
-
],
|
|
4874
|
-
"exports": [
|
|
4875
|
-
{
|
|
4876
|
-
"kind": "js",
|
|
4877
|
-
"name": "liveQuery",
|
|
4878
|
-
"declaration": {
|
|
4879
|
-
"name": "liveQuery",
|
|
4880
|
-
"module": "src/lib/qti-components/utilities/decorators/liveQuery.ts"
|
|
4881
|
-
}
|
|
4882
|
-
}
|
|
4883
|
-
]
|
|
4884
|
-
},
|
|
4885
|
-
{
|
|
4886
|
-
"kind": "javascript-module",
|
|
4887
|
-
"path": "src/lib/qti-components/utilities/decorators/watch.ts",
|
|
4888
|
-
"declarations": [
|
|
4889
|
-
{
|
|
4890
|
-
"kind": "function",
|
|
4891
|
-
"name": "watch",
|
|
4892
|
-
"parameters": [
|
|
4893
|
-
{
|
|
4894
|
-
"name": "propertyName",
|
|
4895
|
-
"type": {
|
|
4896
|
-
"text": "string | string[]"
|
|
4897
|
-
}
|
|
4898
|
-
},
|
|
4899
|
-
{
|
|
4900
|
-
"name": "options",
|
|
4901
|
-
"optional": true,
|
|
4902
|
-
"type": {
|
|
4903
|
-
"text": "WatchOptions"
|
|
4904
|
-
}
|
|
4905
|
-
}
|
|
4906
|
-
],
|
|
4907
|
-
"description": "Runs when observed properties change, e.g. @property or @state, but before the component updates. To wait for an\nupdate to complete after a change occurs, use `await this.updateComplete` in the handler. To start watching after the\ninitial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n\nUsage:"
|
|
4908
|
-
}
|
|
4909
|
-
],
|
|
4910
|
-
"exports": [
|
|
4911
|
-
{
|
|
4912
|
-
"kind": "js",
|
|
4913
|
-
"name": "watch",
|
|
4914
|
-
"declaration": {
|
|
4915
|
-
"name": "watch",
|
|
4916
|
-
"module": "src/lib/qti-components/utilities/decorators/watch.ts"
|
|
4917
|
-
}
|
|
4918
|
-
}
|
|
4919
|
-
]
|
|
4920
|
-
},
|
|
4921
4944
|
{
|
|
4922
4945
|
"kind": "javascript-module",
|
|
4923
4946
|
"path": "src/lib/qti-components/utilities/reset-styles/reset-shadowroot-styles.ts",
|
|
@@ -5981,6 +6004,42 @@
|
|
|
5981
6004
|
}
|
|
5982
6005
|
]
|
|
5983
6006
|
},
|
|
6007
|
+
{
|
|
6008
|
+
"kind": "javascript-module",
|
|
6009
|
+
"path": "src/lib/qti-components/qti-responseprocessing/qti-expression/qti-lte/qti-lte.ts",
|
|
6010
|
+
"declarations": [
|
|
6011
|
+
{
|
|
6012
|
+
"kind": "class",
|
|
6013
|
+
"description": "",
|
|
6014
|
+
"name": "QtiLte",
|
|
6015
|
+
"members": [],
|
|
6016
|
+
"superclass": {
|
|
6017
|
+
"name": "QtiConditionExpression",
|
|
6018
|
+
"module": "/src/lib/qti-components/qti-responseprocessing/qti-expression/qti-condition-expression"
|
|
6019
|
+
},
|
|
6020
|
+
"tagName": "qti-lte",
|
|
6021
|
+
"customElement": true
|
|
6022
|
+
}
|
|
6023
|
+
],
|
|
6024
|
+
"exports": [
|
|
6025
|
+
{
|
|
6026
|
+
"kind": "js",
|
|
6027
|
+
"name": "QtiLte",
|
|
6028
|
+
"declaration": {
|
|
6029
|
+
"name": "QtiLte",
|
|
6030
|
+
"module": "src/lib/qti-components/qti-responseprocessing/qti-expression/qti-lte/qti-lte.ts"
|
|
6031
|
+
}
|
|
6032
|
+
},
|
|
6033
|
+
{
|
|
6034
|
+
"kind": "custom-element-definition",
|
|
6035
|
+
"name": "qti-lte",
|
|
6036
|
+
"declaration": {
|
|
6037
|
+
"name": "QtiLte",
|
|
6038
|
+
"module": "src/lib/qti-components/qti-responseprocessing/qti-expression/qti-lte/qti-lte.ts"
|
|
6039
|
+
}
|
|
6040
|
+
}
|
|
6041
|
+
]
|
|
6042
|
+
},
|
|
5984
6043
|
{
|
|
5985
6044
|
"kind": "javascript-module",
|
|
5986
6045
|
"path": "src/lib/qti-components/qti-responseprocessing/qti-expression/qti-mapping/qti-mapping.ts",
|
|
@@ -6041,42 +6100,6 @@
|
|
|
6041
6100
|
}
|
|
6042
6101
|
]
|
|
6043
6102
|
},
|
|
6044
|
-
{
|
|
6045
|
-
"kind": "javascript-module",
|
|
6046
|
-
"path": "src/lib/qti-components/qti-responseprocessing/qti-expression/qti-lte/qti-lte.ts",
|
|
6047
|
-
"declarations": [
|
|
6048
|
-
{
|
|
6049
|
-
"kind": "class",
|
|
6050
|
-
"description": "",
|
|
6051
|
-
"name": "QtiLte",
|
|
6052
|
-
"members": [],
|
|
6053
|
-
"superclass": {
|
|
6054
|
-
"name": "QtiConditionExpression",
|
|
6055
|
-
"module": "/src/lib/qti-components/qti-responseprocessing/qti-expression/qti-condition-expression"
|
|
6056
|
-
},
|
|
6057
|
-
"tagName": "qti-lte",
|
|
6058
|
-
"customElement": true
|
|
6059
|
-
}
|
|
6060
|
-
],
|
|
6061
|
-
"exports": [
|
|
6062
|
-
{
|
|
6063
|
-
"kind": "js",
|
|
6064
|
-
"name": "QtiLte",
|
|
6065
|
-
"declaration": {
|
|
6066
|
-
"name": "QtiLte",
|
|
6067
|
-
"module": "src/lib/qti-components/qti-responseprocessing/qti-expression/qti-lte/qti-lte.ts"
|
|
6068
|
-
}
|
|
6069
|
-
},
|
|
6070
|
-
{
|
|
6071
|
-
"kind": "custom-element-definition",
|
|
6072
|
-
"name": "qti-lte",
|
|
6073
|
-
"declaration": {
|
|
6074
|
-
"name": "QtiLte",
|
|
6075
|
-
"module": "src/lib/qti-components/qti-responseprocessing/qti-expression/qti-lte/qti-lte.ts"
|
|
6076
|
-
}
|
|
6077
|
-
}
|
|
6078
|
-
]
|
|
6079
|
-
},
|
|
6080
6103
|
{
|
|
6081
6104
|
"kind": "javascript-module",
|
|
6082
6105
|
"path": "src/lib/qti-components/qti-responseprocessing/qti-expression/qti-mapresponse/qti-mapresponse.ts",
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
type UpdateHandler$1 = (prev?: unknown, next?: unknown) => void;
|
|
4
|
+
type NonUndefined$1<A> = A extends undefined ? never : A;
|
|
5
|
+
type UpdateHandlerFunctionKeys$1<T extends object> = {
|
|
6
|
+
[K in keyof T]-?: NonUndefined$1<T[K]> extends UpdateHandler$1 ? K : never;
|
|
7
|
+
}[keyof T];
|
|
8
|
+
interface LiveQueryOptions {
|
|
9
|
+
}
|
|
10
|
+
declare function liveQuery(querySelector: string, options?: LiveQueryOptions): <ElemClass extends LitElement>(proto: ElemClass, decoratedFnName: UpdateHandlerFunctionKeys$1<ElemClass>) => void;
|
|
11
|
+
|
|
12
|
+
type UpdateHandler = (prev?: unknown, next?: unknown) => void;
|
|
13
|
+
type NonUndefined<A> = A extends undefined ? never : A;
|
|
14
|
+
type UpdateHandlerFunctionKeys<T extends object> = {
|
|
15
|
+
[K in keyof T]-?: NonUndefined<T[K]> extends UpdateHandler ? K : never;
|
|
16
|
+
}[keyof T];
|
|
17
|
+
interface WatchOptions {
|
|
18
|
+
/**
|
|
19
|
+
* If true, will only start watching after the initial update/render
|
|
20
|
+
*/
|
|
21
|
+
waitUntilFirstUpdate?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Runs when observed properties change, e.g. @property or @state, but before the component updates. To wait for an
|
|
25
|
+
* update to complete after a change occurs, use `await this.updateComplete` in the handler. To start watching after the
|
|
26
|
+
* initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.
|
|
27
|
+
*
|
|
28
|
+
* Usage:
|
|
29
|
+
*
|
|
30
|
+
* @watch('propName')
|
|
31
|
+
* handlePropChange(oldValue, newValue) {
|
|
32
|
+
* ...
|
|
33
|
+
* }
|
|
34
|
+
*/
|
|
35
|
+
declare function watch(propertyName: string | string[], options?: WatchOptions): <ElemClass extends LitElement>(proto: ElemClass, decoratedFnName: UpdateHandlerFunctionKeys<ElemClass>) => void;
|
|
36
|
+
|
|
37
|
+
export { liveQuery, watch };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"../chunk-RPGALUIV.js";import{a as r}from"../chunk-WFLR5TH7.js";import"../chunk-NMCIOGD2.js";export{o as liveQuery,r as watch};
|