@pie-element/likert 4.1.1 → 4.1.2-next.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/configure.js +2 -0
- package/controller.js +1 -0
- package/dist/author/choiceGenerator.d.ts +13 -0
- package/dist/author/choiceGenerator.js +255 -0
- package/dist/author/defaults.d.ts +102 -0
- package/dist/author/defaults.js +60 -0
- package/dist/author/index.d.ts +31 -0
- package/dist/author/index.js +73 -0
- package/dist/author/likertEntities.d.ts +25 -0
- package/dist/author/likertEntities.js +18 -0
- package/dist/author/main.d.ts +27 -0
- package/dist/author/main.js +298 -0
- package/dist/browser/Radio-CAjl01LA.js +9438 -0
- package/dist/browser/Radio-CAjl01LA.js.map +1 -0
- package/dist/browser/author/index.js +40609 -0
- package/dist/browser/author/index.js.map +1 -0
- package/dist/browser/controller/index.js +51 -0
- package/dist/browser/controller/index.js.map +1 -0
- package/dist/browser/delivery/index.js +219 -0
- package/dist/browser/delivery/index.js.map +1 -0
- package/dist/browser/likert.css +2 -0
- package/dist/controller/defaults.d.ts +19 -0
- package/dist/controller/defaults.js +13 -0
- package/dist/controller/index.d.ts +19 -0
- package/dist/controller/index.js +41 -0
- package/dist/delivery/choice-input.d.ts +27 -0
- package/dist/delivery/choice-input.js +59 -0
- package/dist/delivery/index.d.ts +19 -0
- package/dist/delivery/index.js +44 -0
- package/dist/delivery/likert.d.ts +26 -0
- package/dist/delivery/likert.js +70 -0
- package/dist/delivery/likertEntities.d.ts +12 -0
- package/dist/delivery/likertEntities.js +7 -0
- package/dist/delivery/main.d.ts +23 -0
- package/dist/delivery/main.js +37 -0
- package/dist/delivery/session-updater.d.ts +9 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +145 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignMergeValue.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMerge.js +19 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMergeDeep.js +31 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createAssigner.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_safeGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isPlainObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/merge.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toPlainObject.js +8 -0
- package/package.json +77 -19
- package/CHANGELOG.json +0 -1
- package/CHANGELOG.md +0 -1455
- package/LICENSE.md +0 -5
- package/configure/CHANGELOG.json +0 -1
- package/configure/CHANGELOG.md +0 -1373
- package/configure/lib/choiceGenerator.js +0 -219
- package/configure/lib/choiceGenerator.js.map +0 -1
- package/configure/lib/defaults.js +0 -100
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/index.js +0 -106
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/likertEntities.js +0 -24
- package/configure/lib/likertEntities.js.map +0 -1
- package/configure/lib/main.js +0 -388
- package/configure/lib/main.js.map +0 -1
- package/configure/package.json +0 -27
- package/controller/CHANGELOG.json +0 -1
- package/controller/CHANGELOG.md +0 -90
- package/controller/lib/defaults.js +0 -17
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -81
- package/controller/lib/index.js.map +0 -1
- package/controller/package.json +0 -17
- package/docs/config-schema.json +0 -2011
- package/docs/config-schema.json.md +0 -1487
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -22
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -6
- package/docs/pie-schema.json +0 -966
- package/docs/pie-schema.json.md +0 -711
- package/lib/choice-input.js +0 -90
- package/lib/choice-input.js.map +0 -1
- package/lib/index.js +0 -64
- package/lib/index.js.map +0 -1
- package/lib/likert.js +0 -97
- package/lib/likert.js.map +0 -1
- package/lib/likertEntities.js +0 -11
- package/lib/likertEntities.js.map +0 -1
- package/lib/main.js +0 -42
- package/lib/main.js.map +0 -1
- package/lib/session-updater.js +0 -15
- package/lib/session-updater.js.map +0 -1
- package/readme.md +0 -55
package/configure.js
ADDED
package/controller.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/controller/index.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/likert/configure/src/choiceGenerator.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
declare const generateChoices: (likertScale: any, likertType: any) => {
|
|
10
|
+
label: string;
|
|
11
|
+
value: number;
|
|
12
|
+
}[];
|
|
13
|
+
export default generateChoices;
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import { LIKERT_SCALE as e, LIKERT_TYPE as t } from "./likertEntities.js";
|
|
2
|
+
//#region src/author/choiceGenerator.ts
|
|
3
|
+
var n = [
|
|
4
|
+
{
|
|
5
|
+
label: "Disagree",
|
|
6
|
+
value: -1
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
label: "Unsure",
|
|
10
|
+
value: 0
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
label: "Agree",
|
|
14
|
+
value: 1
|
|
15
|
+
}
|
|
16
|
+
], r = [
|
|
17
|
+
{
|
|
18
|
+
label: "Strongly Disagree",
|
|
19
|
+
value: -2
|
|
20
|
+
},
|
|
21
|
+
...n,
|
|
22
|
+
{
|
|
23
|
+
label: "Strongly Agree",
|
|
24
|
+
value: 2
|
|
25
|
+
}
|
|
26
|
+
], i = [
|
|
27
|
+
{
|
|
28
|
+
label: "Extremely Disagree",
|
|
29
|
+
value: -3
|
|
30
|
+
},
|
|
31
|
+
...r,
|
|
32
|
+
{
|
|
33
|
+
label: "Extremely Agree",
|
|
34
|
+
value: 3
|
|
35
|
+
}
|
|
36
|
+
], a = [
|
|
37
|
+
{
|
|
38
|
+
label: "Infrequently",
|
|
39
|
+
value: -1
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: "Unsure",
|
|
43
|
+
value: 0
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
label: "Frequently",
|
|
47
|
+
value: 1
|
|
48
|
+
}
|
|
49
|
+
], o = [
|
|
50
|
+
{
|
|
51
|
+
label: "Very Infrequently",
|
|
52
|
+
value: -2
|
|
53
|
+
},
|
|
54
|
+
...a,
|
|
55
|
+
{
|
|
56
|
+
label: "Very Frequently",
|
|
57
|
+
value: 2
|
|
58
|
+
}
|
|
59
|
+
], s = [
|
|
60
|
+
{
|
|
61
|
+
label: "Never",
|
|
62
|
+
value: -3
|
|
63
|
+
},
|
|
64
|
+
...o,
|
|
65
|
+
{
|
|
66
|
+
label: "Always",
|
|
67
|
+
value: 3
|
|
68
|
+
}
|
|
69
|
+
], c = [
|
|
70
|
+
{
|
|
71
|
+
label: "No",
|
|
72
|
+
value: -1
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
label: "Unsure",
|
|
76
|
+
value: 0
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
label: "Yes",
|
|
80
|
+
value: 1
|
|
81
|
+
}
|
|
82
|
+
], l = [
|
|
83
|
+
{
|
|
84
|
+
label: "No",
|
|
85
|
+
value: -2
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
label: "Not really",
|
|
89
|
+
value: -1
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
label: "Unsure",
|
|
93
|
+
value: 0
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
label: "Sometimes",
|
|
97
|
+
value: 1
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
label: "Yes",
|
|
101
|
+
value: 2
|
|
102
|
+
}
|
|
103
|
+
], u = [
|
|
104
|
+
{
|
|
105
|
+
label: "No",
|
|
106
|
+
value: -3
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
label: "Rarely",
|
|
110
|
+
value: -2
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
label: "Not really",
|
|
114
|
+
value: -1
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
label: "Unsure",
|
|
118
|
+
value: 0
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
label: "Sometimes",
|
|
122
|
+
value: 1
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
label: "Very Often",
|
|
126
|
+
value: 2
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
label: "Always",
|
|
130
|
+
value: 3
|
|
131
|
+
}
|
|
132
|
+
], d = [
|
|
133
|
+
{
|
|
134
|
+
label: "Not Likely",
|
|
135
|
+
value: -1
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
label: "Unsure",
|
|
139
|
+
value: 0
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
label: "Likely",
|
|
143
|
+
value: 1
|
|
144
|
+
}
|
|
145
|
+
], f = [
|
|
146
|
+
{
|
|
147
|
+
label: "Very Unlikely",
|
|
148
|
+
value: -2
|
|
149
|
+
},
|
|
150
|
+
...d,
|
|
151
|
+
{
|
|
152
|
+
label: "Very Likely",
|
|
153
|
+
value: 2
|
|
154
|
+
}
|
|
155
|
+
], p = [
|
|
156
|
+
{
|
|
157
|
+
label: "Extremely Unlikely",
|
|
158
|
+
value: -3
|
|
159
|
+
},
|
|
160
|
+
...f,
|
|
161
|
+
{
|
|
162
|
+
label: "Extremely Likely",
|
|
163
|
+
value: 3
|
|
164
|
+
}
|
|
165
|
+
], m = [
|
|
166
|
+
{
|
|
167
|
+
label: "Not Important",
|
|
168
|
+
value: -1
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
label: "Unsure",
|
|
172
|
+
value: 0
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
label: "Important",
|
|
176
|
+
value: 1
|
|
177
|
+
}
|
|
178
|
+
], h = [
|
|
179
|
+
{
|
|
180
|
+
label: "Very Not Important",
|
|
181
|
+
value: -2
|
|
182
|
+
},
|
|
183
|
+
...m,
|
|
184
|
+
{
|
|
185
|
+
label: "Very Important",
|
|
186
|
+
value: 2
|
|
187
|
+
}
|
|
188
|
+
], g = [
|
|
189
|
+
{
|
|
190
|
+
label: "Extremely Not Important",
|
|
191
|
+
value: -3
|
|
192
|
+
},
|
|
193
|
+
...h,
|
|
194
|
+
{
|
|
195
|
+
label: "Extremely Important",
|
|
196
|
+
value: 3
|
|
197
|
+
}
|
|
198
|
+
], _ = [
|
|
199
|
+
{
|
|
200
|
+
label: "Dislike",
|
|
201
|
+
value: -1
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
label: "Unsure",
|
|
205
|
+
value: 0
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
label: "Like",
|
|
209
|
+
value: 1
|
|
210
|
+
}
|
|
211
|
+
], v = [
|
|
212
|
+
{
|
|
213
|
+
label: "Really Dislike",
|
|
214
|
+
value: -2
|
|
215
|
+
},
|
|
216
|
+
..._,
|
|
217
|
+
{
|
|
218
|
+
label: "Really Like",
|
|
219
|
+
value: 2
|
|
220
|
+
}
|
|
221
|
+
], y = [
|
|
222
|
+
{
|
|
223
|
+
label: "Extremely Dislike",
|
|
224
|
+
value: -3
|
|
225
|
+
},
|
|
226
|
+
...v,
|
|
227
|
+
{
|
|
228
|
+
label: "Extremely Like",
|
|
229
|
+
value: 3
|
|
230
|
+
}
|
|
231
|
+
], b = (b, x) => {
|
|
232
|
+
switch (`${b}-${x}`) {
|
|
233
|
+
case `${e.likert3}-${t.agreement}`: return [...n];
|
|
234
|
+
case `${e.likert5}-${t.agreement}`: return [...r];
|
|
235
|
+
case `${e.likert7}-${t.agreement}`: return [...i];
|
|
236
|
+
case `${e.likert3}-${t.frequency}`: return [...a];
|
|
237
|
+
case `${e.likert5}-${t.frequency}`: return [...o];
|
|
238
|
+
case `${e.likert7}-${t.frequency}`: return [...s];
|
|
239
|
+
case `${e.likert3}-${t.yesNo}`: return [...c];
|
|
240
|
+
case `${e.likert5}-${t.yesNo}`: return [...l];
|
|
241
|
+
case `${e.likert7}-${t.yesNo}`: return [...u];
|
|
242
|
+
case `${e.likert3}-${t.likelihood}`: return [...d];
|
|
243
|
+
case `${e.likert5}-${t.likelihood}`: return [...f];
|
|
244
|
+
case `${e.likert7}-${t.likelihood}`: return [...p];
|
|
245
|
+
case `${e.likert3}-${t.importance}`: return [...m];
|
|
246
|
+
case `${e.likert5}-${t.importance}`: return [...h];
|
|
247
|
+
case `${e.likert7}-${t.importance}`: return [...g];
|
|
248
|
+
case `${e.likert3}-${t.like}`: return [..._];
|
|
249
|
+
case `${e.likert5}-${t.like}`: return [...v];
|
|
250
|
+
case `${e.likert7}-${t.like}`: return [...y];
|
|
251
|
+
default: return [];
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
//#endregion
|
|
255
|
+
export { b as default };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/likert/configure/src/defaults.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
/** NOTE: teacherInstructions, studentInstructions, rationale & scoringType
|
|
10
|
+
* functionalities are not defined yet - the value for those can belong to
|
|
11
|
+
* model or to configure
|
|
12
|
+
*/
|
|
13
|
+
declare const _default: {
|
|
14
|
+
model: {
|
|
15
|
+
choices: never[];
|
|
16
|
+
likertOrientation: string;
|
|
17
|
+
likertScale: string;
|
|
18
|
+
likertType: string;
|
|
19
|
+
prompt: string;
|
|
20
|
+
promptEnabled: boolean;
|
|
21
|
+
teacherInstructions: string;
|
|
22
|
+
teacherInstructionsEnabled: boolean;
|
|
23
|
+
};
|
|
24
|
+
configuration: {
|
|
25
|
+
baseInputConfiguration: {
|
|
26
|
+
h3: {
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
};
|
|
29
|
+
audio: {
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
};
|
|
32
|
+
video: {
|
|
33
|
+
disabled: boolean;
|
|
34
|
+
};
|
|
35
|
+
image: {
|
|
36
|
+
disabled: boolean;
|
|
37
|
+
};
|
|
38
|
+
textAlign: {
|
|
39
|
+
disabled: boolean;
|
|
40
|
+
};
|
|
41
|
+
showParagraphs: {
|
|
42
|
+
disabled: boolean;
|
|
43
|
+
};
|
|
44
|
+
separateParagraphs: {
|
|
45
|
+
disabled: boolean;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
prompt: {
|
|
49
|
+
settings: boolean;
|
|
50
|
+
label: string;
|
|
51
|
+
inputConfiguration: {
|
|
52
|
+
audio: {
|
|
53
|
+
disabled: boolean;
|
|
54
|
+
};
|
|
55
|
+
video: {
|
|
56
|
+
disabled: boolean;
|
|
57
|
+
};
|
|
58
|
+
image: {
|
|
59
|
+
disabled: boolean;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
required: boolean;
|
|
63
|
+
};
|
|
64
|
+
settingsPanelDisabled: boolean;
|
|
65
|
+
spellCheck: {
|
|
66
|
+
label: string;
|
|
67
|
+
settings: boolean;
|
|
68
|
+
enabled: boolean;
|
|
69
|
+
};
|
|
70
|
+
teacherInstructions: {
|
|
71
|
+
settings: boolean;
|
|
72
|
+
label: string;
|
|
73
|
+
inputConfiguration: {
|
|
74
|
+
audio: {
|
|
75
|
+
disabled: boolean;
|
|
76
|
+
};
|
|
77
|
+
video: {
|
|
78
|
+
disabled: boolean;
|
|
79
|
+
};
|
|
80
|
+
image: {
|
|
81
|
+
disabled: boolean;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
required: boolean;
|
|
85
|
+
};
|
|
86
|
+
likertChoice: {
|
|
87
|
+
label: string;
|
|
88
|
+
inputConfiguration: {
|
|
89
|
+
audio: {
|
|
90
|
+
disabled: boolean;
|
|
91
|
+
};
|
|
92
|
+
video: {
|
|
93
|
+
disabled: boolean;
|
|
94
|
+
};
|
|
95
|
+
image: {
|
|
96
|
+
disabled: boolean;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
export default _default;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//#region src/author/defaults.ts
|
|
2
|
+
var e = {
|
|
3
|
+
model: {
|
|
4
|
+
choices: [],
|
|
5
|
+
likertOrientation: "horizontal",
|
|
6
|
+
likertScale: "likert3",
|
|
7
|
+
likertType: "agreement",
|
|
8
|
+
prompt: "",
|
|
9
|
+
promptEnabled: !0,
|
|
10
|
+
teacherInstructions: "",
|
|
11
|
+
teacherInstructionsEnabled: !0
|
|
12
|
+
},
|
|
13
|
+
configuration: {
|
|
14
|
+
baseInputConfiguration: {
|
|
15
|
+
h3: { disabled: !0 },
|
|
16
|
+
audio: { disabled: !1 },
|
|
17
|
+
video: { disabled: !1 },
|
|
18
|
+
image: { disabled: !1 },
|
|
19
|
+
textAlign: { disabled: !0 },
|
|
20
|
+
showParagraphs: { disabled: !1 },
|
|
21
|
+
separateParagraphs: { disabled: !0 }
|
|
22
|
+
},
|
|
23
|
+
prompt: {
|
|
24
|
+
settings: !0,
|
|
25
|
+
label: "Prompt",
|
|
26
|
+
inputConfiguration: {
|
|
27
|
+
audio: { disabled: !1 },
|
|
28
|
+
video: { disabled: !1 },
|
|
29
|
+
image: { disabled: !1 }
|
|
30
|
+
},
|
|
31
|
+
required: !1
|
|
32
|
+
},
|
|
33
|
+
settingsPanelDisabled: !1,
|
|
34
|
+
spellCheck: {
|
|
35
|
+
label: "Spellcheck",
|
|
36
|
+
settings: !1,
|
|
37
|
+
enabled: !0
|
|
38
|
+
},
|
|
39
|
+
teacherInstructions: {
|
|
40
|
+
settings: !0,
|
|
41
|
+
label: "Teacher Instructions",
|
|
42
|
+
inputConfiguration: {
|
|
43
|
+
audio: { disabled: !1 },
|
|
44
|
+
video: { disabled: !1 },
|
|
45
|
+
image: { disabled: !1 }
|
|
46
|
+
},
|
|
47
|
+
required: !1
|
|
48
|
+
},
|
|
49
|
+
likertChoice: {
|
|
50
|
+
label: "Choice",
|
|
51
|
+
inputConfiguration: {
|
|
52
|
+
audio: { disabled: !1 },
|
|
53
|
+
video: { disabled: !1 },
|
|
54
|
+
image: { disabled: !1 }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
export { e as default };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/likert/configure/src/index.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export default class Likert extends HTMLElement {
|
|
10
|
+
static createDefaultModel: (model?: {}) => {
|
|
11
|
+
choices: any;
|
|
12
|
+
likertOrientation: string;
|
|
13
|
+
likertScale: string;
|
|
14
|
+
likertType: string;
|
|
15
|
+
prompt: string;
|
|
16
|
+
promptEnabled: boolean;
|
|
17
|
+
teacherInstructions: string;
|
|
18
|
+
teacherInstructionsEnabled: boolean;
|
|
19
|
+
};
|
|
20
|
+
constructor();
|
|
21
|
+
set model(s: any);
|
|
22
|
+
set configuration(c: any);
|
|
23
|
+
set disableSidePanel(s: any);
|
|
24
|
+
dispatchModelUpdated(reset: any): void;
|
|
25
|
+
onModelChanged(m: any, reset: any): void;
|
|
26
|
+
onConfigurationChanged(c: any): void;
|
|
27
|
+
insertSound(handler: any): void;
|
|
28
|
+
onDeleteSound(src: any, done: any): void;
|
|
29
|
+
_render(): void;
|
|
30
|
+
disconnectedCallback(): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js";
|
|
2
|
+
import t from "./main.js";
|
|
3
|
+
import n from "./defaults.js";
|
|
4
|
+
import r from "react";
|
|
5
|
+
import { createRoot as i } from "react-dom/client";
|
|
6
|
+
import a from "debug";
|
|
7
|
+
import { DeleteSoundEvent as o, InsertSoundEvent as s, ModelUpdatedEvent as c } from "@pie-element/shared-configure-events";
|
|
8
|
+
//#region src/author/index.ts
|
|
9
|
+
var l = a("likert:configure"), u = (t, r) => ({
|
|
10
|
+
configuration: e(t, n.configuration),
|
|
11
|
+
model: r
|
|
12
|
+
}), d = class e extends HTMLElement {
|
|
13
|
+
static createDefaultModel = (e = {}) => ({
|
|
14
|
+
...n.model,
|
|
15
|
+
...e,
|
|
16
|
+
choices: e && e.choices || []
|
|
17
|
+
});
|
|
18
|
+
constructor() {
|
|
19
|
+
super(), this._root = null, this._model = e.createDefaultModel(), this._configuration = n.configuration, this.onModelChanged = this.onModelChanged.bind(this), this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
20
|
+
}
|
|
21
|
+
set model(t) {
|
|
22
|
+
this._model = e.createDefaultModel(t), this._model = {
|
|
23
|
+
...this._model,
|
|
24
|
+
choices: this._model.choices.map((e) => ({
|
|
25
|
+
...e,
|
|
26
|
+
value: parseInt(e.value)
|
|
27
|
+
}))
|
|
28
|
+
}, this._render();
|
|
29
|
+
}
|
|
30
|
+
set configuration(e) {
|
|
31
|
+
let t = u(e, this._model);
|
|
32
|
+
this.onModelChanged(t.model), this._configuration = t.configuration, this._render();
|
|
33
|
+
}
|
|
34
|
+
set disableSidePanel(e) {
|
|
35
|
+
this._disableSidePanel = e, this._render();
|
|
36
|
+
}
|
|
37
|
+
dispatchModelUpdated(e) {
|
|
38
|
+
let t = !!e;
|
|
39
|
+
this.dispatchEvent(new c(this._model, t));
|
|
40
|
+
}
|
|
41
|
+
onModelChanged(e, t) {
|
|
42
|
+
this._model = e, this._render(), this.dispatchModelUpdated(t);
|
|
43
|
+
}
|
|
44
|
+
onConfigurationChanged(e) {
|
|
45
|
+
this._configuration = u(e, this._model).configuration, this._model && this.onModelChanged(this._model), this._render();
|
|
46
|
+
}
|
|
47
|
+
insertSound(e) {
|
|
48
|
+
this.dispatchEvent(new s(e));
|
|
49
|
+
}
|
|
50
|
+
onDeleteSound(e, t) {
|
|
51
|
+
this.dispatchEvent(new o(e, t));
|
|
52
|
+
}
|
|
53
|
+
_render() {
|
|
54
|
+
l("_render");
|
|
55
|
+
let e = r.createElement(t, {
|
|
56
|
+
model: this._model,
|
|
57
|
+
configuration: this._configuration,
|
|
58
|
+
onModelChanged: this.onModelChanged,
|
|
59
|
+
onConfigurationChanged: this.onConfigurationChanged,
|
|
60
|
+
disableSidePanel: this._disableSidePanel,
|
|
61
|
+
uploadSoundSupport: {
|
|
62
|
+
add: this.insertSound.bind(this),
|
|
63
|
+
delete: this.onDeleteSound.bind(this)
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
this._root ||= i(this), this._root.render(e);
|
|
67
|
+
}
|
|
68
|
+
disconnectedCallback() {
|
|
69
|
+
this._root && this._root.unmount();
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
//#endregion
|
|
73
|
+
export { d as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/likert/configure/src/likertEntities.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const LIKERT_SCALE: {
|
|
10
|
+
likert3: string;
|
|
11
|
+
likert5: string;
|
|
12
|
+
likert7: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const LIKERT_TYPE: {
|
|
15
|
+
agreement: string;
|
|
16
|
+
frequency: string;
|
|
17
|
+
yesNo: string;
|
|
18
|
+
importance: string;
|
|
19
|
+
likelihood: string;
|
|
20
|
+
like: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const LIKERT_ORIENTATION: {
|
|
23
|
+
horizontal: string;
|
|
24
|
+
vertical: string;
|
|
25
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/author/likertEntities.ts
|
|
2
|
+
var e = {
|
|
3
|
+
likert3: "likert3",
|
|
4
|
+
likert5: "likert5",
|
|
5
|
+
likert7: "likert7"
|
|
6
|
+
}, t = {
|
|
7
|
+
agreement: "agreement",
|
|
8
|
+
frequency: "frequency",
|
|
9
|
+
yesNo: "yesNo",
|
|
10
|
+
importance: "importance",
|
|
11
|
+
likelihood: "likelihood",
|
|
12
|
+
like: "like"
|
|
13
|
+
}, n = {
|
|
14
|
+
horizontal: "horizontal",
|
|
15
|
+
vertical: "vertical"
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { n as LIKERT_ORIENTATION, e as LIKERT_SCALE, t as LIKERT_TYPE };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/likert/configure/src/main.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare class Main extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
model: PropTypes.Validator<object>;
|
|
14
|
+
disableSidePanel: PropTypes.Requireable<boolean>;
|
|
15
|
+
onModelChanged: PropTypes.Validator<(...args: any[]) => any>;
|
|
16
|
+
onConfigurationChanged: PropTypes.Validator<(...args: any[]) => any>;
|
|
17
|
+
imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
18
|
+
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
19
|
+
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
20
|
+
}>>;
|
|
21
|
+
};
|
|
22
|
+
onChoiceChanged: any;
|
|
23
|
+
onPromptChanged: any;
|
|
24
|
+
onTeacherInstructionsChanged: any;
|
|
25
|
+
render(): React.JSX.Element;
|
|
26
|
+
}
|
|
27
|
+
export default Main;
|