@pie-element/likert 4.1.2-next.0 → 4.1.2-next.1
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/author/index.js +20 -20
- package/dist/author/main.js +109 -109
- package/dist/browser/Radio-CAjl01LA.js +13 -4
- package/dist/browser/author/index.js +5873 -7108
- package/dist/browser/author/index.js.map +1 -1
- package/dist/runtime-support.d.ts +12 -0
- package/dist/runtime-support.js +12 -0
- package/package.json +11 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignMergeValue.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMerge.js +0 -19
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMergeDeep.js +0 -31
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createAssigner.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_safeGet.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isPlainObject.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/merge.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toPlainObject.js +0 -8
package/dist/author/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import t from "./
|
|
3
|
-
import n from "
|
|
4
|
-
import r from "react";
|
|
5
|
-
import
|
|
6
|
-
import a from "
|
|
7
|
-
import {
|
|
1
|
+
import e from "./main.js";
|
|
2
|
+
import t from "./defaults.js";
|
|
3
|
+
import n from "react";
|
|
4
|
+
import { createRoot as r } from "react-dom/client";
|
|
5
|
+
import i from "debug";
|
|
6
|
+
import { DeleteSoundEvent as a, InsertSoundEvent as o, ModelUpdatedEvent as s } from "@pie-element/shared-configure-events";
|
|
7
|
+
import { defaults as c } from "@pie-element/shared-lodash";
|
|
8
8
|
//#region src/author/index.ts
|
|
9
|
-
var l =
|
|
10
|
-
configuration: e
|
|
11
|
-
model:
|
|
12
|
-
}), d = class
|
|
9
|
+
var l = i("likert:configure"), u = (e, n) => ({
|
|
10
|
+
configuration: c(e, t.configuration),
|
|
11
|
+
model: n
|
|
12
|
+
}), d = class i extends HTMLElement {
|
|
13
13
|
static createDefaultModel = (e = {}) => ({
|
|
14
|
-
...
|
|
14
|
+
...t.model,
|
|
15
15
|
...e,
|
|
16
16
|
choices: e && e.choices || []
|
|
17
17
|
});
|
|
18
18
|
constructor() {
|
|
19
|
-
super(), this._root = null, this._model =
|
|
19
|
+
super(), this._root = null, this._model = i.createDefaultModel(), this._configuration = t.configuration, this.onModelChanged = this.onModelChanged.bind(this), this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
20
20
|
}
|
|
21
|
-
set model(
|
|
22
|
-
this._model =
|
|
21
|
+
set model(e) {
|
|
22
|
+
this._model = i.createDefaultModel(e), this._model = {
|
|
23
23
|
...this._model,
|
|
24
24
|
choices: this._model.choices.map((e) => ({
|
|
25
25
|
...e,
|
|
@@ -36,7 +36,7 @@ var l = a("likert:configure"), u = (t, r) => ({
|
|
|
36
36
|
}
|
|
37
37
|
dispatchModelUpdated(e) {
|
|
38
38
|
let t = !!e;
|
|
39
|
-
this.dispatchEvent(new
|
|
39
|
+
this.dispatchEvent(new s(this._model, t));
|
|
40
40
|
}
|
|
41
41
|
onModelChanged(e, t) {
|
|
42
42
|
this._model = e, this._render(), this.dispatchModelUpdated(t);
|
|
@@ -45,14 +45,14 @@ var l = a("likert:configure"), u = (t, r) => ({
|
|
|
45
45
|
this._configuration = u(e, this._model).configuration, this._model && this.onModelChanged(this._model), this._render();
|
|
46
46
|
}
|
|
47
47
|
insertSound(e) {
|
|
48
|
-
this.dispatchEvent(new
|
|
48
|
+
this.dispatchEvent(new o(e));
|
|
49
49
|
}
|
|
50
50
|
onDeleteSound(e, t) {
|
|
51
|
-
this.dispatchEvent(new
|
|
51
|
+
this.dispatchEvent(new a(e, t));
|
|
52
52
|
}
|
|
53
53
|
_render() {
|
|
54
54
|
l("_render");
|
|
55
|
-
let
|
|
55
|
+
let t = n.createElement(e, {
|
|
56
56
|
model: this._model,
|
|
57
57
|
configuration: this._configuration,
|
|
58
58
|
onModelChanged: this.onModelChanged,
|
|
@@ -63,7 +63,7 @@ var l = a("likert:configure"), u = (t, r) => ({
|
|
|
63
63
|
delete: this.onDeleteSound.bind(this)
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
|
-
this._root ||=
|
|
66
|
+
this._root ||= r(this), this._root.render(t);
|
|
67
67
|
}
|
|
68
68
|
disconnectedCallback() {
|
|
69
69
|
this._root && this._root.unmount();
|
package/dist/author/main.js
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
3
|
-
import i from "
|
|
4
|
-
import a from "
|
|
5
|
-
import o from "
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import u from "@mui/material/
|
|
9
|
-
import
|
|
10
|
-
import f from "@
|
|
11
|
-
import p from "@
|
|
12
|
-
import m from "@
|
|
13
|
-
import {
|
|
1
|
+
import { LIKERT_ORIENTATION as e, LIKERT_SCALE as t, LIKERT_TYPE as n } from "./likertEntities.js";
|
|
2
|
+
import r from "./choiceGenerator.js";
|
|
3
|
+
import i from "react";
|
|
4
|
+
import a from "prop-types";
|
|
5
|
+
import { color as o } from "@pie-lib/render-ui";
|
|
6
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
+
import l from "@mui/material/FormControlLabel";
|
|
8
|
+
import { styled as u } from "@mui/material/styles";
|
|
9
|
+
import d from "@mui/material/Radio";
|
|
10
|
+
import f from "@pie-lib/editable-html-tip-tap";
|
|
11
|
+
import p from "@mui/material/RadioGroup";
|
|
12
|
+
import { InputContainer as m, NumberTextField as h, layout as g, settings as _ } from "@pie-lib/config-ui";
|
|
13
|
+
import { merge as v } from "@pie-element/shared-lodash";
|
|
14
14
|
//#region src/author/main.tsx
|
|
15
|
-
var { Panel: y, toggle: b, radio: x } =
|
|
15
|
+
var { Panel: y, toggle: b, radio: x } = _, S = u(m)(({ theme: e }) => ({
|
|
16
16
|
width: "100%",
|
|
17
17
|
paddingTop: e.spacing(2),
|
|
18
18
|
marginBottom: e.spacing(2)
|
|
19
|
-
})), C =
|
|
19
|
+
})), C = u("div")({
|
|
20
20
|
display: "flex",
|
|
21
21
|
flexDirection: "column"
|
|
22
|
-
}), w =
|
|
22
|
+
}), w = u("p")(({ theme: e }) => ({
|
|
23
23
|
color: e.palette.grey[400],
|
|
24
24
|
fontSize: e.typography.fontSize - 2
|
|
25
|
-
})), T =
|
|
25
|
+
})), T = u("div")(({ theme: e }) => ({
|
|
26
26
|
display: "flex",
|
|
27
27
|
width: "100%",
|
|
28
28
|
alignItems: "flex-start",
|
|
29
29
|
marginBottom: e.spacing(2)
|
|
30
|
-
})), E =
|
|
30
|
+
})), E = u("div")(({ theme: e }) => ({
|
|
31
31
|
display: "flex",
|
|
32
32
|
width: "100%",
|
|
33
33
|
justifyContent: "space-around",
|
|
34
34
|
marginBottom: e.spacing(2.5)
|
|
35
|
-
})), D =
|
|
35
|
+
})), D = u(m)({
|
|
36
36
|
width: "calc(100% - 200px)",
|
|
37
37
|
marginRight: 0
|
|
38
|
-
}), O =
|
|
38
|
+
}), O = u("p")(({ theme: e }) => ({
|
|
39
39
|
color: e.palette.error.main,
|
|
40
40
|
fontSize: e.typography.fontSize - 2
|
|
41
|
-
})), k =
|
|
41
|
+
})), k = u(h)({ width: "100%" }), A = u("div")({
|
|
42
42
|
display: "flex",
|
|
43
43
|
flexDirection: "row"
|
|
44
|
-
}), j =
|
|
44
|
+
}), j = u("div")(({ theme: e }) => ({
|
|
45
45
|
paddingLeft: e.spacing(2.5),
|
|
46
46
|
width: "150px"
|
|
47
|
-
})), M =
|
|
47
|
+
})), M = u(f)(({ theme: e }) => ({ paddingTop: e.spacing(2) })), N = u("span")(({ theme: e }) => ({
|
|
48
48
|
width: "30px",
|
|
49
49
|
paddingTop: e.spacing(4)
|
|
50
|
-
})), P =
|
|
50
|
+
})), P = u("div")(({ theme: e }) => ({
|
|
51
51
|
fontSize: e.typography.fontSize - 2,
|
|
52
52
|
color: e.palette.error.main,
|
|
53
53
|
paddingTop: e.spacing(1)
|
|
54
|
-
})), F = d
|
|
55
|
-
let { model: n, onChangeModel: r } =
|
|
56
|
-
return /* @__PURE__ */
|
|
54
|
+
})), F = u(d)({ color: `${o.tertiary()} !important` }), I = (t) => {
|
|
55
|
+
let { model: n, onChangeModel: r } = t;
|
|
56
|
+
return /* @__PURE__ */ c(C, { children: [/* @__PURE__ */ s(w, { children: "Likert Orientation" }), /* @__PURE__ */ c(p, {
|
|
57
57
|
"aria-label": "likertOrientation",
|
|
58
58
|
name: "likertOrientation",
|
|
59
59
|
value: n.likertOrientation,
|
|
@@ -64,98 +64,98 @@ var { Panel: y, toggle: b, radio: x } = v, S = d(h)(({ theme: e }) => ({
|
|
|
64
64
|
likertOrientation: t
|
|
65
65
|
});
|
|
66
66
|
},
|
|
67
|
-
children: [/* @__PURE__ */
|
|
68
|
-
value:
|
|
69
|
-
control: /* @__PURE__ */
|
|
67
|
+
children: [/* @__PURE__ */ s(l, {
|
|
68
|
+
value: e.horizontal,
|
|
69
|
+
control: /* @__PURE__ */ s(F, {}),
|
|
70
70
|
label: "Horizontal"
|
|
71
|
-
}), /* @__PURE__ */
|
|
72
|
-
value:
|
|
73
|
-
control: /* @__PURE__ */
|
|
71
|
+
}), /* @__PURE__ */ s(l, {
|
|
72
|
+
value: e.vertical,
|
|
73
|
+
control: /* @__PURE__ */ s(F, {}),
|
|
74
74
|
label: "Vertical"
|
|
75
75
|
})]
|
|
76
76
|
})] });
|
|
77
77
|
}, L = (e) => {
|
|
78
|
-
let { model:
|
|
79
|
-
return /* @__PURE__ */
|
|
78
|
+
let { model: n, onChangeModel: i } = e;
|
|
79
|
+
return /* @__PURE__ */ c(C, { children: [/* @__PURE__ */ s(w, { children: "Likert Scale" }), /* @__PURE__ */ c(p, {
|
|
80
80
|
"aria-label": "likertScale",
|
|
81
81
|
name: "likertScale",
|
|
82
|
-
value:
|
|
82
|
+
value: n.likertScale,
|
|
83
83
|
onChange: (e) => {
|
|
84
|
-
let
|
|
85
|
-
|
|
86
|
-
...
|
|
87
|
-
likertScale:
|
|
88
|
-
choices:
|
|
84
|
+
let t = e.target.value;
|
|
85
|
+
i({
|
|
86
|
+
...n,
|
|
87
|
+
likertScale: t,
|
|
88
|
+
choices: r(t, n.likertType)
|
|
89
89
|
});
|
|
90
90
|
},
|
|
91
91
|
children: [
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
value:
|
|
94
|
-
control: /* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ s(l, {
|
|
93
|
+
value: t.likert3,
|
|
94
|
+
control: /* @__PURE__ */ s(F, {}),
|
|
95
95
|
label: "Likert 3"
|
|
96
96
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
value:
|
|
99
|
-
control: /* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ s(l, {
|
|
98
|
+
value: t.likert5,
|
|
99
|
+
control: /* @__PURE__ */ s(F, {}),
|
|
100
100
|
label: "Likert 5"
|
|
101
101
|
}),
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
value:
|
|
104
|
-
control: /* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ s(l, {
|
|
103
|
+
value: t.likert7,
|
|
104
|
+
control: /* @__PURE__ */ s(F, {}),
|
|
105
105
|
label: "Likert 7"
|
|
106
106
|
})
|
|
107
107
|
]
|
|
108
108
|
})] });
|
|
109
109
|
}, R = (e) => {
|
|
110
|
-
let { model: t, onChangeModel:
|
|
111
|
-
let
|
|
112
|
-
|
|
110
|
+
let { model: t, onChangeModel: i } = e, a = (e) => {
|
|
111
|
+
let n = e.target.value;
|
|
112
|
+
i({
|
|
113
113
|
...t,
|
|
114
|
-
likertType:
|
|
115
|
-
choices:
|
|
114
|
+
likertType: n,
|
|
115
|
+
choices: r(t.likertScale, n)
|
|
116
116
|
});
|
|
117
117
|
};
|
|
118
|
-
return /* @__PURE__ */
|
|
118
|
+
return /* @__PURE__ */ c(C, { children: [/* @__PURE__ */ s(w, { children: "Label Type" }), /* @__PURE__ */ c(A, { children: [/* @__PURE__ */ c(p, {
|
|
119
119
|
"aria-label": "likertLabelType",
|
|
120
120
|
name: "likertLabelType",
|
|
121
121
|
value: t.likertType,
|
|
122
122
|
onChange: a,
|
|
123
123
|
children: [
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
value:
|
|
126
|
-
control: /* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ s(l, {
|
|
125
|
+
value: n.agreement,
|
|
126
|
+
control: /* @__PURE__ */ s(F, {}),
|
|
127
127
|
label: "Agreement"
|
|
128
128
|
}),
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
value:
|
|
131
|
-
control: /* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ s(l, {
|
|
130
|
+
value: n.frequency,
|
|
131
|
+
control: /* @__PURE__ */ s(F, {}),
|
|
132
132
|
label: "Frequency"
|
|
133
133
|
}),
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
value:
|
|
136
|
-
control: /* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ s(l, {
|
|
135
|
+
value: n.yesNo,
|
|
136
|
+
control: /* @__PURE__ */ s(F, {}),
|
|
137
137
|
label: "Yes/No"
|
|
138
138
|
})
|
|
139
139
|
]
|
|
140
|
-
}), /* @__PURE__ */
|
|
140
|
+
}), /* @__PURE__ */ c(p, {
|
|
141
141
|
"aria-label": "likertLabelType",
|
|
142
142
|
name: "likertLabelType",
|
|
143
143
|
value: t.likertType,
|
|
144
144
|
onChange: a,
|
|
145
145
|
children: [
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
value:
|
|
148
|
-
control: /* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ s(l, {
|
|
147
|
+
value: n.importance,
|
|
148
|
+
control: /* @__PURE__ */ s(F, {}),
|
|
149
149
|
label: "Importance"
|
|
150
150
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
value:
|
|
153
|
-
control: /* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ s(l, {
|
|
152
|
+
value: n.likelihood,
|
|
153
|
+
control: /* @__PURE__ */ s(F, {}),
|
|
154
154
|
label: "Likelihood"
|
|
155
155
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
value:
|
|
158
|
-
control: /* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ s(l, {
|
|
157
|
+
value: n.like,
|
|
158
|
+
control: /* @__PURE__ */ s(F, {}),
|
|
159
159
|
label: "Like"
|
|
160
160
|
})
|
|
161
161
|
]
|
|
@@ -167,16 +167,16 @@ var { Panel: y, toggle: b, radio: x } = v, S = d(h)(({ theme: e }) => ({
|
|
|
167
167
|
[r]: n[r] + 1
|
|
168
168
|
};
|
|
169
169
|
}, {}), B = (e) => {
|
|
170
|
-
let { configuration: t, imageSupport: n, model: r, onChangeModel: i, onChoiceChanged: a, onConfigurationChanged: o, onPromptChanged:
|
|
170
|
+
let { configuration: t, imageSupport: n, model: r, onChangeModel: i, onChoiceChanged: a, onConfigurationChanged: o, onPromptChanged: l, onTeacherInstructionsChanged: u, uploadSoundSupport: d } = e, { contentDimensions: p = {}, prompt: m = {}, scoringType: h = {}, settingsPanelDisabled: _, spellCheck: v = {}, teacherInstructions: C = {}, baseInputConfiguration: w = {}, likertChoice: A = {} } = t || {}, { errors: F = {}, extraCSSRules: B, spellCheckEnabled: V, teacherInstructionsEnabled: H } = r || {}, { prompt: U, teacherInstructions: W } = F, G = z(r), K = {
|
|
171
171
|
teacherInstructionsEnabled: C.settings && b(C.label),
|
|
172
172
|
spellCheckEnabled: v.settings && b(v.label),
|
|
173
173
|
scoringType: h.settings && x(h.label, ["auto", "rubric"])
|
|
174
174
|
}, q = (e = {}) => Object.assign({ ...w }, e || {});
|
|
175
|
-
return /* @__PURE__ */
|
|
175
|
+
return /* @__PURE__ */ c(g.ConfigLayout, {
|
|
176
176
|
extraCSSRules: B,
|
|
177
|
-
dimensions:
|
|
178
|
-
hideSettings:
|
|
179
|
-
settings: /* @__PURE__ */
|
|
177
|
+
dimensions: p,
|
|
178
|
+
hideSettings: _,
|
|
179
|
+
settings: /* @__PURE__ */ s(y, {
|
|
180
180
|
model: r,
|
|
181
181
|
onChangeModel: i,
|
|
182
182
|
configuration: t,
|
|
@@ -184,9 +184,9 @@ var { Panel: y, toggle: b, radio: x } = v, S = d(h)(({ theme: e }) => ({
|
|
|
184
184
|
groups: { Properties: K }
|
|
185
185
|
}),
|
|
186
186
|
children: [
|
|
187
|
-
H && /* @__PURE__ */
|
|
187
|
+
H && /* @__PURE__ */ c(S, {
|
|
188
188
|
label: C.label,
|
|
189
|
-
children: [/* @__PURE__ */
|
|
189
|
+
children: [/* @__PURE__ */ s(f, {
|
|
190
190
|
markup: r.teacherInstructions || "",
|
|
191
191
|
onChange: u,
|
|
192
192
|
imageSupport: n,
|
|
@@ -195,13 +195,13 @@ var { Panel: y, toggle: b, radio: x } = v, S = d(h)(({ theme: e }) => ({
|
|
|
195
195
|
spellCheck: V,
|
|
196
196
|
uploadSoundSupport: d,
|
|
197
197
|
pluginProps: q(C?.inputConfiguration)
|
|
198
|
-
}), W && /* @__PURE__ */
|
|
198
|
+
}), W && /* @__PURE__ */ s(P, { children: W })]
|
|
199
199
|
}),
|
|
200
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ c(S, {
|
|
201
201
|
label: m.label,
|
|
202
|
-
children: [/* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ s(f, {
|
|
203
203
|
markup: r.prompt,
|
|
204
|
-
onChange:
|
|
204
|
+
onChange: l,
|
|
205
205
|
imageSupport: n,
|
|
206
206
|
nonEmpty: !1,
|
|
207
207
|
error: U,
|
|
@@ -209,27 +209,27 @@ var { Panel: y, toggle: b, radio: x } = v, S = d(h)(({ theme: e }) => ({
|
|
|
209
209
|
disableUnderline: !0,
|
|
210
210
|
uploadSoundSupport: d,
|
|
211
211
|
pluginProps: q(m?.inputConfiguration)
|
|
212
|
-
}), U && /* @__PURE__ */
|
|
212
|
+
}), U && /* @__PURE__ */ s(P, { children: U })]
|
|
213
213
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ c(E, { children: [
|
|
215
|
+
/* @__PURE__ */ s(L, {
|
|
216
216
|
model: r,
|
|
217
217
|
onChangeModel: i
|
|
218
218
|
}),
|
|
219
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ s(R, {
|
|
220
220
|
model: r,
|
|
221
221
|
onChangeModel: i
|
|
222
222
|
}),
|
|
223
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ s(I, {
|
|
224
224
|
model: r,
|
|
225
225
|
onChangeModel: i
|
|
226
226
|
})
|
|
227
227
|
] }),
|
|
228
|
-
r.choices.map((e, t) => /* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
-
/* @__PURE__ */
|
|
228
|
+
r.choices.map((e, t) => /* @__PURE__ */ c(T, { children: [
|
|
229
|
+
/* @__PURE__ */ c(N, { children: [t + 1, "."] }),
|
|
230
|
+
/* @__PURE__ */ s(D, {
|
|
231
231
|
label: "Likert Label",
|
|
232
|
-
children: /* @__PURE__ */
|
|
232
|
+
children: /* @__PURE__ */ s(M, {
|
|
233
233
|
markup: e.label || "",
|
|
234
234
|
onChange: (n) => a(t, {
|
|
235
235
|
...e,
|
|
@@ -241,7 +241,7 @@ var { Panel: y, toggle: b, radio: x } = v, S = d(h)(({ theme: e }) => ({
|
|
|
241
241
|
pluginProps: q(A?.inputConfiguration)
|
|
242
242
|
})
|
|
243
243
|
}, `likert-label-${t}`),
|
|
244
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ c(j, { children: [/* @__PURE__ */ s(k, {
|
|
245
245
|
label: "Likert Value",
|
|
246
246
|
value: e.value,
|
|
247
247
|
max: 100,
|
|
@@ -253,24 +253,24 @@ var { Panel: y, toggle: b, radio: x } = v, S = d(h)(({ theme: e }) => ({
|
|
|
253
253
|
});
|
|
254
254
|
},
|
|
255
255
|
imageSupport: n
|
|
256
|
-
}), G[e.value] && G[e.value] > 1 && /* @__PURE__ */
|
|
256
|
+
}), G[e.value] && G[e.value] > 1 && /* @__PURE__ */ s(O, { children: "Value should be unique" })] })
|
|
257
257
|
] }, `choice-${t}`))
|
|
258
258
|
]
|
|
259
259
|
});
|
|
260
|
-
}, V = class extends
|
|
260
|
+
}, V = class extends i.Component {
|
|
261
261
|
static propTypes = {
|
|
262
|
-
model:
|
|
263
|
-
disableSidePanel:
|
|
264
|
-
onModelChanged:
|
|
265
|
-
onConfigurationChanged:
|
|
266
|
-
imageSupport:
|
|
267
|
-
add:
|
|
268
|
-
delete:
|
|
262
|
+
model: a.object.isRequired,
|
|
263
|
+
disableSidePanel: a.bool,
|
|
264
|
+
onModelChanged: a.func.isRequired,
|
|
265
|
+
onConfigurationChanged: a.func.isRequired,
|
|
266
|
+
imageSupport: a.shape({
|
|
267
|
+
add: a.func.isRequired,
|
|
268
|
+
delete: a.func.isRequired
|
|
269
269
|
})
|
|
270
270
|
};
|
|
271
|
-
onChoiceChanged = (
|
|
272
|
-
let { model:
|
|
273
|
-
|
|
271
|
+
onChoiceChanged = (e, t) => {
|
|
272
|
+
let { model: n, onModelChanged: r } = this.props;
|
|
273
|
+
n.choices = n.choices.map((e) => v({}, e)), n.choices.splice(e, 1, t), r(n);
|
|
274
274
|
};
|
|
275
275
|
onPromptChanged = (e) => {
|
|
276
276
|
this.props.onModelChanged({
|
|
@@ -285,7 +285,7 @@ var { Panel: y, toggle: b, radio: x } = v, S = d(h)(({ theme: e }) => ({
|
|
|
285
285
|
});
|
|
286
286
|
};
|
|
287
287
|
render() {
|
|
288
|
-
return /* @__PURE__ */
|
|
288
|
+
return /* @__PURE__ */ s(B, {
|
|
289
289
|
...this.props,
|
|
290
290
|
onChangeModel: this.props.onModelChanged,
|
|
291
291
|
onChoiceChanged: this.onChoiceChanged,
|
|
@@ -3,6 +3,18 @@ import t, { Children as n, Component as r, cloneElement as i, forwardRef as a, i
|
|
|
3
3
|
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
4
4
|
import * as d from "react-dom";
|
|
5
5
|
import f from "react-dom";
|
|
6
|
+
import * as __pieBrowserCjsReactRequire from "react";
|
|
7
|
+
const __pieBrowserCjsRequire = (specifier) => {
|
|
8
|
+
switch (specifier) {
|
|
9
|
+
case "react": return __pieBrowserCjsReactRequire;
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
default:
|
|
15
|
+
throw new Error(`Unsupported browser CJS require: ${specifier}`);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
6
18
|
//#region \0rolldown/runtime.js
|
|
7
19
|
var p = Object.create, m = Object.defineProperty, h = Object.getOwnPropertyDescriptor, g = Object.getOwnPropertyNames, _ = Object.getPrototypeOf, v = Object.prototype.hasOwnProperty, y = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), b = (e, t) => {
|
|
8
20
|
let n = {};
|
|
@@ -20,10 +32,7 @@ var p = Object.create, m = Object.defineProperty, h = Object.getOwnPropertyDescr
|
|
|
20
32
|
}, S = (e, t, n) => (n = e == null ? {} : p(_(e)), x(t || !e || !e.__esModule ? m(n, "default", {
|
|
21
33
|
value: e,
|
|
22
34
|
enumerable: !0
|
|
23
|
-
}) : n, e)), C = /* @__PURE__ */ ((
|
|
24
|
-
if (typeof require < "u") return require.apply(this, arguments);
|
|
25
|
-
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
26
|
-
}), w = /* @__PURE__ */ y(((e, t) => {
|
|
35
|
+
}) : n, e)), C = __pieBrowserCjsRequire, w = /* @__PURE__ */ y(((e, t) => {
|
|
27
36
|
t.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
28
37
|
})), T = /* @__PURE__ */ y(((e, t) => {
|
|
29
38
|
var n = w();
|